org.openehr.rm.datatypes.text
Class CodePhrase

java.lang.Object
  extended by org.openehr.rm.RMObject
      extended by org.openehr.rm.datatypes.basic.DataValue
          extended by org.openehr.rm.datatypes.text.CodePhrase
All Implemented Interfaces:
java.io.Serializable

public final class CodePhrase
extends DataValue

A fully coordinated (all coordination has been performed) term from a terminologyID service (as distinct from a particular terminologyID). Instances of this class are immutable.

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

Constructor Summary
CodePhrase(java.lang.String terminologyID, java.lang.String codeString)
          Constructs a CodePhrase by terminologyID and codeString
CodePhrase(TerminologyID terminologyID, java.lang.String codeString)
          Constructs a CodePhrase by terminologyID and codeString
 
Method Summary
 boolean equals(java.lang.Object o)
          Two CodePhrases equal if both has same value for terminologyID and codeString
 java.lang.String getCodeString()
          The key used by the terminologyID service to identify a concept or coordination of concepts.
 TerminologyID getTerminologyID()
          Identifier of the distinct terminologyID from which the code_string (or its elements) was extracted.
 int hashCode()
          Return a hash code of this CodePhrase
 java.lang.String toString()
          string form displayable for humans
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 

Constructor Detail

CodePhrase

public CodePhrase(TerminologyID terminologyID,
                  java.lang.String codeString)
Constructs a CodePhrase by terminologyID and codeString

Parameters:
terminologyID -
codeString -
Throws:
java.lang.IllegalArgumentException - if terminolgy null or codeString null or empty

CodePhrase

public CodePhrase(java.lang.String terminologyID,
                  java.lang.String codeString)
Constructs a CodePhrase by terminologyID and codeString

Parameters:
terminologyID -
codeString -
Throws:
java.lang.IllegalArgumentException - if terminolgy null or codeString null or empty
Method Detail

toString

public java.lang.String toString()
string form displayable for humans

Overrides:
toString in class DataValue
Returns:
String

getTerminologyID

public TerminologyID getTerminologyID()
Identifier of the distinct terminologyID from which the code_string (or its elements) was extracted.

Returns:
TerminologyID

getCodeString

public java.lang.String getCodeString()
The key used by the terminologyID service to identify a concept or coordination of concepts. This string is most likely parsable inside the terminologyID service, but nothing can be assumed about its syntax outside that context.

Returns:
String

equals

public boolean equals(java.lang.Object o)
Two CodePhrases equal if both has same value for terminologyID and codeString

Overrides:
equals in class java.lang.Object
Parameters:
o -
Returns:
true if equals

hashCode

public int hashCode()
Return a hash code of this CodePhrase

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


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