Package com.yahoo.document.idstring
Class IdString
- java.lang.Object
-
- com.yahoo.document.idstring.IdString
-
- Direct Known Subclasses:
IdIdString
public abstract class IdString extends Object
To be used with DocumentId constructor.- Author:
- Einar M R Rosenvinge
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static class
IdString.Scheme
-
Field Summary
Fields Modifier and Type Field Description static int
MAX_LENGTH
-
Constructor Summary
Constructors Modifier Constructor Description protected
IdString(IdString.Scheme scheme, String namespace, String namespaceSpecific)
-
Method Summary
All Methods Static Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description static IdString
createFromSerialized(String id)
Creates a IdString based on the given serialized document id string.static IdString
createIdString(String id)
Creates a IdString based on the given document id string.static IdString
createIdStringLessStrict(String id)
Creates a IdString based on the given document id string.boolean
equals(Object o)
String
getDocType()
String
getGroup()
abstract long
getLocation()
String
getNamespace()
String
getNamespaceSpecific()
long
getNumber()
String
getSchemeParameters()
abstract String
getSchemeSpecific()
IdString.Scheme
getType()
boolean
hasDocType()
boolean
hasGroup()
int
hashCode()
boolean
hasNumber()
String
toString()
com.yahoo.text.Utf8String
toUtf8()
-
-
-
Field Detail
-
MAX_LENGTH
public static final int MAX_LENGTH
- See Also:
- Constant Field Values
-
-
Constructor Detail
-
IdString
protected IdString(IdString.Scheme scheme, String namespace, String namespaceSpecific)
-
-
Method Detail
-
hasDocType
public boolean hasDocType()
-
getDocType
public String getDocType()
-
hasGroup
public boolean hasGroup()
-
hasNumber
public boolean hasNumber()
-
getNumber
public long getNumber()
-
getGroup
public String getGroup()
-
createIdString
public static IdString createIdString(String id)
Creates a IdString based on the given document id string. The document id string can only contain text characters.
-
createIdStringLessStrict
public static IdString createIdStringLessStrict(String id)
Creates a IdString based on the given document id string. This is a less strict variant for creating 'illegal' document ids for documents already fed. Only use when strictly needed.
-
createFromSerialized
public static IdString createFromSerialized(String id)
Creates a IdString based on the given serialized document id string. The document id string can not contain 0x0 byte characters.
-
getType
public IdString.Scheme getType()
-
getNamespace
public String getNamespace()
-
getNamespaceSpecific
public String getNamespaceSpecific()
-
getLocation
public abstract long getLocation()
-
getSchemeParameters
public String getSchemeParameters()
-
getSchemeSpecific
public abstract String getSchemeSpecific()
-
toUtf8
public com.yahoo.text.Utf8String toUtf8()
-
-