public class SeqImpl extends ContainerImpl implements Seq
Modifier and Type | Field and Description |
---|---|
static Implementation |
factory |
rdfNodeFactory
Constructor and Description |
---|
SeqImpl(ModelCom model)
Creates new SeqMem
|
SeqImpl(Node n,
EnhGraph g) |
SeqImpl(Resource r,
ModelCom m) |
SeqImpl(String uri,
ModelCom model) |
Modifier and Type | Method and 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,
Object o)
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.
|
Seq |
add(int index,
String o)
Insert a new member into the sequence at the specified position.
|
Seq |
add(int index,
String o,
String l)
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.
|
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.
|
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(Object o)
Return the index of a given member of the sequence.
|
int |
indexOf(RDFNode o)
Return the index of a given member of the sequence.
|
int |
indexOf(String o)
Return the index of a given member of the sequence.
|
int |
indexOf(String o,
String l)
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)
Remove the given value at the given index.
|
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,
Object o)
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.
|
Seq |
set(int index,
String o)
Set the value at a given index in the sequence.
|
Seq |
set(int index,
String o,
String l)
Set the value at a given index in the sequence.
|
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
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, getURI, hasLiteral, hasLiteral, hasLiteral, hasLiteral, hasLiteral, hasLiteral, hasProperty, hasProperty, hasProperty, hasProperty, hasURI, inModel, listProperties, listProperties, listProperties, removeAll, removeProperties, toString, visitWith
as, asNode, canAs, equals, getGraph, hashCode, isAnon, isLiteral, isResource, isURIResource, isValid, viewAs
addView, supports
add, add, add, add, add, add, add, add, add, contains, contains, contains, contains, contains, contains, contains, contains, contains, isAlt, isBag, isSeq, size
abort, addLiteral, addLiteral, addLiteral, addLiteral, addLiteral, addLiteral, addLiteral, addProperty, addProperty, addProperty, addProperty, begin, commit, equals, getId, getLocalName, getNameSpace, getProperty, getProperty, getPropertyResourceValue, getRequiredProperty, getRequiredProperty, getURI, hasLiteral, hasLiteral, hasLiteral, hasLiteral, hasLiteral, hasLiteral, hasProperty, hasProperty, hasProperty, hasProperty, hasURI, inModel, listProperties, listProperties, listProperties, removeAll, removeProperties, toString
as, asLiteral, asResource, canAs, getModel, isAnon, isLiteral, isResource, isURIResource, visitWith
asNode
public static final Implementation factory
public SeqImpl(ModelCom model)
public Resource getResource(int index)
Seq
getResource
in interface Seq
index
- The index of the required member.
.public Literal getLiteral(int index)
Seq
getLiteral
in interface Seq
index
- The index of the required member.
.public RDFNode getObject(int index)
Seq
public boolean getBoolean(int index)
Seq
getBoolean
in interface Seq
index
- The index of the required member.
.public byte getByte(int index)
Seq
public short getShort(int index)
Seq
public int getInt(int index)
Seq
public long getLong(int index)
Seq
public char getChar(int index)
Seq
public float getFloat(int index)
Seq
public double getDouble(int index)
Seq
public String getString(int index)
Seq
public String getLanguage(int index)
Seq
getLanguage
in interface Seq
index
- The index of the required member.
.@Deprecated public Resource getResource(int index, ResourceF f)
Seq
The supplied factory object is used to create the returned object.
getResource
in interface Seq
index
- The index of the required member.f
- The factory object used to create the returned object.
.public Bag getBag(int index)
Seq
public Alt getAlt(int index)
Seq
public Seq getSeq(int index)
Seq
public Seq set(int index, RDFNode o)
Seq
If the index is not in the range 1 to the size of the sequence, then an exception is raised.
public Seq set(int index, boolean o)
Seq
If the index is not in the range 1 to the size of the sequence, then a Jena exception is raised.
public Seq set(int index, long o)
Seq
If the index is not in the range 1 to the size of the sequence, then a Jena exception is raised.
public Seq set(int index, float o)
Seq
If the index is not in the range 1 to the size of the sequence, then a Jena exception is raised.
public Seq set(int index, double o)
Seq
If the index is not in the range 1 to the size of the sequence, then a Jena exception is raised.
public Seq set(int index, char o)
Seq
If the index is not in the range 1 to the size of the sequence, then a Jena exception is raised.
public Seq set(int index, String o)
Seq
If the index is not in the range 1 to the size of the sequence, then a Jena exception is raised.
public Seq set(int index, String o, String l)
Seq
If the index is not in the range 1 to the size of the sequence, then a Jena exception is raised.
public Seq set(int index, Object o)
Seq
If the index is not in the range 1 to the size of the sequence, then a Jena exception is raised.
public Seq add(int index, boolean o)
Seq
The existing member at that position, and all others with higher indexes, have their index increased by one.
public Seq add(int index, long o)
Seq
The existing member at that position, and all others with higher indexes, have their index increased by one.
public Seq add(int index, char o)
Seq
The existing member at that position, and all others with higher indexes, have their index increased by one.
public Seq add(int index, float o)
Seq
The existing member at that position, and all others with higher indexes, have their index increased by one.
public Seq add(int index, double o)
Seq
The existing member at that position, and all others with higher indexes, have their index increased by one.
public Seq add(int index, Object o)
Seq
The existing member at that position, and all others with higher indexes, have their index increased by one.
public Seq add(int index, String o)
Seq
The existing member at that position, and all others with higher indexes, have their index increased by one.
public Seq add(int index, String o, String l)
Seq
The existing member at that position, and all others with higher indexes, have their index increased by one.
public Seq add(int index, RDFNode o)
Seq
The existing member at that position, and all others with higher indexes, have their index increased by one.
public NodeIterator iterator()
Container
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.
iterator
in interface Container
iterator
in class ContainerImpl
public Container remove(Statement s)
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.
remove
in interface Container
remove
in class ContainerImpl
s
- The statement to be removed from the model.public Seq remove(int index)
Seq
All other members with a higher index will have their index reduced by one.
public Container remove(int index, RDFNode o)
remove
in class ContainerImpl
index
- The index at which the value should be removed.o
- The object at that index to be removedpublic int indexOf(RDFNode o)
Seq
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.
public int indexOf(boolean o)
Seq
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.
public int indexOf(long o)
Seq
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.
public int indexOf(char o)
Seq
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.
public int indexOf(float o)
Seq
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.
public int indexOf(double o)
Seq
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.
public int indexOf(Object o)
Seq
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.
public int indexOf(String o)
Seq
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.
public int indexOf(String o, String l)
Seq
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.
Licenced under the Apache License, Version 2.0