Interface MemValue
-
- All Superinterfaces:
Serializable
,Value
- All Known Implementing Classes:
BooleanMemLiteral
,CalendarMemLiteral
,DecimalMemLiteral
,IntegerMemLiteral
,MemBNode
,MemIRI
,MemLiteral
,MemResource
,MemTriple
,NumericMemLiteral
public interface MemValue extends Value
A MemoryStore-specific extension of the Value interface, giving it node properties.
-
-
Field Summary
Fields Modifier and Type Field Description static MemStatementList
EMPTY_LIST
A shared empty MemStatementList that is returned by MemURI and MemBNode to represent an empty list.
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description void
addObjectStatement(MemStatement st)
Adds a statement to this MemValue's list of statements for which it is the object.void
cleanSnapshotsFromObjectStatements(int currentSnapshot)
Removes statements from old snapshots (those that have expired at or before the specified snapshot version) from this MemValue's list of statements for which it is the object.Object
getCreator()
Returns the object that created this MemValue.int
getObjectStatementCount()
Gets the number of statements for which this MemValue is the object.MemStatementList
getObjectStatementList()
Gets the list of statements for which this MemValue is the object.boolean
hasContextStatements()
boolean
hasObjectStatements()
boolean
hasPredicateStatements()
boolean
hasStatements()
Checks whether this MemValue has any statements.boolean
hasSubjectStatements()
-
Methods inherited from interface org.eclipse.rdf4j.model.Value
isBNode, isIRI, isLiteral, isResource, isTriple, stringValue
-
-
-
-
Field Detail
-
EMPTY_LIST
static final MemStatementList EMPTY_LIST
A shared empty MemStatementList that is returned by MemURI and MemBNode to represent an empty list. The use of a shared list reduces memory usage.
-
-
Method Detail
-
getCreator
Object getCreator()
Returns the object that created this MemValue. MemValues are only unique within a single repository, but an application could use several repositories at the same time, passing MemValues generated by one Sail to another Sail. In such situations, the MemValue of the first Sail cannot be used by the second Sail.
-
hasStatements
boolean hasStatements()
Checks whether this MemValue has any statements. A MemValue object has statements if there is at least one statement where it is used as the subject, predicate, object or context value.- Returns:
- true if the MemValue has statements, false otherwise.
-
getObjectStatementList
MemStatementList getObjectStatementList()
Gets the list of statements for which this MemValue is the object.- Returns:
- A MemStatementList containing the statements.
-
getObjectStatementCount
int getObjectStatementCount()
Gets the number of statements for which this MemValue is the object.- Returns:
- An integer larger than or equal to 0.
-
addObjectStatement
void addObjectStatement(MemStatement st) throws InterruptedException
Adds a statement to this MemValue's list of statements for which it is the object.- Throws:
InterruptedException
-
cleanSnapshotsFromObjectStatements
void cleanSnapshotsFromObjectStatements(int currentSnapshot) throws InterruptedException
Removes statements from old snapshots (those that have expired at or before the specified snapshot version) from this MemValue's list of statements for which it is the object.- Parameters:
currentSnapshot
- The current snapshot version.- Throws:
InterruptedException
-
hasSubjectStatements
boolean hasSubjectStatements()
-
hasPredicateStatements
boolean hasPredicateStatements()
-
hasObjectStatements
boolean hasObjectStatements()
-
hasContextStatements
boolean hasContextStatements()
-
-