Skip to content

Latest commit

 

History

History
96 lines (59 loc) · 5.03 KB

README.md

File metadata and controls

96 lines (59 loc) · 5.03 KB

OpenAIRE CRIS validator

A tool to assess whether an OAI-PMH endpoint can provide research information in compliance with the OpenAIRE Guidelines for CRIS Managers 1.1.

The checks

The meaning of the SHALL keyword is specified in RFC 2119.

(0) Any XML response returned by the endpoint to the requests specified below SHALL validate with respect to the following XML Schemas:
http://www.openarchives.org/OAI/2.0/OAI-PMH.xsd for the namespace http://www.openarchives.org/OAI/2.0/,
http://www.openarchives.org/OAI/2.0/oai-identifier.xsd for the namespace http://www.openarchives.org/OAI/2.0/oai-identifier and
https://raw.githubusercontent.com/openaire/guidelines-cris-managers/master/schemas/openaire-cerif-profile.xsd for the namespace https://www.openaire.eu/cerif-profile/1.1/.

(1) The response to an Identify request SHALL include:
(a) exactly one description element that contains a Service element from namespace https://www.openaire.eu/cerif-profile/1.1/ and
(b) exactly one description element that contains an oai-identifier element from namespace http://www.openarchives.org/OAI/2.0/oai-identifier.
The oai-identifier/repositoryIdentifier from (b) will be refered to as {CRIS_identifier} in the sequel. (c) The Service/Acronym from (a) SHALL be equal to the {CRIS_identifier}. (d) The baseURL from the Identify response is equal to the base URL of the CRIS.

(2) The list of supported metadata formats returned by the general ListMetadataFormats request (i.e., no identifier parameter specified) SHALL include oai_cerif_openaire with namespace https://www.openaire.eu/cerif-profile/1.1/ as per specification.

(3) The list of supported sets returned by the ListSets request SHALL include all of the sets as per the specification.

(4) - removed

(5) When all objects from the sets as per the specification are retrieved using the ListRecords requests and put together, the following statements SHALL hold:
(a) Any id attribute in the CERIF XML markup points at an OAI record with identifier constructed as per specification, including the {CRIS_identifier}.
(b) CERIF XML markup contains no conflicts in properties: where a property value is given, the value does not differ from that in other places where the value of the same property is given.

Current status

(as of 2018-05-15)

The software currently covers all of the checks (0), (1) incl. (1a), (1b) and (1c), (2), (3) and (5) incl. (5a) and (5b) above.

Usage

Build

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

mvn clean compile package

Run

From command line

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

With Java 9 you'll need the additional command-line option --add-modules=java.xml.bind to run the code (as per this answer on StackOverflow).

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.

Feedback

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

License

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

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.