|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | 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. |
Location |
getLocation()
Get the source location information for the statement as set by ARP. |
long |
getLong()
Return the object of the statement. |
RDFNode |
getObject()
An accessor function 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. |
void |
setLocation(Location location)
Set the location information for 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 ResourceImplpublic Resource getSubject()
Statement
getSubject in interface Statementpublic Property getPredicate()
Statement
getPredicate in interface Statementpublic RDFNode getObject()
Statement
getObject in interface Statement
public Statement getProperty(Property p)
throws RDFException
StatementThere 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 StatementgetProperty in class ResourceImplp - the property sought
RDFException - Generic RDF Exception
public Statement getStatementProperty(Property p)
throws RDFException
StatementThe 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 Statementp - the property sought
RDFException - Generic RDF exception
public Resource getResource()
throws RDFException
StatementAn exception will be thrown if the object is not a resource.
getResource in interface StatementRDFException - Generuc RDF exception.
public Literal getLiteral()
throws RDFException
StatementAn exception will be thrown if the object is not a Literal.
getLiteral in interface StatementRDFException - Generuc RDF exception.
public boolean getBoolean()
throws RDFException
StatementAn exception will be thrown if the object is not a Literal.
getBoolean in interface StatementRDFException - Generuc RDF exception.
public byte getByte()
throws RDFException
StatementAn exception will be thrown if the object is not a Literal.
getByte in interface StatementRDFException - Generuc RDF exception.
public short getShort()
throws RDFException
StatementAn exception will be thrown if the object is not a Literal.
getShort in interface StatementRDFException - Generuc RDF exception.
public int getInt()
throws RDFException
StatementAn exception will be thrown if the object is not a Literal.
getInt in interface StatementRDFException - Generuc RDF exception.
public long getLong()
throws RDFException
StatementAn exception will be thrown iof the object is not a Literal.
getLong in interface StatementRDFException - Generuc RDF exception.
public char getChar()
throws RDFException
StatementAn exception will be thrown if the object is not a Literal.
getChar in interface StatementRDFException - Generuc RDF exception.
public float getFloat()
throws RDFException
StatementAn exception will be thrown if the object is not a Literal.
getFloat in interface StatementRDFException - Generuc RDF exception.
public double getDouble()
throws RDFException
StatementAn exception will be thrown if the object is not a Literal.
getDouble in interface StatementRDFException - Generuc RDF exception.
public java.lang.String getString()
throws RDFException
StatementAn exception will be thrown if the object is not a Literal.
getString in interface StatementRDFException - Generuc RDF exception.
public Resource getResource(ResourceF f)
throws RDFException
StatementAn exception will be thrown if the object is not a Resource.
getResource in interface StatementRDFException - Generuc RDF exception.
public java.lang.Object getObject(ObjectF f)
throws RDFException
StatementAn exception will be thrown if the object is not a Literal.
getObject in interface Statementf - A factory used to create the returned object.
RDFException - Generuc RDF exception.
public Bag getBag()
throws RDFException
StatementAn exception will be thrown if the object is not a Resource.
getBag in interface StatementRDFException - Generuc RDF exception.
public Alt getAlt()
throws RDFException
StatementAn exception will be thrown if the object is not a Resource.
getAlt in interface StatementRDFException - Generuc RDF exception.
public Seq getSeq()
throws RDFException
StatementAn exception will be thrown if the object is not a Resource.
getSeq in interface StatementRDFException - Generuc RDF exception.
public java.lang.String getLanguage()
throws RDFException
StatementAn exception will be thrown if the object is not a Literal.
getLanguage in interface StatementRDFException - Generuc RDF exception.
public boolean getWellFormed()
throws RDFException
StatementAn exception will be thrown if the object is not a Literal.
getWellFormed in interface StatementRDFException - Generuc RDF exception.
public Statement set(boolean o)
throws RDFException
Statement
set in interface Statemento - The new value to be set.
RDFException - Generic RDF exception.
public Statement set(long o)
throws RDFException
StatementThe statement with the old value is removed from the model and a new statement with the new value added.
set in interface Statemento - The value to be set.
RDFException - Generic RDF exception.
public Statement set(char o)
throws RDFException
StatementThe statement with the old value is removed from the model and a new statement with the new value added.
set in interface Statemento - The value to be set.
RDFException - Generic RDF exception.
public Statement set(float o)
throws RDFException
StatementThe statement with the old value is removed from the model and a new statement with the new value added.
set in interface Statemento - The value to be set.
RDFException - Generic RDF exception.
public Statement set(double o)
throws RDFException
StatementThe statement with the old value is removed from the model and a new statement with the new value added.
set in interface Statemento - The value to be set.
RDFException - Generic RDF exception.
public Statement set(java.lang.String o)
throws RDFException
StatementThe statement with the old value is removed from the model and a new statement with the new value added.
set in interface Statemento - The value to be set.
RDFException - Generic RDF exception.
public Statement set(java.lang.String o,
boolean wellFormed)
throws RDFException
StatementThe statement with the old value is removed from the model and a new statement with the new value added.
set in interface Statemento - The value to be set.wellFormed - true if o is well formed XML
RDFException - Generic RDF exception.
public Statement set(java.lang.String o,
java.lang.String l)
throws RDFException
StatementThe statement with the old value is removed from the model and a new statement with the new value added.
set in interface Statemento - The value to be set.l - the language of the String
RDFException - Generic RDF exception.
public Statement set(java.lang.String o,
java.lang.String l,
boolean wellFormed)
throws RDFException
StatementThe statement with the old value is removed from the model and a new statement with the new value added.
set in interface Statemento - The value to be set.l - the language of the String
RDFException - Generic RDF exception.
public Statement set(RDFNode o)
throws RDFException
StatementThe statement with the old value is removed from the model and a new statement with the new value added.
set in interface Statemento - The value to be set
RDFException - Generic RDF exception.
public Statement set(java.lang.Object o)
throws RDFException
StatementThe 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 Statemento - The value to be set.
RDFException - Generic RDF exception.public java.lang.String toString()
Resource
toString in interface ResourcetoString in class ResourceImplpublic boolean equals(java.lang.Object o)
StatementTwo 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 Statementequals in class ResourceImplo - the object to be compared
public Resource removeProperties()
throws RDFException
Resource
removeProperties in interface ResourceremoveProperties in class ResourceImplRDFException - Generic RDF exception.
public Statement remove()
throws RDFException
StatementThe statement with the same subject, predicate and object as this statement will be removed from the model associated with this statement.
remove in interface StatementRDFException - Generic RDF exception.
public boolean isReified()
throws RDFException
Statement
isReified in interface StatementRDFException - Generic RDF Exception
public Resource port(Model m)
throws RDFException
ResourceI
port in interface ResourceIport in class ResourceImplRDFExceptionpublic Location getLocation()
Statement
getLocation in interface Statementpublic void setLocation(Location location)
Statement
setLocation in interface Statement
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||