| com.hp.hpl.jena.rdf.model.Statement
All known Subclasses: com.hp.hpl.jena.rdf.model.impl.StatementImpl,
Statement | public interface Statement extends FrontsTriple(Code) | | An RDF Statement.
A Statement is not a Resource, but can produce a ReifiedStatement
that represents it and from which the Statement can be recovered.
A statement instance tracks which model created it, if any. All the
Resource components of a Statement are in the same model as the
Statement, if it has one, and are in no model if the Statement isn't.
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.
author: bwm; additions by kers version: $Name: $ $Revision: 1.21 $ $Date: 2008/01/02 12:05:48 $ |
Inner Class :public static class Util | |
Method Summary | |
public Statement | changeLiteralObject(boolean o) Remove this statement (s, p, x) from the model that contains it. | public Statement | changeLiteralObject(long o) Remove this statement (s, p, x) from the model that contains it. | public Statement | changeLiteralObject(int o) Remove this statement (s, p, x) from the model that contains it. | public Statement | changeLiteralObject(char o) Remove this statement (s, p, x) from the model that contains it. | public Statement | changeLiteralObject(float o) Remove this statement (s, p, x) from the model that contains it. | public Statement | changeLiteralObject(double o) Remove this statement (s, p, x) from the model that contains it. | public Statement | changeObject(float o) | public Statement | changeObject(boolean o) | public Statement | changeObject(long o) | public Statement | changeObject(double o) | public Statement | changeObject(Object o) | public Statement | changeObject(String o) change the object of the statement (S, P, X) to (S, P, o).
The statement with the old value is removed from the model and
a new statement with the new value added and returned.
Parameters: o - The value to be set. | public Statement | changeObject(String o, boolean wellFormed) change the object of the statement (S, P, X) to (S, P, o). | public Statement | changeObject(String o, String l) change the object of the statement (S, P, X) to (S, P, o). | public Statement | changeObject(String o, String l, boolean wellFormed) change the object of the statement (S, P, X) to (S, P, o). | public Statement | changeObject(RDFNode o) change the object of the statement (S, P, X) to (S, P, o). | ReifiedStatement | createReifiedStatement() answer a ReifiedStatement object that embodies this Statement and
is in the same Model (if any). | ReifiedStatement | createReifiedStatement(String uri) answer a ReifiedStatement object that embodies this Statement, has
the same Model, and has the given uri . | public boolean | equals(Object o) determine whether two statements are equal.
Two statements are considered to be equal if they have the
the same subject, predicate and object. | public Alt | getAlt() Return the object of the statement. | public Bag | getBag() Return the object of the statement. | public boolean | getBoolean() Return the object of the statement. | public byte | getByte() Return the object of the statement. | public char | getChar() Return the object of the statement. | public double | getDouble() Return the object of the statement. | public float | getFloat() Return the object of the statement. | public int | getInt() Return the object of the statement. | public String | getLanguage() Return the language of the object of the statement. | public Literal | getLiteral() Return the object of the statement. | public long | getLong() Return the object of the statement. | Model | getModel() get the Model this Statement was created in. | public RDFNode | getObject() An accessor funtion to return the object of the statement. | public Object | getObject(ObjectF f) Return the object of the statement. | public Property | getPredicate() An accessor function to return the predicate of the statement. | public Statement | getProperty(Property p) Get a property of the object of the statement.
There is an unfortunate ambiguity here. | public Resource | getResource() Return the object of the statement. | public Resource | getResource(ResourceF f) Return the object of the statement. | public Seq | getSeq() Return the object of the statement. | public short | getShort() Return the object of the statement. | public Statement | getStatementProperty(Property p) Return a property of this statement.
The model associated with this statement is searched for a statement with
this statement as subject and the specified property as predicate. | public String | getString() Return the object of the statement. | public Resource | getSubject() An accessor method to return the subject of the statements. | public boolean | hasWellFormedXML() Answer true iff the Literal object of this statement is well-formed XML
(ie equivalent to getLiteral().isWellFormedXML()). | public int | hashCode() | boolean | isReified() Determine if this statement is the subject of any statements its associated
model. | RSIterator | listReifiedStatements() answer an iterator which delivers all the reified statements in the model
this Statement belongs to that match this Statement. | public Statement | remove() Remove this statement from its associated model. | void | removeReification() Finds all possible resources which are
the reification of this statement, and for each
removes all four triples of the reification quad. |
changeLiteralObject | public Statement changeLiteralObject(boolean o)(Code) | | Remove this statement (s, p, x) from the model that contains it. Create a
new statement (s, p, o'), where o' is the typed literal corresponding to
o, add it to the model, and answer it.
|
changeLiteralObject | public Statement changeLiteralObject(long o)(Code) | | Remove this statement (s, p, x) from the model that contains it. Create a
new statement (s, p, o'), where o' is the typed literal corresponding to
o, add it to the model, and answer it.
|
changeLiteralObject | public Statement changeLiteralObject(int o)(Code) | | Remove this statement (s, p, x) from the model that contains it. Create a
new statement (s, p, o'), where o' is the typed literal corresponding to
o, add it to the model, and answer it.
|
changeLiteralObject | public Statement changeLiteralObject(char o)(Code) | | Remove this statement (s, p, x) from the model that contains it. Create a
new statement (s, p, o'), where o' is the typed literal corresponding to
o, add it to the model, and answer it.
|
changeLiteralObject | public Statement changeLiteralObject(float o)(Code) | | Remove this statement (s, p, x) from the model that contains it. Create a
new statement (s, p, o'), where o' is the typed literal corresponding to
o, add it to the model, and answer it.
|
changeLiteralObject | public Statement changeLiteralObject(double o)(Code) | | Remove this statement (s, p, x) from the model that contains it. Create a
new statement (s, p, o'), where o' is the typed literal corresponding to
o, add it to the model, and answer it.
|
changeObject | public Statement changeObject(String o)(Code) | | change the object of the statement (S, P, X) to (S, P, o).
The statement with the old value is removed from the model and
a new statement with the new value added and returned.
Parameters: o - The value to be set. the new (S, P, o) statement. |
changeObject | public Statement changeObject(String o, boolean wellFormed)(Code) | | change the object of the statement (S, P, X) to (S, P, o).
The statement with the old value is removed from the model and
a new statement with the new value added and returned.
Parameters: o - The value to be set. Parameters: wellFormed - true if o is well formed XML the new (S, P, o) statement. |
changeObject | public Statement changeObject(String o, String l)(Code) | | change the object of the statement (S, P, X) to (S, P, o).
The statement with the old value is removed from the model and
a new statement with the new value added.
Parameters: o - The value to be set. Parameters: l - the language of the String the new (S, P, o) statement.. |
changeObject | public Statement changeObject(String o, String l, boolean wellFormed)(Code) | | change the object of the statement (S, P, X) to (S, P, o).
The statement with the old value is removed from the model and
a new statement with the new value added.
Parameters: o - The value to be set. Parameters: l - the language of the String the new (S, P, o) statement. |
changeObject | public Statement changeObject(RDFNode o)(Code) | | change the object of the statement (S, P, X) to (S, P, o).
The statement with the old value is removed from the model and
a new statement with the new value added.
Parameters: o - The value to be set the new (S, P, o) statement. |
createReifiedStatement | ReifiedStatement createReifiedStatement()(Code) | | answer a ReifiedStatement object that embodies this Statement and
is in the same Model (if any).
|
createReifiedStatement | ReifiedStatement createReifiedStatement(String uri)(Code) | | answer a ReifiedStatement object that embodies this Statement, has
the same Model, and has the given uri .
|
equals | public boolean equals(Object o)(Code) | | determine whether two statements are equal.
Two statements are considered to be equal if they have the
the same subject, predicate and object. A statement can
only be equal to another statement object.
true if and only if the equality condition is met. Parameters: o - the object to be compared |
getAlt | public Alt getAlt()(Code) | | Return the object of the statement.
An exception will be thrown if the object is not a Resource.
The object of the statement interpreted as a value of thethe specified type. |
getBag | public Bag getBag()(Code) | | Return the object of the statement.
An exception will be thrown if the object is not a Resource.
The object of the statement interpreted as a value of thethe specified type. |
getBoolean | public boolean getBoolean()(Code) | | Return the object of the statement.
An exception will be thrown if the object is not a Literal.
The object of the statement interpreted as a value of thethe specified type. |
getByte | public byte getByte()(Code) | | Return the object of the statement.
An exception will be thrown if the object is not a Literal.
The object of the statement interpreted as a value of thethe specified type. |
getChar | public char getChar()(Code) | | Return the object of the statement.
An exception will be thrown if the object is not a Literal.
The object of the statement interpreted as a value of thethe specified type. |
getDouble | public double getDouble()(Code) | | Return the object of the statement.
An exception will be thrown if the object is not a Literal.
The object of the statement interpreted as a value of thethe specified type. |
getFloat | public float getFloat()(Code) | | Return the object of the statement.
An exception will be thrown if the object is not a Literal.
The object of the statement interpreted as a value of thethe specified type. |
getInt | public int getInt()(Code) | | Return the object of the statement.
An exception will be thrown if the object is not a Literal.
The object of the statement interpreted as a value of thethe specified type. |
getLanguage | public String getLanguage()(Code) | | Return the language of the object of the statement.
An exception will be thrown if the object is not a Literal.
the language of the object of the statement |
getLiteral | public Literal getLiteral()(Code) | | Return the object of the statement.
An exception will be thrown if the object is not a Literal.
The Literal which is the object of the statement. |
getLong | public long getLong()(Code) | | Return the object of the statement.
An exception will be thrown iof the object is not a Literal.
The object of the statement interpreted as a value of thethe specified type. |
getModel | Model getModel()(Code) | | get the Model this Statement was created in.
|
getObject | public RDFNode getObject()(Code) | | An accessor funtion to return the object of the statement.
Return the object of the statement. |
getObject | public Object getObject(ObjectF f)(Code) | | Return the object of the statement.
An exception will be thrown if the object is not a Literal.
The object of the statement. Parameters: f - A factory used to create the returned object. |
getPredicate | public Property getPredicate()(Code) | | An accessor function to return the predicate of the statement.
The predicate of the statement. |
getProperty | public Statement getProperty(Property p)(Code) | | Get a property of the object of the statement.
There is an unfortunate ambiguity here. GetProperty would normally
treat the statement as a resource, and return a property about this
statement. This is not what is wanted in most cases, so getProperty
on a statement is defined to call getProperty on its object. If
a property of the statement itself is required, getStatementProperty
should be used.
If the object of the statement is not a resource, an exception is
thrown.
Parameters: p - the property sought a statement representing an instance of the requiredproperty |
getResource | public Resource getResource()(Code) | | Return the object of the statement.
An exception will be thrown if the object is not a resource.
The Resource which is the object of the statement. |
getResource | public Resource getResource(ResourceF f)(Code) | | Return the object of the statement.
An exception will be thrown if the object is not a Resource.
The object of the statement. |
getSeq | public Seq getSeq()(Code) | | Return the object of the statement.
An exception will be thrown if the object is not a Resource.
The object of the statement interpreted as a value of thethe specified type. |
getShort | public short getShort()(Code) | | Return the object of the statement.
An exception will be thrown if the object is not a Literal.
The object of the statement interpreted as a value of thethe specified type. |
getStatementProperty | public Statement getStatementProperty(Property p)(Code) | | Return a property of this statement.
The model associated with this statement is searched for a statement with
this statement as subject and the specified property as predicate. If
such a statement is found it is return. If more than one exists in the
model, then it is undefined which is returned. If no such statement
exists, an exception is thrown.
Parameters: p - the property sought a statement representing an instance of the specifiedproperty. |
getString | public String getString()(Code) | | Return the object of the statement.
An exception will be thrown if the object is not a Literal.
The object of the statement interpreted as a value of thethe specified type. |
getSubject | public Resource getSubject()(Code) | | An accessor method to return the subject of the statements.
The subject of the statement. |
hasWellFormedXML | public boolean hasWellFormedXML()(Code) | | Answer true iff the Literal object of this statement is well-formed XML
(ie equivalent to getLiteral().isWellFormedXML()). If the object is not
a Literal, throw an exception.
|
hashCode | public int hashCode()(Code) | | Returns asTriple().hashCode()
|
isReified | boolean isReified()(Code) | | Determine if this statement is the subject of any statements its associated
model.
true iff this statement is the subject of a statement in the model. |
listReifiedStatements | RSIterator listReifiedStatements()(Code) | | answer an iterator which delivers all the reified statements in the model
this Statement belongs to that match this Statement.
|
remove | public Statement remove()(Code) | | Remove this statement from its associated model.
The statement with the same subject, predicate and object as this
statement will be removed from the model associated with this
statement.
this statement. |
removeReification | void removeReification()(Code) | | Finds all possible resources which are
the reification of this statement, and for each
removes all four triples of the reification quad.
|
|
|