Class ONTSWRLAtomImpl.Binary<ONT_P extends org.apache.jena.ontapi.model.OntObject,ONT_F extends org.apache.jena.ontapi.model.OntSWRL.Arg,ONT_S extends org.apache.jena.ontapi.model.OntSWRL.Arg,ONT_R extends org.apache.jena.ontapi.model.OntSWRL.Atom.Binary<ONT_P,ONT_F,ONT_S>,OWL_P extends org.semanticweb.owlapi.model.OWLObject & org.semanticweb.owlapi.model.SWRLPredicate,OWL_F extends org.semanticweb.owlapi.model.SWRLArgument,OWL_S extends org.semanticweb.owlapi.model.SWRLArgument,OWL_R extends org.semanticweb.owlapi.model.SWRLBinaryAtom<OWL_F,OWL_S>>

Type Parameters:
ONT_P - - subtype of OntObject, predicate
ONT_F - - subtype of OntSWRL.Arg, first argument
ONT_S - - subtype of OntSWRL.Arg, second argument
ONT_R - - subtype of OntSWRL.Atom.Binary, the actual jena type
OWL_P - - subtype of SWRLPredicate, that matches ONTSWRLAtomImpl.Binary
OWL_F - - subtype of SWRLArgument, that matches ONTSWRLAtomImpl.Binary
OWL_S - - subtype of SWRLArgument, that matches ONTSWRLAtomImpl.Binary
OWL_R - - subtype of SWRLBinaryAtom, that matches ONTSWRLAtomImpl.Binary
All Implemented Interfaces:
AsNode, AsRDFNode, HasObjectFactory, ModelObject<OWL_R>, ONTComposite, WithContent<ONTExpressionImpl<ONT_R>>, ONTObject<OWL_R>, Serializable, Comparable<org.semanticweb.owlapi.model.OWLObject>, org.semanticweb.owlapi.model.HasAnnotationPropertiesInSignature, 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.HasSignature, org.semanticweb.owlapi.model.IsAnonymous, org.semanticweb.owlapi.model.OWLObject, org.semanticweb.owlapi.model.SWRLAtom, org.semanticweb.owlapi.model.SWRLObject
Direct Known Subclasses:
ONTSWRLAtomImpl.DPB, ONTSWRLAtomImpl.ObjectBinary
Enclosing class:
ONTSWRLAtomImpl<ONT extends org.apache.jena.ontapi.model.OntSWRL.Atom<?>,OWL extends org.semanticweb.owlapi.model.SWRLAtom>

protected abstract static class ONTSWRLAtomImpl.Binary<ONT_P extends org.apache.jena.ontapi.model.OntObject,ONT_F extends org.apache.jena.ontapi.model.OntSWRL.Arg,ONT_S extends org.apache.jena.ontapi.model.OntSWRL.Arg,ONT_R extends org.apache.jena.ontapi.model.OntSWRL.Atom.Binary<ONT_P,ONT_F,ONT_S>,OWL_P extends org.semanticweb.owlapi.model.OWLObject & org.semanticweb.owlapi.model.SWRLPredicate,OWL_F extends org.semanticweb.owlapi.model.SWRLArgument,OWL_S extends org.semanticweb.owlapi.model.SWRLArgument,OWL_R extends org.semanticweb.owlapi.model.SWRLBinaryAtom<OWL_F,OWL_S>> extends ONTSWRLAtomImpl<ONT_R,OWL_R>
An abstract binary atom impl.
See Also:
  • Constructor Details

  • Method Details

    • getPredicate

      public OWL_P getPredicate()
    • allArguments

      public Stream<org.semanticweb.owlapi.model.SWRLArgument> allArguments()
    • getFirstArgument

      public OWL_F getFirstArgument()
    • getSecondArgument

      public OWL_S getSecondArgument()
    • getONTPredicate

      public ONTObject<? extends OWL_P> getONTPredicate()
    • getFirstONTArgument

      public ONTObject<? extends OWL_F> getFirstONTArgument()
    • getSecondONTArgument

      public ONTObject<? extends OWL_S> getSecondONTArgument()
    • findONTFirstArgument

      protected ONTObject<? extends OWL_F> findONTFirstArgument(ONTObjectFactory factory)
    • findONTSecondArgument

      protected ONTObject<? extends OWL_S> findONTSecondArgument(ONTObjectFactory factory)
    • findONTPredicate

      protected ONTObject<? extends OWL_P> findONTPredicate(ModelObjectFactory factory)
    • objects

      public 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.
      Returns:
      Stream of ONTObjects
      See Also:
    • eraseModel

      public OWL_R eraseModel()
      Description copied from interface: ModelObject
      Answers with an object that equals to the ONTObject.getOWLObject(), but without any model information inside.

      Such unattached object can be used in whatever way, while the object ONTObject.getOWLObject() requires more attention: it will not allow GC to dispose of the model, as there is a strong reference (or a facility to get such reference) to the model inside that object.

      Returns:
      ModelObject
      See Also:
    • collectContent

      protected Object[] collectContent(ONT_R obj, ONTObjectFactory factory)
      Description copied from class: ONTExpressionImpl
      Collects the cache Array. The array was chosen as the best option in sense of memory consumption and access speed.
      Specified by:
      collectContent in class ONTExpressionImpl<ONT_R extends org.apache.jena.ontapi.model.OntSWRL.Atom.Binary<ONT_P,ONT_F,ONT_S>>
      Parameters:
      obj - ONTExpressionImpl, not null
      factory - ONTObjectFactory, not null
      Returns:
      an Array of Objects (content items)
      See Also:
    • initContent

      protected Object[] initContent(ONT_R obj, ONTObjectFactory factory)
      Description copied from class: ONTExpressionImpl
      Initializes the object's content and calculates its hashcode. Together, this must be faster.
      Specified by:
      initContent in class ONTExpressionImpl<ONT_R extends org.apache.jena.ontapi.model.OntSWRL.Atom.Binary<ONT_P,ONT_F,ONT_S>>
      Parameters:
      obj - ONTExpressionImpl the source Jena resource, not null
      factory - ONTObjectFactory, not null
      Returns:
      an Array of Objects (content items)
      See Also:
    • 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