Package org.eclipse.rdf4j.model
Interface Statement
-
- All Superinterfaces:
Serializable
- All Known Subinterfaces:
ExtensibleStatement
- All Known Implementing Classes:
AbstractStatement,ExtensibleStatementImpl,GenericStatement,LinkedHashModel.ModelStatement,MemStatement,UnboundStatement
public interface Statement extends Serializable
An RDF statement, with optional associated context. A statement can have an associated context in specific cases, for example when fetched from a repository.Additional utility functionality for working with
Statementobjects is available in theorg.eclipse.rdf4j.model.util.Statementsutility class.
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description booleanequals(Object other)Compares this statement to another object.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.inthashCode()Computes the hash code of this statement.
-
-
-
Method Detail
-
getSubject
Resource getSubject()
Gets the subject of this statement.- Returns:
- The statement's subject.
-
getPredicate
IRI getPredicate()
Gets the predicate of this statement.- Returns:
- The statement's predicate.
-
getObject
Value getObject()
Gets the object of this statement.- Returns:
- The statement's object.
-
getContext
Resource getContext()
Gets the context of this statement.- Returns:
- The statement's context, or null in case of the null context or if not applicable.
-
equals
boolean equals(Object other)
Compares this statement to another object.
-
hashCode
int hashCode()
Computes the hash code of this statement.- Overrides:
hashCodein classObject- Returns:
- a hash code for this statement computed as
Objects.hash(getSubject(),getPredicate(),getObject(),getContext())
-
-