The aim of this jar is to validate RCS (RCS-C, RCS-EP) CDA document with avoiding access to internet resources as gazelle ValueSet provider,
or EVSClient resources (http://gazelle.ihe.net/EVSClient). There are two possible use cases of this jar :
I - using the jar as an executable (.sh for unix system / .bat for windows system)
II - including the jar on a pre-existing java project, and using classes of the tool for validation.
I - using the jar as a part of an executable
We have created this executable, so a user can specify the file to be validated and the CDA validator to be used.
After unzipping the downloaded file, you will find that it contains two repository : bin and repo. By accessing to the folder bin
you will find two file : validator.sh and validator.bat, the first for unix systems, the second shall be used for windows systems.
Example of use :
You can execute these command line on the repository bin :
./validator.sh -val "IHE - CARD Registry Content Submission (RCS-C)" -path ../samples/test_RCS-C.xml -out ../samples/res.html -html ==> generate a html output
./validator.sh -val "IHE - CARD - Registry Content Submission - Electrophysiology (RCS-EP)" -path ../samples/test_RCS-EP.xml -out ../samples/res.html -html
./validator.sh -val "IHE - CARD Registry Content Submission (RCS-C)" -path ../samples/test_RCS-C.xml -out ../samples/res.xml ==> generate XML validation result
./validator.sh -val "IHE - CARD - Registry Content Submission - Electrophysiology (RCS-EP)" -path ../samples/test_RCS-EP.xml -out ../samples/res.xml
if you have a problem to execute validator.sh, execute the command : chmod u+x validator.sh
## if you execute the validator.sh from a folde which is not the bin folder, you have to add the reference to the resources folder, which contains
the XSD of validation, the valueSet used on the validation, and the xsl that allow to generate html result, example of use :
./validator.sh -val "IHE - CARD Registry Content Submission (RCS-C)" -path ../samples/test_RCS-C.xml -out ../samples/res.html -html
-resources /home/users/..../bin/resources/
The list of available validators are :
* BASIC - CDA
* IHE - CARD Registry Content Submission (RCS-C)
* IHE - CARD - Registry Content Submission - Electrophysiology (RCS-EP)
for windows users, you can test :
./validator.bat -val "IHE - CARD Registry Content Submission (RCS-C)" -path ../samples/test_RCS-C.xml -out ../samples/res.html -html ==> generate a html output
./validator.bat -val "IHE - CARD Registry Content Submission (RCS-C)" -path ../samples/test_RCS-C.xml -out ../samples/res.xml ==> generate XML validation result
The option -html if presents will indicate that the output result is a html result
The option -out if presents will indicate the outputFile in which the validation result is saved. If -out is not present, the validation result will be printed on the console
to view the documentation of the different attributes supported by the tool : ./validator.sh -help
II - include the jar on a pre-existing java project
a - maven project
To use the jar on a pre-existing maven project, you have only to add the dependency of the jar to your pom.xml
net.ihe.gazelle.acc.validator
rcscspec-validator-jar
jar
x.x
You have also to add in your miror project the path to the repository of gazelle on your pom.xml :
irisa-sumo
Sumo Irisa Public Maven Repository Group
http://gazelle.ihe.net/nexus/content/groups/public/
default
true
never
true
The class to be used for the validation is net.ihe.gazelle.acc.validator.GazelleValidatorCore.validateDocument(String document, String validator) where
- document : the CDA XML document to be validated
- validator : the validator name (IHE - CARD Registry Content Submission (RCS-C), IHE - CARD - Registry Content Submission - Electrophysiology (RCS-EP))
And , before calling this method, you have to configure the properties of the validator :
- net.ihe.gazelle.acc.utils.ProjectDependencies.CDA_XSD : url to basic CDA schema
- net.ihe.gazelle.acc.utils.ProjectDependencies.CDA_XSL_TRANSFORMER : url to the xsl for transaformation of the result to HTML
- net.ihe.gazelle.acc.utils.ProjectDependencies.VALUE_SET_REPOSITORY : url to the repository containing all the valueSet for validation
b - ant project
You have to add all the jar on the repository "repo" on the lib folder of your project
The class to be used for the validation is net.ihe.gazelle.acc.validator.GazelleValidatorCore.validateDocument(String document, String validator) where
- document : the CDA XML document to be validated
- validator : the validator name (IHE - CARD Registry Content Submission (RCS-C))
And , before calling this method, you have to configure the properties of validator :
- net.ihe.gazelle.acc.utils.ProjectDependencies.CDA_XSD : url to basic CDA schema
- net.ihe.gazelle.acc.utils.ProjectDependencies.CDA_XSL_TRANSFORMER : url to the xsl for transaformation of the result to HTML
- net.ihe.gazelle.acc.utils.ProjectDependencies.VALUE_SET_REPOSITORY : url to the repository containing all the valueSet for validation
-- source files : you can checkout sources of the project from https://scm.gforge.inria.fr/anonscm/svn/gazelle/validators/rcscspec-validator-jar/trunk
svn co https://scm.gforge.inria.fr/anonscm/svn/gazelle/validators/rcscspec-validator-jar/trunk