Ejemplo n.º 1
0
	def one_time_rules(self) :
		"""Adds some extra axioms and calls for the d_axiom part of the OWL Semantics."""
		for t in self.full_binding_triples : self.store_triple(t)

		# Note that the RL one time rules include the management of datatype which is a true superset
		# of the rules in RDFS. It is therefore unnecessary to add those even self.rdfs is True.
		OWLRL_Semantics.one_time_rules(self)
Ejemplo n.º 2
0
 def post_process(self):
     """
     Do some post-processing step. This method when all processing is done, but before handling possible
     errors (I.e., the method can add its own error messages). By default, this method is empty, subclasses
     can add content to it by overriding it.
     """
     OWLRL_Semantics.post_process(self)
Ejemplo n.º 3
0
    def one_time_rules(self):
        """Adds some extra axioms and calls for the d_axiom part of the OWL Semantics."""
        for t in self.full_binding_triples:
            self.store_triple(t)

        # Note that the RL one time rules include the management of datatype which is a true superset
        # of the rules in RDFS. It is therefore unnecessary to add those even self.rdfs is True.
        OWLRL_Semantics.one_time_rules(self)
Ejemplo n.º 4
0
	def rules(self, t, cycle_num) :
		"""
		@param t: a triple (in the form of a tuple)
		@param cycle_num: which cycle are we in, starting with 1. This value is forwarded to all local rules; it is also used
		locally to collect the bnodes in the graph.
		"""
		OWLRL_Semantics.rules(self, t, cycle_num)
		if self.rdfs: RDFS_Semantics.rules(self, t, cycle_num)
Ejemplo n.º 5
0
 def rules(self, t, cycle_num):
     """
     @param t: a triple (in the form of a tuple)
     @param cycle_num: which cycle are we in, starting with 1. This value is forwarded to all local rules; it is
     also used locally to collect the bnodes in the graph.
     """
     OWLRL_Semantics.rules(self, t, cycle_num)
     if self.rdfs:
         RDFS_Semantics.rules(self, t, cycle_num)
Ejemplo n.º 6
0
 def __init__(self, graph, axioms, daxioms, rdfs=True):
     """
     @param graph: the RDF graph to be extended
     @type graph: rdflib.Graph
     @param axioms: whether (non-datatype) axiomatic triples should be added or not
     @type axioms: bool
     @param daxioms: whether datatype axiomatic triples should be added or not
     @type daxioms: bool
     @param rdfs: placeholder flag (used in subclassed only, it is always defaulted to True in this class)
     @type rdfs: boolean
     """
     OWLRL_Semantics.__init__(self, graph, axioms, daxioms, rdfs)
     RDFS_Semantics.__init__(self, graph, axioms, daxioms, rdfs)
     self.rdfs = True
Ejemplo n.º 7
0
	def __init__(self, graph, axioms, daxioms, rdfs = True) :
		"""
		@param graph: the RDF graph to be extended
		@type graph: rdflib.Graph
		@param axioms: whether (non-datatype) axiomatic triples should be added or not
		@type axioms: Boolean
		@param daxioms: whether datatype axiomatic triples should be added or not
		@type daxioms: Boolean
		@param rdfs: placeholder flag (used in subclassed only, it is always defaulted to True in this class)
		@type rdfs: boolean
		"""
		OWLRL_Semantics.__init__(self, graph, axioms, daxioms, rdfs)
		RDFS_Semantics.__init__(self, graph, axioms, daxioms, rdfs)
		self.rdfs = True
Ejemplo n.º 8
0
 def add_d_axioms(self):
     if self.rdfs:
         RDFS_Semantics.add_d_axioms(self)
     OWLRL_Semantics.add_d_axioms(self)
Ejemplo n.º 9
0
 def add_d_axioms(self):
     if self.rdfs:
         CustomRDFSSemantics.add_d_axioms(self)
     OWLRL_Semantics.add_d_axioms(self)
Ejemplo n.º 10
0
 def __init__(self, graph, axioms, daxioms, rdfs=True):
     OWLRL_Semantics.__init__(self, graph, axioms, daxioms, rdfs)
     CustomRDFSSemantics.__init__(self, graph, axioms, daxioms, rdfs)
     self.rdfs = True
Ejemplo n.º 11
0
	def post_process(self) :
		"""Do some post-processing step. This method when all processing is done, but before handling possible
		errors (ie, the method can add its own error messages). By default, this method is empty, subclasses
		can add content to it by overriding it.
		"""
		OWLRL_Semantics.post_process(self)
Ejemplo n.º 12
0
	def add_d_axioms(self) :
		if self.rdfs: RDFS_Semantics.add_d_axioms(self)
		OWLRL_Semantics.add_d_axioms(self)