Class DocumentId

  • All Implemented Interfaces:
    java.io.Serializable, java.lang.Cloneable

    public class DocumentId
    extends com.yahoo.vespa.objects.Identifiable
    implements java.io.Serializable
    The id of a document
    See Also:
    Serialized Form
    • Field Summary

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

        classId
    • Constructor Summary

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

      All Methods Static Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      DocumentId clone()  
      int compareTo​(java.lang.Object o)  
      static DocumentId createFromSerialized​(java.lang.String id)
      Creates a document id based on a serialized document id URI string.
      boolean equals​(java.lang.Object o)  
      java.lang.String getDocType()  
      byte[] getGlobalId()  
      IdString getScheme()  
      boolean hasDocType()  
      int hashCode()  
      void onDeserialize​(com.yahoo.vespa.objects.Deserializer data)  
      void onSerialize​(com.yahoo.vespa.objects.Serializer target)  
      void setId​(IdString id)  
      java.lang.String toString()  
      • Methods inherited from class com.yahoo.vespa.objects.Identifiable

        create, createFromId, deserialize, deserializeOptional, deserializeWithId, equals, getClassId, getUtf8, onGetClassId, putUtf8, 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 Detail

      • DocumentId

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

        public DocumentId​(java.lang.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 Detail

      • createFromSerialized

        public static DocumentId createFromSerialized​(java.lang.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​(java.lang.Object o)
      • equals

        public boolean equals​(java.lang.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 java.lang.String toString()
        Overrides:
        toString in class com.yahoo.vespa.objects.Identifiable
      • hasDocType

        public boolean hasDocType()
      • getDocType

        public java.lang.String getDocType()