Package com.yahoo.document
Class DocumentId
- java.lang.Object
-
- com.yahoo.vespa.objects.Selectable
-
- com.yahoo.vespa.objects.Identifiable
-
- com.yahoo.document.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
-
-
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()
-
-
-
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 classcom.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 classcom.yahoo.vespa.objects.Identifiable
-
hashCode
public int hashCode()
- Overrides:
hashCode
in classcom.yahoo.vespa.objects.Identifiable
-
toString
public java.lang.String toString()
- Overrides:
toString
in classcom.yahoo.vespa.objects.Identifiable
-
onSerialize
public void onSerialize(com.yahoo.vespa.objects.Serializer target) throws SerializationException
- Overrides:
onSerialize
in classcom.yahoo.vespa.objects.Identifiable
- Throws:
SerializationException
-
onDeserialize
public void onDeserialize(com.yahoo.vespa.objects.Deserializer data) throws DeserializationException
- Overrides:
onDeserialize
in classcom.yahoo.vespa.objects.Identifiable
- Throws:
DeserializationException
-
hasDocType
public boolean hasDocType()
-
getDocType
public java.lang.String getDocType()
-
-