org.urhl7.igor
Class HL7FieldSubcomponent

java.lang.Object
  extended by org.urhl7.igor.HL7FieldSubcomponent
All Implemented Interfaces:
DataField, DelimitedStructure, GenericStructure

public class HL7FieldSubcomponent
extends Object
implements DataField, DelimitedStructure

HL7FieldSubcomponent is a data object that represents the discrete field subcomponent portions of an HL7 message.


Constructor Summary
HL7FieldSubcomponent(char[] delims)
          Creates a HL7FieldSubcomponent object that understands the specified delimiters.
HL7FieldSubcomponent(HL7FieldComponent parent)
          Creates a HL7FieldSubcomponent object that understands the specified delimiters of the parent, as well as references it's parent.
 
Method Summary
 void changeDelims(char[] delims)
          Changes the delims for the implementing data object
 String getData()
          Retrieve the underlying data for this data object.
 char[] getDelims()
          Returns the delimiter set for this data object.
 HL7FieldComponent getParent()
          Returns a reference to the parent HL7FieldComponent for this HL7FieldSubcomponent
 boolean isBaseField()
          Returns if this field is the base field, or if it has subfields included.
 String marshal()
          Returns a string representation of this and the underlying data structures
 void setData(String data)
          Set the underlying data for this data object.
 void setParent(HL7FieldComponent parent)
          Sets the parent of this HL7FieldSubcomponent to a HL7FieldComponent
 String toString()
          Returns a String representation of this field
 void unmarshal(String data)
          Unmarshals an arbitrary String representation of a structure into this data structure
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

HL7FieldSubcomponent

public HL7FieldSubcomponent(char[] delims)
Creates a HL7FieldSubcomponent object that understands the specified delimiters.

Parameters:
delims -

HL7FieldSubcomponent

public HL7FieldSubcomponent(HL7FieldComponent parent)
Creates a HL7FieldSubcomponent object that understands the specified delimiters of the parent, as well as references it's parent.

Parameters:
parent -
Method Detail

setParent

public void setParent(HL7FieldComponent parent)
Sets the parent of this HL7FieldSubcomponent to a HL7FieldComponent

Parameters:
parent - the parent to set

getParent

public HL7FieldComponent getParent()
Returns a reference to the parent HL7FieldComponent for this HL7FieldSubcomponent

Returns:
the parent

getDelims

public char[] getDelims()
Returns the delimiter set for this data object.

Specified by:
getDelims in interface DelimitedStructure
Returns:
delimiter array

changeDelims

public void changeDelims(char[] delims)
Description copied from interface: DelimitedStructure
Changes the delims for the implementing data object

Specified by:
changeDelims in interface DelimitedStructure
Parameters:
delims - delimiter set to use

unmarshal

public void unmarshal(String data)
Unmarshals an arbitrary String representation of a structure into this data structure

Specified by:
unmarshal in interface GenericStructure
Parameters:
data - a String representation of data

marshal

public String marshal()
Returns a string representation of this and the underlying data structures

Specified by:
marshal in interface GenericStructure
Returns:
a String representation of this structure

setData

public void setData(String data)
Set the underlying data for this data object.

Specified by:
setData in interface DataField
Parameters:
data - a String representation of the data

getData

public String getData()
Retrieve the underlying data for this data object.

Specified by:
getData in interface DataField
Returns:
String representation of the data

toString

public String toString()
Returns a String representation of this field

Overrides:
toString in class Object
Returns:
a string representation

isBaseField

public boolean isBaseField()
Returns if this field is the base field, or if it has subfields included.

Returns:
the baseField