Package org.eclipse.rdf4j.model.impl
Class ContextStatement
java.lang.Object
org.eclipse.rdf4j.model.base.AbstractStatement
org.eclipse.rdf4j.model.impl.SimpleStatement
org.eclipse.rdf4j.model.impl.ContextStatement
- All Implemented Interfaces:
Serializable
,Statement
- Direct Known Subclasses:
ExtensibleContextStatement
,LinkedHashModel.ModelStatement
,MemStatement
An extension of
SimpleStatement
that adds a context field.- See Also:
-
Constructor Summary
ModifierConstructorDescriptionprotected
ContextStatement
(Resource subject, IRI predicate, Value object, Resource context) Creates a new Statement with the supplied subject, predicate and object for the specified associated context. -
Method Summary
Modifier and TypeMethodDescriptionboolean
exactSameContext
(Resource context) Gets the context of this statement.toString()
Methods inherited from class org.eclipse.rdf4j.model.impl.SimpleStatement
exactSameObject, exactSamePredicate, exactSameSubject, getObject, getPredicate, getSubject
Methods inherited from class org.eclipse.rdf4j.model.base.AbstractStatement
equals, hashCode
-
Constructor Details
-
ContextStatement
Creates a new Statement with the supplied subject, predicate and object for the specified associated context.- Parameters:
subject
- The statement's subject, must not be null.predicate
- The statement's predicate, must not be null.object
- The statement's object, must not be null.context
- The statement's context, null to indicate no context is associated.
-
-
Method Details
-
getContext
Description copied from interface:Statement
Gets the context of this statement.- Specified by:
getContext
in interfaceStatement
- Overrides:
getContext
in classSimpleStatement
- Returns:
- The statement's context, or null in case of the null context or if not applicable.
-
exactSameContext
-
toString
- Overrides:
toString
in classAbstractStatement
-