|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
RDF Sequence container.
This interface defines methods for accessing RDF Sequence resources. These methods operate on the RDF statements contained in a model. The Sequence implementation may cache state from the underlying model, so objects should not be added to or removed from the Sequence by directly manipulating its properties, whilst the Sequence is being accessed through this interface.
When a member is deleted from a sequence using this interface, or an iterator returned through this interface, all the other members with higher ordinals are renumbered to one below what they previously were.
This interface provides methods supporting typed literals. This means
that methods are provided which will translate a built in type, or an
object to an RDF Literal. This translation is done by invoking the
toString()
method of the object, or its built in equivalent.
The reverse translation is also supported. This is built in for built
in types. Factory objects, provided by the application, are used
for application objects.
This interface provides methods for supporting enhanced resources. An enhanced resource is a resource to which the application has added behaviour. RDF containers are examples of enhanced resources built in to this package. Enhanced resources are supported by encapsulating a resource created by an implementation in another class which adds the extra behaviour. Factory objects are used to construct such enhanced resources.
Method Summary | |
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,
RDFNode 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. |
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. |
long |
getLong(int index)
Get the member at a given index. |
RDFNode |
getObject(int index)
Get the member at a given index. |
java.lang.Object |
getObject(int index,
ObjectF f)
Get the member at a given index |
Resource |
getResource(int index)
Get the member at a given index. |
Resource |
getResource(int index,
ResourceF f)
Get the member at a given index. |
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(RDFNode 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. |
Seq |
remove(int index)
Remove the member at the specified index. |
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,
RDFNode 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. |
Methods inherited from interface com.hp.hpl.mesa.rdf.jena.model.Container |
add, add, add, add, add, add, add, add, add, contains, contains, contains, contains, contains, contains, contains, contains, contains, iterator, remove, size |
Methods inherited from interface com.hp.hpl.mesa.rdf.jena.model.Resource |
abort, addProperty, addProperty, addProperty, addProperty, addProperty, addProperty, addProperty, addProperty, addProperty, begin, commit, equals, getId, getLocalName, getModel, getNameSpace, getProperty, getURI, hasProperty, hasProperty, hasProperty, hasProperty, hasProperty, hasProperty, hasProperty, hasProperty, hasProperty, hasProperty, isAnon, listProperties, listProperties, removeProperties, toString |
Method Detail |
public Seq add(int index, RDFNode o) throws RDFException
The existing member at that position, and all others with higher indexes, have their index increased by one.
index
- The index of the new member,o
- The member to be added.RDFException
- Generic RDF exception.public Seq add(int index, boolean o) throws RDFException
The existing member at that position, and all others with higher indexes, have their index increased by one.
index
- The index of the new member,o
- The member to be added.RDFException
- Generic RDF exception.public Seq add(int index, long o) throws RDFException
The existing member at that position, and all others with higher indexes, have their index increased by one.
index
- The index of the new member,o
- The member to be added.RDFException
- Generic RDF exception.public Seq add(int index, char o) throws RDFException
The existing member at that position, and all others with higher indexes, have their index increased by one.
index
- The index of the new member,o
- The member to be added.RDFException
- Generic RDF exception.public Seq add(int index, float o) throws RDFException
The existing member at that position, and all others with higher indexes, have their index increased by one.
index
- The index of the new member,o
- The member to be added.RDFException
- Generic RDF exception.public Seq add(int index, double o) throws RDFException
The existing member at that position, and all others with higher indexes, have their index increased by one.
index
- The index of the new member,o
- The member to be added.RDFException
- Generic RDF exception.public Seq add(int index, java.lang.String o) throws RDFException
The existing member at that position, and all others with higher indexes, have their index increased by one.
index
- The index of the new member,o
- The member to be added.RDFException
- Generic RDF exception.public Seq add(int index, java.lang.String o, java.lang.String l) throws RDFException
The existing member at that position, and all others with higher indexes, have their index increased by one.
index
- The index of the new member,o
- The member to be added.l
- the langauge of the value addedRDFException
- Generic RDF exception.public Seq add(int index, java.lang.Object o) throws RDFException
The existing member at that position, and all others with higher indexes, have their index increased by one.
index
- The index of the new member,o
- The member to be added.RDFException
- Generic RDF exception.public boolean getBoolean(int index) throws RDFException
index
- The index of the required member.RDFException
- Generic RDF exception.public byte getByte(int index) throws RDFException
index
- The index of the required member.RDFException
- Generic RDF exception.public short getShort(int index) throws RDFException
index
- The index of the required member.RDFException
- Generic RDF exception.public int getInt(int index) throws RDFException
index
- The index of the required member.RDFException
- Generic RDF exception.public long getLong(int index) throws RDFException
index
- The index of the required member.RDFException
- Generic RDF exception.public char getChar(int index) throws RDFException
index
- The index of the required member.RDFException
- Generic RDF exception.public float getFloat(int index) throws RDFException
index
- The index of the required member.RDFException
- Generic RDF exception.public double getDouble(int index) throws RDFException
index
- The index of the required member.RDFException
- Generic RDF exception.public java.lang.String getString(int index) throws RDFException
index
- The index of the required member.RDFException
- Generic RDF exception.public java.lang.String getLanguage(int index) throws RDFException
index
- The index of the required member.RDFException
- Generic RDF exception.public java.lang.Object getObject(int index, ObjectF f) throws RDFException
The supplied factory object is used to created the object return.
index
- The index of the required member.f
- A factory object used to create the returned object.RDFException
- Generic RDF exception.public Resource getResource(int index, ResourceF f) throws RDFException
The supplied factory object is used to create the returned object.
index
- The index of the required member.f
- The factory object used to create the returned object.RDFException
- Generic RDF exception.public Literal getLiteral(int index) throws RDFException
index
- The index of the required member.RDFException
- Generic RDF exception.public Resource getResource(int index) throws RDFException
index
- The index of the required member.RDFException
- Generic RDF exception.public RDFNode getObject(int index) throws RDFException
index
- The index of the required member.RDFException
- Generic RDF exception.public Bag getBag(int index) throws RDFException
index
- The index of the required member.RDFException
- Generic RDF exception.public Alt getAlt(int index) throws RDFException
index
- The index of the required member.RDFException
- Generic RDF exception.public Seq getSeq(int index) throws RDFException
index
- The index of the required member.RDFException
- Generic RDF exception.public Seq remove(int index) throws RDFException
All other members with a higher index will have their index reduced by one.
index
- The index of the member to be removed.RDFException
- Generic RDF exception.public int indexOf(RDFNode o) throws RDFException
If more the 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.
o
- The member sought.RDFException
- Generic RDF exception.public int indexOf(boolean o) throws RDFException
If more the 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.
o
- The member sought.RDFException
- Generic RDF exception.public int indexOf(long o) throws RDFException
If more the 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.
o
- The member sought.RDFException
- Generic RDF exception.public int indexOf(char o) throws RDFException
If more the 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.
o
- The member sought.RDFException
- Generic RDF exception.public int indexOf(float o) throws RDFException
If more the 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.
o
- The member sought.RDFException
- Generic RDF exception.public int indexOf(double o) throws RDFException
If more the 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.
o
- The member sought.RDFException
- Generic RDF exception.public int indexOf(java.lang.String o) throws RDFException
If more the 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.
o
- The member sought.RDFException
- Generic RDF exception.public int indexOf(java.lang.String o, java.lang.String l) throws RDFException
If more the 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.
o
- The member sought.l
- the language of the member soughtRDFException
- Generic RDF exception.public int indexOf(java.lang.Object o) throws RDFException
If more the 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.
o
- The member sought.RDFException
- Generic RDF exception.public Seq set(int index, RDFNode o) throws RDFException
If the index is not in the range 1 to the size of the sequence, then an RDFException is raised.
index
- The index whose member is to be set.o
- The value to be set.RDFException
- Generic RDF exception.public Seq set(int index, boolean o) throws RDFException
If the index is not in the range 1 to the size of the sequence, then an RDFException is raised.
index
- The index whose member is to be set.o
- The value to be set.RDFException
- Generic RDF exception.public Seq set(int index, long o) throws RDFException
If the index is not in the range 1 to the size of the sequence, then an RDFException is raised.
index
- The index whose member is to be set.o
- The value to be set.RDFException
- Generic RDF exception.public Seq set(int index, char o) throws RDFException
If the index is not in the range 1 to the size of the sequence, then an RDFException is raised.
index
- The index whose member is to be set.o
- The value to be set.RDFException
- Generic RDF exception.public Seq set(int index, float o) throws RDFException
If the index is not in the range 1 to the size of the sequence, then an RDFException is raised.
index
- The index whose member is to be set.o
- The value to be set.RDFException
- Generic RDF exception.public Seq set(int index, double o) throws RDFException
If the index is not in the range 1 to the size of the sequence, then an RDFException is raised.
index
- The index whose member is to be set.o
- The value to be set.RDFException
- Generic RDF exception.public Seq set(int index, java.lang.String o) throws RDFException
If the index is not in the range 1 to the size of the sequence, then an RDFException is raised.
index
- The index whose member is to be set.o
- The value to be set.RDFException
- Generic RDF exception.public Seq set(int index, java.lang.String o, java.lang.String l) throws RDFException
If the index is not in the range 1 to the size of the sequence, then an RDFException is raised.
index
- The index whose member is to be set.o
- The value to be set.l
- The language of the value set.RDFException
- Generic RDF exception.public Seq set(int index, java.lang.Object o) throws RDFException
If the index is not in the range 1 to the size of the sequence, then an RDFException is raised.
index
- The index whose member is to be set.o
- The value to be set.RDFException
- Generic RDF exception.
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |