Beispiel #1
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:
         CustomRDFSSemantics.rules(self, t, cycle_num)
Beispiel #2
0
    def rules(self, t, cycle_num):
        """
        :param t: A triple (in the form of a tuple).
        :type t: 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.
        :type cycle_num: int
        """
        OWLRL_Semantics.rules(self, t, cycle_num)
        if self.rdfs:
            RDFS_Semantics.rules(self, t, cycle_num)
Beispiel #3
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
Beispiel #4
0
 def add_d_axioms(self):
     if self.rdfs:
         CustomRDFSSemantics.add_d_axioms(self)
     OWLRL_Semantics.add_d_axioms(self)
Beispiel #5
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)
Beispiel #6
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
Beispiel #7
0
 def add_d_axioms(self):
     if self.rdfs:
         RDFS_Semantics.add_d_axioms(self)
     OWLRL_Semantics.add_d_axioms(self)