/** * @return the preferred encoding of the current primary Parser */ public String getDefaultEncoding() { return primaryParser.getDefaultEncoding(); }
/** * @return the preferred encoding of the current primary Parser */ public String getDefaultEncoding() { return primaryParser.getDefaultEncoding(); }
/** * Returns true if and only if the given encoding is supported by this Parser. * @param encoding the encoding, "XML" or "ER7" * @return true if this parser supports parsing message encoded this way */ public boolean supportsEncoding(String encoding) { return getDefaultEncoding().equalsIgnoreCase(encoding); }
/** * Returns true if and only if the given encoding is supported by this Parser. * @param encoding the encoding, "XML" or "ER7" * @return true if this parser supports parsing message encoded this way */ public boolean supportsEncoding(String encoding) { return getDefaultEncoding().equalsIgnoreCase(encoding); }
/** * Formats a Message object into an HL7 message string using this parser's default encoding. * * @param source a Message object from which to construct an encoded message string * @return the encoded message * @throws HL7Exception if the data fields in the message do not permit encoding (e.g. required * fields are null) */ public String encode(Message source) throws HL7Exception { assertMessageValidates(source); String result = doEncode(source); assertMessageValidates(result, getDefaultEncoding(), source.getVersion()); return result; }
/** * Formats a Message object into an HL7 message string using this parser's default encoding. * * @param source a Message object from which to construct an encoded message string * @return the encoded message * @throws HL7Exception if the data fields in the message do not permit encoding (e.g. required * fields are null) */ public String encode(Message source) throws HL7Exception { assertMessageValidates(source); String result = doEncode(source); assertMessageValidates(result, getDefaultEncoding(), source.getVersion()); return result; }