com.okworx.ilcd.validation.ILCDFormatValidator Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of ilcd-validation Show documentation
Show all versions of ilcd-validation Show documentation
A Java library for performing technical validation of data in ILCD data format.
package com.okworx.ilcd.validation;
/**
* Validates category information in datasets.
*
* @author oliver.kusche
* @version $Id: $Id
*/
public class ILCDFormatValidator extends ValidatorChain implements IValidator {
/** {@inheritDoc} */
@Override
public String getAspectName() {
return "ILCD Format Validity";
}
/**
* Constructor for ILCDFormatValidator.
*/
public ILCDFormatValidator() {
AbstractDatasetsValidator sv = setupSchemaValidator();
XSLTStylesheetValidator xslv = setupXSLValidator();
this.validators.add(sv);
this.validators.add(xslv);
}
private XSLTStylesheetValidator setupXSLValidator() {
XSLTStylesheetValidator xslv = new XSLTStylesheetValidator();
xslv.setAspectName("ILCD Format Validity");
// xslv.setProfile(ProfileManager.INSTANCE.getDefaultProfile());
// xslv.registerStylesheet(this.getClass().getClassLoader().getResource(Constants.DEFAULT_PROFILE_JAR).getPath(), Constants.STYLESHEETS_PATH_PREFIX, Constants.VALIDATE_STYLESHEET_NAME);
return xslv;
}
private AbstractDatasetsValidator setupSchemaValidator() {
SchemaValidator sv = new SchemaValidator();
// sv.registerDefaultSchemas();
return sv;
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy