Class EquivalentObjectPropertiesTranslator.AxiomImpl

java.lang.Object
com.github.owlcs.ontapi.owlapi.OWLObjectImpl
com.github.owlcs.ontapi.internal.objects.ONTObjectImpl
com.github.owlcs.ontapi.internal.objects.ONTStatementImpl
com.github.owlcs.ontapi.internal.objects.ONTAxiomImpl<org.semanticweb.owlapi.model.OWLEquivalentObjectPropertiesAxiom>
com.github.owlcs.ontapi.internal.axioms.AbstractNaryTranslator.NaryAxiomImpl<org.semanticweb.owlapi.model.OWLEquivalentObjectPropertiesAxiom,org.semanticweb.owlapi.model.OWLObjectPropertyExpression>
com.github.owlcs.ontapi.internal.axioms.AbstractNaryTranslator.ObjectPropertyNaryAxiomImpl<org.semanticweb.owlapi.model.OWLEquivalentObjectPropertiesAxiom>
com.github.owlcs.ontapi.internal.axioms.EquivalentObjectPropertiesTranslator.AxiomImpl
All Implemented Interfaces:
HasConfig, HasObjectFactory, AsStatement, ModelObject<org.semanticweb.owlapi.model.OWLEquivalentObjectPropertiesAxiom>, ONTComposite, WithAnnotations, ONTObject<org.semanticweb.owlapi.model.OWLEquivalentObjectPropertiesAxiom>, WithMerge<ONTObject<org.semanticweb.owlapi.model.OWLEquivalentObjectPropertiesAxiom>>, Serializable, Comparable<org.semanticweb.owlapi.model.OWLObject>, org.apache.jena.graph.FrontsTriple, org.semanticweb.owlapi.model.HasAnnotationPropertiesInSignature, org.semanticweb.owlapi.model.HasAnnotations, org.semanticweb.owlapi.model.HasAnonymousIndividuals, org.semanticweb.owlapi.model.HasClassesInSignature, org.semanticweb.owlapi.model.HasComponents, org.semanticweb.owlapi.model.HasContainsEntityInSignature, org.semanticweb.owlapi.model.HasDataPropertiesInSignature, org.semanticweb.owlapi.model.HasDatatypesInSignature, org.semanticweb.owlapi.model.HasHashIndex, org.semanticweb.owlapi.model.HasIndex, org.semanticweb.owlapi.model.HasIndividualsInSignature, org.semanticweb.owlapi.model.HasObjectPropertiesInSignature, org.semanticweb.owlapi.model.HasOperands<org.semanticweb.owlapi.model.OWLObjectPropertyExpression>, org.semanticweb.owlapi.model.HasSignature, org.semanticweb.owlapi.model.IsAnonymous, org.semanticweb.owlapi.model.OWLAxiom, org.semanticweb.owlapi.model.OWLEquivalentObjectPropertiesAxiom, org.semanticweb.owlapi.model.OWLLogicalAxiom, org.semanticweb.owlapi.model.OWLNaryAxiom<org.semanticweb.owlapi.model.OWLObjectPropertyExpression>, org.semanticweb.owlapi.model.OWLNaryPropertyAxiom<org.semanticweb.owlapi.model.OWLObjectPropertyExpression>, org.semanticweb.owlapi.model.OWLObject, org.semanticweb.owlapi.model.OWLObjectPropertyAxiom, org.semanticweb.owlapi.model.OWLPropertyAxiom
Direct Known Subclasses:
EquivalentObjectPropertiesTranslator.AxiomImpl.ComplexImpl, EquivalentObjectPropertiesTranslator.AxiomImpl.SimpleImpl
Enclosing class:
EquivalentObjectPropertiesTranslator

public abstract static class EquivalentObjectPropertiesTranslator.AxiomImpl extends AbstractNaryTranslator.ObjectPropertyNaryAxiomImpl<org.semanticweb.owlapi.model.OWLEquivalentObjectPropertiesAxiom> implements org.semanticweb.owlapi.model.OWLEquivalentObjectPropertiesAxiom
See Also:
  • Constructor Details

    • AxiomImpl

      protected AxiomImpl(org.apache.jena.graph.Triple t, Supplier<org.apache.jena.ontapi.model.OntModel> m)
    • AxiomImpl

      protected AxiomImpl(Object s, String p, Object o, Supplier<org.apache.jena.ontapi.model.OntModel> m)
  • Method Details

    • create

      public static EquivalentObjectPropertiesTranslator.AxiomImpl create(org.apache.jena.ontapi.model.OntStatement statement, ModelObjectFactory factory, AxiomsSettings config)
      Creates an ONTObject container, that is also OWLEquivalentObjectPropertiesAxiom.
      Parameters:
      statement - OntStatement, not null
      factory - ONTObjectFactory, not null
      config - AxiomsSettings, not null
      Returns:
      EquivalentObjectPropertiesTranslator.AxiomImpl
    • count

      protected final long count()
      Description copied from class: AbstractNaryTranslator.NaryAxiomImpl
      Returns the number of components. For single-triple axioms (i.e. a with predicate such as owl:sameAs, owl:equivalentClass) the method returns 2. Only n-ary axioms which are based on OntDisjoint resource can different members count.
      Specified by:
      count in class AbstractNaryTranslator.NaryAxiomImpl<org.semanticweb.owlapi.model.OWLEquivalentObjectPropertiesAxiom,org.semanticweb.owlapi.model.OWLObjectPropertyExpression>
      Returns:
      long
    • createAxiom

      protected org.semanticweb.owlapi.model.OWLEquivalentObjectPropertiesAxiom createAxiom(Collection<org.semanticweb.owlapi.model.OWLObjectPropertyExpression> members, Collection<org.semanticweb.owlapi.model.OWLAnnotation> annotations)
      Description copied from class: AbstractNaryTranslator.NaryAxiomImpl
      Creates a factory instance of AbstractNaryTranslator.NaryAxiomImpl.
      Specified by:
      createAxiom in class AbstractNaryTranslator.NaryAxiomImpl<org.semanticweb.owlapi.model.OWLEquivalentObjectPropertiesAxiom,org.semanticweb.owlapi.model.OWLObjectPropertyExpression>
      Parameters:
      members - a Collection of AbstractNaryTranslator.NaryAxiomImpl-members, not null
      annotations - a Collection of OWLAnnotations, can be null
      Returns:
      AbstractNaryTranslator.NaryAxiomImpl
    • createSubPropertyOf

      protected org.semanticweb.owlapi.model.OWLSubObjectPropertyOfAxiom createSubPropertyOf(org.semanticweb.owlapi.model.OWLObjectPropertyExpression a, org.semanticweb.owlapi.model.OWLObjectPropertyExpression b)
    • asSubObjectPropertyOfAxioms

      public Collection<org.semanticweb.owlapi.model.OWLSubObjectPropertyOfAxiom> asSubObjectPropertyOfAxioms()
      Specified by:
      asSubObjectPropertyOfAxioms in interface org.semanticweb.owlapi.model.OWLEquivalentObjectPropertiesAxiom
    • properties

      public Stream<org.semanticweb.owlapi.model.OWLObjectPropertyExpression> properties()
      Specified by:
      properties in interface org.semanticweb.owlapi.model.OWLNaryPropertyAxiom<A extends org.semanticweb.owlapi.model.OWLNaryPropertyAxiom<P>>
    • getPropertiesMinus

      public Set<org.semanticweb.owlapi.model.OWLObjectPropertyExpression> getPropertiesMinus(org.semanticweb.owlapi.model.OWLObjectPropertyExpression property)
      Specified by:
      getPropertiesMinus in interface org.semanticweb.owlapi.model.OWLNaryPropertyAxiom<A extends org.semanticweb.owlapi.model.OWLNaryPropertyAxiom<P>>
    • canContainNamedClasses

      public final boolean canContainNamedClasses()
      Description copied from interface: ONTComposite
      Answers true if this object-container is allowed to contain (named) OWL classes.
      Specified by:
      canContainNamedClasses in interface ONTComposite
      Returns:
      boolean
    • canContainClassExpressions

      public final boolean canContainClassExpressions()
      Description copied from interface: ONTComposite
      Answers true if this object-container is allowed to contain nested class-expressions.
      Specified by:
      canContainClassExpressions in interface ONTComposite
      Returns:
      boolean
    • canContainNamedIndividuals

      public final boolean canContainNamedIndividuals()
      Description copied from interface: ONTComposite
      Answers true if this object-container is allowed to contain named individuals.
      Specified by:
      canContainNamedIndividuals in interface ONTComposite
      Returns:
      boolean
    • canContainDatatypes

      public final boolean canContainDatatypes()
      Description copied from interface: ONTComposite
      Answers true if this object-container may contain datatypes.
      Specified by:
      canContainDatatypes in interface ONTComposite
      Returns:
      boolean
    • canContainAnonymousIndividuals

      public final boolean canContainAnonymousIndividuals()
      Description copied from interface: ONTComposite
      Answers true if this object-container is allowed to contain anonymous individuals.
      Specified by:
      canContainAnonymousIndividuals in interface ONTComposite
      Returns:
      boolean
    • sorted

      Stream<ONTObject<? extends org.semanticweb.owlapi.model.OWLObjectPropertyExpression>> sorted(ModelObjectFactory factory)
      Returns a sorted and distinct Stream over all components (annotations are not included).
      Parameters:
      factory - ModelObjectFactory, not null
      Returns:
      a Stream of ONTObjects that wrap WithManyObjectss
    • members

      Stream<ONTObject<? extends org.semanticweb.owlapi.model.OWLObjectPropertyExpression>> members(ModelObjectFactory factory)
      Lists all components of this axiom.
      Parameters:
      factory - ModelObjectFactory, not null
      Returns:
      a Stream of ONTObjects that wrap WithManyObjectss
    • objects

      Stream<ONTObject<? extends org.semanticweb.owlapi.model.OWLObject>> objects(ModelObjectFactory factory)
      Lists all components and annotations of this axiom.
      Parameters:
      factory - ModelObjectFactory, not null
      Returns:
      a Stream of ONTObjects that wrap either WithManyObjectss or OWLAnnotations
    • fetchONTComponents

      default Set<ONTObject<? extends org.semanticweb.owlapi.model.OWLObjectPropertyExpression>> fetchONTComponents(org.apache.jena.ontapi.model.OntStatement statement, ModelObjectFactory factory)
      Gets all components (as ONTObjects) in the form of sorted Set.
      Parameters:
      statement - OntStatement, the source, not null
      factory - ModelObjectFactory, not null
      Returns:
      a Set of ONTObject with type WithManyObjects
    • sorted

      default Stream<ONTObject<? extends org.semanticweb.owlapi.model.OWLObjectPropertyExpression>> sorted()
      Sorts and lists all components of this axiom.
      Returns:
      a sorted Stream of ONTObjects that wrap WithManyObjectss
    • members

      default Stream<ONTObject<? extends org.semanticweb.owlapi.model.OWLObjectPropertyExpression>> members()
      Lists all characteristic (i.e. without annotations) components of this axiom.
      Returns:
      an unsorted Stream of ONTObjects that wrap WithManyObjectss
    • objects

      default Stream<ONTObject<? extends org.semanticweb.owlapi.model.OWLObject>> objects()
      Description copied from interface: ONTComposite
      Lists all components in the form of Stream. Neither this object nor parts of its components are not included in the result: it content only top-level direct components. Note that HasComponents.components() may also contain non-OWLObject things: integers (e.g. cardinality), Lists (e.g. ObjectOneOf), etc, while this method is only for OWLObjects which are represented as ONTObjects.
      Specified by:
      objects in interface ONTComposite
      Returns:
      Stream of ONTObjects
      See Also:
    • getSetMinus

      default Set<org.semanticweb.owlapi.model.OWLObjectPropertyExpression> getSetMinus(org.semanticweb.owlapi.model.OWLObjectPropertyExpression... excludes)
      Gets all components as a sorted Set with exclusion of the specified.
      Parameters:
      excludes - an Array of WithManyObjectss, not null
      Returns:
      a Set of WithManyObjectss
    • hasURIObject

      default boolean hasURIObject()
      Answers true iff the subject is a URI resource.
      Returns:
      boolean
    • hasURISubject

      default boolean hasURISubject()
      Answers true iff the object is a URI resource.
      Returns:
      boolean
    • getSubjectURI

      default String getSubjectURI()
      Answers a URI of the triple's subject.
      Returns:
      URI of the subject
      Throws:
      RuntimeException - in case the main triple has no subject uri (b-node instead)
    • getObjectURI

      default String getObjectURI()
      Answers a URI of the triple's object.
      Returns:
      URI of the object
      Throws:
      RuntimeException - in case the main triple has no object uri (b-node or literal instead)
    • getOWLComponentsAsSet

      Set<? extends org.semanticweb.owlapi.model.OWLObject> getOWLComponentsAsSet(ModelObjectFactory factory)
      Gets all OWL characteristic components in the form of Set. OWLAnnotations are not included.
      Parameters:
      factory - ModelObjectFactory, not null
      Returns:
      a sorted Set of OWLObjects
      See Also:
    • getOWLComponentsAsSet

      default Set<? extends org.semanticweb.owlapi.model.OWLObject> getOWLComponentsAsSet()
      Gets all OWL characteristic components in the form of Set.
      Returns:
      a sorted Set of OWLObjects
    • isClassExpression

      default boolean isClassExpression()
      Answers true iff this is an OWL Class Expression.
      Returns:
      boolean
    • isAnonymousIndividual

      default boolean isAnonymousIndividual()
      Answers true iff this is an OWL Anonymous Individual.
      Returns:
      boolean
    • isNamedClass

      default boolean isNamedClass()
      Answers true iff this is an OWL Class.
      Returns:
      boolean
    • isNamedIndividual

      default boolean isNamedIndividual()
      Answers true iff this is an OWL Named Individual.
      Returns:
      boolean
    • isDatatype

      default boolean isDatatype()
      Answers true iff this is an OWL Datatype.
      Returns:
      boolean
    • isObjectProperty

      default boolean isObjectProperty()
      Answers true iff this is an OWL Object Property.
      Returns:
      boolean
    • isDataProperty

      default boolean isDataProperty()
      Answers true iff this is an OWL Data Property.
      Returns:
      boolean
    • isAnnotationProperty

      default boolean isAnnotationProperty()
      Answers true iff this is an OWL Annotation Property.
      Returns:
      boolean