17.4 SEM_RDFCTX.MAINTAIN_TRIPLES
Format
SEM_RDFCTX.MAINTAIN_TRIPLES( index_name IN VARCHAR2, where_clause IN VARCHAR2, rdfxml_content IN sys.XMLType, policy_name IN VARCHAR2 DEFAULT NULL, action IN VARCHAR2 DEFAULT 'ADD', network_owner IN VARCHAR2 DEFAULT NULL, network_name IN VARCHAR2 DEFAULT NULL);
Description
Adds one or more triples to graphs that contain information extracted from specific documents.
Parameters
- index_name
-
Name of the semantic index for documents.
- where_clause
-
A SQL predicate (WHERE clause text without the
WHERE
keyword) on the table in which the documents are stored, to identify the rows for which to maintain the index. - rdfxml_content
-
Triples, in the form of an RDF/XML document, to be added to the individual graphs corresponding to the documents.
- policy_name
-
Name of the extractor policy. If
policy_name
is null (the default), the triples are added to the information extracted by the default (or the only) extractor policy for the index; if you specify a policy name, the triples are added to the information extracted by that policy. - action
-
Type of maintenance operation to perform on the triples. The only value currently supported in
ADD
(the default), which adds the triples that are specified in therdfxml_content
parameter. - network_owner
-
Owner of the semantic network. (See Table 1-2.)
- network_name
-
Name of the semantic network. (See Table 1-2.)
Usage Notes
The information extracted from the semantically indexed documents may be incomplete and lacking in proper context. This procedure enables a domain expect to add triples to individual graphs pertaining to specific semantically indexed documents, so that all subsequent SEM_CONTAINS queries can consider these triples in their document search criteria.
This procedure accepts the index name and WHERE clause text to identify the specific documents to be annotated with the additional triples. For example, the where_clause might be specified as a simple predicate involving numeric data, such as 'docId IN (1,2,3)'
.
For information about semantic network types and options, see RDF Networks.
Examples
The following example annotates a specific document with the semantic index ArticleIndex
by adding triples to the corresponding individual graph.
begin sem_rdfctx.maintain_triples( index_name => 'ArticleIndex', where_clause => 'docid = 15', rdfxml_content => sys.xmltype( '<rdf:RDF xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:rdfs="http://www.w3.org/2000/01/rdf-schema#" xmlns:pred="http://myorg.com/pred/"> <rdf:Description rdf:about=" http://newscorp.com/Org/ExampleCorp"> <pred:hasShortName rdf:datatype="http://www.w3.org/2001/XMLSchema#string"> Example </pred:hasShortName> </rdf:Description> </rdf:RDF>')); end; /
Parent topic: SEM_RDFCTX Package Subprograms