Package org.eclipse.rdf4j.model.impl
Class SimpleStatement
- java.lang.Object
-
- org.eclipse.rdf4j.model.base.AbstractStatement
-
- org.eclipse.rdf4j.model.impl.SimpleStatement
-
- All Implemented Interfaces:
Serializable,Statement
- Direct Known Subclasses:
ContextStatement,ExtensibleStatementImpl,StatementImpl
public class SimpleStatement extends AbstractStatement
A simple default implementation of theStatementinterface for statements that don't have an associated context. For statements that do have an associated context,ContextStatementcan be used.- See Also:
SimpleValueFactory, Serialized Form
-
-
Constructor Summary
Constructors Modifier Constructor Description protectedSimpleStatement(Resource subject, IRI predicate, Value object)Creates a new Statement with the supplied subject, predicate and object.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description ResourcegetContext()Gets the context of this statement.ValuegetObject()Gets the object of this statement.IRIgetPredicate()Gets the predicate of this statement.ResourcegetSubject()Gets the subject of this statement.-
Methods inherited from class org.eclipse.rdf4j.model.base.AbstractStatement
equals, hashCode, toString
-
-
-
-
Constructor Detail
-
SimpleStatement
protected SimpleStatement(Resource subject, IRI predicate, Value object)
Creates a new Statement with the supplied subject, predicate and object. *Note that creating SimpleStatement objects directly via this constructor is not the recommended approach. Instead, use a
ValueFactory(obtained from your repository or by usingSimpleValueFactory.getInstance()) to create new Statement objects.- 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.- See Also:
SimpleValueFactory.createStatement(Resource, IRI, Value)
-
-
Method Detail
-
getSubject
public Resource getSubject()
Description copied from interface:StatementGets the subject of this statement.- Returns:
- The statement's subject.
-
getPredicate
public IRI getPredicate()
Description copied from interface:StatementGets the predicate of this statement.- Returns:
- The statement's predicate.
-
getObject
public Value getObject()
Description copied from interface:StatementGets the object of this statement.- Returns:
- The statement's object.
-
-