Skip to content

cessda/cessda.cmv.core

Repository files navigation

CESSDA Metadata Validator Core

SQAaaS badge

SQAaaS badge shields.io

Build Status Quality Gate Status Coverage Code Smells Technical Debt Security Rating Vulnerabilities Bugs

This repository holds all core domain logic about CESSDA Metadata Validator project.

Prerequisites

The following SDKs must be installed before the project can be used.

  • Java Development Kit (JDK) 8 (or later)

Usage

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

Logging is provided using SLF4J. Applications integrating CMV Core must provide their own SLF4J implementation (such as Logback) for logs to be outputted.

Dependency Information

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>

Getting started as developer

# Pull repository and change directory
git clone https://github.com/cessda/cessda.cmv.core.git
cd cessda.cmv.core

# Execute tests
./mvnw clean test

Contributing

Please read CONTRIBUTING for details on our code of conduct, and the process for submitting pull requests to us.

Versioning

See Semantic Versioning for guidance.

Changes

You can find the list of changes made in each release in the CHANGELOG file.

License

See the LICENSE file.

Citing

See the CITATION file.

About

CESSDA Metadata Validator core. Contains business logic of all use cases.

Resources

License

Code of conduct

Stars

Watchers

Forks

Packages

No packages published

Languages