Package RDFClosure :: Module OWLRLExtras :: Class OWLRL_Extension_Trimming
[hide private]
[frames] | no frames]

Class OWLRL_Extension_Trimming

source code

                Closure.Core --+            
                               |            
      RDFSClosure.RDFS_Semantics --+        
                                   |        
                Closure.Core --+   |        
                               |   |        
           OWLRL.OWLRL_Semantics --+        
                                   |        
CombinedClosure.RDFS_OWLRL_Semantics --+    
                                       |    
                         OWLRL_Extension --+
                                           |
                                          OWLRL_Extension_Trimming

This Class adds only one feature to OWLRL_Extension: to initialize with a trimming flag set to True by default.

This is pretty experimental and probably contentious: this class removes a number of triples from the Graph at the very end of the processing steps. These triples are either the by-products of the deductive closure calculation or are axiom like triples that are added following the rules of OWL 2 RL. While these triples are necessary for the correct inference of really 'useful' triples, they may not be of interest for the application for the end result. The triples that are removed are of the form (following a SPARQL-like notation):

Trimming is the only feature of this class, done in the post_process step. If users extend OWLRL_Extension, this class can be safely mixed in via multiple inheritance.

Instance Methods [hide private]
 
__init__(self, graph, axioms, daxioms, rdfs=False) source code
 
post_process(self)
Do some post-processing step performing the trimming of the graph.
source code

Inherited from OWLRL_Extension: add_axioms, one_time_rules, restriction_typing_check, rules

Inherited from CombinedClosure.RDFS_OWLRL_Semantics: add_d_axioms

Inherited from Closure.Core: add_error, closure, empty_stored_triples, flush_stored_triples, get_literal_value, pre_process, store_triple

Static Methods [hide private]

Inherited from CombinedClosure.RDFS_OWLRL_Semantics: add_new_datatype

Class Variables [hide private]

Inherited from OWLRL_Extension: extra_axioms

Instance Variables [hide private]

Inherited from OWLRL_Extension: restricted_datatypes

Inherited from CombinedClosure.RDFS_OWLRL_Semantics: full_binding_triples, rdfs

Inherited from Closure.Core: IMaxNum, added_triples, axioms, daxioms, error_messages, graph, literal_proxies

Method Details [hide private]

__init__(self, graph, axioms, daxioms, rdfs=False)
(Constructor)

source code 
Parameters:
  • graph (rdflib.Graph) - the RDF graph to be extended
  • axioms (Boolean) - whether (non-datatype) axiomatic triples should be added or not
  • daxioms (Boolean) - whether datatype axiomatic triples should be added or not
  • rdfs (boolean) - whether RDFS extension is done
Overrides: OWLRL.OWLRL_Semantics.__init__

post_process(self)

source code 

Do some post-processing step performing the trimming of the graph. See the class description for further details.

Overrides: OWLRL.OWLRL_Semantics.post_process