Class SeqImpl
- java.lang.Object
-
- org.apache.jena.enhanced.Polymorphic<RDFNode>
-
- org.apache.jena.enhanced.EnhNode
-
- org.apache.jena.rdf.model.impl.ResourceImpl
-
- org.apache.jena.rdf.model.impl.ContainerImpl
-
- org.apache.jena.rdf.model.impl.SeqImpl
-
- All Implemented Interfaces:
FrontsNode
,Container
,RDFNode
,Resource
,Seq
public class SeqImpl extends ContainerImpl implements Seq
An implementation of Seq
-
-
Field Summary
Fields Modifier and Type Field Description static Implementation
factory
-
Fields inherited from class org.apache.jena.rdf.model.impl.ResourceImpl
rdfNodeFactory
-
-
Method Summary
All Methods Instance Methods Concrete Methods Deprecated Methods Modifier and Type Method Description Seq
add(int index, boolean o)
Insert a new member into the sequence at the specified position.Seq
add(int index, char o)
Insert a new member into the sequence at the specified position.Seq
add(int index, double o)
Insert a new member into the sequence at the specified position.Seq
add(int index, float o)
Insert a new member into the sequence at the specified position.Seq
add(int index, long o)
Insert a new member into the sequence at the specified position.Seq
add(int index, java.lang.Object o)
Insert a new member into the sequence at the specified position.Seq
add(int index, java.lang.String o)
Insert a new member into the sequence at the specified position.Seq
add(int index, java.lang.String o, java.lang.String l)
Insert a new member into the sequence at the specified position.Seq
add(int index, RDFNode o)
Insert a new member into the sequence at the specified position.Alt
getAlt(int index)
Get the member at a given index.Bag
getBag(int index)
Get the member at a given index.boolean
getBoolean(int index)
Get the member at a given index.byte
getByte(int index)
Get the member at a given index.char
getChar(int index)
Get the member at a given index.double
getDouble(int index)
Get the member at a given index.float
getFloat(int index)
Get the member at a given index.int
getInt(int index)
Get the member at a given index.java.lang.String
getLanguage(int index)
Get the language of the member at a given index.Literal
getLiteral(int index)
Get the member at a given index.long
getLong(int index)
Get the member at a given index.RDFNode
getObject(int index)
Get the member at a given index.Resource
getResource(int index)
Get the member at a given index.Resource
getResource(int index, ResourceF f)
Deprecated.Seq
getSeq(int index)
Get the member at a given index.short
getShort(int index)
Get the member at a given index.java.lang.String
getString(int index)
Get the member at a given index.int
indexOf(boolean o)
Return the index of a given member of the sequence.int
indexOf(char o)
Return the index of a given member of the sequence.int
indexOf(double o)
Return the index of a given member of the sequence.int
indexOf(float o)
Return the index of a given member of the sequence.int
indexOf(long o)
Return the index of a given member of the sequence.int
indexOf(java.lang.Object o)
Return the index of a given member of the sequence.int
indexOf(java.lang.String o)
Return the index of a given member of the sequence.int
indexOf(java.lang.String o, java.lang.String l)
Return the index of a given member of the sequence.int
indexOf(RDFNode o)
Return the index of a given member of the sequence.NodeIterator
iterator()
Return an iterator over the values.Seq
remove(int index)
Remove the member at the specified index.Container
remove(int index, RDFNode o)
Container
remove(Statement s)
Remove a value from the container.Seq
set(int index, boolean o)
Set the value at a given index in the sequence.Seq
set(int index, char o)
Set the value at a given index in the sequence.Seq
set(int index, double o)
Set the value at a given index in the sequence.Seq
set(int index, float o)
Set the value at a given index in the sequence.Seq
set(int index, long o)
Set the value at a given index in the sequence.Seq
set(int index, java.lang.Object o)
Set the value at a given index in the sequence.Seq
set(int index, java.lang.String o)
Set the value at a given index in the sequence.Seq
set(int index, java.lang.String o, java.lang.String l)
Set the value at a given index in the sequence.Seq
set(int index, RDFNode o)
Set the value at a given index in the sequence.-
Methods inherited from class org.apache.jena.rdf.model.impl.ContainerImpl
add, add, add, add, add, add, add, add, add, containerContains, containerIndexOf, contains, contains, contains, contains, contains, contains, contains, contains, contains, isAlt, isBag, isSeq, listContainerMembers, size
-
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, getModel, getNameSpace, getProperty, getProperty, getPropertyResourceValue, getRequiredProperty, getRequiredProperty, getStmtTerm, getURI, hasLiteral, hasLiteral, hasLiteral, hasLiteral, hasLiteral, hasLiteral, hasProperty, hasProperty, hasProperty, hasProperty, hasURI, inModel, listProperties, listProperties, listProperties, removeAll, removeProperties, toString, 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 interface org.apache.jena.rdf.model.Container
add, add, add, add, add, add, add, add, add, contains, contains, contains, contains, contains, contains, contains, contains, contains, isAlt, isBag, isSeq, size
-
Methods inherited from interface org.apache.jena.graph.FrontsNode
asNode
-
Methods inherited from interface org.apache.jena.rdf.model.RDFNode
as, asLiteral, asResource, canAs, getModel, 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, getRequiredProperty, getStmtTerm, getURI, hasLiteral, hasLiteral, hasLiteral, hasLiteral, hasLiteral, hasLiteral, hasProperty, hasProperty, hasProperty, hasProperty, hasURI, inModel, listProperties, listProperties, listProperties, removeAll, removeProperties, toString
-
-
-
-
Field Detail
-
factory
public static final Implementation factory
-
-
Method Detail
-
getResource
public Resource getResource(int index)
Description copied from interface:Seq
Get the member at a given index.- Specified by:
getResource
in interfaceSeq
- Parameters:
index
- The index of the required member. .- Returns:
- The member at the given index.
-
getLiteral
public Literal getLiteral(int index)
Description copied from interface:Seq
Get the member at a given index.- Specified by:
getLiteral
in interfaceSeq
- Parameters:
index
- The index of the required member. .- Returns:
- The member at the given index.
-
getObject
public RDFNode getObject(int index)
Description copied from interface:Seq
Get the member at a given index.
-
getBoolean
public boolean getBoolean(int index)
Description copied from interface:Seq
Get the member at a given index.- Specified by:
getBoolean
in interfaceSeq
- Parameters:
index
- The index of the required member. .- Returns:
- The member at the given index.
-
getByte
public byte getByte(int index)
Description copied from interface:Seq
Get the member at a given index.
-
getShort
public short getShort(int index)
Description copied from interface:Seq
Get the member at a given index.
-
getInt
public int getInt(int index)
Description copied from interface:Seq
Get the member at a given index.
-
getLong
public long getLong(int index)
Description copied from interface:Seq
Get the member at a given index.
-
getChar
public char getChar(int index)
Description copied from interface:Seq
Get the member at a given index.
-
getFloat
public float getFloat(int index)
Description copied from interface:Seq
Get the member at a given index.
-
getDouble
public double getDouble(int index)
Description copied from interface:Seq
Get the member at a given index.
-
getString
public java.lang.String getString(int index)
Description copied from interface:Seq
Get the member at a given index.
-
getLanguage
public java.lang.String getLanguage(int index)
Description copied from interface:Seq
Get the language of the member at a given index.- Specified by:
getLanguage
in interfaceSeq
- Parameters:
index
- The index of the required member. .- Returns:
- The member at the given index.
-
getResource
@Deprecated public Resource getResource(int index, ResourceF f)
Deprecated.Description copied from interface:Seq
Get the member at a given index.The supplied factory object is used to create the returned object.
- Specified by:
getResource
in interfaceSeq
- Parameters:
index
- The index of the required member.f
- The factory object used to create the returned object. .- Returns:
- The member at the given index.
-
getBag
public Bag getBag(int index)
Description copied from interface:Seq
Get the member at a given index.
-
getAlt
public Alt getAlt(int index)
Description copied from interface:Seq
Get the member at a given index.
-
getSeq
public Seq getSeq(int index)
Description copied from interface:Seq
Get the member at a given index.
-
set
public Seq set(int index, RDFNode o)
Description copied from interface:Seq
Set the value at a given index in the sequence.If the index is not in the range 1 to the size of the sequence, then an exception is raised.
-
set
public Seq set(int index, boolean o)
Description copied from interface:Seq
Set the value at a given index in the sequence.If the index is not in the range 1 to the size of the sequence, then a Jena exception is raised.
-
set
public Seq set(int index, long o)
Description copied from interface:Seq
Set the value at a given index in the sequence.If the index is not in the range 1 to the size of the sequence, then a Jena exception is raised.
-
set
public Seq set(int index, float o)
Description copied from interface:Seq
Set the value at a given index in the sequence.If the index is not in the range 1 to the size of the sequence, then a Jena exception is raised.
-
set
public Seq set(int index, double o)
Description copied from interface:Seq
Set the value at a given index in the sequence.If the index is not in the range 1 to the size of the sequence, then a Jena exception is raised.
-
set
public Seq set(int index, char o)
Description copied from interface:Seq
Set the value at a given index in the sequence.If the index is not in the range 1 to the size of the sequence, then a Jena exception is raised.
-
set
public Seq set(int index, java.lang.String o)
Description copied from interface:Seq
Set the value at a given index in the sequence.If the index is not in the range 1 to the size of the sequence, then a Jena exception is raised.
-
set
public Seq set(int index, java.lang.String o, java.lang.String l)
Description copied from interface:Seq
Set the value at a given index in the sequence.If the index is not in the range 1 to the size of the sequence, then a Jena exception is raised.
-
set
public Seq set(int index, java.lang.Object o)
Description copied from interface:Seq
Set the value at a given index in the sequence.If the index is not in the range 1 to the size of the sequence, then a Jena exception is raised.
-
add
public Seq add(int index, boolean o)
Description copied from interface:Seq
Insert a new member into the sequence at the specified position.The existing member at that position, and all others with higher indexes, have their index increased by one.
-
add
public Seq add(int index, long o)
Description copied from interface:Seq
Insert a new member into the sequence at the specified position.The existing member at that position, and all others with higher indexes, have their index increased by one.
-
add
public Seq add(int index, char o)
Description copied from interface:Seq
Insert a new member into the sequence at the specified position.The existing member at that position, and all others with higher indexes, have their index increased by one.
-
add
public Seq add(int index, float o)
Description copied from interface:Seq
Insert a new member into the sequence at the specified position.The existing member at that position, and all others with higher indexes, have their index increased by one.
-
add
public Seq add(int index, double o)
Description copied from interface:Seq
Insert a new member into the sequence at the specified position.The existing member at that position, and all others with higher indexes, have their index increased by one.
-
add
public Seq add(int index, java.lang.Object o)
Description copied from interface:Seq
Insert a new member into the sequence at the specified position.The existing member at that position, and all others with higher indexes, have their index increased by one.
-
add
public Seq add(int index, java.lang.String o)
Description copied from interface:Seq
Insert a new member into the sequence at the specified position.The existing member at that position, and all others with higher indexes, have their index increased by one.
-
add
public Seq add(int index, java.lang.String o, java.lang.String l)
Description copied from interface:Seq
Insert a new member into the sequence at the specified position.The existing member at that position, and all others with higher indexes, have their index increased by one.
-
add
public Seq add(int index, RDFNode o)
Description copied from interface:Seq
Insert a new member into the sequence at the specified position.The existing member at that position, and all others with higher indexes, have their index increased by one.
-
iterator
public NodeIterator iterator()
Description copied from interface:Container
Return an iterator over the values.Note the iterator returned is not a standard java.util.iterator. It has a
.close
method which SHOULD be called if the application has not completed the iteration, but no longer requires the iterator. This will enable the freeing of resources in, for example, implementations which store their models in a database.- Specified by:
iterator
in interfaceContainer
- Overrides:
iterator
in classContainerImpl
- Returns:
- Return an iterator over the values.
-
remove
public Container remove(Statement s)
Description copied from interface:Container
Remove a value from the container.The predicate of the statement
s
identifies the ordinal of the value to be removed. Once removed, the values in the container with a higher ordinal value are renumbered. The renumbering algorithm depends on the type of container.- Specified by:
remove
in interfaceContainer
- Overrides:
remove
in classContainerImpl
- Parameters:
s
- The statement to be removed from the model.- Returns:
- this container to enable cascading calls.
-
remove
public Seq remove(int index)
Description copied from interface:Seq
Remove the member at the specified index.All other members with a higher index will have their index reduced by one.
-
remove
public Container remove(int index, RDFNode o)
- Overrides:
remove
in classContainerImpl
-
indexOf
public int indexOf(RDFNode o)
Description copied from interface:Seq
Return the index of a given member of the sequence.If more the same value appears more than once in the sequence, it is undefined which of the indexes will be returned.
If the member is not found in this sequence, a value of 0 is returned.
-
indexOf
public int indexOf(boolean o)
Description copied from interface:Seq
Return the index of a given member of the sequence.If more the same value appears more than once in the sequence, it is undefined which of the indexes will be returned.
If the member is not found in this sequence, a value of 0 is returned.
-
indexOf
public int indexOf(long o)
Description copied from interface:Seq
Return the index of a given member of the sequence.If more the same value appears more than once in the sequence, it is undefined which of the indexes will be returned.
If the member is not found in this sequence, a value of 0 is returned.
-
indexOf
public int indexOf(char o)
Description copied from interface:Seq
Return the index of a given member of the sequence.If more the same value appears more than once in the sequence, it is undefined which of the indexes will be returned.
If the member is not found in this sequence, a value of 0 is returned.
-
indexOf
public int indexOf(float o)
Description copied from interface:Seq
Return the index of a given member of the sequence.If more the same value appears more than once in the sequence, it is undefined which of the indexes will be returned.
If the member is not found in this sequence, a value of 0 is returned.
-
indexOf
public int indexOf(double o)
Description copied from interface:Seq
Return the index of a given member of the sequence.If more the same value appears more than once in the sequence, it is undefined which of the indexes will be returned.
If the member is not found in this sequence, a value of 0 is returned.
-
indexOf
public int indexOf(java.lang.Object o)
Description copied from interface:Seq
Return the index of a given member of the sequence.If more the same value appears more than once in the sequence, it is undefined which of the indexes will be returned.
If the member is not found in this sequence, a value of 0 is returned.
-
indexOf
public int indexOf(java.lang.String o)
Description copied from interface:Seq
Return the index of a given member of the sequence.If more the same value appears more than once in the sequence, it is undefined which of the indexes will be returned.
If the member is not found in this sequence, a value of 0 is returned.
-
indexOf
public int indexOf(java.lang.String o, java.lang.String l)
Description copied from interface:Seq
Return the index of a given member of the sequence.If more the same value appears more than once in the sequence, it is undefined which of the indexes will be returned.
If the member is not found in this sequence, a value of 0 is returned.
-
-