SEM_APIS.UPDATE_RDF_GRAPH

Format

SEM_APIS.UPDATE_RDF_GRAPH(
     apply_rdf_graph     IN VARCHAR2,
     update_stmt         IN CLOB,
     match_models        IN SEM_MODELS DEFAULT NULL,
     match_rulebases     IN SEM_RULEBASES DEFAULT NULL,
     match_index_status  IN VARCHAR2 DEFAULT NULL,
     match_options       IN VARCHAR2 DEFAULT NULL,
     options             IN VARCHAR2 DEFAULT NULL,
     network_owner       IN VARCHAR2 DEFAULT NULL,
     network_name        IN VARCHAR2 DEFAULT NULL);

Description

Executes a SPARQL update statement on an RDF graph.

Parameters

apply_rdf_graph

Name of the RDF graph to be updated. This is the name specified when the graph was created using the SEM_APIS.CREATE_RDF_GRAPH procedure.

It cannot be an RDF graph collection (see RDF Graph Collections) or an RDF view.

update_stmt

One or more SPARQL update commands to be executed on the apply_rdf_graph graph. Use the semicolon (;) to separate commands.

match_models

A list of RDF graphs that forms the SPARQL data set to query for graph pattern matching during a SPARQL update operation (INSERT WHERE, DELETE WHERE, COPY, MOVE, ADD). Can include RDF graph collections and/or RDF views If this parameter is not specified, the apply_rdf_graph graph is used.

match_rulebases

A list of rulebases to use with match_models to provide an inferred graph that generates additional triples or quads to use for graph pattern matching during a SPARQL update operation.

match_index_status

The desired status for any inferred graphs used for graph pattern matching during a SPARQL update operation.

match_options

String specifying hints to influence graph pattern matching during a SPARQL update operation. The set of hints that can be used here is identical to those that can be used in the options parameter of SEM_MATCH.

options

String specifying hints that affect SPARQL operations. See the Usage Notes for a list of available options.

network_owner

Owner of the RDF network. (See Table: network_owner and network_name Parameters.)

network_name

Name of the RDF network. (See Table: network_owner and network_name Parameters.)

Usage Notes

Before using this procedure, be sure you understand the material in Support for SPARQL Update Operations on an RDF Graph.

The options parameter can specify one or more of the following options:

You can override some options settings at the session level by using the MDSYS.SDO_SEM_UPDATE_CTX.SET_PARAM procedure, as explained in Setting UPDATE_RDF_GRAPH Options at the Session Level.

For information about RDF network types and options, see RDF Networks.

Examples

The following example inserts six triples into an RDF graph.

BEGIN
  sem_apis.update_rdf_graph('electronics',
   'PREFIX : <http://www.example.org/electronics/>
    INSERT DATA {
       :camera1 :name "Camera 1" .
       :camera1 :price 120 .
       :camera1 :cameraType :Camera .
       :camera2 :name "Camera 2" .
       :camera2 :price 150 .
       :camera2 :cameraType :Camera .
      } ');
END;
/