Class AbstractSubPropertyTranslator<Axiom extends org.semanticweb.owlapi.model.OWLAxiom,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.AbstractSubPropertyTranslator<Axiom,P>
All Implemented Interfaces:
ObjectsSearcher<Axiom>
Direct Known Subclasses:
SubAnnotationPropertyOfTranslator, SubDataPropertyOfTranslator, SubObjectPropertyOfTranslator

public abstract class AbstractSubPropertyTranslator<Axiom extends org.semanticweb.owlapi.model.OWLAxiom,P extends org.apache.jena.ontapi.model.OntProperty> extends AxiomTranslator<Axiom>
The base class for SubObjectPropertyOfTranslator, SubDataPropertyOfTranslator and SubAnnotationPropertyOfTranslator. Example: foaf:msnChatID rdfs:subPropertyOf foaf:nick .

Created by @ssz on 30.09.2016.

  • Constructor Details

    • AbstractSubPropertyTranslator

      public AbstractSubPropertyTranslator()
  • Method Details

    • 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: AxiomTranslator
      Lists all statements from the base graph of the given model that match this axiom definition.
      Specified by:
      listStatements in class AxiomTranslator<Axiom extends org.semanticweb.owlapi.model.OWLAxiom>
      Parameters:
      model - Ontology Jena Model, not null
      config - AxiomsSettings control settings, not null
      Returns:
      ExtendedIterator of OntStatements
    • 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: AxiomTranslator
      Tests if the specified statement answers the axiom definition.
      Specified by:
      testStatement in class AxiomTranslator<Axiom extends org.semanticweb.owlapi.model.OWLAxiom>
      Parameters:
      statement - OntStatement any statement, not necessarily local
      config - AxiomsSettings control settings
      Returns:
      true if the statement corresponds the axiom type
    • write

      public void write(Axiom axiom, org.apache.jena.ontapi.model.OntModel model)
      Description copied from class: AxiomTranslator
      Writes the given axiom to the model.
      Specified by:
      write in class AxiomTranslator<Axiom extends org.semanticweb.owlapi.model.OWLAxiom>
      Parameters:
      axiom - OWL-API axiom object
      model - ONT-API Jena Model
    • getSearchTriples

      protected final Collection<org.apache.jena.graph.Triple> getSearchTriples(Axiom axiom)
      Description copied from class: AxiomTranslator
      Returns a collection of triples 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:
      getSearchTriples in class AxiomTranslator<Axiom extends org.semanticweb.owlapi.model.OWLAxiom>
      Parameters:
      axiom - AxiomTranslator to extract triples, not null
      Returns:
      a Collection of Triples, can be empty