org.dvb.tvanytime.resolution
Class CRID

java.lang.Object
  extended by org.dvb.tvanytime.resolution.CRID

public abstract class CRID
extends java.lang.Object

Interface for a Content Reference Identifier. (i.e. a CRID in TV Anytime terminology.)


Method Summary
abstract  boolean equals(java.lang.Object that)
          Test two Content References for equality in a case insensitive fashion.
abstract  java.lang.String getAuthority()
          Get the authority part of this Content Reference.
abstract  java.lang.String getData()
          Get the data part of this Content Reference.
abstract  int hashCode()
          Implementations will to override hashCode() to be consistent with the equals().
static CRID newInstance(java.lang.String crString)
          Method for creating a new instance of a content reference.
abstract  java.lang.String toURIString()
          Returns the Content Reference as a valid Content Reference string.
abstract  java.lang.String toURNString()
          Returns the Content Reference as a valid Content Reference string.
 
Methods inherited from class java.lang.Object
getClass, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

newInstance

public static CRID newInstance(java.lang.String crString)
                        throws InvalidCRIDException
Method for creating a new instance of a content reference.

Parameters:
crString - A valid Content Reference string
Returns:
A new instance of a CRID
Throws:
InvalidCRIDException - if the Content Reference string is invalid

getAuthority

public abstract java.lang.String getAuthority()
Get the authority part of this Content Reference.

Returns:
resolving authority name

getData

public abstract java.lang.String getData()
Get the data part of this Content Reference.

Returns:
data - specific identity for this content, which identifies it uniquely within this authority

toURIString

public abstract java.lang.String toURIString()
Returns the Content Reference as a valid Content Reference string. (i.e. in a form that could be validly passed back to newInstance()).

Returns:
a String representation of the object.

toURNString

public abstract java.lang.String toURNString()
Returns the Content Reference as a valid Content Reference string. (i.e. in a form that could be validly passed back to newInstance(), in the form of a URN)

Returns:
a URN String representation of the object.

equals

public abstract boolean equals(java.lang.Object that)
Test two Content References for equality in a case insensitive fashion.

Overrides:
equals in class java.lang.Object
Parameters:
that - a CRID object to compare
Returns:
true if the two Content References are equal.

hashCode

public abstract int hashCode()
Implementations will to override hashCode() to be consistent with the equals().

Overrides:
hashCode in class java.lang.Object
Returns:
hash code of this CRID.