MDR Validation Project

General information

This is a lib to validate value against the MDR.


First prepare the MDR connection. You need to provide: the URL to the MDR to be used the AUTH userId and keyId the AUTH URL to be used the privateKey used there (for signature) the MDR namespace the samply proxyConfiguration


MdrConnection mdrConnection = new MdrConnection(mdrURL, authUserId, keyId, authURL, privateKeyBase64, nameSpace, proxyConfiguration);


Then initiate the Validator and read out the members of the namespace


MDRValidator val = new MDRValidator(mdrConnection);  


Now you can simply validate, by calling <code>

val.validate(mdrKey, value)


Example: <code>

String mdrKey = "urn:mdr:dataelement:1:1";

if(!val.validate(mdrKey, 900)) {  
    for(ErrorMessage error: val.getErrorMessage(mdrKey)) {  
        System.out.println(error.getDesignation()+ " : "+error.getDefinition());  

assertFalse(val.validate(mdrKey, 900));  
assertTrue(val.validate(mdrKey, 90));


As you can see you can get the error messages defined in MDR by calling





Use maven to build the jar:

mvn clean install