Class LmdbTripleTerm
java.lang.Object
org.eclipse.rdf4j.model.base.AbstractTripleTerm
org.eclipse.rdf4j.sail.lmdb.model.LmdbTripleTerm
- All Implemented Interfaces:
Serializable, TripleTerm, Value, LmdbValue
- See Also:
-
Nested Class Summary
Nested classes/interfaces inherited from interface Value
Value.Type -
Field Summary
Fields inherited from interface LmdbValue
UNKNOWN_ID -
Constructor Summary
ConstructorsConstructorDescriptionLmdbTripleTerm(ValueStoreRevision revision, long internalID) LmdbTripleTerm(ValueStoreRevision revision, Resource subject, IRI predicate, Value object) LmdbTripleTerm(ValueStoreRevision revision, Resource subject, IRI predicate, Value object, long internalID) -
Method Summary
Modifier and TypeMethodDescriptionbooleanCompares this triple to another object.longGets the ID that is used in the lmdb store for this Value.Gets the object of this triple.Gets the predicate of this triple.Gets the subject of this triple.Gets the revision of the value store that created this value.inthashCode()Computes the hash code of this triple.voidinit()Initializes this value if it was a lazy value (ID-only value) before.voidsetFromInitializedValue(LmdbValue initializedValue) Sets this value's data from an initialized value.voidsetInternalID(long id, ValueStoreRevision revision) Sets the ID that is used for this value in a specific revision of the value store.protected ObjectMethods inherited from class AbstractTripleTerm
stringValue, toStringMethods inherited from interface TripleTerm
getType, isTripleTermMethods inherited from interface Value
isBNode, isIRI, isLiteral, isResource, stringValue
-
Constructor Details
-
LmdbTripleTerm
-
LmdbTripleTerm
-
LmdbTripleTerm
public LmdbTripleTerm(ValueStoreRevision revision, Resource subject, IRI predicate, Value object, long internalID)
-
-
Method Details
-
getSubject
Description copied from interface:TripleTermGets the subject of this triple.- Specified by:
getSubjectin interfaceTripleTerm- Returns:
- The triple's subject.
-
getPredicate
Description copied from interface:TripleTermGets the predicate of this triple.- Specified by:
getPredicatein interfaceTripleTerm- Returns:
- The triple's predicate.
-
getObject
Description copied from interface:TripleTermGets the object of this triple.- Specified by:
getObjectin interfaceTripleTerm- Returns:
- The triple's object.
-
setInternalID
Description copied from interface:LmdbValueSets the ID that is used for this value in a specific revision of the value store.- Specified by:
setInternalIDin interfaceLmdbValue
-
getInternalID
public long getInternalID()Description copied from interface:LmdbValueGets the ID that is used in the lmdb store for this Value.- Specified by:
getInternalIDin interfaceLmdbValue- Returns:
- The value's ID, or
LmdbValue.UNKNOWN_IDif not yet set.
-
init
-
getValueStoreRevision
Description copied from interface:LmdbValueGets the revision of the value store that created this value. The value's internal ID is only valid when it's value store revision is equal to the value store's current revision.- Specified by:
getValueStoreRevisionin interfaceLmdbValue- Returns:
- The revision of the value store that created this value at the time it last set the value's internal ID.
-
setFromInitializedValue
Description copied from interface:LmdbValueSets this value's data from an initialized value.This must be only called within a synchronized block in the init() method of the uninitialized value.
- Specified by:
setFromInitializedValuein interfaceLmdbValue- Parameters:
initializedValue- the initialized value to copy data from
-
writeReplace
- Throws:
ObjectStreamException
-
equals
Description copied from interface:TripleTermCompares this triple to another object.- Specified by:
equalsin interfaceTripleTerm- Overrides:
equalsin classAbstractTripleTerm- Parameters:
o- the object to compare this triple to- Returns:
trueif theotherobject is an instance ofTripleTermand if their subjects, predicates and objects are equal;falseotherwise
-
hashCode
public int hashCode()Description copied from interface:TripleTermComputes the hash code of this triple.- Specified by:
hashCodein interfaceTripleTerm- Overrides:
hashCodein classAbstractTripleTerm- Returns:
- a hash code for this triple computed as
Objects.hash(TripleTerm.getSubject(),TripleTerm.getPredicate(),TripleTerm.getObject())
-