public class MemTriple extends Object implements Triple, MemResource
Triple
.EMPTY_LIST
Constructor and Description |
---|
MemTriple(Object creator,
MemResource subject,
MemIRI predicate,
MemValue object) |
Modifier and Type | Method and Description |
---|---|
void |
addContextStatement(MemStatement st)
Adds a statement to this MemResource's list of statements for which it represents the context.
|
void |
addObjectStatement(MemStatement st)
Adds a statement to this MemValue's list of statements for which it is the object.
|
void |
addSubjectStatement(MemStatement st)
Adds a statement to this MemResource's list of statements for which it is the subject.
|
void |
cleanSnapshotsFromContextStatements(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 context.
|
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.
|
void |
cleanSnapshotsFromSubjectStatements(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 subject.
|
boolean |
equals(Object other)
Compares this triple to another object.
|
int |
getContextStatementCount()
Gets the number of statements for which this MemResource represents the context.
|
MemStatementList |
getContextStatementList()
Gets the list of statements for which this MemResource represents the context.
|
Object |
getCreator()
Returns the object that created this MemValue.
|
Value |
getObject()
Gets the object of this triple.
|
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.
|
IRI |
getPredicate()
Gets the predicate of this triple.
|
Resource |
getSubject()
Gets the subject of this triple.
|
int |
getSubjectStatementCount()
Gets the number of statements for which this MemResource is the subject.
|
MemStatementList |
getSubjectStatementList()
Gets the list of statements for which this MemResource is the subject.
|
int |
hashCode()
Computes the hash code of this triple.
|
boolean |
hasStatements()
Checks whether this MemValue has any statements.
|
void |
removeContextStatement(MemStatement st)
Removes a statement from this MemResource's list of statements for which it represents the context.
|
void |
removeObjectStatement(MemStatement st)
Removes a statement from this MemValue's list of statements for which it is the object.
|
void |
removeSubjectStatement(MemStatement st)
Removes a statement from this MemResource's list of statements for which it is the subject.
|
String |
stringValue()
Returns the String-value of a Value object.
|
String |
toString() |
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
isResource
public MemTriple(Object creator, MemResource subject, MemIRI predicate, MemValue object)
public String stringValue()
Value
Literal
's label, a
IRI
's URI or a BNode
's ID.stringValue
in interface Value
public Object getCreator()
MemValue
getCreator
in interface MemValue
public boolean hasStatements()
MemValue
hasStatements
in interface MemValue
public MemStatementList getObjectStatementList()
MemValue
getObjectStatementList
in interface MemValue
public int getObjectStatementCount()
MemValue
getObjectStatementCount
in interface MemValue
public void addObjectStatement(MemStatement st)
MemValue
addObjectStatement
in interface MemValue
public void removeObjectStatement(MemStatement st)
MemValue
removeObjectStatement
in interface MemValue
public void cleanSnapshotsFromObjectStatements(int currentSnapshot)
MemValue
cleanSnapshotsFromObjectStatements
in interface MemValue
currentSnapshot
- The current snapshot version.public MemStatementList getSubjectStatementList()
MemResource
getSubjectStatementList
in interface MemResource
public int getSubjectStatementCount()
MemResource
getSubjectStatementCount
in interface MemResource
public void addSubjectStatement(MemStatement st)
MemResource
addSubjectStatement
in interface MemResource
public void removeSubjectStatement(MemStatement st)
MemResource
removeSubjectStatement
in interface MemResource
public void cleanSnapshotsFromSubjectStatements(int currentSnapshot)
MemResource
cleanSnapshotsFromSubjectStatements
in interface MemResource
currentSnapshot
- The current snapshot version.public MemStatementList getContextStatementList()
MemResource
getContextStatementList
in interface MemResource
public int getContextStatementCount()
MemResource
getContextStatementCount
in interface MemResource
public void addContextStatement(MemStatement st)
MemResource
addContextStatement
in interface MemResource
public void removeContextStatement(MemStatement st)
MemResource
removeContextStatement
in interface MemResource
public void cleanSnapshotsFromContextStatements(int currentSnapshot)
MemResource
cleanSnapshotsFromContextStatements
in interface MemResource
currentSnapshot
- The current snapshot version.public Resource getSubject()
Triple
getSubject
in interface Triple
public IRI getPredicate()
Triple
getPredicate
in interface Triple
public Value getObject()
Triple
public int hashCode()
Triple
hashCode
in interface Triple
hashCode
in class Object
Objects.hash
(
Triple.getSubject()
, Triple.getPredicate()
, Triple.getObject()
)Copyright © 2015-2022 Eclipse Foundation. All Rights Reserved.