|
eRqlEngine API documentation - http://www.wleklinski.de/rdf/ | ||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objecteworks.RDF.model.StaticCollection
eworks.RDF.model.Statement
Represents a RDF statement.
Constructor Summary | |
Statement()
Creates a new and empty statement. |
|
Statement(LiteralValue subject,
LiteralValue predicat,
LiteralValue object)
Creates a new statement with the given subject, predicate and object. |
Method Summary | |
boolean |
add(Tuple t)
Do not call this method, as it throws an UnsupportedOperationException .
|
boolean |
addAll(Collection c,
boolean distinct)
Do not call this method, as it throws an UnsupportedOperationException .
|
Object |
clone()
Clones this statement and returns a new instance containing the same subject, predicate and object. |
boolean |
equals(Object o)
Checks if the given object o is equal to this statement.
|
Value |
get(int index)
Returns the statement's component with the given index ,
0 will return it's subject, 1 it's predicate and 2 it's object. |
int |
getNumberOfGroups()
Returns the number of tuple goups, always 1 in this implementation. |
LiteralValue |
getObject()
Returns this statement's object. |
LiteralValue |
getPredicat()
Returns this statement's predicate. |
int |
getSize()
Returns the statement's number of components (always 3). |
LiteralValue |
getSubject()
Returns this statement's subject. |
Tuple |
getTuple(int index)
Returns a certain tuple specified by it's numerical index. |
Tuples |
getTuplesByGroup(int groupIndex)
Returns all tuples of a certain tuple group. |
void |
set(int index,
LiteralValue value)
Sets the statement's component with the given index
to the given value . |
Methods inherited from class eworks.RDF.model.StaticCollection |
add, addAll, clear, contains, containsAll, isEmpty, iterator, remove, removeAll, retainAll, size, toArray, toArray |
Methods inherited from class java.lang.Object |
finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Methods inherited from interface java.util.Collection |
add, addAll, clear, contains, containsAll, hashCode, isEmpty, iterator, remove, removeAll, retainAll, size, toArray, toArray |
Constructor Detail |
public Statement()
public Statement(LiteralValue subject, LiteralValue predicat, LiteralValue object)
subject
- The statement's subject.predicat
- The statement's predicat.object
- The statement's object.Method Detail |
public LiteralValue getSubject()
public LiteralValue getPredicat()
public LiteralValue getObject()
public boolean add(Tuple t)
UnsupportedOperationException
.
This method is implemented due to the contract with StaticCollection
, but
cannot be applied on instances of this class.
add
in interface Tuples
t
- The tuple to add.
true
if and only if the set of tuples has changed.
UnsupportedOperationException
- always.public int getNumberOfGroups()
getNumberOfGroups
in interface Tuples
public Object clone()
clone
in interface Tuples
public Tuples getTuplesByGroup(int groupIndex)
getTuplesByGroup
in interface Tuples
groupIndex
- The group's numerical index, has to be the value 1 in
this implementation.
ArrayIndexOutOfBoundsException
- if the groupIndex
is unequal to 1.public boolean addAll(Collection c, boolean distinct)
UnsupportedOperationException
.
This method is implemented due to the contract with StaticCollection
, but
cannot be applied on instances of this class.
addAll
in interface Tuples
c
- The tuples to add.distinct
- If set to true
, there will no duplicates be added.
true
if and only if at least one tuple was added.
UnsupportedOperationException
- always.public Tuple getTuple(int index)
getTuple
in interface Tuples
index
- The numerical index of the tuple to return, must be 0 in this
implementation.
ArrayIndexOutOfBoundsException
- if index
is unequal to 0.public Value get(int index) throws ArrayIndexOutOfBoundsException
index
,
0 will return it's subject, 1 it's predicate and 2 it's object.
get
in interface Tuple
index
- The index of the component to return.
index
.
ArrayIndexOutOfBoundsException
- if the index is not a value
between 0 and StaticCollection.size()
.public void set(int index, LiteralValue value)
index
to the given value
. The index
0 will set
it's subject, 1 it's predicate and 2 it's object.
set
in interface Tuple
index
- The index of the component to set.value
- The value to set.
ArrayIndexOutOfBoundsException
- if the index is not a value
between 0 and StaticCollection.size()
.public int getSize()
getSize
in interface Tuple
public boolean equals(Object o)
o
is equal to this statement.
To do so, it is checked if o
is an instance of the class
Statement
, too, and if it isn't, the result of
Object.equals(java.lang.Object)
is returned.
Otherwise the subject, predicate and object of the given statement are
compared with subject, predicate and obect of this statement, and if all
of them are equal, true
is returned, false
otherwise.
equals
in interface Tuple
|
eRqlEngine API documentation - http://www.wleklinski.de/rdf/ | ||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |