Skip to content

A validator tool to assess the compliance of an OAI-PMH endpoint with the OpenAIRE Guidelines for CRIS Managers 1.1 or 1.2.

License

Notifications You must be signed in to change notification settings

EuroCRIS/openaire-cris-validator

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

OpenAIRE CRIS validator

A tool to assess whether an OAI-PMH endpoint can provide research information complying with the OpenAIRE Guidelines for CRIS Managers versions 1.1 and 1.2. It covers these checks. Please note that releases before 2.0.0 only support version 1.1 of the Guidelines.

This is a command-line Java tool that is organized as a JUnit test suite. You can also run it in your IDE.

Please read below how to build it, run it, explore its internals and give feedback. This is Open Source software, available under the terms of the Apache 2.0 License.

CI workflow ← checking if the software builds and runs on the example files.

Usage

Build

Please make sure you have checked out the guidelines-cris-managers project in a parallel directory. Then do:

mvn clean package

We compile for Java 17 by default, but you can switch to 11 or 1.8 in the POM file.

Run

From command line

java -jar target/openaire-cris-validator-*-jar-with-dependencies.jar {endpoint-url}

From Eclipse

Set up a JUnit launcher for the CRISValidator class. Pass the OAI-PMH endpoint URL as the value of the system property endpoint.to.validate. Add the parallel guidelines-cris-managers project to the classpath of the launcher (in order to access the XML Schemas).

Checking the examples from OpenAIRE Guidelines for CRIS Managers

Use file:samples/ as your endpoint-url.

Diagnostics

The validator copies the responses to the requests it makes into files in the data/ subdirectory.

Internals

CRISValidator is the main validator class. It is the JUnit4 test suite. As it reads the metadata records from the CRIS:

  • it does simple checks on the fly (using CheckingIterable); and
  • it builds an internal representation: a HashMap of trees that consist of CERIFNodes. The last test, check990_CheckReferentialIntegrityAndFunctionalDependency, works on this internal representation.

OAIPMHEndpoint is an independent implementation of an OAI-PMH 2.0 client in Java. While it uses JAXB to map the OAI-PMH 2.0 markup to Java objects, any metadata payload is opaque to it. For requests that list objects (i.e., ListIdentifiers, ListRecords or ListSets) an Iterable is returned that uses the protocol's resumption token mechanism to fetch successive chunks of objects. This is entirely transparent to the class user.

If the OAI-PMH 2.0 data provider advertises support for a compression, the endpoint client object will use it. CompressionHandlingHttpURLConnectionAdapter is a transparent compression-handling wrapper around an HttpURLConnection.

Feedback

I'll be grateful for your feedback.
Please submit a github issue or email me to [email protected].

License

Copyright 2018–2023 Jan Dvořák ORCID iD icon https://orcid.org/0000-0001-8985-152X and other contributors

Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at

http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.

About

A validator tool to assess the compliance of an OAI-PMH endpoint with the OpenAIRE Guidelines for CRIS Managers 1.1 or 1.2.

Topics

Resources

License

Stars

Watchers

Forks

Contributors 4

  •  
  •  
  •  
  •  

Languages