|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
public interface Segment
Represents an HL7 message segment, which is a unit of data that contains multiple fields.
Method Summary | |
---|---|
java.lang.String |
encode()
Encodes this message using the parser returned by Message.getParser() |
Type[] |
getField(int number)
Returns the array of Fields at the specified index. |
Type |
getField(int number,
int rep)
Returns a specific repetition of field at the specified index. |
int |
getLength(int number)
Returns the maximum length of the field at the given index, in characters. |
int |
getMaxCardinality(int number)
Returns the maximum number of repetitions of this field that are allowed. |
java.lang.String[] |
getNames()
Returns the names of the fields in this segment. |
boolean |
isRequired(int number)
Returns true if the field at the given index is required, false otherwise. |
int |
numFields()
Returns the number of fields defined by this segment (repeating fields are not counted multiple times). |
void |
parse(java.lang.String string)
Parses the string into this segment using the parser returned by Message.getParser() |
Methods inherited from interface ca.uhn.hl7v2.model.Structure |
---|
getMessage, getName, getParent |
Method Detail |
---|
Type[] getField(int number) throws HL7Exception
HL7Exception
- if field index is out of range.Type getField(int number, int rep) throws HL7Exception
Type t = getField(x, 2);
number
- the field number (starting at 1)rep
- the repetition number (starting at 0)
HL7Exception
- if field index is out of range, or if the specified
repetition is more than 1 greater than the highest index of existing repetitions.
NOTE: to facilitate local extensions, no exception is thrown if
rep > max cardinalityboolean isRequired(int number) throws HL7Exception
HL7Exception
- if field index is out of range.int getLength(int number) throws HL7Exception
HL7Exception
- if field index is out of range.int getMaxCardinality(int number) throws HL7Exception
HL7Exception
- if field index is out of range.int numFields()
java.lang.String[] getNames()
void parse(java.lang.String string) throws HL7Exception
Message.getParser()
HL7Exception
java.lang.String encode() throws HL7Exception
Message.getParser()
HL7Exception
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |