Overview | Package | Class | Tree | Deprecated | Index | Help
| Sun Adapter for TCP/IP HL7
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## com.stc.connector.hl7.framework.structure.component
Class GenericComponentImpl

    java.lang.Object
      com.stc.connector.hl7.framework.structure.component.GenericComponentImpl

All Implemented Interfaces:
  Component

Direct Known Subclasses:
  GenericDataTypeImpl, GenericFieldImpl, GenericMessageImpl, GenericSegmentImpl

    public class GenericComponentImpl

extends java.lang.Object
implements Component

This class represents a generic implementation of HL7 component structure.

Version:
  cvs revision: $Revision: 1.9 $ Last Modified: $Date: 2005/09/03 06:28:36 $
Author:
  Harry Liu

Field Summary
`static java.lang.String` | `version`

Constructor Summary
`protected` | `GenericComponentImpl()` Constructor for GenericComponentImpl.
`` | `GenericComponentImpl(Message message, java.lang.String name, java.lang.String content)` Constructor for GenericComponentImpl.

Method Summary
`java.lang.String` | `getContent()` Method getContent.
`Message` | `getMessage()` Method getMessage.
`java.lang.String` | `getName()` Method getName.
`protected Status` | `getStatus()` Returns the status.
`void` | `marshal()` Method marshal.
`void` | `setContent(java.lang.String content)` Method setContent.
`protected void` | `setMessage(Message message)` Method setMessage.
`void` | `setName(java.lang.String name)` Method setName.
`java.lang.String` | `toXMLString(ComponentSpec componentSpec)` Method toXMLString.
`void` | `unmarshal()` Method unmarshal.
`void` | `validate(ComponentSpec componentSpec)` Method validate.

Methods inherited from class java.lang.Object
`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

Field Detail

### version

    public static final java.lang.String version

See Also:
  Constant Field Values

Constructor Detail

### GenericComponentImpl

    public GenericComponentImpl(Message message,
                                java.lang.String name,
                                java.lang.String content)
                         throws HL7ApplicationException

  Constructor for GenericComponentImpl.

  Parameters:
    `message` -
    `name` -
    `content` -
  Throws:
    `HL7ApplicationException`

### GenericComponentImpl

    protected GenericComponentImpl()

  Constructor for GenericComponentImpl.

Method Detail

### getName

    public java.lang.String getName()

  Description copied from interface: `Component`
  Method getName. For DataType, the name should be the data type name (e.g. "AD", "CD", "VID", etc). For Field, the name should be the field name (e.g. "Sending Application", "Version ID", etc). For Segment, the name should be the segment name (e.g. "MSH", "MSA", "ERR", etc). For Message, the name should be the message type name (e.g. "ACK", "ADT", etc).

  Specified by:
    `getName` in interface `Component`
  Returns:
    String
  See Also:
    `Component.getName()`

### getContent

    public java.lang.String getContent()

  Description copied from interface: `Component`
  Method getContent. The content is the string representation of the data.

  Specified by:
    `getContent` in interface `Component`
  Returns:
    String
  See Also:
    `Component.getContent()`

### getMessage

    public Message getMessage()

  Description copied from interface: `Component`
  Method getMessage.

  Specified by:
    `getMessage` in interface `Component`
  Returns:
    Message
  See Also:
    `Component.getMessage()`

### setContent

    public void setContent(java.lang.String content)
                    throws HL7ApplicationException

  Description copied from interface: `Component`
  Method setContent.

  Specified by:
    `setContent` in interface `Component`
  Throws:
    `HL7ApplicationException`
  See Also:
    `Component.setContent(String)`

### marshal

    public void marshal()
                 throws HL7ApplicationException

  Description copied from interface: `Component`
  Method marshal. Marshal the corresponding structure into content. Once the structure is modified, to refresh the content against the modified structure, this method should be called.

  Specified by:
    `marshal` in interface `Component`
  Throws:
    `HL7ApplicationException`
  See Also:
    `Component.marshal()`

### unmarshal

    public void unmarshal()
                   throws HL7ApplicationException

  Description copied from interface: `Component`
  Method unmarshal. Un-Marshal the content into corresponding structure. Once the content is modified, to refresh the corresponding structure against the modified content, this method should be called.

  Specified by:
    `unmarshal` in interface `Component`
  Throws:
    `HL7ApplicationException`
  See Also:
    `Component.unmarshal()`

### setName

    public void setName(java.lang.String name)
                 throws HL7ApplicationException

  Method setName.

  Specified by:
    `setName` in interface `Component`
  Parameters:
    `name` -
  Throws:
    `HL7ApplicationException`

### setMessage

    protected void setMessage(Message message)
                       throws HL7ApplicationException

  Method setMessage.

  Parameters:
    `message` -
  Throws:
    `HL7ApplicationException`

### getStatus

    protected Status getStatus()

  Returns the status.

  Returns:
    Status

### validate

    public void validate(ComponentSpec componentSpec)
                  throws HL7ApplicationException

  Description copied from interface: `Component`
  Method validate. This method is supposed to be called after "new xxxStructureImpl()", that is, "new GenericComponentImpl(...)", "new GenericDataTypeImpl(...)", "new GenericFieldImpl(...)", "new GenericSegmentImpl(...)", "new GenericMessageImpl(...)", "new MSH(...)", "new MSA(...)", "new ERR(...)", "new ACK(...)".

  Specified by:
    `validate` in interface `Component`
  Throws:
    `HL7ApplicationException`
  See Also:
    `Component.validate(ComponentSpec)`

### toXMLString

    public java.lang.String toXMLString(ComponentSpec componentSpec)
                                 throws HL7ApplicationException

  Description copied from interface: `Component`
  Method toXMLString.

  Specified by:
    `toXMLString` in interface `Component`
  Throws:
    `HL7ApplicationException`
  See Also:
    `Component.toXMLString(com.stc.connector.hl7.framework.spec.component.ComponentSpec)`

Overview | Package | Class | Tree | Deprecated | Index | Help
| Sun Adapter for TCP/IP HL7
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD