net.handle.hdllib
Class NamespaceInfo

java.lang.Object
  extended by net.handle.hdllib.NamespaceInfo

public class NamespaceInfo
extends java.lang.Object

Object containing information about a handle namespace. A namespace is basically a prefix for an identifier and can be a global prefix which consists of everything before the first slash of a handle identifer, or it can be a local prefix which includes the global prefix and also some part of the identifer after the slash. A handle could be contained within multiple nested namespaces.


Field Summary
static java.lang.String CONTACT_TAG
           
static char DEFAULT_DELEGATION_DELIMITER
           
static java.lang.String DELEGATE_SUBNAMESPACES_TAG
           
static java.lang.String DELEGATION_DELIM_TAG
           
static java.lang.String PUBKEY_TAG
           
static java.lang.String STATUS_ACTIVE
           
static java.lang.String STATUS_INACTIVE
           
static java.lang.String STATUS_MSG_TAG
           
static java.lang.String STATUS_TAG
           
 
Constructor Summary
NamespaceInfo()
          Construct a new namespace information record, with the default settings
NamespaceInfo(byte[] rawInfo)
           
NamespaceInfo(HandleValue namespaceValue)
           
 
Method Summary
 boolean getAllowDelegation()
          Return whether or not names under this namespace can be delegated to other handle servers.
 char getDelegationDelimeter()
          Returns the delimiter that should be used to determine the next part of the handle/identifier that is delegated to another service.
 java.lang.String getNamespaceStatus()
          Return the status of this namespace as a String.
 NamespaceInfo getParentNamespace()
          Get the parent for this namespace.
 java.security.PublicKey[] getPublicKeys()
          Return a list of public keys that can sign values within this namespace.
 java.lang.String getResponsiblePartyContactAddress()
          Return an email address for the person or company that is responsible for this namespace.
 java.lang.String getStatusMessage()
          Return a message that can be presented to a user who tries to resolve an identifier under this namespace if the namespace status is not active.
 void setParentNamespace(NamespaceInfo parent)
          Set the parent for this namespace.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

STATUS_ACTIVE

public static final java.lang.String STATUS_ACTIVE
See Also:
Constant Field Values

STATUS_INACTIVE

public static final java.lang.String STATUS_INACTIVE
See Also:
Constant Field Values

PUBKEY_TAG

public static final java.lang.String PUBKEY_TAG
See Also:
Constant Field Values

CONTACT_TAG

public static final java.lang.String CONTACT_TAG
See Also:
Constant Field Values

STATUS_MSG_TAG

public static final java.lang.String STATUS_MSG_TAG
See Also:
Constant Field Values

STATUS_TAG

public static final java.lang.String STATUS_TAG
See Also:
Constant Field Values

DELEGATE_SUBNAMESPACES_TAG

public static final java.lang.String DELEGATE_SUBNAMESPACES_TAG
See Also:
Constant Field Values

DELEGATION_DELIM_TAG

public static final java.lang.String DELEGATION_DELIM_TAG
See Also:
Constant Field Values

DEFAULT_DELEGATION_DELIMITER

public static final char DEFAULT_DELEGATION_DELIMITER
See Also:
Constant Field Values
Constructor Detail

NamespaceInfo

public NamespaceInfo(HandleValue namespaceValue)
              throws HandleException
Throws:
HandleException

NamespaceInfo

public NamespaceInfo(byte[] rawInfo)
              throws HandleException
Throws:
HandleException

NamespaceInfo

public NamespaceInfo()
Construct a new namespace information record, with the default settings

Method Detail

setParentNamespace

public void setParentNamespace(NamespaceInfo parent)
Set the parent for this namespace. This should be called when resolving an identifier that is contained within multiple nested namespaces.


getParentNamespace

public NamespaceInfo getParentNamespace()
Get the parent for this namespace. This can be useful for tracing back namespaces when debugging or when verifying identifiers or sub-namespaces based on signatures applied by parent namespaces. If there is no higher level namespace, then this will return null;


getResponsiblePartyContactAddress

public java.lang.String getResponsiblePartyContactAddress()
Return an email address for the person or company that is responsible for this namespace.


getStatusMessage

public java.lang.String getStatusMessage()
Return a message that can be presented to a user who tries to resolve an identifier under this namespace if the namespace status is not active.


getNamespaceStatus

public java.lang.String getNamespaceStatus()
Return the status of this namespace as a String. Currently known values are "active" and "inactive" although it is possible that other values will be used in the future.


getAllowDelegation

public boolean getAllowDelegation()
Return whether or not names under this namespace can be delegated to other handle servers. If so, the getDelegationDelimeter() method should be called in order to indicate the character that separates different delegation levels of the namespace.


getDelegationDelimeter

public char getDelegationDelimeter()
Returns the delimiter that should be used to determine the next part of the handle/identifier that is delegated to another service.


getPublicKeys

public java.security.PublicKey[] getPublicKeys()
Return a list of public keys that can sign values within this namespace. Keep in mind that these keys should not be considered valid unless the HandleValue that was used to construct this object was verified in some way, such as with a signed handle response or using the SecureResolver.