Class SWRLRuleTranslator
java.lang.Object
com.github.owlcs.ontapi.internal.BaseSearcher
com.github.owlcs.ontapi.internal.AxiomTranslator<org.semanticweb.owlapi.model.SWRLRule>
com.github.owlcs.ontapi.internal.axioms.SWRLRuleTranslator
- All Implemented Interfaces:
ObjectsSearcher<org.semanticweb.owlapi.model.SWRLRule>
A translator that provides
SWRLRule implementations.
All of them have type AxiomType.SWRL_RULE.
Specification: SWRL: A Semantic Web Rule Language Combining OWL and RuleML.
Created @ssz on 20.10.2016.
-
Nested Class Summary
Nested Classes -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionorg.apache.jena.util.iterator.ExtendedIterator<org.apache.jena.ontapi.model.OntStatement> listStatements(org.apache.jena.ontapi.model.OntModel model, AxiomsSettings config) Lists all statements from the base graph of the given model that match this axiom definition.booleantestStatement(org.apache.jena.ontapi.model.OntStatement statement, AxiomsSettings config) Tests if the specified statement answers the axiom definition.ONTObject<org.semanticweb.owlapi.model.SWRLRule> toAxiomImpl(org.apache.jena.ontapi.model.OntStatement statement, ModelObjectFactory factory, AxiomsSettings config) Creates an OWL Axiom impl from a statement.ONTObject<org.semanticweb.owlapi.model.SWRLRule> toAxiomWrap(org.apache.jena.ontapi.model.OntStatement statement, ONTObjectFactory factory, AxiomsSettings config) Creates an OWL Axiom wrapper from a statement.voidwrite(org.semanticweb.owlapi.model.SWRLRule axiom, org.apache.jena.ontapi.model.OntModel model) Writes the given axiom to the model.Methods inherited from class com.github.owlcs.ontapi.internal.AxiomTranslator
axioms, containsONTObject, findONTObject, get, getConfig, getObjectFactory, getSearchTriples, listAxioms, listONTObjects, listSearchStatements, listSearchStatements, statements, testStatement, toAxiom, toAxiomMethods inherited from class com.github.owlcs.ontapi.internal.BaseSearcher
getSystemResources, getTranslator, listByObject, listByPredicate, listByPredicateAndObject, listBySubject, listBySubjectAndPredicate, listStatements, listStatements, selectTranslators, split, toAxiom, translate
-
Constructor Details
-
SWRLRuleTranslator
public SWRLRuleTranslator()
-
-
Method Details
-
write
public void write(org.semanticweb.owlapi.model.SWRLRule axiom, org.apache.jena.ontapi.model.OntModel model) Description copied from class:AxiomTranslatorWrites the given axiom to the model.- Specified by:
writein classAxiomTranslator<org.semanticweb.owlapi.model.SWRLRule>- Parameters:
axiom-OWL-API axiom objectmodel-ONT-API Jena Model
-
listStatements
public org.apache.jena.util.iterator.ExtendedIterator<org.apache.jena.ontapi.model.OntStatement> listStatements(org.apache.jena.ontapi.model.OntModel model, AxiomsSettings config) Description copied from class:AxiomTranslatorLists all statements from the base graph of the given model that match this axiom definition.- Specified by:
listStatementsin classAxiomTranslator<org.semanticweb.owlapi.model.SWRLRule>- Parameters:
model-Ontology Jena Model, notnullconfig-AxiomsSettingscontrol settings, notnull- Returns:
ExtendedIteratorofOntStatements
-
testStatement
public boolean testStatement(org.apache.jena.ontapi.model.OntStatement statement, AxiomsSettings config) Description copied from class:AxiomTranslatorTests if the specified statement answers the axiom definition.- Specified by:
testStatementin classAxiomTranslator<org.semanticweb.owlapi.model.SWRLRule>- Parameters:
statement-OntStatementany statement, not necessarily localconfig-AxiomsSettingscontrol settings- Returns:
trueif the statement corresponds the axiom type
-
toAxiomImpl
public ONTObject<org.semanticweb.owlapi.model.SWRLRule> toAxiomImpl(org.apache.jena.ontapi.model.OntStatement statement, ModelObjectFactory factory, AxiomsSettings config) Description copied from class:AxiomTranslatorCreates an OWL Axiom impl from a statement. Impl note: the method returnsONTAxiomImplinstance that is attached to the model.- Specified by:
toAxiomImplin classAxiomTranslator<org.semanticweb.owlapi.model.SWRLRule>- Parameters:
statement-OntStatementthe statement which determines the axiomfactory-ModelObjectFactorythe data factory to create OWL-API objectsconfig-AxiomsSettingsto control the process- Returns:
ONTObjectaroundOWLAxiom
-
toAxiomWrap
public ONTObject<org.semanticweb.owlapi.model.SWRLRule> toAxiomWrap(org.apache.jena.ontapi.model.OntStatement statement, ONTObjectFactory factory, AxiomsSettings config) Description copied from class:AxiomTranslatorCreates an OWL Axiom wrapper from a statement. Impl note: the method returns a simpleONT Wrapperwith an actualAxiomTranslatorinstance inside, that is created by the system-wideData Factory.- Specified by:
toAxiomWrapin classAxiomTranslator<org.semanticweb.owlapi.model.SWRLRule>- Parameters:
statement-OntStatementthe statement which determines the axiomfactory-ONTObjectFactorythe data factory to create OWL-API objectsconfig-AxiomsSettingsto control the process- Returns:
ONTObjectaroundOWLAxiom
-