com.adobe.repository.infomodel
Class Uuid

java.lang.Object
  extended by com.adobe.repository.infomodel.Uuid
All Implemented Interfaces:
java.io.Serializable
Direct Known Subclasses:
Id, Lid

public class Uuid
extends java.lang.Object
implements java.io.Serializable

A DCE 128-bit universally unique identifier (UUID) in hex format, with a prefix to make this object a valid URI.

See Also:
Serialized Form

Field Summary
static java.lang.String PREFIX_URN_UUID
          The default prefix.
static java.lang.String PREFIX_URN_UUID_ID
          The prefix applied to Id objects.
static java.lang.String PREFIX_URN_UUID_LID
          The prefix applied to Lid objects.
 
Constructor Summary
Uuid()
          Default constructor that uses the default prefix of Uuid.PREFIX_URN_UUID.
Uuid(java.lang.String uuid)
          Constructor that uses the specified UUID.
Uuid(java.lang.String uuid, boolean checkPrefix)
          Constructor that uses the specified UUID, which may contain a prefix.
 
Method Summary
 boolean equals(java.lang.Object obj)
          Compares the current object with the specified instance in obj.
 java.lang.String getDefaultPrefix()
          Retrieves the default prefix that will be applied to new and un-prefixed UUIDs.
 java.lang.String getPrefix()
          Retrieves the prefix string.
 java.lang.String getUuid()
          Retrieves the 36-character UUID string.
 int hashCode()
          Retrieves the hash code for the prefix.
 void setPrefix(java.lang.String prefix)
           
 void setUuid(java.lang.String uuid)
           
 java.lang.String toString()
          Creates a String comprised of the prefix and UUID.
 
Methods inherited from class java.lang.Object
getClass, notify, notifyAll, wait, wait, wait
 

Field Detail

PREFIX_URN_UUID

public static final java.lang.String PREFIX_URN_UUID
The default prefix.

See Also:
Constant Field Values

PREFIX_URN_UUID_ID

public static final java.lang.String PREFIX_URN_UUID_ID
The prefix applied to Id objects.

See Also:
Constant Field Values

PREFIX_URN_UUID_LID

public static final java.lang.String PREFIX_URN_UUID_LID
The prefix applied to Lid objects.

See Also:
Constant Field Values
Constructor Detail

Uuid

public Uuid()
Default constructor that uses the default prefix of Uuid.PREFIX_URN_UUID.


Uuid

public Uuid(java.lang.String uuid)
Constructor that uses the specified UUID. The method sets the default prefix if a prefix is not found in uuid.

Parameters:
uuid - The UUID from which to create the object.

Uuid

public Uuid(java.lang.String uuid,
            boolean checkPrefix)
Constructor that uses the specified UUID, which may contain a prefix.

Parameters:
uuid - The UUID from which to create the object.
checkPrefix - If true, the constructor sets the default prefix if a prefix is not found in uuid. If checkPrefix is false, the default prefix is used without checking uuid.
Method Detail

toString

public java.lang.String toString()
Creates a String comprised of the prefix and UUID.

Overrides:
toString in class java.lang.Object
Returns:
A String comprised of the prefix and the 36-character UUID string.

getPrefix

public java.lang.String getPrefix()
Retrieves the prefix string.

Returns:
The prefix string.

setPrefix

public void setPrefix(java.lang.String prefix)

getUuid

public java.lang.String getUuid()
Retrieves the 36-character UUID string.

Returns:
The 36-character UUID string.

setUuid

public void setUuid(java.lang.String uuid)

getDefaultPrefix

public java.lang.String getDefaultPrefix()
Retrieves the default prefix that will be applied to new and un-prefixed UUIDs.

Returns:
The default prefix to apply to new and un-prefixed UUIDs.

equals

public boolean equals(java.lang.Object obj)
Compares the current object with the specified instance in obj.

Overrides:
equals in class java.lang.Object
Parameters:
obj - The object with which to compare the current instance.
Returns:
true if the objects are equivalent, false otherwise.

hashCode

public int hashCode()
Retrieves the hash code for the prefix.

Overrides:
hashCode in class java.lang.Object
Returns:
The hash code for the prefix.


[an error occurred while processing this directive] [an error occurred while processing this directive]