- All Implemented Interfaces:
FrontsTriple
,Statement
-
Constructor Summary
ConstructorsConstructorDescriptionStatementImpl
(Resource subject, Property predicate, RDFNode object) StatementImpl
(Resource subject, Property predicate, RDFNode object, ModelCom model) Creates new StatementImpl -
Method Summary
Modifier and TypeMethodDescriptionasTriple()
static Triple[]
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.create a ReifiedStatement corresponding to this Statementcreate a ReifiedStatement corresponding to this Statement and with the given _uri_.boolean
.equals() defers to .sameAs so we only get the complexity of one cast.getAlt()
Return the object of the statement.getBag()
Return the object of the statement.getList()
Return the object of the statement as an RDF List.get the object field of this statement, insisting that it be a Literal.An accessor funtion to return the object of the statement.An accessor function to return the predicate of the statement.Get a property of the object of the statement.Return the object of the statement.Deprecated.getSeq()
Return the object of the statement.Return a property of this statement.An accessor method to return the subject of the statements.int
hashCode()
Returns asTriple().hashCode()boolean
Determine if this statement is the subject of any statements its associated model.answer an iterator which delivers all the reified statements in the model this Statement belongs to that match this Statement.remove()
Remove this statement from its associated model.void
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_.Methods inherited from class org.apache.jena.rdf.model.impl.StatementBase
changeLiteralObject, changeLiteralObject, changeLiteralObject, changeLiteralObject, changeLiteralObject, changeLiteralObject, changeObject, changeObject, changeObject, changeObject, changeObject, getBoolean, getByte, getChar, getDouble, getFloat, getInt, getLanguage, getLong, getModel, getShort, getString, getWellFormed, hasWellFormedXML, toString
Methods inherited from interface org.apache.jena.rdf.model.Statement
changeLiteralObject, changeLiteralObject, changeLiteralObject, changeLiteralObject, changeLiteralObject, changeLiteralObject, changeObject, changeObject, changeObject, changeObject, changeObject, getBoolean, getByte, getChar, getDouble, getFloat, getInt, getLanguage, getLong, getModel, getShort, getString, hasWellFormedXML
-
Constructor Details
-
StatementImpl
Creates new StatementImpl -
StatementImpl
-
-
Method Details
-
toStatement
create a Statement from the triple _t_ in the enhanced graph _eg_. The Statement has subject, predicate, and object corresponding to those of _t_. -
getSubject
Description copied from interface:Statement
An accessor method to return the subject of the statements.- Specified by:
getSubject
in interfaceStatement
- Specified by:
getSubject
in classStatementBase
- Returns:
- The subject of the statement.
-
getPredicate
Description copied from interface:Statement
An accessor function to return the predicate of the statement.- Specified by:
getPredicate
in interfaceStatement
- Specified by:
getPredicate
in classStatementBase
- Returns:
- The predicate of the statement.
-
getObject
Description copied from interface:Statement
An accessor funtion to return the object of the statement.- Specified by:
getObject
in interfaceStatement
- Specified by:
getObject
in classStatementBase
- Returns:
- Return the object of the statement.
-
getStatementProperty
Description copied from interface:Statement
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.
- Specified by:
getStatementProperty
in interfaceStatement
- Parameters:
p
- the property sought- Returns:
- a statement representing an instance of the specified property.
-
getResource
Description copied from interface:Statement
Return the object of the statement.An exception will be thrown if the object is not a resource.
- Specified by:
getResource
in interfaceStatement
- Specified by:
getResource
in classStatementBase
- Returns:
- The Resource which is the object of the statement.
-
getResource
Deprecated.Description copied from interface:Statement
Return the object of the statement.An exception will be thrown if the object is not a Resource.
- Specified by:
getResource
in interfaceStatement
- Returns:
- The object of the statement.
-
getProperty
Description copied from interface:Statement
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.
- Specified by:
getProperty
in interfaceStatement
- Parameters:
p
- the property sought- Returns:
- a statement representing an instance of the required property
-
getLiteral
get the object field of this statement, insisting that it be a Literal. If it isn't, throw LiteralRequiredException.- Specified by:
getLiteral
in interfaceStatement
- Specified by:
getLiteral
in classStatementBase
- Returns:
- The Literal which is the object of the statement.
-
getBag
Description copied from interface:Statement
Return the object of the statement.An exception will be thrown if the object is not a Resource.
-
getAlt
Description copied from interface:Statement
Return the object of the statement.An exception will be thrown if the object is not a Resource.
-
getSeq
Description copied from interface:Statement
Return the object of the statement.An exception will be thrown if the object is not a Resource.
-
getList
Description copied from interface:Statement
Return the object of the statement as an RDF List.An exception will be thrown if the object is not an
RDFList
. -
equals
.equals() defers to .sameAs so we only get the complexity of one cast. -
hashCode
public int hashCode()Description copied from interface:Statement
Returns asTriple().hashCode() -
asResource
-
remove
Description copied from interface:Statement
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.
-
removeReification
public void removeReification()Description copied from interface:Statement
Finds all possible resources which are the reification of this statement, and for each removes all four triples of the reification quad.- Specified by:
removeReification
in interfaceStatement
-
asTriple
- Specified by:
asTriple
in interfaceFrontsTriple
-
asTriples
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.- Parameters:
statements
- the array of statements to convert- Returns:
- the corresponding array of triples
-
isReified
public boolean isReified()Description copied from interface:Statement
Determine if this statement is the subject of any statements its associated model. -
createReifiedStatement
create a ReifiedStatement corresponding to this Statement- Specified by:
createReifiedStatement
in interfaceStatement
-
createReifiedStatement
create a ReifiedStatement corresponding to this Statement and with the given _uri_.- Specified by:
createReifiedStatement
in interfaceStatement
-
listReifiedStatements
Description copied from interface:Statement
answer an iterator which delivers all the reified statements in the model this Statement belongs to that match this Statement.- Specified by:
listReifiedStatements
in interfaceStatement
-
createObject
create an RDF node which might be a literal, or not.
-