def expand(self, graph) : """ Expand the graph using forward chaining, and with the relevant closure type. @param graph: the RDF graph @type graph: rdflib.Graph """ if DeductiveClosure.improved_datatype_generic == False and self.improved_datatypes == True : DatatypeHandling.use_Alt_lexical_conversions() if self.closure_class is not None : self.closure_class(graph, self.axiomatic_triples, self.datatype_axioms, self.rdfs_closure).closure() if DeductiveClosure.improved_datatype_generic == False and self.improved_datatypes == True : DatatypeHandling.use_RDFLib_lexical_conversions()
def expand(self, graph) : """ Expand the graph using forward chaining, and with the relevant closure type. @param graph: the RDF graph @type graph: rdflib.Graph """ if (not DeductiveClosure.improved_datatype_generic) and self.improved_datatypes: DatatypeHandling.use_Alt_lexical_conversions() if self.closure_class is not None: self.closure_class(graph, self.axiomatic_triples, self.datatype_axioms, self.rdfs_closure).closure() if (not DeductiveClosure.improved_datatype_generic) and self.improved_datatypes: DatatypeHandling.use_RDFLib_lexical_conversions()
def use_rdflib_datatypes_conversions(self) : """ Switch the system to use the generic (RDFLib) datatype conversion routines """ DeductiveClosure.improved_datatype_generic = False DatatypeHandling.use_RDFLib_lexical_conversions()
def use_improved_datatypes_conversions(self) : """ Switch the system to use the improved datatype conversion routines. """ DeductiveClosure.improved_datatype_generic = True DatatypeHandling.use_Alt_lexical_conversions()
def use_rdflib_datatypes_conversions(): """ Switch the system to use the generic (RDFLib) datatype conversion routines """ DeductiveClosure.improved_datatype_generic = False DatatypeHandling.use_RDFLib_lexical_conversions()
def use_improved_datatypes_conversions(): """ Switch the system to use the improved datatype conversion routines. """ DeductiveClosure.improved_datatype_generic = True DatatypeHandling.use_Alt_lexical_conversions()