Class MemStatement
java.lang.Object
org.eclipse.rdf4j.model.impl.GenericStatement<MemResource, MemIRI, MemValue>
org.eclipse.rdf4j.sail.memory.model.MemStatement
- All Implemented Interfaces:
Serializable, Statement
A MemStatement is a Statement which contains context information and a flag indicating whether the statement is
explicit or inferred.
- See Also:
-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate final booleanFlag indicating whether or not this statement has been added explicitly or that it has been inferred.private static final org.slf4j.Loggerprivate static final longprivate final intIdentifies the snapshot in which this statement was introduced.private static final VarHandleprivate intIdentifies the snapshot in which this statement was revoked, defaults toInteger.MAX_VALUE.Fields inherited from class GenericStatement
context, object, predicate, subject -
Constructor Summary
ConstructorsConstructorDescriptionMemStatement(MemResource subject, MemIRI predicate, MemValue object, MemResource context, boolean explicit, int sinceSnapshot) Creates a new MemStatement with the supplied subject, predicate, object and context.MemStatement(MemResource subject, MemIRI predicate, MemValue object, MemResource context, int sinceSnapshot) Creates a new MemStatement with the supplied subject, predicate, object and context and marks it as 'explicit'. -
Method Summary
Modifier and TypeMethodDescriptionvoidLets this statement add itself to the appropriate statement lists of its subject, predicate, object and context.booleanexactMatch(MemResource subject, MemIRI predicate, MemValue object, MemResource context) intintbooleanbooleanisInSnapshot(int snapshot) booleanmatchesContext(MemResource[] memContexts) booleanmatchesSPO(MemResource subject, MemIRI predicate, MemValue object) voidsetExplicit(boolean explicit) Deprecated, for removal: This API element is subject to removal in a future version.voidsetTillSnapshot(int snapshot) Methods inherited from class GenericStatement
equals, getContext, getObject, getPredicate, getSubject, hashCode, toString
-
Field Details
-
logger
private static final org.slf4j.Logger logger -
serialVersionUID
private static final long serialVersionUID- See Also:
-
explicit
private final boolean explicitFlag indicating whether or not this statement has been added explicitly or that it has been inferred. -
sinceSnapshot
private final int sinceSnapshotIdentifies the snapshot in which this statement was introduced. -
tillSnapshot
private volatile int tillSnapshotIdentifies the snapshot in which this statement was revoked, defaults toInteger.MAX_VALUE. -
TILL_SNAPSHOT
-
-
Constructor Details
-
MemStatement
public MemStatement(MemResource subject, MemIRI predicate, MemValue object, MemResource context, int sinceSnapshot) Creates a new MemStatement with the supplied subject, predicate, object and context and marks it as 'explicit'. -
MemStatement
public MemStatement(MemResource subject, MemIRI predicate, MemValue object, MemResource context, boolean explicit, int sinceSnapshot) Creates a new MemStatement with the supplied subject, predicate, object and context. The value of the explicit parameter determines if this statement is marked as 'explicit' or not.
-
-
Method Details
-
getSinceSnapshot
public int getSinceSnapshot() -
setTillSnapshot
public void setTillSnapshot(int snapshot) -
getTillSnapshot
public int getTillSnapshot() -
isInSnapshot
public boolean isInSnapshot(int snapshot) -
setExplicit
Deprecated, for removal: This API element is subject to removal in a future version. -
isExplicit
public boolean isExplicit() -
addToComponentLists
Lets this statement add itself to the appropriate statement lists of its subject, predicate, object and context. The transaction status will be set to new.- Throws:
InterruptedException
-
matchesSPO
-
matchesContext
-
exactMatch
public boolean exactMatch(MemResource subject, MemIRI predicate, MemValue object, MemResource context)
-