org.dcm4che2.audit.message
Class CodeElement

java.lang.Object
  extended by org.dcm4che2.audit.message.CodeElement
Direct Known Subclasses:
ActiveParticipant.RoleIDCode, AuditEvent.ID, AuditEvent.TypeCode, AuditSource.TypeCode, ParticipantObject.IDTypeCode

public class CodeElement
extends java.lang.Object

Coded value.

Since:
Nov 17, 2006
Version:
$Revision: 769 $ $Date: 2007-02-26 01:28:19 +0100 (Mon, 26 Feb 2007) $
Author:
Gunter Zeilinger

Field Summary
protected  java.lang.String name
           
 
Constructor Summary
protected CodeElement(java.lang.String name, java.lang.String code)
           
protected CodeElement(java.lang.String name, java.lang.String code, boolean readonly)
           
protected CodeElement(java.lang.String name, java.lang.String code, java.lang.String codeSystemName, java.lang.String displayName)
          Used by derived classes to instantiate Code constants.
 
Method Summary
protected  void addAttribute(java.lang.String name, byte[] val, boolean optional)
           
protected  void addAttribute(java.lang.String name, java.util.Date val, boolean optional)
           
protected  void addAttribute(java.lang.String name, java.lang.Object val, boolean optional)
           
protected  java.lang.Object getAttribute(java.lang.String name)
           
 java.lang.String getCode()
           
 java.lang.String getCodeSystem()
           
 java.lang.String getCodeSystemName()
           
 java.lang.String getDisplayName()
           
 java.lang.String getOriginalText()
           
protected  boolean isEmpty()
           
 void output(java.io.Writer out)
           
protected  void outputChilds(java.io.Writer out, java.util.List<? extends org.dcm4che2.audit.message.BaseElement> childs)
           
protected  void outputContent(java.io.Writer out)
          Allows subclasses to write content to the output.
 CodeElement setCodeSystem(java.lang.String codeSystem)
          Sets OID reference.
 CodeElement setCodeSystemName(java.lang.String codeSystemName)
          Sets name of the coding system.
 CodeElement setDisplayName(java.lang.String displayName)
          Sets the value to be used in displays and reports.
 CodeElement setOriginalText(java.lang.String originalText)
          Sets original Text Input value that was translated to this code.
 java.lang.String toString()
           
 java.lang.String toString(int initialSize)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

name

protected final java.lang.String name
Constructor Detail

CodeElement

protected CodeElement(java.lang.String name,
                      java.lang.String code)

CodeElement

protected CodeElement(java.lang.String name,
                      java.lang.String code,
                      java.lang.String codeSystemName,
                      java.lang.String displayName)
Used by derived classes to instantiate Code constants.


CodeElement

protected CodeElement(java.lang.String name,
                      java.lang.String code,
                      boolean readonly)
Method Detail

getCode

public final java.lang.String getCode()

getCodeSystem

public final java.lang.String getCodeSystem()

setCodeSystem

public final CodeElement setCodeSystem(java.lang.String codeSystem)
Sets OID reference.

Parameters:
codeSystem - OID reference
Returns:
this Code object.

getCodeSystemName

public final java.lang.String getCodeSystemName()

setCodeSystemName

public final CodeElement setCodeSystemName(java.lang.String codeSystemName)
Sets name of the coding system.

Parameters:
codeSystemName - name of the coding system
Returns:
this Code object.

getDisplayName

public final java.lang.String getDisplayName()

setDisplayName

public final CodeElement setDisplayName(java.lang.String displayName)
Sets the value to be used in displays and reports.

Parameters:
displayName - value to be used in displays and reports
Returns:
this Code object.

getOriginalText

public final java.lang.String getOriginalText()

setOriginalText

public final CodeElement setOriginalText(java.lang.String originalText)
Sets original Text Input value that was translated to this code.

Parameters:
originalText - value that was translated to this code
Returns:
this Code object.

addAttribute

protected void addAttribute(java.lang.String name,
                            java.lang.Object val,
                            boolean optional)

addAttribute

protected void addAttribute(java.lang.String name,
                            java.util.Date val,
                            boolean optional)

addAttribute

protected void addAttribute(java.lang.String name,
                            byte[] val,
                            boolean optional)

getAttribute

protected java.lang.Object getAttribute(java.lang.String name)

output

public void output(java.io.Writer out)
            throws java.io.IOException
Throws:
java.io.IOException

toString

public java.lang.String toString()
Overrides:
toString in class java.lang.Object

toString

public java.lang.String toString(int initialSize)

isEmpty

protected boolean isEmpty()

outputContent

protected void outputContent(java.io.Writer out)
                      throws java.io.IOException
Allows subclasses to write content to the output. Note to implementers: isEmpty() should also be overridden to return false, otherwise this method will not be called.

Parameters:
out - the writer to write the output to.
Throws:
java.io.IOException - thrown by derived classes if an error occurs.

outputChilds

protected void outputChilds(java.io.Writer out,
                            java.util.List<? extends org.dcm4che2.audit.message.BaseElement> childs)
                     throws java.io.IOException
Throws:
java.io.IOException


Copyright © 2011 dcm4che. All Rights Reserved.