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

public class LmdbTripleTerm extends AbstractTripleTerm implements LmdbValue
See Also:
  • Constructor Details

  • Method Details

    • getSubject

      public Resource getSubject()
      Description copied from interface: TripleTerm
      Gets the subject of this triple.
      Specified by:
      getSubject in interface TripleTerm
      Returns:
      The triple's subject.
    • getPredicate

      public IRI getPredicate()
      Description copied from interface: TripleTerm
      Gets the predicate of this triple.
      Specified by:
      getPredicate in interface TripleTerm
      Returns:
      The triple's predicate.
    • getObject

      public Value getObject()
      Description copied from interface: TripleTerm
      Gets the object of this triple.
      Specified by:
      getObject in interface TripleTerm
      Returns:
      The triple's object.
    • setInternalID

      public void setInternalID(long id, ValueStoreRevision revision)
      Description copied from interface: LmdbValue
      Sets the ID that is used for this value in a specific revision of the value store.
      Specified by:
      setInternalID in interface LmdbValue
    • getInternalID

      public long getInternalID()
      Description copied from interface: LmdbValue
      Gets the ID that is used in the lmdb store for this Value.
      Specified by:
      getInternalID in interface LmdbValue
      Returns:
      The value's ID, or LmdbValue.UNKNOWN_ID if not yet set.
    • init

      public void init()
      Description copied from interface: LmdbValue
      Initializes this value if it was a lazy value (ID-only value) before.
      Specified by:
      init in interface LmdbValue
    • getValueStoreRevision

      public ValueStoreRevision getValueStoreRevision()
      Description copied from interface: LmdbValue
      Gets 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:
      getValueStoreRevision in interface LmdbValue
      Returns:
      The revision of the value store that created this value at the time it last set the value's internal ID.
    • setFromInitializedValue

      public void setFromInitializedValue(LmdbValue initializedValue)
      Description copied from interface: LmdbValue
      Sets 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:
      setFromInitializedValue in interface LmdbValue
      Parameters:
      initializedValue - the initialized value to copy data from
    • writeReplace

      protected Object writeReplace() throws ObjectStreamException
      Throws:
      ObjectStreamException
    • equals

      public boolean equals(Object o)
      Description copied from interface: TripleTerm
      Compares this triple to another object.
      Specified by:
      equals in interface TripleTerm
      Overrides:
      equals in class AbstractTripleTerm
      Parameters:
      o - the object to compare this triple to
      Returns:
      true if the other object is an instance of TripleTerm and if their subjects, predicates and objects are equal; false otherwise
    • hashCode

      public int hashCode()
      Description copied from interface: TripleTerm
      Computes the hash code of this triple.
      Specified by:
      hashCode in interface TripleTerm
      Overrides:
      hashCode in class AbstractTripleTerm
      Returns:
      a hash code for this triple computed as Objects.hash( TripleTerm.getSubject(), TripleTerm.getPredicate(), TripleTerm.getObject())