public class OldPipeParser extends Parser
| Constructor and Description |
|---|
OldPipeParser()
Deprecated.
Creates a new PipeParser
|
OldPipeParser(ModelClassFactory theFactory)
Deprecated.
Creates a new PipeParser
|
| Modifier and Type | Method and Description |
|---|---|
protected String |
doEncode(Message source)
Deprecated.
Formats a Message object into an HL7 message string using this parser's
default encoding ("VB").
|
protected String |
doEncode(Message source,
String encoding)
Deprecated.
Formats a Message object into an HL7 message string using the given
encoding.
|
String |
doEncode(Segment structure,
EncodingCharacters encodingCharacters)
Deprecated.
Encodes a particular segment and returns the encoded structure
|
String |
doEncode(Type type,
EncodingCharacters encodingCharacters)
Deprecated.
Encodes a particular type and returns the encoded structure
|
protected Message |
doParse(String message,
String version)
Deprecated.
Parses a message string and returns the corresponding Message
object.
|
protected Message |
doParseForSpecificPackage(String theMessage,
String theVersion,
String thePackageName)
Deprecated.
Throws unsupported operation exception
|
static String |
encode(Group source,
EncodingCharacters encodingChars)
Deprecated.
Returns given group serialized as a pipe-encoded string - this method is called
by encode(Message source, String encoding).
|
static String |
encode(Segment source,
EncodingCharacters encodingChars)
Deprecated.
|
static String |
encode(Type source,
EncodingCharacters encodingChars)
Deprecated.
Encodes the given Type, using the given encoding characters.
|
String |
getAckID(String message)
Deprecated.
For response messages, returns the value of MSA-2 (the message ID of the message
sent by the sending system).
|
Segment |
getCriticalResponseData(String message)
Deprecated.
Returns a minimal amount of data from a message string, including only the
data needed to send a response to the remote system.
|
String |
getDefaultEncoding()
Deprecated.
|
String |
getEncoding(String message)
Deprecated.
Returns a String representing the encoding of the given message, if
the encoding is recognized.
|
String |
getMessageStructure(String message)
Deprecated.
this method should not be public
|
String |
getVersion(String message)
Deprecated.
Returns the version ID (MSH-12) from the given message, without fully parsing the message.
|
void |
parse(Message message,
String string)
Deprecated.
Parses a particular message and returns the encoded structure
|
void |
parse(Segment destination,
String segment,
EncodingCharacters encodingChars)
Deprecated.
Parses a segment string and populates the given Segment object.
|
void |
parse(Type destinationField,
String data,
EncodingCharacters encodingCharacters)
Deprecated.
Fills a field with values from an unparsed string representing the field.
|
static String[] |
split(String composite,
String delim)
Deprecated.
Splits the given composite string into an array of components using the given
delimiter.
|
static String |
stripLeadingWhitespace(String in)
Deprecated.
Removes leading whitespace from the given string.
|
boolean |
supportsEncoding(String encoding)
Deprecated.
Returns true if and only if the given encoding is supported
by this Parser.
|
encode, encode, getFactory, getMessageStructureForEvent, getMessageStructures, getParserConfiguration, getValidationContext, instantiateMessage, instantiateMessageInASpecificPackage, makeControlMSH, parse, parseForSpecificPackage, setParserConfiguration, setValidationContext, validVersionpublic OldPipeParser()
public OldPipeParser(ModelClassFactory theFactory)
theFactory - custom factory to use for model class lookuppublic String getEncoding(String message)
getEncoding in class Parserpublic String getDefaultEncoding()
getDefaultEncoding in class Parserpublic boolean supportsEncoding(String encoding)
supportsEncoding in class Parserpublic String getMessageStructure(String message) throws HL7Exception, EncodingNotSupportedException
message - HL7ExceptionEncodingNotSupportedExceptionprotected Message doParse(String message, String version) throws HL7Exception, EncodingNotSupportedException
doParse in class Parsermessage - a String that contains an HL7 messageversion - the name of the HL7 version to which the message belongs (eg "2.5")HL7Exception - if the message is not correctly formatted.EncodingNotSupportedException - if the message encoded
is not supported by this parser.public void parse(Segment destination, String segment, EncodingCharacters encodingChars) throws HL7Exception
parse in class Parserdestination - The segment to encodesegment - The string to parseencodingChars - The encoding charactersHL7Exception - if the given string does not contain the
given segment or if the string is not encoded properlypublic void parse(Type destinationField, String data, EncodingCharacters encodingCharacters) throws HL7Exception
parse in class ParserdestinationField - the field Typedata - the field string (including all components and subcomponents; not including field delimiters)encodingCharacters - the encoding characters used in the messageHL7Exception - If there is a problem encodingpublic static String[] split(String composite, String delim)
public static String encode(Type source, EncodingCharacters encodingChars)
protected String doEncode(Message source, String encoding) throws HL7Exception, EncodingNotSupportedException
doEncode in class Parsersource - a Message object from which to construct an encoded message stringencoding - the name of the HL7 encoding to use (eg "XML"; most implementations support only
one encoding)HL7Exception - if the data fields in the message do not permit encoding
(e.g. required fields are null)EncodingNotSupportedException - if the requested encoding is not
supported by this parser.protected String doEncode(Message source) throws HL7Exception
doEncode in class Parsersource - a Message object from which to construct an encoded message stringHL7Exception - if the data fields in the message do not permit encoding
(e.g. required fields are null)public static String encode(Group source, EncodingCharacters encodingChars) throws HL7Exception
HL7Exceptionpublic static String encode(Segment source, EncodingCharacters encodingChars)
public static String stripLeadingWhitespace(String in)
public Segment getCriticalResponseData(String message) throws HL7Exception
Returns a minimal amount of data from a message string, including only the data needed to send a response to the remote system. This includes the following fields:
getCriticalResponseData in class ParserHL7Exceptionpublic String getAckID(String message)
public String getVersion(String message) throws HL7Exception
getVersion in class ParserHL7Exception - if the version field can not be found.public String doEncode(Segment structure, EncodingCharacters encodingCharacters) throws HL7Exception
doEncode in class Parserstructure - The structure to encodeencodingCharacters - The encoding charactersHL7Exception - If there is a problem encodingpublic String doEncode(Type type, EncodingCharacters encodingCharacters) throws HL7Exception
doEncode in class Parsertype - The type to encodeencodingCharacters - The encoding charactersHL7Exception - If there is a problem encodingprotected Message doParseForSpecificPackage(String theMessage, String theVersion, String thePackageName) throws HL7Exception, EncodingNotSupportedException
doParseForSpecificPackage in class ParserUnsupported - operation exceptionHL7ExceptionEncodingNotSupportedExceptionpublic void parse(Message message, String string) throws HL7Exception
Parserparse in class Parsermessage - The message to encodestring - The string to parseHL7Exception - If there is a problem encodingCopyright © 2001-2012 University Health Network. All Rights Reserved.