|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--com.hp.hpl.mesa.rdf.jena.common.ResourceImpl | +--com.hp.hpl.mesa.rdf.jena.common.StatementImpl
An implementation of Statement.
Constructor Summary | |
StatementImpl(Resource subject,
Property predicate,
RDFNode object)
|
|
StatementImpl(Resource subject,
Property predicate,
RDFNode object,
AnonId id,
Model model)
Creates new StatementImpl |
|
StatementImpl(Resource subject,
Property predicate,
RDFNode object,
Model model)
Creates new StatementImpl |
|
StatementImpl(Resource subject,
Property predicate,
RDFNode object,
java.lang.String URI,
Model model)
Creates new StatementImpl |
Method Summary | |
boolean |
equals(java.lang.Object o)
determine whether two statements are equal. |
Alt |
getAlt()
Return the object of the statement. |
Bag |
getBag()
Return the object of the statement. |
boolean |
getBoolean()
Return the object of the statement. |
byte |
getByte()
Return the object of the statement. |
char |
getChar()
Return the object of the statement. |
double |
getDouble()
Return the object of the statement. |
float |
getFloat()
Return the object of the statement. |
int |
getInt()
Return the object of the statement. |
java.lang.String |
getLanguage()
Return the language of the object of the statement |
Literal |
getLiteral()
Return the object of the statement. |
long |
getLong()
Return the object of the statement. |
RDFNode |
getObject()
An accessor funtion to return the object of the statement. |
java.lang.Object |
getObject(ObjectF f)
Return the object of the statement. |
Property |
getPredicate()
An accessor function to return the predicate of the statement. |
Statement |
getProperty(Property p)
Get a property of the object of the statement. |
Resource |
getResource()
Return the object of the statement. |
Resource |
getResource(ResourceF f)
Return the object of the statement. |
Seq |
getSeq()
Return the object of the statement. |
short |
getShort()
Return the object of the statement. |
Statement |
getStatementProperty(Property p)
Return a property of this statement. |
java.lang.String |
getString()
Return the object of the statement. |
Resource |
getSubject()
An accessor method to return the subject of the statements. |
boolean |
getWellFormed()
Return whether the Literal object is well formed XML as would result from parsing a property element with parseType="Literal" |
int |
hashCode()
|
boolean |
isReified()
Determine if this statement is the subject of any statements its associated model. |
Resource |
port(Model m)
For internal use only |
Statement |
remove()
Remove this statement from its associated model. |
Resource |
removeProperties()
Delete all the properties for this resource from the associated model. |
Statement |
set(boolean o)
Set the object of the statement. |
Statement |
set(char o)
Set the object of the statement. |
Statement |
set(double o)
Set the object of the statement. |
Statement |
set(float o)
Set the object of the statement. |
Statement |
set(long o)
Set the object of the statement. |
Statement |
set(java.lang.Object o)
Set the object of the statement. |
Statement |
set(RDFNode o)
Set the object of the statement. |
Statement |
set(java.lang.String o)
Set the object of the statement. |
Statement |
set(java.lang.String o,
boolean wellFormed)
Set the object of the statement. |
Statement |
set(java.lang.String o,
java.lang.String l)
Set the object of the statement. |
Statement |
set(java.lang.String o,
java.lang.String l,
boolean wellFormed)
Set the object of the statement. |
java.lang.String |
toString()
Return a string representation of the resource. |
Methods inherited from class com.hp.hpl.mesa.rdf.jena.common.ResourceImpl |
abort, addProperty, addProperty, addProperty, addProperty, addProperty, addProperty, addProperty, addProperty, addProperty, begin, commit, getEmbeddedResource, getId, getLocalName, getModel, getNameSpace, getURI, hasProperty, hasProperty, hasProperty, hasProperty, hasProperty, hasProperty, hasProperty, hasProperty, hasProperty, hasProperty, isAnon, listProperties, listProperties |
Methods inherited from class java.lang.Object |
getClass, notify, notifyAll, wait, wait, wait |
Methods inherited from interface com.hp.hpl.mesa.rdf.jena.model.Resource |
abort, addProperty, addProperty, addProperty, addProperty, addProperty, addProperty, addProperty, addProperty, addProperty, begin, commit, getId, getLocalName, getModel, getNameSpace, getURI, hasProperty, hasProperty, hasProperty, hasProperty, hasProperty, hasProperty, hasProperty, hasProperty, hasProperty, hasProperty, isAnon, listProperties, listProperties |
Constructor Detail |
public StatementImpl(Resource subject, Property predicate, RDFNode object)
public StatementImpl(Resource subject, Property predicate, RDFNode object, Model model) throws RDFException
public StatementImpl(Resource subject, Property predicate, RDFNode object, AnonId id, Model model) throws RDFException
public StatementImpl(Resource subject, Property predicate, RDFNode object, java.lang.String URI, Model model) throws RDFException
Method Detail |
public int hashCode()
hashCode
in class ResourceImpl
public Resource getSubject()
Statement
getSubject
in interface Statement
com.hp.hpl.mesa.rdf.jena.model.Statement
public Property getPredicate()
Statement
getPredicate
in interface Statement
com.hp.hpl.mesa.rdf.jena.model.Statement
public RDFNode getObject()
Statement
getObject
in interface Statement
com.hp.hpl.mesa.rdf.jena.model.Statement
public Statement getProperty(Property p) throws RDFException
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.
getProperty
in interface Statement
getProperty
in class ResourceImpl
com.hp.hpl.mesa.rdf.jena.model.Statement
p
- the property soughtRDFException
- Generic RDF Exceptionpublic Statement getStatementProperty(Property p) throws RDFException
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.
getStatementProperty
in interface Statement
com.hp.hpl.mesa.rdf.jena.model.Statement
p
- the property soughtRDFException
- Generic RDF exceptionpublic Resource getResource() throws RDFException
Statement
An exception will be thrown if the object is not a resource.
getResource
in interface Statement
com.hp.hpl.mesa.rdf.jena.model.Statement
RDFException
- Generuc RDF exception.public Literal getLiteral() throws RDFException
Statement
An exception will be thrown if the object is not a Literal.
getLiteral
in interface Statement
com.hp.hpl.mesa.rdf.jena.model.Statement
RDFException
- Generuc RDF exception.public boolean getBoolean() throws RDFException
Statement
An exception will be thrown if the object is not a Literal.
getBoolean
in interface Statement
com.hp.hpl.mesa.rdf.jena.model.Statement
RDFException
- Generuc RDF exception.public byte getByte() throws RDFException
Statement
An exception will be thrown if the object is not a Literal.
getByte
in interface Statement
com.hp.hpl.mesa.rdf.jena.model.Statement
RDFException
- Generuc RDF exception.public short getShort() throws RDFException
Statement
An exception will be thrown if the object is not a Literal.
getShort
in interface Statement
com.hp.hpl.mesa.rdf.jena.model.Statement
RDFException
- Generuc RDF exception.public int getInt() throws RDFException
Statement
An exception will be thrown if the object is not a Literal.
getInt
in interface Statement
com.hp.hpl.mesa.rdf.jena.model.Statement
RDFException
- Generuc RDF exception.public long getLong() throws RDFException
Statement
An exception will be thrown iof the object is not a Literal.
getLong
in interface Statement
com.hp.hpl.mesa.rdf.jena.model.Statement
RDFException
- Generuc RDF exception.public char getChar() throws RDFException
Statement
An exception will be thrown if the object is not a Literal.
getChar
in interface Statement
com.hp.hpl.mesa.rdf.jena.model.Statement
RDFException
- Generuc RDF exception.public float getFloat() throws RDFException
Statement
An exception will be thrown if the object is not a Literal.
getFloat
in interface Statement
com.hp.hpl.mesa.rdf.jena.model.Statement
RDFException
- Generuc RDF exception.public double getDouble() throws RDFException
Statement
An exception will be thrown if the object is not a Literal.
getDouble
in interface Statement
com.hp.hpl.mesa.rdf.jena.model.Statement
RDFException
- Generuc RDF exception.public java.lang.String getString() throws RDFException
Statement
An exception will be thrown if the object is not a Literal.
getString
in interface Statement
com.hp.hpl.mesa.rdf.jena.model.Statement
RDFException
- Generuc RDF exception.public Resource getResource(ResourceF f) throws RDFException
Statement
An exception will be thrown if the object is not a Resource.
getResource
in interface Statement
com.hp.hpl.mesa.rdf.jena.model.Statement
RDFException
- Generuc RDF exception.public java.lang.Object getObject(ObjectF f) throws RDFException
Statement
An exception will be thrown if the object is not a Literal.
getObject
in interface Statement
com.hp.hpl.mesa.rdf.jena.model.Statement
f
- A factory used to create the returned object.RDFException
- Generuc RDF exception.public Bag getBag() throws RDFException
Statement
An exception will be thrown if the object is not a Resource.
getBag
in interface Statement
com.hp.hpl.mesa.rdf.jena.model.Statement
RDFException
- Generuc RDF exception.public Alt getAlt() throws RDFException
Statement
An exception will be thrown if the object is not a Resource.
getAlt
in interface Statement
com.hp.hpl.mesa.rdf.jena.model.Statement
RDFException
- Generuc RDF exception.public Seq getSeq() throws RDFException
Statement
An exception will be thrown if the object is not a Resource.
getSeq
in interface Statement
com.hp.hpl.mesa.rdf.jena.model.Statement
RDFException
- Generuc RDF exception.public java.lang.String getLanguage() throws RDFException
Statement
An exception will be thrown if the object is not a Literal.
getLanguage
in interface Statement
com.hp.hpl.mesa.rdf.jena.model.Statement
RDFException
- Generuc RDF exception.public boolean getWellFormed() throws RDFException
Statement
An exception will be thrown if the object is not a Literal.
getWellFormed
in interface Statement
com.hp.hpl.mesa.rdf.jena.model.Statement
RDFException
- Generuc RDF exception.public Statement set(boolean o) throws RDFException
Statement
set
in interface Statement
com.hp.hpl.mesa.rdf.jena.model.Statement
o
- The new value to be set.RDFException
- Generic RDF exception.public Statement set(long o) throws RDFException
Statement
The statement with the old value is removed from the model and a new statement with the new value added.
set
in interface Statement
com.hp.hpl.mesa.rdf.jena.model.Statement
o
- The value to be set.RDFException
- Generic RDF exception.public Statement set(char o) throws RDFException
Statement
The statement with the old value is removed from the model and a new statement with the new value added.
set
in interface Statement
com.hp.hpl.mesa.rdf.jena.model.Statement
o
- The value to be set.RDFException
- Generic RDF exception.public Statement set(float o) throws RDFException
Statement
The statement with the old value is removed from the model and a new statement with the new value added.
set
in interface Statement
com.hp.hpl.mesa.rdf.jena.model.Statement
o
- The value to be set.RDFException
- Generic RDF exception.public Statement set(double o) throws RDFException
Statement
The statement with the old value is removed from the model and a new statement with the new value added.
set
in interface Statement
com.hp.hpl.mesa.rdf.jena.model.Statement
o
- The value to be set.RDFException
- Generic RDF exception.public Statement set(java.lang.String o) throws RDFException
Statement
The statement with the old value is removed from the model and a new statement with the new value added.
set
in interface Statement
com.hp.hpl.mesa.rdf.jena.model.Statement
o
- The value to be set.RDFException
- Generic RDF exception.public Statement set(java.lang.String o, boolean wellFormed) throws RDFException
Statement
The statement with the old value is removed from the model and a new statement with the new value added.
set
in interface Statement
com.hp.hpl.mesa.rdf.jena.model.Statement
o
- The value to be set.wellFormed
- true if o is well formed XMLRDFException
- Generic RDF exception.public Statement set(java.lang.String o, java.lang.String l) throws RDFException
Statement
The statement with the old value is removed from the model and a new statement with the new value added.
set
in interface Statement
com.hp.hpl.mesa.rdf.jena.model.Statement
o
- The value to be set.l
- the language of the StringRDFException
- Generic RDF exception.public Statement set(java.lang.String o, java.lang.String l, boolean wellFormed) throws RDFException
Statement
The statement with the old value is removed from the model and a new statement with the new value added.
set
in interface Statement
com.hp.hpl.mesa.rdf.jena.model.Statement
o
- The value to be set.l
- the language of the StringRDFException
- Generic RDF exception.public Statement set(RDFNode o) throws RDFException
Statement
The statement with the old value is removed from the model and a new statement with the new value added.
set
in interface Statement
com.hp.hpl.mesa.rdf.jena.model.Statement
o
- The value to be setwellFormed
- true if o is well formed XMLRDFException
- Generic RDF exception.public Statement set(java.lang.Object o) throws RDFException
Statement
The statement with the old value is removed from the model and a new statement with the new value added.
The Object o is converted to a string representation by calling itstoString()
method.set
in interface Statement
com.hp.hpl.mesa.rdf.jena.model.Statement
o
- The value to be set.RDFException
- Generic RDF exception.public java.lang.String toString()
Resource
toString
in interface Resource
toString
in class ResourceImpl
com.hp.hpl.mesa.rdf.jena.model.Resource
public boolean equals(java.lang.Object o)
Statement
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.
equals
in interface Statement
equals
in class ResourceImpl
com.hp.hpl.mesa.rdf.jena.model.Statement
o
- the object to be comparedpublic Resource removeProperties() throws RDFException
Resource
removeProperties
in interface Resource
removeProperties
in class ResourceImpl
com.hp.hpl.mesa.rdf.jena.model.Resource
RDFException
- Generic RDF exception.public Statement remove() throws RDFException
Statement
The statement with the same subject, predicate and object as this statement will be removed from the model associated with this statement.
remove
in interface Statement
com.hp.hpl.mesa.rdf.jena.model.Statement
RDFException
- Generic RDF exception.public boolean isReified() throws RDFException
Statement
isReified
in interface Statement
com.hp.hpl.mesa.rdf.jena.model.Statement
s
- The statement tested.RDFException
- Generic RDF Exceptionpublic Resource port(Model m) throws RDFException
ResourceI
port
in class ResourceImpl
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |