- 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 RDFNodecreateObject(Node n, EnhGraph g) 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 function 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.getSeq()Return the object of the statement.Return a property of this statement.An accessor method to return the subject of the statements.inthashCode()Returns asTriple().hashCode()remove()Remove this statement from its associated model.static StatementtoStatement(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, getBoolean, getByte, getChar, getDouble, getFloat, getInt, getLanguage, getLong, getModel, getShort, getString, toStringMethods inherited from interface org.apache.jena.rdf.model.Statement
changeLiteralObject, changeLiteralObject, changeLiteralObject, changeLiteralObject, changeLiteralObject, changeLiteralObject, changeObject, changeObject, changeObject, getBoolean, getByte, getChar, getDouble, getFloat, getInt, getLanguage, getLong, getModel, getShort, getString
-
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:StatementAn accessor method to return the subject of the statements.- Specified by:
getSubjectin interfaceStatement- Specified by:
getSubjectin classStatementBase- Returns:
- The subject of the statement.
-
getPredicate
Description copied from interface:StatementAn accessor function to return the predicate of the statement.- Specified by:
getPredicatein interfaceStatement- Specified by:
getPredicatein classStatementBase- Returns:
- The predicate of the statement.
-
getObject
Description copied from interface:StatementAn accessor function to return the object of the statement.- Specified by:
getObjectin interfaceStatement- Specified by:
getObjectin classStatementBase- Returns:
- Return the object of the statement.
-
getStatementProperty
Description copied from interface:StatementReturn 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:
getStatementPropertyin interfaceStatement- Parameters:
p- the property sought- Returns:
- a statement representing an instance of the specified property.
-
getResource
Description copied from interface:StatementReturn the object of the statement.An exception will be thrown if the object is not a resource.
- Specified by:
getResourcein interfaceStatement- Specified by:
getResourcein classStatementBase- Returns:
- The Resource which is the object of the statement.
-
getProperty
Description copied from interface:StatementGet 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:
getPropertyin 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:
getLiteralin interfaceStatement- Specified by:
getLiteralin classStatementBase- Returns:
- The Literal which is the object of the statement.
-
getBag
Description copied from interface:StatementReturn the object of the statement.An exception will be thrown if the object is not a Resource.
-
getAlt
Description copied from interface:StatementReturn the object of the statement.An exception will be thrown if the object is not a Resource.
-
getSeq
Description copied from interface:StatementReturn the object of the statement.An exception will be thrown if the object is not a Resource.
-
getList
Description copied from interface:StatementReturn 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:StatementReturns asTriple().hashCode() -
remove
Description copied from interface:StatementRemove 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.
-
asTriple
- Specified by:
asTriplein 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
-
createObject
-