Esempio n. 1
0
	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()
Esempio n. 2
0
	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()
Esempio n. 3
0
	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()
Esempio n. 4
0
	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()
Esempio n. 5
0
	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()
Esempio n. 6
0
	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()