This repository holds all core domain logic about CESSDA Metadata Validator project.
The following SDKs must be installed before the project can be used.
- Java Development Kit (JDK) 8 (or later)
This is a short snippet showing how to use the validator.
void validateUsingFiles()
{
CessdaMetadataValidatorFactory factory = new CessdaMetadataValidatorFactory();
Document document = factory.newDocument( new File( "path/to/ddi-document.xml" ) );
Profile profile = factory.newProfile( new File( "path/to/ddi-profile.xml" ) );
ValidationReport validationReport = factory.validate( document, profile, BASIC );
boolean isValid = validationReport.getConstraintViolations().isEmpty();
validationReport.getConstraintViolations().forEach( cv -> System.out.println( cv.getMessage() ) );
}
For more detailed information, consult the JavaDoc.
Logging is provided using SLF4J. Applications integrating CMV Core must provide their own SLF4J implementation (such as Logback) for logs to be outputted.
Add CESSDA Maven Repository to your pom.xml
:
<repositories>
<repository>
<id>cessda-nexus</id>
<url>https://nexus.cessda.eu/repository/maven-releases</url>
</repository>
</repositories>
For snapshots add:
<repositories>
<repository>
<id>cessda-nexus-snapshots</id>
<url>https://nexus.cessda.eu/repository/maven-snapshots</url>
</repository>
</repositories>
Add the dependency to your pom.xml
:
<dependency>
<groupId>eu.cessda.cmv</groupId>
<artifactId>cmv-core</artifactId>
<version>1.0.0</version>
</dependency>
# Pull repository and change directory
git clone https://github.com/cessda/cessda.cmv.core.git
cd cessda.cmv.core
# Execute tests
./mvnw clean test
Please read CONTRIBUTING for details on our code of conduct, and the process for submitting pull requests to us.
See Semantic Versioning for guidance.
You can find the list of changes made in each release in the CHANGELOG file.
See the LICENSE file.
See the CITATION file.