public class SimpleStatement extends AbstractStatement
Statement
interface for statements that don't have an associated
context. For statements that do have an associated context, ContextStatement
can be used.SimpleValueFactory
,
Serialized FormModifier | Constructor and Description |
---|---|
protected |
SimpleStatement(Resource subject,
IRI predicate,
Value object)
Creates a new Statement with the supplied subject, predicate and object.
|
Modifier and Type | Method and Description |
---|---|
Resource |
getContext()
Gets the context of this statement.
|
Value |
getObject()
Gets the object of this statement.
|
IRI |
getPredicate()
Gets the predicate of this statement.
|
Resource |
getSubject()
Gets the subject of this statement.
|
equals, hashCode, toString
protected SimpleStatement(Resource subject, IRI predicate, Value 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
using SimpleValueFactory.getInstance()
) to create new Statement objects.
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.SimpleValueFactory.createStatement(Resource, IRI, Value)
public Resource getSubject()
Statement
public IRI getPredicate()
Statement
public Value getObject()
Statement
Copyright © 2015-2022 Eclipse Foundation. All Rights Reserved.