Class InverseObjectPropertiesTranslator.AxiomImpl.ComplexImpl

All Implemented Interfaces:
com.github.owlcs.ontapi.internal.axioms.WithManyObjects.Complex<InverseObjectPropertiesTranslator.AxiomImpl.ComplexImpl,org.semanticweb.owlapi.model.OWLObjectPropertyExpression>, HasConfig, HasObjectFactory, AsStatement, ModelObject<org.semanticweb.owlapi.model.OWLInverseObjectPropertiesAxiom>, ONTComposite, WithAnnotations, WithContent<InverseObjectPropertiesTranslator.AxiomImpl.ComplexImpl>, ONTObject<org.semanticweb.owlapi.model.OWLInverseObjectPropertiesAxiom>, WithMerge<ONTObject<org.semanticweb.owlapi.model.OWLInverseObjectPropertiesAxiom>>, 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.OWLInverseObjectPropertiesAxiom, 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
Enclosing class:
InverseObjectPropertiesTranslator.AxiomImpl

protected static class InverseObjectPropertiesTranslator.AxiomImpl.ComplexImpl extends InverseObjectPropertiesTranslator.AxiomImpl implements com.github.owlcs.ontapi.internal.axioms.WithManyObjects.Complex<InverseObjectPropertiesTranslator.AxiomImpl.ComplexImpl,org.semanticweb.owlapi.model.OWLObjectPropertyExpression>
An OWLInverseObjectPropertiesAxiom that either has annotations or anonymous object expressions (OWLObjectInverseOf) in subject or object positions. It has a public constructor since it is more generic then InverseObjectPropertiesTranslator.AxiomImpl.SimpleImpl.
See Also:
  • Field Details

  • Constructor Details

    • ComplexImpl

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

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

    • getContentCache

      Description copied from interface: WithContent
      Returns the content-cache-container, which is created by the method WithContent.createContentCache().
      Specified by:
      getContentCache in interface WithContent<InverseObjectPropertiesTranslator.AxiomImpl.ComplexImpl>
      Returns:
      InternalCache.Loading for an array
      See Also:
    • getFirstONTProperty

      public ONTObject<? extends org.semanticweb.owlapi.model.OWLObjectPropertyExpression> getFirstONTProperty()
      Specified by:
      getFirstONTProperty in class InverseObjectPropertiesTranslator.AxiomImpl
    • getSecondONTProperty

      public ONTObject<? extends org.semanticweb.owlapi.model.OWLObjectPropertyExpression> getSecondONTProperty()
      Specified by:
      getSecondONTProperty in class InverseObjectPropertiesTranslator.AxiomImpl
    • sameContent

      protected boolean sameContent(ONTStatementImpl other)
      Description copied from class: ONTStatementImpl
      Answers true if this object and the given have the same content. Two OWLObjects may have same content, but different base triples (see ONTStatementImpl.sameTriple(ONTStatementImpl)).
      Specified by:
      sameContent in class ONTStatementImpl
      Parameters:
      other - ONTStatementImpl, not null
      Returns:
      boolean
    • findByURI

      ONTObject<? extends org.semanticweb.owlapi.model.OWLObjectPropertyExpression> findByURI(String uri, ModelObjectFactory factory)
      Gets the ONTObject-wrapper from the factory.
      Parameters:
      uri - String, an entity URI, not null
      factory - ModelObjectFactory, not null
      Returns:
      ONTObject of WithManyObjects
    • listONTComponents

      org.apache.jena.util.iterator.ExtendedIterator<ONTObject<? extends org.semanticweb.owlapi.model.OWLObjectPropertyExpression>> listONTComponents(org.apache.jena.ontapi.model.OntStatement statement, ModelObjectFactory factory)
      Extracts and lists all elements from the given statement.
      Parameters:
      statement - OntStatement, the source, not null
      factory - ModelObjectFactory, not null
      Returns:
      an ExtendedIterator of ONTObject with type WithManyObjects
    • 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

      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
    • listONTComponents

      org.apache.jena.util.iterator.ExtendedIterator<ONTObject<? extends org.semanticweb.owlapi.model.OWLObjectPropertyExpression>> listONTComponents(org.apache.jena.ontapi.model.OntStatement statement, ModelObjectFactory factory)
      Extracts and lists all members from the statement.
      Parameters:
      statement - OntStatement, not null
      factory - ModelObjectFactory to create ONTObjects, not null
      Returns:
      an ExtendedIterator of ONTObjects with WithLists
    • isAnnotated

      default boolean isAnnotated()
      Description copied from interface: WithAnnotations
      Answers true if this object (axiom or annotation) has sub-annotations.
      Specified by:
      isAnnotated in interface org.semanticweb.owlapi.model.OWLAxiom
      Specified by:
      isAnnotated in interface WithAnnotations
      Returns:
      boolean
      See Also:
      • OWLAxiom.isAnnotated()
    • annotations

      default Stream<org.semanticweb.owlapi.model.OWLAnnotation> annotations()
      Description copied from interface: WithAnnotations
      Lists all OWLAnnotations on this object. The stream must be ordered, nonull, distinct and sorted.
      Specified by:
      annotations in interface org.semanticweb.owlapi.model.HasAnnotations
      Specified by:
      annotations in interface WithAnnotations
      Returns:
      a Stream of OWLAnnotations
      See Also:
      • HasAnnotations.annotations()
    • annotationsAsList

      default List<org.semanticweb.owlapi.model.OWLAnnotation> annotationsAsList()
      Description copied from interface: WithAnnotations
      Answers a sorted and distinct List of OWLAnnotations on this object. The returned List is unmodifiable.
      Specified by:
      annotationsAsList in interface org.semanticweb.owlapi.model.HasAnnotations
      Specified by:
      annotationsAsList in interface WithAnnotations
      Returns:
      an unmodifiable List of OWLAnnotations
      See Also:
      • HasAnnotations.annotationsAsList()
    • toContentItem

      default Object toContentItem(ONTObject x)
      Makes a content item from the object.
      Parameters:
      x - ONTObject to cache, not null
      Returns:
      a content item
      See Also:
      • WithList.fromContentItem(Object, ModelObjectFactory)