Class SameIndividualTranslator.AxiomImpl.SimpleImpl

All Implemented Interfaces:
com.github.owlcs.ontapi.internal.axioms.WithManyObjects.Simple<org.semanticweb.owlapi.model.OWLIndividual>, HasConfig, HasObjectFactory, AsStatement, ModelObject<org.semanticweb.owlapi.model.OWLSameIndividualAxiom>, ONTComposite, WithAnnotations, WithoutAnnotations, ONTObject<org.semanticweb.owlapi.model.OWLSameIndividualAxiom>, WithMerge<ONTObject<org.semanticweb.owlapi.model.OWLSameIndividualAxiom>>, 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.OWLIndividual>, org.semanticweb.owlapi.model.HasSignature, org.semanticweb.owlapi.model.IsAnonymous, org.semanticweb.owlapi.model.OWLAxiom, org.semanticweb.owlapi.model.OWLIndividualAxiom, org.semanticweb.owlapi.model.OWLLogicalAxiom, org.semanticweb.owlapi.model.OWLNaryAxiom<org.semanticweb.owlapi.model.OWLIndividual>, org.semanticweb.owlapi.model.OWLNaryIndividualAxiom, org.semanticweb.owlapi.model.OWLObject, org.semanticweb.owlapi.model.OWLSameIndividualAxiom, org.semanticweb.owlapi.model.OWLSubClassOfAxiomSetShortCut
Enclosing class:
SameIndividualTranslator.AxiomImpl

protected static class SameIndividualTranslator.AxiomImpl.SimpleImpl extends SameIndividualTranslator.AxiomImpl implements com.github.owlcs.ontapi.internal.axioms.WithManyObjects.Simple<org.semanticweb.owlapi.model.OWLIndividual>
An OWLSameIndividualAxiom that has named classes as subject and object and has no annotations.
See Also:
  • Constructor Details

    • SimpleImpl

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

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

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

      protected SameIndividualTranslator.AxiomImpl makeCopyWith(ONTObject<org.semanticweb.owlapi.model.OWLSameIndividualAxiom> other)
      Description copied from class: AbstractNaryTranslator.NaryAxiomImpl
      Creates an instance of AbstractNaryTranslator.NaryAxiomImpl with additional triples getting from the specified other object. The returned instance must be equivalent to this instance.
      Specified by:
      makeCopyWith in class AbstractNaryTranslator.NaryAxiomImpl<org.semanticweb.owlapi.model.OWLSameIndividualAxiom,org.semanticweb.owlapi.model.OWLIndividual>
      Parameters:
      other - ONTObject with AbstractNaryTranslator.NaryAxiomImpl, not null
      Returns:
      AbstractNaryTranslator.NaryAxiomImpl - a fresh instance that equals to this
    • containsAnonymousIndividuals

      public boolean containsAnonymousIndividuals()
      Specified by:
      containsAnonymousIndividuals in interface org.semanticweb.owlapi.model.OWLSameIndividualAxiom
      Overrides:
      containsAnonymousIndividuals in class SameIndividualTranslator.AxiomImpl
    • getNamedIndividualSet

      public Set<org.semanticweb.owlapi.model.OWLNamedIndividual> getNamedIndividualSet()
      Description copied from class: OWLObjectImpl
      Gets all the individuals that are in the signature of this object. The set is a copy, changes are not reflected back.
      Overrides:
      getNamedIndividualSet in class ONTObjectImpl
      Returns:
      a modifiable sorted Set containing the individuals that are in the signature of this object
    • getSignatureSet

      public Set<org.semanticweb.owlapi.model.OWLEntity> getSignatureSet()
      Description copied from class: OWLObjectImpl
      Gets the signature of this object. The set is a copy, changes are not reflected back.
      Overrides:
      getSignatureSet in class ONTObjectImpl
      Returns:
      a modifiable sorted Set of entities that represents the signature of this object
    • containsNamedIndividual

      public boolean containsNamedIndividual(org.semanticweb.owlapi.model.OWLNamedIndividual individual)
      Description copied from class: ONTObjectImpl
      Answers true iff the given OWL named individual is present in the object's signature.
      Overrides:
      containsNamedIndividual in class ONTObjectImpl
      Parameters:
      individual - OWLNamedIndividual, not null
      Returns:
      boolean
    • canContainAnonymousIndividuals

      public 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
    • findByURI

      ONTObject<? extends org.semanticweb.owlapi.model.OWLIndividual> 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.OWLIndividual>> 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.OWLIndividual>> 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.OWLIndividual>> 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.OWLIndividual>> 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.OWLIndividual> getSetMinus(org.semanticweb.owlapi.model.OWLIndividual... 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