|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object eu.ihe.validator.ValidationAPI
public class ValidationAPI
Class for the validation and the parsing
Field Summary | |
---|---|
ca.uhn.hl7v2.HL7Exception[] |
errs
|
boolean |
isparsing
|
private static ca.uhn.log.HapiLog |
log
|
private java.util.Vector |
vct
|
Constructor Summary | |
---|---|
ValidationAPI()
|
Method Summary | |
---|---|
private java.lang.String |
createErrorFile(java.lang.String path)
|
private java.lang.String |
createErrorPath(java.lang.String path,
java.lang.String extension)
Generate default path from the in-file message |
ca.uhn.hl7v2.model.Message |
getMessageModel(java.lang.String[] es)
Used HAPI to parse .hl7 en .xml TO instatiate a message class ca.uhn.hl7v2.model.vxx.message.MsgStructID |
private java.lang.String |
loadFile(java.lang.String path)
To load any message file I should use |
private static java.lang.String |
loadProfile(java.lang.String path)
loads a profile file |
void |
loadTable(java.io.File table_path)
|
static void |
main(java.lang.String[] args)
the usage of the class always the message in first and the profile message after |
void |
P2X2P(java.lang.String[] es)
Parse an ER7 message to XML and The XML one in ER7 |
java.lang.String |
parsefileextension(java.lang.String infilepath)
Create the path of the parsing file by default |
java.lang.String |
parsefileextension(java.lang.String infilepath,
java.lang.String encode)
|
void |
parsers(java.lang.String[] args)
To parse an ER7 or HL7 message |
void |
validation(java.lang.String[] args)
Validate an ER7 or HL7 messsage against an profil of message XML |
boolean |
validMessageAgainstProfile(java.lang.String[] es)
validate a message against a profile |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
public ca.uhn.hl7v2.HL7Exception[] errs
private java.util.Vector vct
public boolean isparsing
private static final ca.uhn.log.HapiLog log
Constructor Detail |
---|
public ValidationAPI()
Method Detail |
---|
public void P2X2P(java.lang.String[] es) throws java.lang.Exception
path
- to the in and out file
java.lang.Exception
public ca.uhn.hl7v2.model.Message getMessageModel(java.lang.String[] es) throws java.lang.Exception
es
- : String[2] path to (.hl7)file and path to the output file (.xml)
java.lang.Exception
- java.io.Exceptionprivate java.lang.String loadFile(java.lang.String path) throws java.io.IOException
String
- :filePath
java.io.IOException
public java.lang.String parsefileextension(java.lang.String infilepath)
ou
- : the in-file pathpublic java.lang.String parsefileextension(java.lang.String infilepath, java.lang.String encode)
public void loadTable(java.io.File table_path)
public boolean validMessageAgainstProfile(java.lang.String[] es)
es
- : path to the in out and log path
message in first (.hl7/.xml) and profil(.xml)
private java.lang.String createErrorPath(java.lang.String path, java.lang.String extension) throws java.lang.Exception
ou
- : in-message file path
java.lang.Exception
- :file not found exceptionprivate java.lang.String createErrorFile(java.lang.String path) throws java.lang.Exception
java.lang.Exception
public void validation(java.lang.String[] args) throws java.lang.Exception
args
- : path for the in and out file
java.lang.Exception
public void parsers(java.lang.String[] args) throws java.lang.Exception
the
- in and out file path
java.lang.Exception
private static java.lang.String loadProfile(java.lang.String path) throws java.io.IOException
String
- path
java.io.IOException
can load any file
public static void main(java.lang.String[] args) throws java.lang.Exception
args[2]:
- path to message in (.hl7 or .xml) and profil(.xml)
java.lang.Exception
- File not found
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |