Skip to content

Validation From API

Bastiaan Bijl edited this page Nov 1, 2016 · 3 revisions

The validation process can be triggered using the coins-cli tool, but it can also be called from a Java or dotNET project.

Please first read the For Starters.

##Example

JenaCoinsContainer container = new JenaCoinsContainer(...
Validator validator = new Validator(container, "COINS 2.0 Lite");
// generate html
validator.validate(reportFile, Validator.GENERATE_HTML);
// generate xml
validator.validate(reportFile, Validator.GENERATE_XML);
// generate html and xml
validator.validate(reportFile, Validator.GENERATE_BOTH);

##Custom profiles The list of public available profiles is available at this link.

To call the validator with a custom profile, register the profile the following way:

File profileFile = ...
Profile profile = Profile.loadProfile(new FileInputStream(profileFile));
profileName = profile.getName();

Validator validator = new Validator(container, profileName);
...

Clone this wiki locally