public class FastParser extends Parser
| Modifier and Type | Class and Description |
|---|---|
static class |
FastParser.RootRef
Deprecated.
A convenience StructRef that points to a message root.
|
static class |
FastParser.StructRef
Deprecated.
A pointer to a distinct segment or group position in a message.
|
| Constructor and Description |
|---|
FastParser(Map<Object,FastParser.StructRef> theEventGuideMap)
Deprecated.
|
FastParser(ModelClassFactory theFactory,
Map<Object,FastParser.StructRef> theEventGuideMap)
Deprecated.
|
| Modifier and Type | Method and Description |
|---|---|
protected String |
doEncode(Message source)
Deprecated.
Called by encode(Message) to perform implementation-specific encoding work.
|
protected String |
doEncode(Message source,
String encoding)
Deprecated.
Called by encode(Message, String) to perform implementation-specific encoding work.
|
String |
doEncode(Segment structure,
EncodingCharacters encodingCharacters)
Deprecated.
Not supported, throws UnsupportedOperationException
|
String |
doEncode(Type type,
EncodingCharacters encodingCharacters)
Deprecated.
Not supported, throws UnsupportedOperationException
|
protected Message |
doParse(String message,
String version)
Deprecated.
Called by parse() to perform implementation-specific parsing work.
|
protected Message |
doParseForSpecificPackage(String theMessage,
String theVersion,
String thePackageName)
Deprecated.
Throws unsupported operation exception
|
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 |
getVersion(String message)
Deprecated.
Returns the version ID (MSH-12) from the given message, without fully parsing the message.
|
static Map<Object,FastParser.StructRef> |
loadEventGuideMap(URL theMapURL)
Deprecated.
Loads a parsing guide map (as required for FastParser instantiation).
|
void |
parse(Message message,
String string)
Deprecated.
Not supported, throws UnsupportedOperationException
|
void |
parse(Segment segment,
String string,
EncodingCharacters encodingCharacters)
Deprecated.
Not supported, throws UnsupportedOperationException
|
void |
parse(Type type,
String string,
EncodingCharacters encodingCharacters)
Deprecated.
Not supported, throws UnsupportedOperationException
|
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 FastParser(Map<Object,FastParser.StructRef> theEventGuideMap)
theEventGuideMap - a map with keys in the form "type^event" (like MSH-9
components 1 and 2). Values are corresponding parsing guides for those events.
A parsing guide is a group of StructRef that identify which segments to parse,
the relationships between them, and where to find them in a message hierarchy.
The value in the map is the RootRef of the message root. It must return the
StructRef for the MSH segment from getSuccessor("MSH"). References to other
segments can be included as needed.public FastParser(ModelClassFactory theFactory, Map<Object,FastParser.StructRef> theEventGuideMap)
theFactory - custom factory to use for model class lookuptheEventGuideMap - a map with keys in the form "type^event" (like MSH-9
components 1 and 2). Values are corresponding parsing guides for those events.
A parsing guide is a group of StructRef that identify which segments to parse,
the relationships between them, and where to find them in a message hierarchy.
The value in the map is the RootRef of the message root. It must return the
StructRef for the MSH segment from getSuccessor("MSH"). References to other
segments can be included as needed.public static Map<Object,FastParser.StructRef> loadEventGuideMap(URL theMapURL) throws HL7Exception
theMapURL - an URL to a file of the form desribed aboveHL7Exceptionpublic String getEncoding(String message)
ParsergetEncoding in class ParserParser.getEncoding(java.lang.String)public boolean supportsEncoding(String encoding)
ParsersupportsEncoding in class ParserParser.supportsEncoding(java.lang.String)public String getDefaultEncoding()
getDefaultEncoding in class Parserprotected Message doParse(String message, String version) throws HL7Exception, EncodingNotSupportedException
ParserdoParse 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.Parser.doParse(java.lang.String, java.lang.String)protected String doEncode(Message source, String encoding) throws HL7Exception, EncodingNotSupportedException
ParserdoEncode 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.Parser.encode(ca.uhn.hl7v2.model.Message, java.lang.String)protected String doEncode(Message source) throws HL7Exception
ParserdoEncode 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)EncodingNotSupportedException - if the requested encoding is not
supported by this parser.Parser.encode(ca.uhn.hl7v2.model.Message)public Segment getCriticalResponseData(String message) throws HL7Exception
ParserReturns 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 ParserHL7ExceptionParser.getCriticalResponseData(java.lang.String)public String getAckID(String message)
ParsergetAckID in class ParserParser.getAckID(java.lang.String)public String getVersion(String message) throws HL7Exception
ParsergetVersion in class ParserHL7Exception - if the version field can not be found.Parser.getVersion(java.lang.String)public String doEncode(Segment structure, EncodingCharacters encodingCharacters) throws HL7Exception
doEncode in class Parserstructure - The structure to encodeencodingCharacters - The encoding charactersUnsupportedOperationExceptionHL7Exception - If there is a problem encodingpublic String doEncode(Type type, EncodingCharacters encodingCharacters) throws HL7Exception
doEncode in class Parsertype - The type to encodeencodingCharacters - The encoding charactersUnsupportedOperationExceptionHL7Exception - If there is a problem encodingpublic void parse(Type type, String string, EncodingCharacters encodingCharacters) throws HL7Exception
parse in class Parsertype - The type to encodestring - The string to parseencodingCharacters - The encoding charactersUnsupportedOperationExceptionHL7Exception - If there is a problem encodingpublic void parse(Segment segment, String string, EncodingCharacters encodingCharacters) throws HL7Exception
parse in class Parsersegment - The segment to encodestring - The string to parseencodingCharacters - The encoding charactersUnsupportedOperationExceptionHL7Exception - If there is a problem encodingpublic void parse(Message message, String string) throws HL7Exception
parse in class Parsermessage - The message to encodestring - The string to parseUnsupportedOperationExceptionHL7Exception - If there is a problem encodingprotected Message doParseForSpecificPackage(String theMessage, String theVersion, String thePackageName) throws HL7Exception, EncodingNotSupportedException
doParseForSpecificPackage in class ParserUnsupported - operation exceptionHL7ExceptionEncodingNotSupportedExceptionCopyright © 2001-2012 University Health Network. All Rights Reserved.