Package org.hl7.fhir.r4.elementmodel
Class VerticalBarParser.Delimiters
- java.lang.Object
-
- org.hl7.fhir.r4.elementmodel.VerticalBarParser.Delimiters
-
- Enclosing class:
- VerticalBarParser
public class VerticalBarParser.Delimiters extends Object
Delimiters for a message. Note that the application rarely needs to concern itself with this information; it mainly exists for internal use. However if a message is being written to a spec that calls for non-standard delimiters, the application can set them here.- Author:
- Grahame
-
-
Field Summary
Fields Modifier and Type Field Description static charDEFAULT_CHARACTER_ESCAPEHl7 defined default delimiter for an escapestatic charDEFAULT_DELIMITER_COMPONENTHl7 defined default delimiter for a componentstatic charDEFAULT_DELIMITER_FIELDHl7 defined default delimiter for a fieldstatic charDEFAULT_DELIMITER_REPETITIONHl7 defined default delimiter for a repeatstatic charDEFAULT_DELIMITER_SUBCOMPONENTHl7 defined default delimiter for a subcomponent
-
Constructor Summary
Constructors Constructor Description Delimiters()create
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidcheck()check that the delimiters are validStringforMSH2()build the MSH-2 contentchargetComponentDelimiter()get defined component character for this messagechargetDelimiterEscapeChar(char ch)get escape for ch in an escapeStringgetEscape(char ch)get the escape for a characterchargetEscapeCharacter()get defined escape character for this messagechargetFieldDelimiter()get defined field character for this messagechargetRepetitionDelimiter()get repeat field character for this messagechargetSubComponentDelimiter()get sub-component field character for this messagebooleanisCellDelimiter(char ch)check to see whether ch is a cell delimiter char (vertical bar parser support)booleanisDelimiter(char ch)check to see whether ch is a delimiter character (vertical bar parser support)booleanisDelimiterEscape(char ch)check to see whether ch represents a delimiter escapebooleanmatches(VerticalBarParser.Delimiters other)voidreset()reset to default HL7 valuesvoidsetComponentDelimiter(char componentDelimiter)set defined component character for this messagevoidsetEscapeCharacter(char escapeCharacter)set defined escape character for this messagevoidsetFieldDelimiter(char fieldDelimiter)set defined field character for this messagevoidsetRepetitionDelimiter(char repetitionDelimiter)set repeat field character for this messagevoidsetSubComponentDelimiter(char subComponentDelimiter)set sub-component field character for this message
-
-
-
Field Detail
-
DEFAULT_DELIMITER_FIELD
public static final char DEFAULT_DELIMITER_FIELD
Hl7 defined default delimiter for a field- See Also:
- Constant Field Values
-
DEFAULT_DELIMITER_COMPONENT
public static final char DEFAULT_DELIMITER_COMPONENT
Hl7 defined default delimiter for a component- See Also:
- Constant Field Values
-
DEFAULT_DELIMITER_SUBCOMPONENT
public static final char DEFAULT_DELIMITER_SUBCOMPONENT
Hl7 defined default delimiter for a subcomponent- See Also:
- Constant Field Values
-
DEFAULT_DELIMITER_REPETITION
public static final char DEFAULT_DELIMITER_REPETITION
Hl7 defined default delimiter for a repeat- See Also:
- Constant Field Values
-
DEFAULT_CHARACTER_ESCAPE
public static final char DEFAULT_CHARACTER_ESCAPE
Hl7 defined default delimiter for an escape- See Also:
- Constant Field Values
-
-
Constructor Detail
-
Delimiters
public Delimiters()
create
-
-
Method Detail
-
matches
public boolean matches(VerticalBarParser.Delimiters other)
-
getComponentDelimiter
public char getComponentDelimiter()
get defined component character for this message- Returns:
-
setComponentDelimiter
public void setComponentDelimiter(char componentDelimiter)
set defined component character for this message- Parameters:
componentDelimiter-
-
getEscapeCharacter
public char getEscapeCharacter()
get defined escape character for this message- Returns:
-
setEscapeCharacter
public void setEscapeCharacter(char escapeCharacter)
set defined escape character for this message- Parameters:
escapeCharacter-
-
getFieldDelimiter
public char getFieldDelimiter()
get defined field character for this message- Returns:
-
setFieldDelimiter
public void setFieldDelimiter(char fieldDelimiter)
set defined field character for this message- Parameters:
fieldDelimiter-
-
getRepetitionDelimiter
public char getRepetitionDelimiter()
get repeat field character for this message- Returns:
-
setRepetitionDelimiter
public void setRepetitionDelimiter(char repetitionDelimiter)
set repeat field character for this message- Parameters:
repetitionDelimiter-
-
getSubComponentDelimiter
public char getSubComponentDelimiter()
get sub-component field character for this message- Returns:
-
setSubComponentDelimiter
public void setSubComponentDelimiter(char subComponentDelimiter)
set sub-component field character for this message- Parameters:
subComponentDelimiter-
-
reset
public void reset()
reset to default HL7 values
-
check
public void check() throws org.hl7.fhir.exceptions.FHIRException
check that the delimiters are valid- Throws:
org.hl7.fhir.exceptions.FHIRException
-
isDelimiter
public boolean isDelimiter(char ch)
check to see whether ch is a delimiter character (vertical bar parser support)- Parameters:
ch-- Returns:
-
isCellDelimiter
public boolean isCellDelimiter(char ch)
check to see whether ch is a cell delimiter char (vertical bar parser support)- Parameters:
ch-- Returns:
-
getEscape
public String getEscape(char ch)
get the escape for a character- Parameters:
ch-- Returns:
-
isDelimiterEscape
public boolean isDelimiterEscape(char ch)
check to see whether ch represents a delimiter escape- Parameters:
ch-- Returns:
-
getDelimiterEscapeChar
public char getDelimiterEscapeChar(char ch) throws org.hl7.fhir.exceptions.DefinitionException
get escape for ch in an escape- Parameters:
ch-- Returns:
- Throws:
org.hl7.fhir.exceptions.DefinitionExceptionorg.hl7.fhir.exceptions.FHIRException
-
-