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)
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)
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)
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)
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)
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
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
def add_d_axioms(self): if self.rdfs: RDFS_Semantics.add_d_axioms(self) OWLRL_Semantics.add_d_axioms(self)
def add_d_axioms(self): if self.rdfs: CustomRDFSSemantics.add_d_axioms(self) OWLRL_Semantics.add_d_axioms(self)
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
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)
def add_d_axioms(self) : if self.rdfs: RDFS_Semantics.add_d_axioms(self) OWLRL_Semantics.add_d_axioms(self)