Package ca.uhn.hl7v2.parser
Class EncodingCharacters
java.lang.Object
ca.uhn.hl7v2.parser.EncodingCharacters
- All Implemented Interfaces:
Cloneable
Represents the set of special characters used to encode traditionally
encoded HL7 messages.
- Author:
- Bryan Tripp (bryan_tripp@sourceforge.net)
-
Constructor Summary
ConstructorsConstructorDescriptionEncodingCharacters(char fieldSeparator, char componentSeparator, char repetitionSeparator, char escapeCharacter, char subcomponentSeparator) EncodingCharacters(char fieldSeparator, char componentSeparator, char repetitionSeparator, char escapeCharacter, char subcomponentSeparator, char truncationCharacter) EncodingCharacters(char fieldSeparator, String encodingCharacters) Creates new EncodingCharacters object with the given character values.copies contents of "other" -
Method Summary
Modifier and TypeMethodDescriptionclone()static EncodingCharactersReturns an instance of encoding characters with the standard ER7 encoding characters defined: |^~\&booleancharReturns the component separator.charReturns the escape character.charReturns the field separator.static EncodingCharactersgetInstance(Message message) Returns an instance using the MSH-1 and MSH-2 values of the given messagecharReturns the repetition separator.charReturns the subcomponent separator.charReturns the truncation character.inthashCode()voidsetComponentSeparator(char newComponentSep) voidsetEscapeCharacter(char newEscapeChar) voidsetFieldSeparator(char newFieldSep) voidsetRepetitionSeparator(char newRepetitionSep) voidsetSubcomponentSeparator(char newSubcomponentSep) voidsetTruncationCharacter(char newTruncationChar) toString()Returns the encoding characters (not including field separator) as a string.
-
Constructor Details
-
EncodingCharacters
Creates new EncodingCharacters object with the given character values. If the encodingCharacters argument is null, the default values are used.- Parameters:
fieldSeparator- field seperatorencodingCharacters- consists of the characters that appear in MSH-2 (see section 2.8 of the HL7 spec). The characters are Component Separator, Repetition Separator, Escape Character, Subcomponent Separator, and, as of v2.7, the Truncation Character (in that order).
-
EncodingCharacters
public EncodingCharacters(char fieldSeparator, char componentSeparator, char repetitionSeparator, char escapeCharacter, char subcomponentSeparator) -
EncodingCharacters
public EncodingCharacters(char fieldSeparator, char componentSeparator, char repetitionSeparator, char escapeCharacter, char subcomponentSeparator, char truncationCharacter) -
EncodingCharacters
copies contents of "other"
-
-
Method Details
-
getInstance
Returns an instance using the MSH-1 and MSH-2 values of the given message- Parameters:
message- the message- Returns:
- the encoding characters for this message
- Throws:
HL7Exception- If either MSH-1 or MSH-2 are not populated- Since:
- 1.0
-
getFieldSeparator
Returns the field separator.- Returns:
- the field separator
-
getComponentSeparator
Returns the component separator.- Returns:
- the component separator
-
getRepetitionSeparator
Returns the repetition separator.- Returns:
- the repetition separator
-
getEscapeCharacter
Returns the escape character.- Returns:
- the escape character
-
getSubcomponentSeparator
Returns the subcomponent separator.- Returns:
- the subcomponent separator
-
getTruncationCharacter
Returns the truncation character.- Returns:
- the truncation character
-
toString
Returns the encoding characters (not including field separator) as a string. -
clone
- Overrides:
clonein classObject- Throws:
CloneNotSupportedException
-
setFieldSeparator
-
setComponentSeparator
-
setRepetitionSeparator
-
setEscapeCharacter
-
setSubcomponentSeparator
-
setTruncationCharacter
-
equals
-
hashCode
-
defaultInstance
Returns an instance of encoding characters with the standard ER7 encoding characters defined: |^~\&- Returns:
- a default instance of encoding characters
-