Package RDFClosure :: Class DeductiveClosure
[hide private]
[frames] | no frames]

Class DeductiveClosure

source code

Entry point to generate the deductive closure of a graph. The exact choice deductive closure is controlled by a class reference. The important initialization parameter is the closure_class: a Class object referring to a subclass of Closure.Core. Although this package includes a number of such subclasses (OWLRL_Semantics, RDFS_Semantics, RDFS_OWLRL_Semantics, and OWLRL_Extension), the user can use his/her own if additional rules are implemented.

Note that owl:imports statements are not interpreted in this class, that has to be done beforehand on the graph that is to be expanded.

Instance Methods [hide private]
 
__init__(self, closure_class, improved_datatypes=True, rdfs_closure=False, axiomatic_triples=False, datatype_axioms=False) source code
 
expand(self, graph)
Expand the graph using forward chaining, and with the relevant closure type.
source code
Static Methods [hide private]
 
use_improved_datatypes_conversions()
Switch the system to use the improved datatype conversion routines.
source code
 
use_rdflib_datatypes_conversions()
Switch the system to use the generic (RDFLib) datatype conversion routines
source code
Class Variables [hide private]
boolean improved_datatype_generic = False
Whether the improved set of lexical-to-Python conversions should be used for datatype handling in general, ie, not only for a particular instance and not only for inference purposes.
Instance Variables [hide private]
boolean axiomatic_triples
Whether relevant axiomatic triples are added before chaining, except for datatype axiomatic triples.
Closure.Core closure_class
the class instance used to expand the graph
boolean datatype_axioms
Whether further datatype axiomatic triples are added to the output.
boolean rdfs_closure
Whether the RDFS closure should also be executed.
Method Details [hide private]

__init__(self, closure_class, improved_datatypes=True, rdfs_closure=False, axiomatic_triples=False, datatype_axioms=False)
(Constructor)

source code 
Parameters:
  • closure_class (subclass of Closure.Core) - a closure class reference.
  • rdfs_closure (boolean) - whether RDFS rules are executed or not
  • axiomatic_triples (boolean) - Whether relevant axiomatic triples are added before chaining, except for datatype axiomatic triples. Default: False.
  • datatype_axioms (boolean) - Whether further datatype axiomatic triples are added to the output. Default: false.
  • improved_datatypes (boolean) - Whether the improved set of lexical-to-Python conversions should be used for datatype handling. See the introduction for more details. Default: True.

expand(self, graph)

source code 

Expand the graph using forward chaining, and with the relevant closure type.

Parameters:
  • graph (rdflib.Graph) - the RDF graph

Class Variable Details [hide private]

improved_datatype_generic

Whether the improved set of lexical-to-Python conversions should be used for datatype handling in general, ie, not only for a particular instance and not only for inference purposes. Default: False.
Type:
boolean
Value:
False

Instance Variable Details [hide private]

axiomatic_triples

Whether relevant axiomatic triples are added before chaining, except for datatype axiomatic triples. Default: False.
Type:
boolean

datatype_axioms

Whether further datatype axiomatic triples are added to the output. Default: false.
Type:
boolean

rdfs_closure

Whether the RDFS closure should also be executed. Default: False.
Type:
boolean