org.openehr.rm.datatypes.text
Class DvCodedText

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

public final class DvCodedText
extends DvText

A text item whose value must be the rubric from a controlled terminology, the key (the code ) of which is the defining code attribute. Instances of this class are immutable.

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

Constructor Summary
DvCodedText(java.lang.String value, CodePhrase language, CodePhrase charset, CodePhrase definingCode, TerminologyService terminologyService)
          Constructs a Text by only required values
DvCodedText(java.lang.String value, java.util.List<TermMapping> mapping, java.lang.String formatting, DvURI hyperlink, CodePhrase language, CodePhrase charset, CodePhrase definingCode, TerminologyService terminologyService)
          Constructs a CodedText of given components
 
Method Summary
 boolean equals(java.lang.Object o)
          Two CodedText euqual if super class equals and has same value for defining code
 CodePhrase getDefiningCode()
          Return defining code
 int hashCode()
          Return a hash code of this CodedText
 java.lang.String toString()
          Return string presentation of this CodedText
 
Methods inherited from class org.openehr.rm.datatypes.text.DvText
getCharset, getFormatting, getHyperlink, getLanguage, getMappings, getValue, setCharset, setFormatting, setHyperlink, setLanguage, setMappings, setValue
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 

Constructor Detail

DvCodedText

public DvCodedText(java.lang.String value,
                   java.util.List<TermMapping> mapping,
                   java.lang.String formatting,
                   DvURI hyperlink,
                   CodePhrase language,
                   CodePhrase charset,
                   CodePhrase definingCode,
                   TerminologyService terminologyService)
Constructs a CodedText of given components

Parameters:
value -
mapping -
formatting -
hyperlink -
language -
charset -
definingCode - not null
terminologyService - not null
Throws:
java.lang.IllegalArgumentException - if

DvCodedText

public DvCodedText(java.lang.String value,
                   CodePhrase language,
                   CodePhrase charset,
                   CodePhrase definingCode,
                   TerminologyService terminologyService)
Constructs a Text by only required values

Parameters:
value -
language -
charset -
terminologyService - not null
Throws:
java.lang.IllegalArgumentException - if value, language or charset are empty or invalid
Method Detail

getDefiningCode

public CodePhrase getDefiningCode()
Return defining code

Returns:
defining code

equals

public boolean equals(java.lang.Object o)
Two CodedText euqual if super class equals and has same value for defining code

Overrides:
equals in class DvText
Parameters:
o -
Returns:
true if equals

hashCode

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

Overrides:
hashCode in class DvText
Returns:
hash code

toString

public java.lang.String toString()
Return string presentation of this CodedText

Overrides:
toString in class DvText
Returns:
string presentation


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