Class DocumentId

java.lang.Object
com.yahoo.vespa.objects.Selectable
com.yahoo.vespa.objects.Identifiable
com.yahoo.document.DocumentId
All Implemented Interfaces:
Cloneable

public class DocumentId extends com.yahoo.vespa.objects.Identifiable
The id of a document
  • Field Summary

    Fields inherited from class com.yahoo.vespa.objects.Identifiable

    classId
  • Constructor Summary

    Constructors
    Constructor
    Description
     
    DocumentId(com.yahoo.vespa.objects.Deserializer buf)
    Constructor used for deserialization.
    Creates a document id based on the given document id URI string.
  • Method Summary

    Modifier and Type
    Method
    Description
     
    int
     
    static DocumentId
    Creates a document id based on a serialized document id URI string.
    boolean
     
     
    byte[]
     
     
    boolean
     
    int
     
    void
    onDeserialize(com.yahoo.vespa.objects.Deserializer data)
     
    void
    onSerialize(com.yahoo.vespa.objects.Serializer target)
     
    void
     
     

    Methods inherited from class com.yahoo.vespa.objects.Identifiable

    create, createFromId, deserialize, deserializeOptional, deserializeWithId, equals, getClassId, getRawUtf8Bytes, getUtf8, onGetClassId, putUtf8, registerClass, registerClass, serialize, serializeOptional, serializeWithId, visitMembers

    Methods inherited from class com.yahoo.vespa.objects.Selectable

    select, select, selectMembers

    Methods inherited from class java.lang.Object

    finalize, getClass, notify, notifyAll, wait, wait, wait
  • Constructor Details

    • DocumentId

      public DocumentId(com.yahoo.vespa.objects.Deserializer buf)
      Constructor used for deserialization.
    • DocumentId

      public DocumentId(String id)
      Creates a document id based on the given document id URI string. The document id string can only contain text characters.
    • DocumentId

      public DocumentId(IdString id)
  • Method Details

    • createFromSerialized

      public static DocumentId createFromSerialized(String id)
      Creates a document id based on a serialized document id URI string. The document id string is not allowed to contain 0x0 byte characters. Otherwise all characters are allowed to ensure that document ids already stored can be de-serialized.
    • clone

      public DocumentId clone()
      Overrides:
      clone in class com.yahoo.vespa.objects.Identifiable
    • setId

      public void setId(IdString id)
    • getScheme

      public IdString getScheme()
    • getGlobalId

      public byte[] getGlobalId()
    • compareTo

      public int compareTo(Object o)
    • equals

      public boolean equals(Object o)
      Overrides:
      equals in class com.yahoo.vespa.objects.Identifiable
    • hashCode

      public int hashCode()
      Overrides:
      hashCode in class com.yahoo.vespa.objects.Identifiable
    • toString

      public String toString()
      Overrides:
      toString in class com.yahoo.vespa.objects.Identifiable
    • onSerialize

      public void onSerialize(com.yahoo.vespa.objects.Serializer target) throws SerializationException
      Overrides:
      onSerialize in class com.yahoo.vespa.objects.Identifiable
      Throws:
      SerializationException
    • onDeserialize

      public void onDeserialize(com.yahoo.vespa.objects.Deserializer data) throws DeserializationException
      Overrides:
      onDeserialize in class com.yahoo.vespa.objects.Identifiable
      Throws:
      DeserializationException
    • hasDocType

      public boolean hasDocType()
    • getDocType

      public String getDocType()