18.8 SEM_RDFSA.SET_RESOURCE_LABEL
Format
SEM_RDFSA.SET_RESOURCE_LABEL( model_name IN VARCHAR2, resource_uri IN VARCHAR2, label_string IN VARCHAR2, resource_pos IN VARCHAR2 DEFAULT 'S', network_owner IN VARCHAR2 DEFAULT NULL, network_name IN VARCHAR2 DEFAULT NULL);
Description
Sets a sensitivity label for a resource that may be used in the subject and/or object position of a triple.
Parameters
- model_name
-
Name of the model to which the resource belongs, or the string
RDF$GLOBAL
if the same label should applied for using the resource in all models. - resource_uri
-
URI for the resource that may be used as subject or object in one or more triples.
- label_string
-
OLS row label in string representation.
- resource_pos
-
Position of the resource within a triple:
S
,O
, orS,O
. You can specify up to two separate labels for the same resource, one to be considered when the resource is used in the subject position of a triple and the other to be considered when it appears in the object position. The values 'S
', 'O
' or 'S,O
' set a label for the resource in subject, object or both subject and object positions, respectively. - network_owner
-
Owner of the semantic network. (See Table 1-2.)
- network_name
-
Name of the semantic network. (See Table 1-2.)
Usage Notes
If you specify a model name, you must have read access to the model and execute privileges on the SEM_RDFSA package to perform this operation. If you specify RDF$GLOBAL
, you must have FULL access privilege with the OLS policy applied to RDF data.
You must have access to the specified label and OLS policy privilege to overwrite an existing label if a label already exists for the predicate. The SECURE_PREDICATE option must be enabled for RDF data.
If an existing resource label is updated with this operation, the labels for the triples using this resource in the specified position must all dominate the new resource label. The only exception is when the OPT_RELAX_TRIPLE_LABEL option is chosen for the OLS-enabled RDF data.
If you specify RDF$GLOBAL
, a global resource with a unique sensitivity label across models is created. If the same resource is previously defined in one or more models with the same triple position, the global label dominates all such labels and the model-specific labels are replaced for the given resource in that position.
After a label for a predicate is set, new triples using the resource in the specified position can be added only if the triple label dominates the resource's sensitivity label. This dominance relationship can be relaxed with OPT_RELAX_TRIPLE_LABEL option, in which case, the user should at least have read access to the resource.
For information about support for OLS, see Fine-Grained Access Control for RDF Data.
For information about semantic network types and options, see RDF Networks.
Examples
The following example sets sensitivity labels for multiple resources based on their position.
begin sem_rdfsa.set_resource_label( model_name => 'contracts', resource_uri => '<http://www.myorg.com/contract/projectHLS>', label_string => 'SE:US_SPCL:US', resource_pos => 'S,O'); end; / begin sem_rdfsa.set_resource_label( model_name => 'rdf$global', resource_uri => '<http://www.myorg.com/contract/status/Complete>', label_string => 'SE:US_SPCL:US', resource_pos => 'O'); end; /
Parent topic: SEM_RDFSA Package Subprograms