public class StatementImpl extends StatementBase implements Statement
| Constructor and Description |
|---|
StatementImpl(Resource subject,
Property predicate,
RDFNode object) |
StatementImpl(Resource subject,
Property predicate,
RDFNode object,
ModelCom model)
Creates new StatementImpl
|
| Modifier and Type | Method and Description |
|---|---|
Resource |
asResource() |
Triple |
asTriple() |
static Triple[] |
asTriples(Statement[] statements)
returns an array of triples corresponding to the array of statements; ie
the i'th element of the result is the i'th element of the input as a triple.
|
static RDFNode |
createObject(Node n,
EnhGraph g)
create an RDF node which might be a literal, or not.
|
ReifiedStatement |
createReifiedStatement()
create a ReifiedStatement corresponding to this Statement
|
ReifiedStatement |
createReifiedStatement(String uri)
create a ReifiedStatement corresponding to this Statement
and with the given _uri_.
|
boolean |
equals(Object o)
.equals() defers to .sameAs so we only get the complexity of one cast.
|
Alt |
getAlt()
Return the object of the statement.
|
Bag |
getBag()
Return the object of the statement.
|
RDFList |
getList()
Return the object of the statement as an RDF List.
|
Literal |
getLiteral()
get the object field of this statement, insisting that it be a Literal.
|
RDFNode |
getObject()
An accessor funtion to 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)
Deprecated.
|
Seq |
getSeq()
Return the object of the statement.
|
Statement |
getStatementProperty(Property p)
Return a property of this statement.
|
Resource |
getSubject()
An accessor method to return the subject of the statements.
|
int |
hashCode()
Returns asTriple().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.
|
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.
|
static Statement |
toStatement(Triple t,
ModelCom eg)
create a Statement from the triple _t_ in the enhanced graph _eg_.
|
changeLiteralObject, changeLiteralObject, changeLiteralObject, changeLiteralObject, changeLiteralObject, changeLiteralObject, changeObject, changeObject, changeObject, changeObject, changeObject, getBoolean, getByte, getChar, getDouble, getFloat, getInt, getLanguage, getLong, getModel, getShort, getString, getWellFormed, hasWellFormedXML, toStringchangeLiteralObject, changeLiteralObject, changeLiteralObject, changeLiteralObject, changeLiteralObject, changeLiteralObject, changeObject, changeObject, changeObject, changeObject, changeObject, getBoolean, getByte, getChar, getDouble, getFloat, getInt, getLanguage, getLong, getModel, getShort, getString, hasWellFormedXMLpublic StatementImpl(Resource subject, Property predicate, RDFNode object, ModelCom model)
public static Statement toStatement(Triple t, ModelCom eg)
public Resource getSubject()
StatementgetSubject in interface StatementgetSubject in class StatementBasepublic Property getPredicate()
StatementgetPredicate in interface StatementgetPredicate in class StatementBasepublic RDFNode getObject()
StatementgetObject in interface StatementgetObject in class StatementBasepublic Statement getStatementProperty(Property p)
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 soughtpublic Resource getResource()
StatementAn exception will be thrown if the object is not a resource.
getResource in interface StatementgetResource in class StatementBase@Deprecated public Resource getResource(ResourceF f)
StatementAn exception will be thrown if the object is not a Resource.
getResource in interface Statementpublic Statement getProperty(Property p)
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 Statementp - the property soughtpublic Literal getLiteral()
getLiteral in interface StatementgetLiteral in class StatementBasepublic Bag getBag()
StatementAn exception will be thrown if the object is not a Resource.
public Alt getAlt()
StatementAn exception will be thrown if the object is not a Resource.
public Seq getSeq()
StatementAn exception will be thrown if the object is not a Resource.
public RDFList getList()
StatementAn exception will be thrown if the object is not an RDFList.
public boolean equals(Object o)
public int hashCode()
Statementpublic Resource asResource()
public Statement remove()
StatementThe statement with the same subject, predicate and object as this statement will be removed from the model associated with this statement.
public void removeReification()
StatementremoveReification in interface Statementpublic Triple asTriple()
asTriple in interface FrontsTriplepublic static Triple[] asTriples(Statement[] statements)
statements - the array of statements to convertpublic boolean isReified()
Statementpublic ReifiedStatement createReifiedStatement()
createReifiedStatement in interface Statementpublic ReifiedStatement createReifiedStatement(String uri)
createReifiedStatement in interface Statementpublic RSIterator listReifiedStatements()
StatementlistReifiedStatements in interface StatementLicenced under the Apache License, Version 2.0