org.openehr.rm.support.identification
Class ObjectID

java.lang.Object
  extended by org.openehr.rm.RMObject
      extended by org.openehr.rm.support.identification.ObjectID
All Implemented Interfaces:
java.io.Serializable
Direct Known Subclasses:
ArchetypeID, HierarchicalObjectID, TerminologyID

public abstract class ObjectID
extends RMObject

Ancestor class of identifiers of informational objects. Ids may be completely meaningless, in which case their only job is to refer to something, or may carry some information to do with the identified object.

Version:
1.0
Author:
Rong Chen
See Also:
Serialized Form

Constructor Summary
protected ObjectID()
           
  ObjectID(java.lang.String value)
          Create objectID by string value
 
Method Summary
 boolean equals(java.lang.Object o)
          Return true if both have same value and
 java.lang.String getValue()
          The value of this objectID
 int hashCode()
          Return a hash code value of this objectID
 java.lang.String toString()
          Return value as string presentation of this objectID
abstract  java.lang.String versionID()
          Return version of information pointed to by this ID, if versioning is supported.
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 

Constructor Detail

ObjectID

public ObjectID(java.lang.String value)
Create objectID by string value

Parameters:
value -
Throws:
java.lang.IllegalArgumentException - if value is empty

ObjectID

protected ObjectID()
Method Detail

getValue

public java.lang.String getValue()
The value of this objectID

Returns:
value

versionID

public abstract java.lang.String versionID()
Return version of information pointed to by this ID, if versioning is supported.

Returns:
versionID null if not present

equals

public boolean equals(java.lang.Object o)
Return true if both have same value and

Overrides:
equals in class java.lang.Object
Parameters:
o - The object to which this object is to be compared
Returns:
true if equals

hashCode

public int hashCode()
Return a hash code value of this objectID

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

toString

public java.lang.String toString()
Return value as string presentation of this objectID

Overrides:
toString in class java.lang.Object
Returns:
string presentation


Copyright © 2004-2005 Acode HB. All Rights Reserved.