Class AbstractPropertyDomainTranslator<Axiom extends org.semanticweb.owlapi.model.OWLAxiom & org.semanticweb.owlapi.model.HasDomain<? extends org.semanticweb.owlapi.model.OWLObject> & org.semanticweb.owlapi.model.HasProperty<? extends org.semanticweb.owlapi.model.OWLPropertyExpression>,P extends org.apache.jena.ontapi.model.OntProperty>
java.lang.Object
com.github.owlcs.ontapi.internal.BaseSearcher
com.github.owlcs.ontapi.internal.AxiomTranslator<Axiom>
com.github.owlcs.ontapi.internal.axioms.AbstractPropertyDomainTranslator<Axiom,P>
- All Implemented Interfaces:
ObjectsSearcher<Axiom>
- Direct Known Subclasses:
AnnotationPropertyDomainTranslator,DataPropertyDomainTranslator,ObjectPropertyDomainTranslator
public abstract class AbstractPropertyDomainTranslator<Axiom extends org.semanticweb.owlapi.model.OWLAxiom & org.semanticweb.owlapi.model.HasDomain<? extends org.semanticweb.owlapi.model.OWLObject> & org.semanticweb.owlapi.model.HasProperty<? extends org.semanticweb.owlapi.model.OWLPropertyExpression>,P extends org.apache.jena.ontapi.model.OntProperty>
extends AxiomTranslator<Axiom>
The base class for
ObjectPropertyDomainTranslator,
DataPropertyDomainTranslator and AnnotationPropertyDomainTranslator axioms.
There are 3 domain axioms:
- object property domain
P rdfs:domain C - data property domain
R rdfs:domain C - annotation property domain
A rdfs:domain U
U- IRIA- annotation propertyR- data propertyP- object property expressionC- class expression
Created by @ssz on 30.09.2016.
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionprotected static classAbstractPropertyDomainTranslator.ClassDomainAxiomImpl<A extends org.semanticweb.owlapi.model.OWLAxiom & org.semanticweb.owlapi.model.HasProperty<P> & org.semanticweb.owlapi.model.HasDomain<org.semanticweb.owlapi.model.OWLClassExpression>,P extends org.semanticweb.owlapi.model.OWLPropertyExpression> protected static classAbstractPropertyDomainTranslator.DomainAxiomImpl<A extends org.semanticweb.owlapi.model.OWLAxiom & org.semanticweb.owlapi.model.HasProperty<P> & org.semanticweb.owlapi.model.HasDomain<D>,P extends org.semanticweb.owlapi.model.OWLPropertyExpression, D extends org.semanticweb.owlapi.model.OWLObject> -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected booleanfilter(org.apache.jena.ontapi.model.OntStatement statement, AxiomsSettings config) protected final Collection<org.apache.jena.graph.Triple> getSearchTriples(Axiom axiom) Returns a collection oftriples for search optimization.org.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.voidWrites the given axiom to the model.Methods inherited from class com.github.owlcs.ontapi.internal.AxiomTranslator
axioms, containsONTObject, findONTObject, get, getConfig, getObjectFactory, listAxioms, listONTObjects, listSearchStatements, listSearchStatements, statements, testStatement, toAxiom, toAxiom, toAxiomImpl, toAxiomWrapMethods inherited from class com.github.owlcs.ontapi.internal.BaseSearcher
getSystemResources, getTranslator, listByObject, listByPredicate, listByPredicateAndObject, listBySubject, listBySubjectAndPredicate, listStatements, listStatements, selectTranslators, split, toAxiom, translate
-
Constructor Details
-
AbstractPropertyDomainTranslator
public AbstractPropertyDomainTranslator()
-
-
Method Details
-
write
Description copied from class:AxiomTranslatorWrites the given axiom to the model.- Specified by:
writein classAxiomTranslator<Axiom extends org.semanticweb.owlapi.model.OWLAxiom & org.semanticweb.owlapi.model.HasDomain<? extends org.semanticweb.owlapi.model.OWLObject> & org.semanticweb.owlapi.model.HasProperty<? extends org.semanticweb.owlapi.model.OWLPropertyExpression>>- 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<Axiom extends org.semanticweb.owlapi.model.OWLAxiom & org.semanticweb.owlapi.model.HasDomain<? extends org.semanticweb.owlapi.model.OWLObject> & org.semanticweb.owlapi.model.HasProperty<? extends org.semanticweb.owlapi.model.OWLPropertyExpression>>- Parameters:
model-Ontology Jena Model, notnullconfig-AxiomsSettingscontrol settings, notnull- Returns:
ExtendedIteratorofOntStatements
-
filter
protected boolean filter(org.apache.jena.ontapi.model.OntStatement statement, AxiomsSettings config) -
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<Axiom extends org.semanticweb.owlapi.model.OWLAxiom & org.semanticweb.owlapi.model.HasDomain<? extends org.semanticweb.owlapi.model.OWLObject> & org.semanticweb.owlapi.model.HasProperty<? extends org.semanticweb.owlapi.model.OWLPropertyExpression>>- Parameters:
statement-OntStatementany statement, not necessarily localconfig-AxiomsSettingscontrol settings- Returns:
trueif the statement corresponds the axiom type
-
getSearchTriples
Description copied from class:AxiomTranslatorReturns a collection oftriples for search optimization. Usually, each of the returned triples has a URI-subject and URI-object. This is a helper method to optimize searching on a direct model (i.e., when there is no internal cache).- Overrides:
getSearchTriplesin classAxiomTranslator<Axiom extends org.semanticweb.owlapi.model.OWLAxiom>- Parameters:
axiom-AxiomTranslatorto extract triples, notnull- Returns:
- a
CollectionofTriples, can be empty
-