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:
LinkedHashModel.ModelStatement
public class ContextStatement extends SimpleStatement
An extension ofSimpleStatement
that adds a context field.- See Also:
- Serialized Form
-
-
Constructor Summary
Constructors Modifier Constructor Description protected
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
All Methods Instance Methods Concrete Methods Modifier and Type Method Description boolean
exactSameContext(Resource context)
Resource
getContext()
String
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 Detail
-
ContextStatement
protected 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.- 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 Detail
-
getContext
public Resource getContext()
- Specified by:
getContext
in interfaceStatement
- Overrides:
getContext
in classSimpleStatement
-
exactSameContext
public boolean exactSameContext(Resource context)
-
toString
public String toString()
- Overrides:
toString
in classAbstractStatement
-
-