rdfs_rule_set — Adds the applicable facts of the graph into a rule set.


rdfs_rule_set ( in rule_name varchar ,
in graph_iri varchar ,
in remove integer );


This function associates a rule-name with a source named graphs identified by a named graph IRI. This named graph is contains RDF statements that constitute the desired inference rule to be created. You can use this procedure to add RDF statements from other named graphs as part as part of a rule-enhancement effort.



Rule name (literal that identifies the rule).


A named graph IRI that identifies the source of RDF statements to be used as inference rules,


(0|1 default 0) - where 1 indicates that the specified graph is to be removed from the rule set.


Example24.280.Simple Usage Example

Google and Bloomberg Stock Quote Services return HTML5+Microdata based Linked Open Data using terms from As will be quite common, there is a case sensitive issue in regards to the HTTP URIs that identify the "Financial Quote" class. For Bloomberg we have: <> and for Google: <> . What follows in an owl:equivalentProperty relation that enables a processor of this data (e.g., SPARQL Query Processor) apply reasoning and inference based on the semantics of the owl:equivalentProperty relation. Using Virtuoso's SPARQL processor, you can create an inference rule declaratively via rdfs_rule_set() :

-- Suppose a ttl file inference-rule-for-stock-quotes.ttl has the following content:
  owl:equivalentProperty <> .

-- Load the data to a Named Graph that's implicitly (in the case of Virtuoso)
-- identified by the RDF Document URL that contains the RDF statements that
-- constitute the rule being created
SQL> LOAD <> ;
Done. -- 15 msec.

-- Via SQL run the procedure:
SQL> RDFS_RULE_SET ('schema_stock_quotes', '');

Example24.281.Create Rule example

Create rule set and verify rule's existence:

SQL> rdfs_rule_set('myset', '');
Done. -- 15 msec.
RS_NAME                              RS_URI                                                         RS_G
VARCHAR NOT NULL                     VARCHAR NOT NULL                          VARCHAR
_______________________________________________________________________________          NULL            NULL
myset                                              NULL
virtrdf-ifp                          virtrdf-ifp                                                    NULL
virtrdf-label                        virtrdf-label                                                  NULL
virtrdf-meta-entity-class      NULL

7 Rows. -- 0 msec.