Class LmdbIRI

java.lang.Object
org.eclipse.rdf4j.sail.lmdb.model.LmdbIRI
All Implemented Interfaces:
Serializable, IRI, Resource, Value, LmdbResource, LmdbValue

public class LmdbIRI extends Object implements LmdbResource, IRI
See Also:
  • Constructor Details

  • Method Details

    • setInternalID

      public void setInternalID(long internalID, 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
    • 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
    • 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.
    • getNamespace

      public String getNamespace()
      Description copied from interface: IRI
      Gets the namespace part of this IRI.

      The namespace is defined as per the algorithm described in the class documentation.

      Specified by:
      getNamespace in interface IRI
      Returns:
      the namespace of this IRI
    • getLocalName

      public String getLocalName()
      Description copied from interface: IRI
      Gets the local name part of this IRI.

      The local name is defined as per the algorithm described in the class documentation.

      Specified by:
      getLocalName in interface IRI
      Returns:
      the local name of this IRI
    • stringValue

      public String stringValue()
      Description copied from interface: Value
      Returns the String-value of a Value object. This returns either a Literal's label, a IRI's URI or a BNode's ID.
      Specified by:
      stringValue in interface Value
    • 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
    • equals

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

      public int hashCode()
      Description copied from interface: IRI
      Computes the hash code of this IRI.
      Specified by:
      hashCode in interface IRI
      Overrides:
      hashCode in class Object
      Returns:
      a hash code for this IRI computed as Value.stringValue().hashCode()
    • writeReplace

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

      public String toString()
      Overrides:
      toString in class Object
    • setNamespaceAndIri

      public void setNamespaceAndIri(String namespace, String localName)