Class OntObjectImpl

java.lang.Object
org.apache.jena.enhanced.Polymorphic<org.apache.jena.rdf.model.RDFNode>
org.apache.jena.enhanced.EnhNode
org.apache.jena.rdf.model.impl.ResourceImpl
org.apache.jena.ontapi.impl.objects.OntObjectImpl
All Implemented Interfaces:
org.apache.jena.graph.FrontsNode, OntObject, org.apache.jena.rdf.model.RDFNode, org.apache.jena.rdf.model.Resource
Direct Known Subclasses:
OntAnnotationImpl, OntClassImpl, OntDataRangeImpl, OntDisjointImpl, OntFacetRestrictionImpl, OntIDImpl, OntIndividualImpl, OntNamedDataRangeImpl, OntNegativePropertyAssertionImpl, OntPropertyImpl, OntSimpleClassImpl, OntSWRLImpl, OntSWRLImpl.DArgImpl, OntSWRLImpl.IArgImpl

public class OntObjectImpl extends org.apache.jena.rdf.model.impl.ResourceImpl implements OntObject
The base for any Ontology Object Resource implementation.
  • Field Summary

    Fields inherited from class org.apache.jena.rdf.model.impl.ResourceImpl

    factory, rdfNodeFactory
  • Constructor Summary

    Constructors
    Constructor
    Description
    OntObjectImpl(org.apache.jena.graph.Node n, org.apache.jena.enhanced.EnhGraph m)
     
  • Method Summary

    Modifier and Type
    Method
    Description
    addAnnotation(OntAnnotationProperty property, org.apache.jena.rdf.model.RDFNode value)
    Adds an annotation assertion.
    addStatement(org.apache.jena.rdf.model.Property property, org.apache.jena.rdf.model.RDFNode value)
    Adds an ont-statement by attaching predicate and object (value) to this resource.
    Lists all annotation property assertions (so-called plain annotations) attached to this object plus all bulk annotations of the root statement.
    Lists all annotation literals for the given predicate and the language tag.
    Lists all annotation property assertions (so-called plain annotations) attached to this object.
    static org.apache.jena.graph.Node
    checkNamed(org.apache.jena.graph.Node res)
    Tests the node is named.
    static org.apache.jena.rdf.model.Resource
    checkNamed(org.apache.jena.rdf.model.Resource res)
    Tests the RDF resource is named.
    Removes all root annotations including their sub-annotations hierarchy.
    Lists the content of the object, i.e., all characteristic statements (see OntObject.spec()), plus all additional statements in which this object is the subject, minus those of them whose predicate is an annotation property (annotations are not included).
    static Class<? extends OntObject>
    findActualClass(Class<? extends OntObject> type)
     
    static Class<? extends OntObject>
    Finds a public Ontology Object class-type.
    Finds the first declaration root statement.
    <X extends org.apache.jena.rdf.model.RDFNode>
    X
    getAs(Class<X> type)
    Safely converts this RDF resource to the given type interface, if it is possible.
    Returns the main OntStatement which determines the nature of this ontological resource.
     
    static <X extends org.apache.jena.rdf.model.RDFNode>
    X
    getNodeAs(org.apache.jena.rdf.model.RDFNode node, Class<X> view)
    Answers an enhanced node that wraps the given RDF node and conforms to the given interface view.
    <T extends org.apache.jena.rdf.model.RDFNode>
    T
    getRequiredObject(org.apache.jena.rdf.model.Property predicate, Class<T> view)
    Returns an object from a first found statement with specified predicate.
    getRequiredProperty(org.apache.jena.rdf.model.Property property)
    Returns an ont-statement with the given subject and property.
    boolean
     
    static boolean
    Returns true if the given object is from reserved vocabulary (e.g.
    org.apache.jena.util.iterator.ExtendedIterator<org.apache.jena.rdf.model.Literal>
    Returns an iterator over all literal's annotations.
    org.apache.jena.util.iterator.ExtendedIterator<OntStatement>
    Lists all related annotation assertions.
    org.apache.jena.util.iterator.ExtendedIterator<OntStatement>
    Returns an iterator over object's annotation property assertions.
    org.apache.jena.util.iterator.ExtendedIterator<org.apache.jena.rdf.model.RDFNode>
    listObjects(org.apache.jena.rdf.model.Property predicate)
    Lists all objects for the given predicate.
    <O extends org.apache.jena.rdf.model.RDFNode>
    org.apache.jena.util.iterator.ExtendedIterator<O>
    listObjects(org.apache.jena.rdf.model.Property predicate, Class<O> type)
    Lists all objects for the given predicate and type, considering this instance in a subject relation.
    org.apache.jena.rdf.model.StmtIterator
    org.apache.jena.rdf.model.StmtIterator
    listProperties(org.apache.jena.rdf.model.Property p)
    org.apache.jena.util.iterator.ExtendedIterator<OntStatement>
    Lists all object's characteristic statements according to its OWL2 specification.
    org.apache.jena.util.iterator.ExtendedIterator<OntStatement>
    Returns an Extended Iterator over all the properties of this resource.
    org.apache.jena.util.iterator.ExtendedIterator<OntStatement>
    listStatements(org.apache.jena.rdf.model.Property p)
    Lists all the values of the property p.
    <S extends org.apache.jena.rdf.model.RDFNode>
    org.apache.jena.util.iterator.ExtendedIterator<S>
    listSubjects(org.apache.jena.rdf.model.Property predicate, Class<S> type)
    Lists all subjects for the given predicate and type, considering this instance in an object relation.
    <T extends org.apache.jena.rdf.model.RDFNode>
    Optional<T>
    object(org.apache.jena.rdf.model.Property predicate, Class<T> type)
    Finds a first object with the given rdf:type attached to this ontology object on the given predicate.
    Stream<org.apache.jena.rdf.model.RDFNode>
    objects(org.apache.jena.rdf.model.Property predicate)
    Lists all objects for the given predicate.
    <O extends org.apache.jena.rdf.model.RDFNode>
    Stream<O>
    objects(org.apache.jena.rdf.model.Property predicate, Class<O> type)
    Lists all objects attached on the property to this object with the given type.
    Class<? extends OntObject>
    Gets a public ont-object type identifier.
    remove(org.apache.jena.rdf.model.Property property, org.apache.jena.rdf.model.RDFNode value)
    Deletes the specific property-value pair from this object.
    Lists all characteristic statements of the ontology resource, i.e., all those statements which completely determine this object nature according to the OWL2 specification.
    statement(org.apache.jena.rdf.model.Property property)
    Returns the first statement for the specified property.
    statement(org.apache.jena.rdf.model.Property property, org.apache.jena.rdf.model.RDFNode value)
    Returns the first statement for the specified property and object.
    Lists all top-level statements related to this object (i.e., with subject=this).
    statements(org.apache.jena.rdf.model.Property property)
    Lists ont-statements by the predicate.
    static <X extends OntObject>
    Stream<X>
    subjects(org.apache.jena.rdf.model.Property predicate, OntObject object, Class<X> type)
     
     
    static OntObject
    wrapAsOntObject(org.apache.jena.graph.Node node, org.apache.jena.enhanced.EnhGraph model)
    Creates a fresh OntObject instance.

    Methods inherited from class org.apache.jena.rdf.model.impl.ResourceImpl

    abort, addLiteral, addLiteral, addLiteral, addLiteral, addLiteral, addLiteral, addLiteral, addProperty, addProperty, addProperty, addProperty, addProperty, addProperty, addProperty, asLiteral, asResource, begin, commit, getId, getLocalName, getNameSpace, getProperty, getProperty, getPropertyResourceValue, getRequiredProperty, getStmtTerm, getURI, hasLiteral, hasLiteral, hasLiteral, hasLiteral, hasLiteral, hasLiteral, hasProperty, hasProperty, hasProperty, hasProperty, hasURI, inModel, listProperties, removeAll, removeProperties, visitWith

    Methods inherited from class org.apache.jena.enhanced.EnhNode

    as, asNode, canAs, equals, getGraph, hashCode, isAnon, isLiteral, isResource, isStmtResource, isURIResource, isValid, viewAs

    Methods inherited from class org.apache.jena.enhanced.Polymorphic

    addView, supports

    Methods inherited from class java.lang.Object

    getClass, notify, notifyAll, wait, wait, wait

    Methods inherited from interface org.apache.jena.graph.FrontsNode

    asNode

    Methods inherited from interface org.apache.jena.rdf.model.RDFNode

    as, asLiteral, asResource, canAs, isAnon, isLiteral, isResource, isStmtResource, isURIResource, visitWith

    Methods inherited from interface org.apache.jena.rdf.model.Resource

    abort, addLiteral, addLiteral, addLiteral, addLiteral, addLiteral, addLiteral, addLiteral, addProperty, addProperty, addProperty, addProperty, begin, commit, equals, getId, getLocalName, getNameSpace, getProperty, getProperty, getPropertyResourceValue, getRequiredProperty, getStmtTerm, getURI, hasLiteral, hasLiteral, hasLiteral, hasLiteral, hasLiteral, hasLiteral, hasProperty, hasProperty, hasProperty, hasProperty, hasURI, inModel, listProperties, removeAll, removeProperties
  • Constructor Details

    • OntObjectImpl

      public OntObjectImpl(org.apache.jena.graph.Node n, org.apache.jena.enhanced.EnhGraph m)
  • Method Details

    • checkNamed

      public static org.apache.jena.graph.Node checkNamed(org.apache.jena.graph.Node res)
      Tests the node is named.
      Parameters:
      res - Node to test, not null
      Returns:
      the same node
      Throws:
      OntJenaException - in case null or anonymous node is given
    • checkNamed

      public static org.apache.jena.rdf.model.Resource checkNamed(org.apache.jena.rdf.model.Resource res)
      Tests the RDF resource is named.
      Parameters:
      res - Resource to test, not null
      Returns:
      the same resource
      Throws:
      OntJenaException - in case null or anonymous resource is given
    • subjects

      public static <X extends OntObject> Stream<X> subjects(org.apache.jena.rdf.model.Property predicate, OntObject object, Class<X> type)
    • findActualClass

      public static Class<? extends OntObject> findActualClass(OntObject o)
      Finds a public Ontology Object class-type.
      Parameters:
      o - OntObject, not null
      Returns:
      Class of the given OntObject
    • findActualClass

      public static Class<? extends OntObject> findActualClass(Class<? extends OntObject> type)
    • getNodeAs

      public static <X extends org.apache.jena.rdf.model.RDFNode> X getNodeAs(org.apache.jena.rdf.model.RDFNode node, Class<X> view)
      Answers an enhanced node that wraps the given RDF node and conforms to the given interface view. The method does not change the model nodes cache, but changes the object's cache if view is suitable for the given node.
      Type Parameters:
      X - any subtype of RDFNode
      Parameters:
      node - RDFNode, not null
      view - a Class-type of the desired RDF view (interface)
      Returns:
      an instance of the type X or null
      See Also:
    • wrapAsOntObject

      public static OntObject wrapAsOntObject(org.apache.jena.graph.Node node, org.apache.jena.enhanced.EnhGraph model)
      Creates a fresh OntObject instance.
      Parameters:
      node - Node, not null
      model - EnhGraph, not null
      Returns:
      OntObject
    • isReservedOrBuiltin

      public static boolean isReservedOrBuiltin(OntObject object)
      Returns true if the given object is from reserved vocabulary (e.g. rdf:rest is reserved in system settings).
      Parameters:
      object - OntObject
      Returns:
      boolean
    • isLocal

      public boolean isLocal()
      Returns:
      true if the root statement belongs to the base graph
    • getMainStatement

      public final OntStatement getMainStatement()
      Returns the main OntStatement which determines the nature of this ontological resource. In most cases it is a declaration and wraps a triple with predicate rdf:type.

      The returned OntStatement differs from that which could be obtained directly from the model using one of model's statement(..) methods: the main statement annotations are added in the form of annotation property assertions (so-called 'plain annotations'), not as typed anonymous resources (so-called 'bulk annotations', OntAnnotation). In ONT-API it is legal for a main statement to have both plain and bulk annotations. Note: for anonymous ontology objects (i.e., not for OWL Entities) this behavior may not fully meet OWL2 specification: the specification describes only bulk annotations for all anonymous OWL2 components with except of an individual. To get a common ontology statement that supports bulk annotations only, the expression getModel().asStatement(this.getMainStatement().asTriple()) can be used.

      Specified by:
      getMainStatement in interface OntObject
      Returns:
      OntStatement
      See Also:
    • spec

      public Stream<OntStatement> spec()
      Lists all characteristic statements of the ontology resource, i.e., all those statements which completely determine this object nature according to the OWL2 specification. For non-composite objects the result might contain only the root statement. For composite objects (usually anonymous resources: disjoint sections, class expression, etc.) the result would contain all statements in the graph directly related to the object but without statements that relate to the object components. The return stream is ordered and, in most cases, the expression this.spec().findFirst().get() returns the same statement as this.getRoot(). Object annotations are not included in the resultant stream.

      For OWL Entities the returned stream will contain only a single main statement (i.e. OntObject.getMainStatement()), or even will be empty for built-in entities and individuals.

      Specified by:
      spec in interface OntObject
      Returns:
      Stream of OntStatements
      See Also:
    • getAs

      public <X extends org.apache.jena.rdf.model.RDFNode> X getAs(Class<X> type)
      Safely converts this RDF resource to the given type interface, if it is possible. Otherwise, returns null. A calling of this method is effectively equivalent to the expression this.canAs(type) ? this.as(type) : null.

      Impl remarks: - the method body is optimized to minimize graph querying; - we use RDFNode (not Resource) as generic supertype due to the fact that an OntObject can be also a Literal (but in only single case when it is OntSWRL.DArg).

    • listSpec

      public org.apache.jena.util.iterator.ExtendedIterator<OntStatement> listSpec()
      Lists all object's characteristic statements according to its OWL2 specification.
      Returns:
      ExtendedIterator of OntStatements
    • content

      public Stream<OntStatement> content()
      Lists the content of the object, i.e., all characteristic statements (see OntObject.spec()), plus all additional statements in which this object is the subject, minus those of them whose predicate is an annotation property (annotations are not included).
      Specified by:
      content in interface OntObject
      Returns:
      distinct Stream of OntStatements
      See Also:
    • findRootStatement

      public Optional<OntStatement> findRootStatement()
      Finds the first declaration root statement. The graph may contain several triples with predicate rdf:type and this ontology object as a subject. In this case, the result is unpredictable.
      Returns:
      Optional around OntStatement that supports plain annotation assertions
    • statement

      public Optional<OntStatement> statement(org.apache.jena.rdf.model.Property property)
      Returns the first statement for the specified property. What is the first triple is defined at the level of graph; in general, it is unpredictable.
      Specified by:
      statement in interface OntObject
      Parameters:
      property - Property
      Returns:
      Optional around OntStatement
      See Also:
      • Resource.getProperty(Property)
    • statement

      public Optional<OntStatement> statement(org.apache.jena.rdf.model.Property property, org.apache.jena.rdf.model.RDFNode value)
      Returns the first statement for the specified property and object. What exactly is the first triple is defined at the level of graph; in general, it is unpredictable. Also note, the common jena implementation of in-memory graph does not allow duplicated triples, and hence there can be at most one operator for a given property and value.
      Specified by:
      statement in interface OntObject
      Parameters:
      property - Property, the predicate
      value - RDFNode, the object
      Returns:
      Optional around OntStatement
    • getRequiredProperty

      public OntStatement getRequiredProperty(org.apache.jena.rdf.model.Property property) throws org.apache.jena.shared.PropertyNotFoundException
      Returns an ont-statement with the given subject and property. If more than one statement that matches the patter exists in the model, it is undefined which will be returned. If none exist, an exception is thrown.
      Specified by:
      getRequiredProperty in interface OntObject
      Specified by:
      getRequiredProperty in interface org.apache.jena.rdf.model.Resource
      Overrides:
      getRequiredProperty in class org.apache.jena.rdf.model.impl.ResourceImpl
      Parameters:
      property - Property, the predicate
      Returns:
      OntStatement
      Throws:
      org.apache.jena.shared.PropertyNotFoundException - no statement is found
      See Also:
      • Resource.getRequiredProperty(Property)
    • addStatement

      public OntStatement addStatement(org.apache.jena.rdf.model.Property property, org.apache.jena.rdf.model.RDFNode value)
      Description copied from interface: OntObject
      Adds an ont-statement by attaching predicate and object (value) to this resource.
      Specified by:
      addStatement in interface OntObject
      Parameters:
      property - Property predicate, not null
      value - RDFNode object, not null
      Returns:
      OntStatement
      See Also:
      • Resource.addProperty(Property, RDFNode)
    • remove

      public OntObjectImpl remove(org.apache.jena.rdf.model.Property property, org.apache.jena.rdf.model.RDFNode value)
      Description copied from interface: OntObject
      Deletes the specific property-value pair from this object. All the corresponding statement's annotations are also deleted. In case the given object is null, all statements with the property-predicate will be deleted. No-op if no match found.
      Specified by:
      remove in interface OntObject
      Parameters:
      property - Property predicate, not null
      value - RDFNode object, can be null
      Returns:
      this object to allow cascading calls
      See Also:
    • statements

      public Stream<OntStatement> statements(org.apache.jena.rdf.model.Property property)
      Description copied from interface: OntObject
      Lists ont-statements by the predicate.
      Specified by:
      statements in interface OntObject
      Parameters:
      property - Property, predicate, can be null
      Returns:
      Stream of OntStatements
    • statements

      public Stream<OntStatement> statements()
      Description copied from interface: OntObject
      Lists all top-level statements related to this object (i.e., with subject=this).
      Specified by:
      statements in interface OntObject
      Returns:
      Stream of all statements
      See Also:
      • Resource.listProperties()
    • listProperties

      public org.apache.jena.rdf.model.StmtIterator listProperties()
      Specified by:
      listProperties in interface org.apache.jena.rdf.model.Resource
      Overrides:
      listProperties in class org.apache.jena.rdf.model.impl.ResourceImpl
      Returns:
      StmtIterator which contains OntStatements
      See Also:
    • listStatements

      public org.apache.jena.util.iterator.ExtendedIterator<OntStatement> listStatements()
      Returns an Extended Iterator over all the properties of this resource. The model associated with this resource is search and an iterator is returned which iterates over all the statements which have this resource as a subject.
      Returns:
      ExtendedIterator over all the OntStatements about this object
      See Also:
    • listProperties

      public org.apache.jena.rdf.model.StmtIterator listProperties(org.apache.jena.rdf.model.Property p)
      Specified by:
      listProperties in interface org.apache.jena.rdf.model.Resource
      Overrides:
      listProperties in class org.apache.jena.rdf.model.impl.ResourceImpl
      Parameters:
      p - Property, the predicate to search, can be null
      Returns:
      StmtIterator
      See Also:
    • listStatements

      public org.apache.jena.util.iterator.ExtendedIterator<OntStatement> listStatements(org.apache.jena.rdf.model.Property p)
      Lists all the values of the property p. Returns an Extended Iterator over all the statements in the associated model whose subject is this resource and whose predicate is p.
      Parameters:
      p - Property, the predicate sought, can be null
      Returns:
      ExtendedIterator over the OntStatements
      See Also:
    • annotations

      public Stream<OntStatement> annotations()
      Lists all annotation property assertions (so-called plain annotations) attached to this object plus all bulk annotations of the root statement.
      Specified by:
      annotations in interface OntObject
      Returns:
      Stream of OntStatements
      See Also:
    • listAnnotations

      public org.apache.jena.util.iterator.ExtendedIterator<OntStatement> listAnnotations()
      Lists all related annotation assertions.
      Returns:
      ExtendedIterator of OntStatements
      See Also:
    • assertions

      public Stream<OntStatement> assertions()
      Lists all annotation property assertions (so-called plain annotations) attached to this object.
      Returns:
      Stream of OntStatements
      See Also:
    • listAssertions

      public org.apache.jena.util.iterator.ExtendedIterator<OntStatement> listAssertions()
      Returns an iterator over object's annotation property assertions. The annotation assertion is a statements with an annotation property as predicate.
      Returns:
      ExtendedIterator of OntStatements
      See Also:
    • listAnnotationLiterals

      public org.apache.jena.util.iterator.ExtendedIterator<org.apache.jena.rdf.model.Literal> listAnnotationLiterals(OntAnnotationProperty predicate)
      Returns an iterator over all literal's annotations.
      Parameters:
      predicate - OntAnnotationProperty, not null
      Returns:
      ExtendedIterator of Literals
      See Also:
    • annotationValues

      public Stream<String> annotationValues(OntAnnotationProperty p, String lang)
      Description copied from interface: OntObject
      Lists all annotation literals for the given predicate and the language tag. Literal tag comparison is case-insensitive. Partial search is also allowed, for example, a literal with the tag en-GB will list also if the input language tag is en. An empty string as language tag means searching for plain no-language literals.
      Specified by:
      annotationValues in interface OntObject
      Parameters:
      p - OntAnnotationProperty, not null
      lang - String, the language tag to restrict the listed literals to, or null to select all literals
      Returns:
      Stream of String's, i.e., literal lexical forms
      See Also:
    • addAnnotation

      public OntStatement addAnnotation(OntAnnotationProperty property, org.apache.jena.rdf.model.RDFNode value)
      Adds an annotation assertion. It could be expanded to a bulk form by adding sub-annotation.
      Specified by:
      addAnnotation in interface OntObject
      Parameters:
      property - OntAnnotationProperty, Named annotation property.
      value - RDFNode the value: uri-resource, literal or anonymous individual.
      Returns:
      OntStatement for newly added annotation
      Throws:
      OntJenaException - in case input is wrong
      See Also:
    • clearAnnotations

      public OntObjectImpl clearAnnotations()
      Removes all root annotations including their sub-annotations hierarchy. Any non-root annotations are untouched. For example, in case of deleting an OWL class, if it is present on the left side of the rdfs:subClassOf statement, all the annotations of that statement will remain in the graph, but all main annotations (which belongs to the statement with the predicate rdf:type) will be deleted from the graph. For non-built-in ontology objects this is equivalent to the expression getRoot().clearAnnotations().
      Specified by:
      clearAnnotations in interface OntObject
      Returns:
      this instance
      See Also:
    • getRequiredObject

      public <T extends org.apache.jena.rdf.model.RDFNode> T getRequiredObject(org.apache.jena.rdf.model.Property predicate, Class<T> view)
      Returns an object from a first found statement with specified predicate. Since the order in the graph is undefined in case there is more than one statement for a property, the result is unpredictable.
      Type Parameters:
      T - RDFNode type
      Parameters:
      predicate - Property
      view - Class
      Returns:
      an object from statement
      Throws:
      OntJenaException - in case no object by predicate has been found
      See Also:
    • object

      public <T extends org.apache.jena.rdf.model.RDFNode> Optional<T> object(org.apache.jena.rdf.model.Property predicate, Class<T> type)
      Finds a first object with the given rdf:type attached to this ontology object on the given predicate. The result is unpredictable in case there more than one statement for these conditions.
      Type Parameters:
      T - any subtype of RDFNode
      Parameters:
      predicate - Property
      type - subclass of RDFNode
      Returns:
      Optional around T
    • objects

      public <O extends org.apache.jena.rdf.model.RDFNode> Stream<O> objects(org.apache.jena.rdf.model.Property predicate, Class<O> type)
      Lists all objects attached on the property to this object with the given type.
      Specified by:
      objects in interface OntObject
      Type Parameters:
      O - any subtype of RDFNode
      Parameters:
      predicate - Property predicate, can be null
      type - Interface to find and cast, not null
      Returns:
      Stream of nodes of the O type
    • listObjects

      public <O extends org.apache.jena.rdf.model.RDFNode> org.apache.jena.util.iterator.ExtendedIterator<O> listObjects(org.apache.jena.rdf.model.Property predicate, Class<O> type)
      Lists all objects for the given predicate and type, considering this instance in a subject relation.
      Type Parameters:
      O - subtype of rdf-node
      Parameters:
      predicate - Property, can be null
      type - class-type of interface to find and cast, not null
      Returns:
      ExtendedIterator of nodes of the type O
      See Also:
    • listSubjects

      public <S extends org.apache.jena.rdf.model.RDFNode> org.apache.jena.util.iterator.ExtendedIterator<S> listSubjects(org.apache.jena.rdf.model.Property predicate, Class<S> type)
      Lists all subjects for the given predicate and type, considering this instance in an object relation.
      Type Parameters:
      S - subtype of rdf-node
      Parameters:
      predicate - Property, can be null
      type - class-type of interface to find and cast, not null
      Returns:
      ExtendedIterator of nodes of the type S
      See Also:
    • objects

      public Stream<org.apache.jena.rdf.model.RDFNode> objects(org.apache.jena.rdf.model.Property predicate)
      Lists all objects for the given predicate.
      Specified by:
      objects in interface OntObject
      Parameters:
      predicate - Property
      Returns:
      Stream of RDFNodes
      See Also:
    • listObjects

      public org.apache.jena.util.iterator.ExtendedIterator<org.apache.jena.rdf.model.RDFNode> listObjects(org.apache.jena.rdf.model.Property predicate)
      Lists all objects for the given predicate.
      Parameters:
      predicate - Property
      Returns:
      ExtendedIterator of RDFNodes
      See Also:
    • getModel

      public OntGraphModelImpl getModel()
      Specified by:
      getModel in interface org.apache.jena.rdf.model.RDFNode
      Overrides:
      getModel in class org.apache.jena.rdf.model.impl.ResourceImpl
    • objectType

      public Class<? extends OntObject> objectType()
      Gets a public ont-object type identifier.
      Specified by:
      objectType in interface OntObject
      Returns:
      Class, the actual type of this object
    • toString

      public String toString()
      Specified by:
      toString in interface org.apache.jena.rdf.model.RDFNode
      Specified by:
      toString in interface org.apache.jena.rdf.model.Resource
      Overrides:
      toString in class org.apache.jena.rdf.model.impl.ResourceImpl