Package org.apache.jena.ontology
Class OntTools.Path
- java.lang.Object
-
- java.util.AbstractCollection<E>
-
- java.util.AbstractList<E>
-
- java.util.ArrayList<Statement>
-
- org.apache.jena.ontology.OntTools.Path
-
- All Implemented Interfaces:
java.io.Serializable
,java.lang.Cloneable
,java.lang.Iterable<Statement>
,java.util.Collection<Statement>
,java.util.List<Statement>
,java.util.RandomAccess
- Enclosing class:
- OntTools
public static class OntTools.Path extends java.util.ArrayList<Statement>
A path is an application ofList
containing onlyStatement
objects, and in which for all adjacent elementsSi-1
andSi
, wherei > 0
, it is true that:Si-1.getObject().equals( Si.getSubject() )
- See Also:
- Serialized Form
-
-
Constructor Summary
Constructors Constructor Description Path()
Path(OntTools.Path basePath)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description OntTools.Path
append(Statement s)
Answer a new Path whose elements are this Path withs
added at the endStatement
getStatement(int i)
RDFNode
getTerminal()
Answer the RDF node at the end of the path, if defined, or nullResource
getTerminalResource()
Answer the resource at the end of the path, if defined, or nullboolean
hasTerminus(RDFNode n)
Answer true if the last link on the path has object equal ton
-
Methods inherited from class java.util.ArrayList
add, add, addAll, addAll, clear, clone, contains, ensureCapacity, equals, forEach, get, hashCode, indexOf, isEmpty, iterator, lastIndexOf, listIterator, listIterator, remove, remove, removeAll, removeIf, replaceAll, retainAll, set, size, sort, spliterator, subList, toArray, toArray, trimToSize
-
-
-
-
Constructor Detail
-
Path
public Path()
-
Path
public Path(OntTools.Path basePath)
-
-
Method Detail
-
getStatement
public Statement getStatement(int i)
-
append
public OntTools.Path append(Statement s)
Answer a new Path whose elements are this Path withs
added at the end
-
hasTerminus
public boolean hasTerminus(RDFNode n)
Answer true if the last link on the path has object equal ton
-
getTerminal
public RDFNode getTerminal()
Answer the RDF node at the end of the path, if defined, or null
-
getTerminalResource
public Resource getTerminalResource()
Answer the resource at the end of the path, if defined, or null
-
-