From 11ae6861c3cb94931a838edd2082ed7f76a750f4 Mon Sep 17 00:00:00 2001 From: Jan Dvorak Date: Sat, 17 Jun 2023 19:57:35 +0200 Subject: [PATCH 01/36] Avoid using the deprecated URL(String) constructor --- .../org/eurocris/openaire/cris/validator/CRISValidator.java | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/main/java/org/eurocris/openaire/cris/validator/CRISValidator.java b/src/main/java/org/eurocris/openaire/cris/validator/CRISValidator.java index 80ce233..593f2c6 100644 --- a/src/main/java/org/eurocris/openaire/cris/validator/CRISValidator.java +++ b/src/main/java/org/eurocris/openaire/cris/validator/CRISValidator.java @@ -9,6 +9,7 @@ import java.io.IOException; import java.io.InputStream; import java.net.MalformedURLException; +import java.net.URI; import java.net.URL; import java.net.URLConnection; import java.nio.file.Files; @@ -150,7 +151,7 @@ public class CRISValidator { */ public static void main( final String[] args ) throws Exception { final String endpointUrl = ( args.length > 0 ) ? args[0] : null; - final URL endpointBaseUrl = new URL( endpointUrl ); + final URL endpointBaseUrl = URI.create( endpointUrl ).toURL(); endpoint = new OAIPMHEndpoint( endpointBaseUrl, getParserSchema(), CONN_STREAM_FACTORY ); JUnitCore.main( CRISValidator.class.getName() ); } @@ -170,7 +171,7 @@ public CRISValidator() throws MalformedURLException, MissingArgumentException, S if ( endpointUrl == null ) { throw new MissingArgumentException( "Please specify the OAI-PMH endpoint URL as the value of the " + endpointPropertyKey + " system property or as the first argument on the command line" ); } - final URL endpointBaseUrl = new URL( endpointUrl ); + final URL endpointBaseUrl = URI.create( endpointUrl ).toURL(); endpoint = new OAIPMHEndpoint( endpointBaseUrl, getParserSchema(), CONN_STREAM_FACTORY ); } } From 06f7fafa6936767a19c40fd36cef6ef06b7b7a3c Mon Sep 17 00:00:00 2001 From: Jan Dvorak Date: Sat, 17 Jun 2023 19:58:18 +0200 Subject: [PATCH 02/36] Upgrade org.glassfish.jaxb:jaxb-runtime to 2.3.8 --- pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pom.xml b/pom.xml index 9d03581..5b7e407 100644 --- a/pom.xml +++ b/pom.xml @@ -59,7 +59,7 @@ org.glassfish.jaxb jaxb-runtime - 2.3.3 + 2.3.8 From b8981893f2980425e4c40a68f1ce6b945e1aae4a Mon Sep 17 00:00:00 2001 From: Jan Dvorak Date: Sun, 18 Jun 2023 10:03:15 +0200 Subject: [PATCH 03/36] Unpack 1.1.1 schemas from https://doi.org/10.5281/zenodo.2316420 - cd src/main/resources/schemas/ - unzip ~/Downloads/OpenAIRE_Guidelines_for_CRIS_Managers-schemas_v1.1.1.zip - mv schemas cerif_profile_1_1 - rm -rf cerif_profile_1_1/cached --- .../schemas/cerif_profile_1_1/catalog.xml | 12 + .../includes/cerif-base-identifiers.xsd | 105 + .../includes/cerif-commons.xsd | 409 ++++ .../includes/person-identifiers.xsd | 234 +++ .../includes/product-identifiers.xsd | 85 + .../includes/publication-identifiers.xsd | 123 ++ .../openaire-cerif-profile.sch | 65 + .../openaire-cerif-profile.xsd | 1738 +++++++++++++++++ .../vocabularies/coar_accessrights.xsd | 133 ++ .../vocabularies/coar_patent_types.xsd | 65 + .../vocabularies/coar_product_types.xsd | 511 +++++ .../vocabularies/coar_publication_types.xsd | 1541 +++++++++++++++ .../vocabularies/issn_medium_types.xsd | 76 + .../vocabularies/openaire_funding_types.xsd | 136 ++ .../openaire_service_compatibilities.xsd | 58 + 15 files changed, 5291 insertions(+) create mode 100644 src/main/resources/schemas/cerif_profile_1_1/catalog.xml create mode 100644 src/main/resources/schemas/cerif_profile_1_1/includes/cerif-base-identifiers.xsd create mode 100644 src/main/resources/schemas/cerif_profile_1_1/includes/cerif-commons.xsd create mode 100644 src/main/resources/schemas/cerif_profile_1_1/includes/person-identifiers.xsd create mode 100644 src/main/resources/schemas/cerif_profile_1_1/includes/product-identifiers.xsd create mode 100644 src/main/resources/schemas/cerif_profile_1_1/includes/publication-identifiers.xsd create mode 100644 src/main/resources/schemas/cerif_profile_1_1/openaire-cerif-profile.sch create mode 100644 src/main/resources/schemas/cerif_profile_1_1/openaire-cerif-profile.xsd create mode 100644 src/main/resources/schemas/cerif_profile_1_1/vocabularies/coar_accessrights.xsd create mode 100644 src/main/resources/schemas/cerif_profile_1_1/vocabularies/coar_patent_types.xsd create mode 100644 src/main/resources/schemas/cerif_profile_1_1/vocabularies/coar_product_types.xsd create mode 100644 src/main/resources/schemas/cerif_profile_1_1/vocabularies/coar_publication_types.xsd create mode 100644 src/main/resources/schemas/cerif_profile_1_1/vocabularies/issn_medium_types.xsd create mode 100644 src/main/resources/schemas/cerif_profile_1_1/vocabularies/openaire_funding_types.xsd create mode 100644 src/main/resources/schemas/cerif_profile_1_1/vocabularies/openaire_service_compatibilities.xsd diff --git a/src/main/resources/schemas/cerif_profile_1_1/catalog.xml b/src/main/resources/schemas/cerif_profile_1_1/catalog.xml new file mode 100644 index 0000000..5206a28 --- /dev/null +++ b/src/main/resources/schemas/cerif_profile_1_1/catalog.xml @@ -0,0 +1,12 @@ + + + + + + + + + + \ No newline at end of file diff --git a/src/main/resources/schemas/cerif_profile_1_1/includes/cerif-base-identifiers.xsd b/src/main/resources/schemas/cerif_profile_1_1/includes/cerif-base-identifiers.xsd new file mode 100644 index 0000000..81d1713 --- /dev/null +++ b/src/main/resources/schemas/cerif_profile_1_1/includes/cerif-base-identifiers.xsd @@ -0,0 +1,105 @@ + + + + + Common identifers for CERIF XML Schemas. To be xs:included by other XML Schemas. + Created by the CERIF and CRIS Architecture Task Group of euroCRIS. + + + + + The common building blocks for any CERIF XML Schema. + + + + + + The Digital Object Identifier + + + + + + + + + + + + + + + + + + + + + + + + The International Standard Book Numbers + + + + + + + Constructed from the description in Section 5 of the ISBN Manual, 7th edition. + + + + + ISBN-13, human readable form + + + + + + + + + + + + ISBN-13, concise form + + + + + + + + + + + + + Constructed from the description in Wikipedia. + + + + + ISBN-10, human readable form + + + + + + + + + + ISBN-10, concise form + + + + + + + + + + \ No newline at end of file diff --git a/src/main/resources/schemas/cerif_profile_1_1/includes/cerif-commons.xsd b/src/main/resources/schemas/cerif_profile_1_1/includes/cerif-commons.xsd new file mode 100644 index 0000000..0bbd124 --- /dev/null +++ b/src/main/resources/schemas/cerif_profile_1_1/includes/cerif-commons.xsd @@ -0,0 +1,409 @@ + + + + + Basic building blocks for CERIF XML Schemas. To be xs:included by other XML Schemas. + Created by the CERIF and CRIS Architecture Task Group of euroCRIS. + + + "startDate" precedes the corresponding "endDate" + + + + The "startDate" () must not be later than the end of the corresponding "endDate" () period + + + The "startDate" () must not be later than the end of the corresponding "endDate" () period + + + The "startDate" () must not be later than the end of the corresponding "endDate" () period + + + + + + + + The `xml:lang` attribute. + + + + + + Any CERIF base object + + + + + + A person or an organisational unit + + + + + A common supertype for persons and organisational units + + + + + + + + + A person + + + + + An abstract person type + + + + + + + + + An organisation unit + + + + + An abstract organisation unit type + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + Value in the original language + + + + + Human-translated value + + + + + Machine-translated value + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + The type of the relationship + + + + + + + + + A generic federated identifier, the type of the identifier is expressed using the `type` attribute + + + + + + The type of the identifier + + + + + + + + + A federated identifier of a specific type: the type is expressed in the type of the XML Element. + + + + + + The identifier optionally links to the Service that issued it by specifying the Service ID in this attribute. + + + + + + + + + A monetary amount in a specified currency. + + + + + + The code of the currency + + + + + + + + + The validity interval specification. + + + + The instant when the particular fact or relationship starts being true. + When specified, the validity starts at the beginning of the datetime value (e.g. startDate="2016" means "from the beginning of the year 2016"). + When missing, minus infinity is assumed, with the meaning of "from time immemorial", or from times beyond the reach of record. + + + + + The instant when the particular fact or relationship stops being true. + When specified, the validity extends up to the end of the datetime value, but it does not include the very last instant (e.g. endDate="2016" means "until the end of the year 2016" i.e., anything before 2017-01-01 00:00:00). + When missing, plus infinity is assumed, with the meaning of "until things change" (effectively "forever" for links with semantics that cannot change). + Note that translating this value to the cfEndDate attribute from the CERIF Data Model is non-trivial. + + + + + + + A year (xs:gYear), year and month (xs:gYearMonth) or full date (xs:date). All cases can include an optional time zone specification. + + + + + + + + + + + A year (xs:gYear), year and month (xs:gYearMonth), full date (xs:date) or date and time instant (xs:dateTime). All cases can include an optional time zone specification. + + + + + + + + + + + A year (xs:gYear), year and month (xs:gYearMonth) or full date (xs:date). All cases can include an optional time zone specification. + + + + + + + A year (xs:gYear), year and month (xs:gYearMonth), full date (xs:date) or date and time instant (xs:dateTime). All cases can include an optional time zone specification. + + + + + + + Extension mechanism: Any CERIF XML element type includes this attribute group. + + + + Any CERIF XML element supports attributes from other namespaces. + + + + + \ No newline at end of file diff --git a/src/main/resources/schemas/cerif_profile_1_1/includes/person-identifiers.xsd b/src/main/resources/schemas/cerif_profile_1_1/includes/person-identifiers.xsd new file mode 100644 index 0000000..56ca480 --- /dev/null +++ b/src/main/resources/schemas/cerif_profile_1_1/includes/person-identifiers.xsd @@ -0,0 +1,234 @@ + + + + + This is the XML Schema component for the OpenAIRE CERIF profile 1.1 which specifies the admissible person identifiers. + For further description please see the main schema file. + This work is licensed under a Creative Commons Attribution 4.0 International License (http://creativecommons.org/licenses/by/4.0/). + + + + + + The common building blocks for any CERIF XML Schema. + + + + + + + + + The ORCID identifier in case its value is certain or known to be a preferred one. + + + + + The ORCID identifiers in case the value is not certain, e.g. because there is a conflicting statement with a different value. This can also represent deprecated identifiers/profiles that have been merged into a single, current one that is preferred. + + + + + + The ResearcherID identifier in case its value is certain or known to be a preferred one. + + + + + The ResearcherID identifier in case the value is not certain, e.g. because there is a conflicting statement with a different value. This can also represent deprecated identifiers/profiles that have been merged into a single, current one that is preferred. + + + + + + The Scopus Author ID identifier in case its value is certain or known to be a preferred one. + + + + + The Scopus Author ID identifier in case the value is not certain, e.g. because there is a conflicting statement with a different value. This can also represent deprecated identifiers/profiles that have been merged into a single, current one that is preferred. + + + + + + The ISNI identifier in case its value is certain or known to be a preferred one. + + + + + The ISNI identifier in case the value is not certain, e.g. because there is a conflicting statement with a different value. This can also represent deprecated identifiers/profiles that have been merged into a single, current one that is preferred. + + + + + + The Digital Author Identifier in case its value is certain or known to be a preferred one. + + + + + The Digital Author Identifier in case the value is not certain, e.g. because there is a conflicting statement with a different value. This can also represent deprecated identifiers/profiles that have been merged into a single, current one that is preferred. + + + + + + + + + + + The XML Schema type for the ORCID identifier + + + The ORCID identifier + The service of registering researchers and contributors to research and assigning identifiers to them. See https://orcid.org for more details. + + + + + + + + + + + + + + + + + The XML Schema type for the ResearcherID identifier + + + The ResearcherID identifier + The service of registering researchers (authors of scholarly publications) and assigning identifiers to them, connected to the Web of Science publication database and citation index. See http://www.researcherid.com/ for more details. + + + + + + + + + + + + + + + + + The XML Schema type for the Scopus Author ID identifier + + + The Scopus Author ID identifier + The service of registering researchers (authors of scholarly publications) and assigning identifiers to them, connected to the Scopus publication database and citation index. See http://www.researcherid.com/ for more details. + + + + + + + + + + + + + + + + + The XML Schema type for the ISNI identifier + + + The ISNI identifier + The identifiers assigned to persons, legal entities and other named objects. See http://www.isni.org/ for more details. + + + + + + + + + + + + + + + + + The XML Schema type for the Digital Author Identifier + + + The Digital Author Identifier + The Digital Author Identifier (DAI) system assigns a unique number to all academic authors as a form of authority control. See https://en.wikipedia.org/wiki/Digital_Author_Identifier for more details. + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/src/main/resources/schemas/cerif_profile_1_1/includes/product-identifiers.xsd b/src/main/resources/schemas/cerif_profile_1_1/includes/product-identifiers.xsd new file mode 100644 index 0000000..1c0ab09 --- /dev/null +++ b/src/main/resources/schemas/cerif_profile_1_1/includes/product-identifiers.xsd @@ -0,0 +1,85 @@ + + + + + This is the XML Schema component for the OpenAIRE CERIF profile 1.1 which specifies the admissible product identifiers. + For further description please see the main schema file. + This work is licensed under a Creative Commons Attribution 4.0 International License (http://creativecommons.org/licenses/by/4.0/). + + + + + + The basic types of identifiers for use with schemas. + + + + + + The common building blocks for any CERIF XML Schema. + + + + + + + + + + + The Digital Object Identifier + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/src/main/resources/schemas/cerif_profile_1_1/includes/publication-identifiers.xsd b/src/main/resources/schemas/cerif_profile_1_1/includes/publication-identifiers.xsd new file mode 100644 index 0000000..338daae --- /dev/null +++ b/src/main/resources/schemas/cerif_profile_1_1/includes/publication-identifiers.xsd @@ -0,0 +1,123 @@ + + + + + This is the XML Schema component for the OpenAIRE CERIF profile 1.1 which specifies the admissible publication identifiers. + For further description please see the main schema file. + This work is licensed under a Creative Commons Attribution 4.0 International License (http://creativecommons.org/licenses/by/4.0/). + + + + + + The medium types. + + + + + + The basic types of identifiers for use with schemas. + + + + + + The common building blocks for any CERIF XML Schema. + + + + + + + + + The Digital Object Identifier + + + + + + + + + + + + + + + + + + + + + The International Standard Serial Number + + + + + + + + + + + + + + The International Standard Book Number + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/src/main/resources/schemas/cerif_profile_1_1/openaire-cerif-profile.sch b/src/main/resources/schemas/cerif_profile_1_1/openaire-cerif-profile.sch new file mode 100644 index 0000000..ab0c50c --- /dev/null +++ b/src/main/resources/schemas/cerif_profile_1_1/openaire-cerif-profile.sch @@ -0,0 +1,65 @@ + + + + + + Occurrence of "uri" implies an OAMandate is mandated + + If the URI of an Open Access policy is given, "mandated" must be set true + + + + Occurrence of "startDate" and "endDate" with the COAR Access Rights vocabulary + + No "startDate" shall be specified for an access item + An "endDate" may only be specified for an embargoed access item + No "endDate" may be specified for an item with other than embargoed access + + + + "startDate" precedes the corresponding "endDate" + + The "startDate" () must not be later than the end of the corresponding "endDate" () period + + + The "startDate" () must not be later than the end of the corresponding "endDate" () period + + + The "startDate" () must not be later than the end of the corresponding "endDate" () period + + + + diff --git a/src/main/resources/schemas/cerif_profile_1_1/openaire-cerif-profile.xsd b/src/main/resources/schemas/cerif_profile_1_1/openaire-cerif-profile.xsd new file mode 100644 index 0000000..561d6e0 --- /dev/null +++ b/src/main/resources/schemas/cerif_profile_1_1/openaire-cerif-profile.xsd @@ -0,0 +1,1738 @@ + + + + +This is the XML Schema for the OpenAIRE CERIF profile 1.1, + a companion artifact of the OpenAIRE Guidelines for CRIS Managers 1.1 (http://openaire-guidelines-for-cris-managers.readthedocs.io/en/latest/index.html). + This work is licensed under a Creative Commons Attribution 4.0 International License (http://creativecommons.org/licenses/by/4.0/). + + + + + + + +Occurrence of "uri" implies an OAMandate is mandated + +If the URI of an Open Access policy is given, "mandated" must be set true + + + + + + + + + + + + + + + + + + + +The person identifiers. + + + + + +The publication identifiers. + + + + + +The product identifiers. + + + + + + + + The common building blocks for any CERIF XML Schema. + + + + + + +A human being as an individual. +Source: https://en.oxforddictionaries.com/definition/person + +The kind of involvement of a Person in the research ecosystem is specified in the links with the organisations, the services, etc. This typically includes: +(1) researchers (Persons performing research in an Organisation Unit as employees or students); +(2) authors and contributors (Persons signing a publication, creators of data sets, software developers, etc.); +(3) investigators and project participants (Persons involved in a Project as principal investigators, co investigators, project managers, consultants, etc.); +(4) management (directors, rectors, deans, department heads, etc.); +(5) support staffs (technicians, responsible for Equipment, librarians and digital asset curators, administrative staff, etc.). +One Person typically has many of these relationships. + + + + + + + + + + The name of the person + + + + + + + + + + + + + + + + + + + + + + + + + + + The gender of the person. Leave out in case the gender is unknown or not communicated. + + + + Genders (sociocultural, not linguistic) + + + Genders (sociocultural, not linguistic) + + + + + + + Masculine + + + Masculine + Man + + + + + + + Feminine + + + Feminine + Woman + + + + + + + + + + + + + An electronic address associated with the person + + + + + + + +The organisation or organisation unit the person is affiliated with + + + + + + + + + + + + + + + + + + + + + + + Organisation Unit: an organisation, a unit therein, a committee or any other group of people that has a collective goal. Organisation Units are not necessarily formalized as legal entities. + +In the research information domain Organisation Units typically represents: +(1) organisations that perform research (universities, research institutes, corporations) and their subdivisions (faculties, schools, departments, research groups) and other associated bodies (boards, advisory bodies); +(2) organisations that fund research (funders, their divisions and evaluation panels); +(3) scientific associations and networks; +(4) publishers, facility operators and other service providers in the research space; +(5) authorities, such as patent offices and standardization or supervision bodies; and +(6) other bodies: editorial boards, evaluation panels, or committees of all kinds. + + + + + + + + + + The type of the organisation unit + + + + + + The acronym of the organisation unit + + + + + + The name of the organisation unit + + + + + + An identifier of the organisation unit + + + + + + + + An electronic address associated with the organisation unit + + + + + + + + Link to the larger unit that encompasses this unit. + To be used for the immediate parents only. In order to represent the full path up through the hierarchy of an institution, use this construct recursively. + + In specific cases there may be several such parents at one time in parallel. + An example: a interdisciplinary research centre within a university can be subordinated to several faculties. + + + + + + + + + + + + + + + + + + + + + + + + + + + Project or Funding + + + + + A common supertype for projects and funding + + + + + + + + + A temporary endeavor undertaken to create a unique product, service or result. +Source: the Project Management Institute, https://www.pmi.org/about/learn-about-pmi/what-is-project-management + +In the research information domain, one typically tracks: +(1) research projects, where the result is an addition to the body of knowledge of the mankind, +(2) technology development projects, where the result is a particular technology or product, +(3) innovation projects, where the result is an improvement of a product or process, and +(4) projects that create or enhance infrastructure for research, technology development or innovation. + +Depending on the scope one can also track finer levels of granularity: stages, work packages, sometimes even down to individual tasks. All such activities are also modelled using the Project entity and linked using the recursive link relationship. + +The Project entity only captures details of the project scope and plan. Information about the resources needed to execute the project such as the funding (i.e., the grants received), the people and organisations involved, the supporting infrastructures, the outputs produced, etc. is contained in separate entities (the Funding entity, the Person entity, the OrgUnit entity, the infrastructure entities, the result entities respectively) and is linked to the Project. + + + + + + + + + + The type of the project + + + + + + The acronym of the project + + + + + + The title of the project + + + + + + An identifier of the project + + + + + + The start date of the project + + + + + + The end date of the project + + + + + + + + The consortium of the project: the organisations (persons) who are contractually bound to do the work in the project + + + + + + Project coordinator + + + + + Project partner + + + + + Project contractor + + + + + Project in kind contributor + + + + + + A member of the project consortium + + + + + + + + + The project team: the persons who carry out the work in the project, typically as a part of their job at the organisations from the consortium + + + + + + The principal investigator: the person responsible for the whole project, the head of the project team + + + + + A person to contact in matters connected with her/his organisations' participation in the project + + + + + + A member of the project team + + + + + + + + + Information about funding of this project + + + + + + The funder of the project + + + + + + The specific funding device (grant, award, contract) for the project + + + + + + + + + + + + + + + + + + + + The subject classification(s) of the project + + + + + + A single keyword or key expression that characterize the project. Please repeat to serialize separate keywords or key expressions. + + + + + + + + The abstract of the project + + + + + + The status of the project + + + + + + + +The equipment this project uses + + + + + + + + + + + + + + +Information about the Open Access mandate that applies to this project + + + + +The flag if Open Access is mandated in the project + + + + +The Open Access policy that applies to the project + + + + + + + + + + + + + + + + + + + + + + + + + + +The type of the funding + + + + + + + + The acronym of the funding + + + + + + The name of the funding + + + + + + The amount of the funding and its currency + + + + + + An identifier of the funding + + + + + + A description of the funding + + + + + + + The subject classification(s) of the funding + + + + + + A single keyword or key expression that characterize the funding. Please repeat to serialize separate keywords or key expressions. + + + + + + The funder or funders + + + + + + Chain up to the larger funding that encompasses this funding + + + + + + + + + + + + + + + + + + +Duration of the funding + + + + + +Information about the Open Access mandate that applies to this funding + + + + +The flag if Open Access is mandated for this funding + + + + +The Open Access policy that applies to this funding + + + + + + + + + + + + + + + + + + Research outputs: publications, patents, and products + + + + + A common supertype for research outputs: publications, patents, and products + + + + + + + + + +A text based scholarly publication or publishing channel that contains results of research. + +CRISs typically record metadata about scholarly publications from the scope of the CRIS (institutional CRIS for the institution, funder CRIS for the funding it distributed, etc.) in the context of the research projects, infrastructure, funding, organization units and authors/contributors. + +This entity typically represents the granularity level of a single published item for which attribution information is attached (usually in the form of a list of authors and contributors). This entity is also used to represent publishing channels and sources: journals and book series (incl. continuing conference proceedings series). + +(Taken from https://doi.org/10.1016/j.procs.2014.06.008) + + + + + + + + + +The type of the publication + + + + + + + + The language of the publication. Please use the IETF language tags as described in the IETF BCP 47 document. + + + + + + The title of the publication + + + + + + The subtitle of the publication + + + + + + The source (another Publication) where this publication appeared. E.g. a journal article lists here the journal where it appeared. To be used for a publishing channel. + + + + + + + + + + + + + + + The Publication of which this publication is a part. E.g. a book chapter lists here the book that contains it. To be used for a containing publication. + + + + + + + + + + + + + + + The date the publication appeared + + + + + + The number of the publication (e.g. Article Number) + + + + + + The volume of the publishing channel where this publication appeared + + + + + + The issue of the publishing channel where this publication appeared + + + + + + The edition of the publication + + + + + + + + The page where this publication starts, in case the publishing channel or containing publication has numbered pages + + + + + + The page where this publication ends, in case the publishing channel or containing publication has numbered pages + + + + + + + + + + The authors of this publication + + + + + + + + + + + The editors of this publication + + + + + + + + + + + The publishers of this publication + + + + + + + + + + + The license of the publication + + + + + + The subject of the publication from a classification + + + + + + A single keyword or key expression. Please repeat to serialize separate keywords or key expressions. + + + + + + + + + + + + + + + + + + + + + + + +The event where this publication was presented. + [[Note: Video recordings of conference presentations are stored as alternative representations of the primary object: the conference paper. It would be unneccessarily complex to represent them as separate, linked Products.]] + + + + + + + + + + + + + + +This publication contains the proceedings from the linked event + + + + + + + + + + + + + + +The event that is covered by this publication (e.g. a report about the event) + + + + + + + + + + + + + + +Result outputs that are referenced by this publication + + + + + + + + + + + + + + +The open access type of the publication + + + + + + + + + + + + + + A set of exclusive rights granted by a sovereign state to an inventor or assignee for a limited period of time in exchange for detailed public disclosure of an invention. +Source: Wikipedia + + + + + + + + + +The type of the patent (currently just one option) + + + + + + + + + + + + + + + + + + The issuer of the patent: the patent office + + + + + + + + + + The inventors of this patent + + + + + + The inventor: The actual devisor of an invention that is the subject of a patent. + + + + + + + + + The holders of this patent + + + + + + The patent rights holder, also known as the patentee or assignee + + + + + + + + + + + The subject of the patent from a classification + + + + + + A single keyword or key expression. Please repeat to serialize separate keywords or key expressions. + + + + + + + + + + + + + + + + + + + +Patents that precede (i.e., have priority over) this patent + + + + + + + + + + + + + + +Result outputs that are referenced by this patent + + + + + + + + + + + + + + + + + + + + + + + Any result of research other than Publication or Patent. + +This includes: +(1) research datasets, +(2) software, +(3) visualisations: still or moving images, including maps and other cartographic material, +(4) audio recordings, +(5) other objects that can be perceived through human senses. + + + + + + + + + +The type of the resulting product (other than publication or patent) + + + + + + + + The language or languages of the product, if applicable. Please use the IETF language tags as described in the IETF BCP 47 document. + + + + + + + + + + + + + + The creators of this product + + + + + + + + + + + The publisher or publishers of this product + + + + + + + + + + + The license of the product + + + + + + + + The subject of the product from a classification + + + + + + A single keyword or key expression. Please repeat to serialize separate keywords or key expressions. + + + + + + Link to the research output of which this product is a part (e.g. a data set collection that contains it) + + + + + + + + + + + + + + + + + + + + + + + + + + + + +The equipment that generated this product + + + + + + + + + + + + + + +The event where this product was presented + + + + + + + + + + + + + + +The event that is covered by this product (e.g. a video or audio interview about the event) + + + + + + + + + + + + + + +Result outputs that are referenced by this product + + + + + + + + + + + + + + +The open access type of the product + + + + + + + + + + + + + + An event is something that happens at a given place and time. + +Definition Source: http://wordnetweb.princeton.edu/perl/webwn?s=event + + + + + + + + + + The type of the event + + + + + + Acronym of the event + + + + + + Name of the event + + + + + + Location of the event (the city or town) + + + + + + Country of the location of the event + + + + + + The start date of the event + + + + + + The end date of the event + + + + + + Description of the event + + + + + + The subject category of the event from a classification + + + + + + A single keyword or key expression that characterize the event. Please repeat to serialize separate keywords or key expressions. + + + + + +The organizer of the event + + + + + + + + + + + + + + + +The sponsor of the event + + + + + + + + + + + + + + + +The partner of the event + + + + + + + + + + + + + + + + + + + + + + + + Research infrastructures: facilities, equipment, and services + + + + + A common supertype for research infrastructures: facilities, equipment, and services + + + + + + + + + + + An equipment is an instrumentality needed for an undertaking or to perform a service: + +Definition Source: http://wordnetweb.princeton.edu/perl/webwn?s=equipment + + + + + + + + + + The type of the equipment + + + + + + Acronym of the equipment + + + + + + Name of the equipment + + + + + + An identifier of this equipment + + + + + + Description of the equipment + + + + + + + +The owner of the piece of equipment + + + + + + + + + + + + + +CRIS compatible with the OpenAIRE Guidelines for CRIS Managers + + + + + + + + + +OpenAIRE compatibility of the CRIS + + + + + + + + Acronym of the service + + + + + + Name of the service + + + + + + An identifier of this service + + + + + + Description of the service + + + + + + + +URL of the website of the CRIS + + + + + +Base URL for the OAI-PMH protocol endpoint of the CRIS + + + + + +The URL where the subject classification used by the CRIS can be obtained (using the HTTP GET) + + + + + +The owner of the CRIS: The organisation the research of which the CRIS documents + + + + + + + + + + + + + + + + + + + Semantic layer: classification schemes and classifications + + + + + A common supertype for semantic layer objects: classification schemes and classifications + + + + + + + + + A structured collection of Classifications (concepts). + +CERIF Classification Schemes can represent flat or hierarchical lists, taxonomies, thesauri, ontologies or any general arrangement of concepts. + +Examples of classification schemes include: +- the OECD Fields of Science classification (https://unstats.un.org/unsd/EconStatKB/KnowledgebaseArticle10269.aspx) and +- the COAR Resource Types controlled vocabulary (http://vocabularies.coar-repositories.org/documentation/resource_types/). +Another example is the Person Output Contributions scheme from the OpenAIRE Guidelines for CRIS Managers 1.0 (https://doi.org/10.5281/zenodo.17065) that consists of the concepts of Author, Editor and Publisher. + + + + + + + + + + The name of the classification scheme + + + + + + The description of the classification scheme + + + + + + An identifier of the classification scheme + + + + + + A classification: a single concept, category, or notion that belongs in the enclosing classification scheme + + + + + + A general link from a classification scheme to another classification scheme or a classification + + + + + + + + + + + + + + + + + + + + + A concept to describe a characteristic of objects or to qualify relationships between objects or concepts. Classifications are organised into Classification Schemes: every Classification belongs to exactly one Classification Scheme. + +In CERIF a Classification usually specifies the type (e.g. "Journal Article" - http://purl.org/coar/resource_type/c_6501) or status (e.g. "Approved") of an object, or some other category – most notably a subject heading (e.g. "Analytical chemistry"). +Other Classification specify the type of relationship between two objects (e.g. "Author" between a Person and a Result Publication). + + + + + + + + The classification scheme this classification belongs into + + + + + + + + + + The base type for a CERIF classification + + + + + + + + The term for the classification + + + + + + Role expressions: used in case the classification represents a relationship type in a binary relationship between two CERIF objects + + + + + The role expression for the classification (used in case it represents a relationship type in a binary relationship) + + + + + + The inverse role expression for the classification (used in case it represents a relationship type in a binary relationship) + + + + + + + + The definition of the classification + + + + + + The description of the classification + + + + + + Example(s) of the classification + + + + + + An identifier of the classification + + + + + + Points at a concept that is more general in meaning than the present one: equivalent to the SKOS `skos:broader` semantic relation + + + + + + + + + + + + + + + Points at a narrower concept than the present one: equivalent to the SKOS `skos:narrower` semantic relation which is the inverse of `skos:broader` + + + + + + + + + + + + + + + Points at a related concept: equivalent to the SKOS `skos:related` semantic relation + + + + + + + + + + + + + + + A general link from a classification to another classification or a classification scheme + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/src/main/resources/schemas/cerif_profile_1_1/vocabularies/coar_accessrights.xsd b/src/main/resources/schemas/cerif_profile_1_1/vocabularies/coar_accessrights.xsd new file mode 100644 index 0000000..89f82aa --- /dev/null +++ b/src/main/resources/schemas/cerif_profile_1_1/vocabularies/coar_accessrights.xsd @@ -0,0 +1,133 @@ + + + + + + + + + + + + + + + + + + Occurrence of "startDate" and "endDate" with the COAR Access Rights vocabulary + + No "startDate" shall be specified for an access item + An "endDate" may only be specified for an embargoed access item + No "endDate" may be specified for an item with other than embargoed access + + + + + + + + + + + + + + + + + open access + acceso abierto + açık erişim + libre accès + オープンアクセス + offener Zugang + + + open access + acceso abierto + açık erişim + libre accès + オープンアクセス + offener Zugang + Open access refers to a resource that is immediately and permanently online, and free for all on the Web, without financial and technical barriers. + + + + + + + embargoed access + acceso embargado + ambargolu erişim + sous embargo + エンバーゴ有 + Zugang unterliegt Embargo + + + embargoed access + acceso embargado + ambargolu erişim + sous embargo + エンバーゴ有 + Zugang unterliegt Embargo + Embargoed access refers to a resource that is metadata only access until released for open access on a certain date. Embargoes can be required by publishers and funders policies, or set by the author (e.g such as in the case of theses and dissertations). + + + + + + + restricted access + acceso restringido + sınırlı erişim + accès réservé + アクセス制限有 + eingeschränkter Zugang + + + restricted access + acceso restringido + sınırlı erişim + accès réservé + アクセス制限有 + eingeschränkter Zugang + Restricted access refers to a resource that is available in a system but with some type of restriction for full open access. This type of access can occur in a number of different situations. Some examples are described below: +The user must log-in to the system in order to access the resource +The user must send an email to the author or system administrator to access the resource +Access to the resource is restricted to a specific community (e.g. limited to a university community) + + + + + + + metadata only access + acceso a metadatos + sadece üstveri erişimi + accès aux seules métadonnées + メタデータのみ + nur Metadaten + + + metadata only access + acceso a metadatos + sadece üstveri erişimi + accès aux seules métadonnées + メタデータのみ + nur Metadaten + Metadata only access refers to a resource in which access is limited to metadata only. The resource itself is described by the metadata, but is not directly available through the system or platform. This type of access can occur in a number of different situations. Some examples are described below: +There is no electronic copy of the resource available (record links to a physical resource) +The resource is only available elsewhere for a fee (record links to a subscription-based publisher version) +The resource is available open access but at a different location (record links to a version at an open access publisher or archive) +The resource is available elsewhere, but not in a fully open access format (record links to a read only, or other type of resources that is not permanent or in some way restricted) + + + + + + + + \ No newline at end of file diff --git a/src/main/resources/schemas/cerif_profile_1_1/vocabularies/coar_patent_types.xsd b/src/main/resources/schemas/cerif_profile_1_1/vocabularies/coar_patent_types.xsd new file mode 100644 index 0000000..966f594 --- /dev/null +++ b/src/main/resources/schemas/cerif_profile_1_1/vocabularies/coar_patent_types.xsd @@ -0,0 +1,65 @@ + + + + + Patent types extracted from the COAR Resource Types concept scheme: Types of patents as extracted from the COAR Resource Types concept scheme (http://vocabularies.coar-repositories.org/documentation/resource_types/, the term 'patent' only). + + + Patent types extracted from the COAR Resource Types concept scheme + Types of patents as extracted from the COAR Resource Types concept scheme (http://vocabularies.coar-repositories.org/documentation/resource_types/, the term 'patent' only). + + + + + + + + + + + + + + + + + + + patent + 专利 + patente + патент + brevet + brevetto + Patent + patent + patente + patent + 特許 + patent + + + patent + 专利 + patente + патент + brevet + brevetto + Patent + patent + patente + patent + 特許 + patent + A patent or patent application. + Патент или заявка на изобретение. Предоставление эксклюзивного права на эксплуатацию изобретения. + + + + + + + + \ No newline at end of file diff --git a/src/main/resources/schemas/cerif_profile_1_1/vocabularies/coar_product_types.xsd b/src/main/resources/schemas/cerif_profile_1_1/vocabularies/coar_product_types.xsd new file mode 100644 index 0000000..ea57ce9 --- /dev/null +++ b/src/main/resources/schemas/cerif_profile_1_1/vocabularies/coar_product_types.xsd @@ -0,0 +1,511 @@ + + + + + Product types extracted from the COAR Resource Types concept scheme: Types of products as extracted from the COAR Resource Types concept scheme (http://vocabularies.coar-repositories.org/documentation/resource_types/, all types that do not descend from 'text'). + + + Product types extracted from the COAR Resource Types concept scheme + Types of products as extracted from the COAR Resource Types concept scheme (http://vocabularies.coar-repositories.org/documentation/resource_types/, all types that do not descend from 'text'). + + + + + + + + + + + + + + + + + + + website + 网站 + sitio web + sito web + веб-сайт + lloc web + sítio web + Webseite + site web + website + ウェブサイト + web sitesi + + + website + 网站 + sitio web + sito web + веб-сайт + lloc web + sítio web + Webseite + site web + website + ウェブサイト + web sitesi + A website, also written as web site or simply site, is a set of related web pages typically served from a single web domain. A website is hosted on at least one web server, accessible via a network such as the Internet or a private local area network through an Internet address known as a uniform resource locator (URL). All publicly accessible websites collectively constitute the World Wide Web. + + + + + + + + + + interactive resource + 互动资源 + recurso interactivo + интерактивный ресурс + recurs interactiu + risorsa interattiva + recurso interativo + interaktive Ressource + ressource interactive + interactieve bron + インタラクティブリソース + etkileşimli kaynak + + + interactive resource + 互动资源 + recurso interactivo + интерактивный ресурс + recurs interactiu + risorsa interattiva + recurso interativo + interaktive Ressource + ressource interactive + interactieve bron + インタラクティブリソース + etkileşimli kaynak + A resource requiring interaction from the user to be understood, executed, or experienced. Examples include forms on Web pages, applets, multimedia learning objects, chat services, or virtual reality environments. + + + + + + + dataset + 数据集 + conjunto de datos + jeu de données + dataset + набор данных + Datensatz + conjunt de dades + conjunto de dados + dataset + データセット + veri seti + + + dataset + 数据集 + conjunto de datos + jeu de données + dataset + набор данных + Datensatz + conjunt de dades + conjunto de dados + dataset + データセット + veri seti + A collection of related facts and data encoded in a defined structure. +(adapted from fabio; DataCite) + + + + + + + image + 图像 + imagen + immagine + изображение + Bild + imatge + imagem + image + afbeelding + 画像 + görüntü + + + image + 图像 + imagen + immagine + изображение + Bild + imatge + imagem + image + afbeelding + 画像 + görüntü + A visual representation other than text, including all types of moving image and still image. + + + + + + + moving image + 运动图像 + imagen dinámica + image animée + immagine dinamica + Bewegte Bilder + движущееся изображение + imatge en moviment + imagem animada + filmmateriaal + 動画 + hareketli görüntü + + + moving image + 运动图像 + imagen dinámica + image animée + immagine dinamica + Bewegte Bilder + движущееся изображение + imatge en moviment + imagem animada + filmmateriaal + 動画 + hareketli görüntü + A moving display, either generated dynamically by a computer program or formed from a series of pre-recorded still images imparting an impression of motion when shown in succession. +(adapted from fabio) + + + + + + + + + + other + 其他 + otros + прочее + autre + altro + altre + outros + sonstige + anders + その他 + diğer + + + other + 其他 + otros + прочее + autre + altro + altre + outros + sonstige + anders + その他 + diğer + A rest category which may cover text, interactive, sound, or image-based resources not explicitly addressed in any concept in this vocabulary + + + + + + + software + 软件 + software + développement informatique + software + программное обеспечение + Software + programari + software + software + ソフトウェア + yazılım + + + software + 软件 + software + développement informatique + software + программное обеспечение + Software + programari + software + software + ソフトウェア + yazılım + A computer program in source code (text) or compiled form. + + + + + + + still image + 静态图像 + imagen fija + статическое изображение + image fixe + immagine fissa + Einzelbild + imatge fixa + imagem estática + stilstaandbeeld + 静止画 + hareketsiz görüntü + + + still image + 静态图像 + imagen fija + статическое изображение + image fixe + immagine fissa + Einzelbild + imatge fixa + imagem estática + stilstaandbeeld + 静止画 + hareketsiz görüntü + A recorded static visual representation. This class of image includes diagrams, drawings, graphs, graphic designs, plans, photographs and prints. + + + + + + + + + + workflow + 工作流程 + flujo de trabajo + рабочий процесс + procedura + Workflow + flux de treball + fluxo de trabalho + workflow + workflow + ワークフロー + iş akışı + + + workflow + 工作流程 + flujo de trabajo + рабочий процесс + procedura + Workflow + flux de treball + fluxo de trabalho + workflow + workflow + ワークフロー + iş akışı + A recorded sequence of connected steps, which may be automated, specifying a reliably repeatable sequence of operations to be undertaken when conducting a particular job, for example an in silico investigation that extracts and processes information from a number of bioinformatics databases. + + + + + + + cartographic material + material cartogràfic + material cartográfico + cartografia + 地图类资料 + material cartográfico + kartographisches Material + matériel cartographique + картографические ресурсы + cartografisch materiaal + 地図資料 + kartografik malzeme + + + cartographic material + material cartogràfic + material cartográfico + cartografia + 地图类资料 + material cartográfico + kartographisches Material + matériel cartographique + картографические ресурсы + cartografisch materiaal + 地図資料 + kartografik malzeme + Any material representing the whole or part of the earth or any celestial body at any scale. Cartographic materials include two- and three-dimensional maps and plans (including maps of imaginary places); aeronautical, navigational, and celestial charts; atlases; globes; block diagrams; sections; aerial photographs with a cartographic purpose; bird's-eye views (map views), etc. + + + + + + + map + карта + mapa + mapa + mappa + 地图 + mapa + Karte + carte géographique + kaart + harita + 地図 + + + map + карта + mapa + mapa + mappa + 地图 + mapa + Karte + carte géographique + kaart + harita + 地図 + Defined as a representation normally to scale and on a flat medium, of a selection of material or abstract features on, or in relation to, the surface of the earth or of another celestial body. + harita + + + + + + + + + + video + видео + 视频 + vídeo + vídeo + video + vídeo + Video + vidéo + video + 録画資料 + video + + + video + видео + 视频 + vídeo + vídeo + video + vídeo + Video + vidéo + video + 録画資料 + video + A recording of visual images, usually in motion and with sound accompaniment. + + + + + + + + + + sound + фонодокумент + so + sonido + suono + 声音 + som + Ton + son + 音声 + ses + + + sound + фонодокумент + so + sonido + suono + 声音 + som + Ton + son + 音声 + ses + A resource primarily intended to be heard. Examples include a music playback file format, an audio compact disc, and recorded speech or sounds. + + + + + + + musical composition + музыкальная композиция + composició musical + composición musical + composizione musicale + 音乐 + composição musical + musikalische Komposition + composition musicale + muzikale compositie + 音楽 + müzikal kompozisyon + + + musical composition + музыкальная композиция + composició musical + composición musical + composizione musicale + 音乐 + composição musical + musikalische Komposition + composition musicale + muzikale compositie + 音楽 + müzikal kompozisyon + Musical composition can refer to an original piece of music, the structure of a musical piece, or the process of creating a new piece of music. + + + + + + + + + + \ No newline at end of file diff --git a/src/main/resources/schemas/cerif_profile_1_1/vocabularies/coar_publication_types.xsd b/src/main/resources/schemas/cerif_profile_1_1/vocabularies/coar_publication_types.xsd new file mode 100644 index 0000000..6ab3713 --- /dev/null +++ b/src/main/resources/schemas/cerif_profile_1_1/vocabularies/coar_publication_types.xsd @@ -0,0 +1,1541 @@ + + + + + Publication types extracted from the COAR Resource Types concept scheme: Types of publications as extracted from the COAR Resource Types concept scheme (http://vocabularies.coar-repositories.org/documentation/resource_types/, the term 'text' and its descendants in the hierarchy except 'patent'). + + + Publication types extracted from the COAR Resource Types concept scheme + Types of publications as extracted from the COAR Resource Types concept scheme (http://vocabularies.coar-repositories.org/documentation/resource_types/, the term 'text' and its descendants in the hierarchy except 'patent'). + + + + + + + + + + + + + + + + + + + annotation + 标注 + comentario + примечание + commento + Entscheidungs- oder Urteilsanmerkung + anotació + anotação + annotation + annotatie + 注釈 + açıklama + + + annotation + 标注 + comentario + примечание + commento + Entscheidungs- oder Urteilsanmerkung + anotació + anotação + annotation + annotatie + 注釈 + açıklama + An annotation in the sense of a legal note is a legally explanatory comment on a decision handed down by a court or arbitral tribunal. + + + + + + + + + + journal + 学术期刊 + revista + журнал + revue + rivista + revista + revista + Zeitschrift + tijdschrift + 学術雑誌 + dergi + + + journal + 学术期刊 + revista + журнал + revue + rivista + revista + revista + Zeitschrift + tijdschrift + 学術雑誌 + dergi + A periodical of (academic) journal articles. +(Adapted from bibo) + + + + + + + + + + journal article + 学术论文 + artículo + articolo in rivista + article + Wissenschaftlicher Artikel + журнальная статья + article de revista + artigo + wetenschappelijk artikel + 研究論文 + + + journal article + 学术论文 + artículo + articolo in rivista + article + Wissenschaftlicher Artikel + журнальная статья + article de revista + artigo + wetenschappelijk artikel + 研究論文 + An article on a particular topic and published in a journal issue. +(adapted from fabio) + + + + + + + + + + editorial + 社论 + editorial + editoriale + редакционная статья + editorial de revista + editorial + Vorwort + éditorial + voorwoord + エディトリアル + + + editorial + 社论 + editorial + editoriale + редакционная статья + editorial de revista + editorial + Vorwort + éditorial + voorwoord + エディトリアル + A brief essay expressing the opinion or position of the chief editor(s) of a (academic) journal with respect to a current political, social, cultural, or professional issue. Adapted from ODLIS + + + + + + + + + + bachelor thesis + 学士学位论文 + proyecto fin de carrera + tesi di laurea + диплом бакалавра + Abschlussarbeit (Bachelor) + project final de carrera + trabalho de fim de curso + mémoire de stage + bachelorscriptie + 学士論文 + lisans tezi + + + bachelor thesis + 学士学位论文 + proyecto fin de carrera + tesi di laurea + диплом бакалавра + Abschlussarbeit (Bachelor) + project final de carrera + trabalho de fim de curso + mémoire de stage + bachelorscriptie + 学士論文 + lisans tezi + A thesis reporting a research project undertaken as part of an undergraduate course of education leading to a bachelor's degree. + + + + + + + + + + bibliography + 文献目录 + bibliografía + bibliografia + библиография + bibliographie + bibliografia + bibliografia + Bibliografie + bibliografie + 書誌 + kaynakça + + + bibliography + 文献目录 + bibliografía + bibliografia + библиография + bibliographie + bibliografia + bibliografia + Bibliografie + bibliografie + 書誌 + kaynakça + A systematic list or enumeration of written works by a specific author or on a given subject. + Систематизированный перечень или список письменных работ/источников конкретного автора или на заданную тему. + + + + + + + + + + book + + libro + libro + livro + boek + книга + ouvrage + Buch + llibre + 図書 + kitap + + + book + + libro + libro + livro + boek + книга + ouvrage + Buch + llibre + 図書 + kitap + A non-serial publication that is complete in one volume or a designated finite number of volumes. +(adapted from CiTO; EPrint Type vocabulary) + + + + + + + + + + book part + 章节 + capítulo de libro + capítulo de livro + capitolo di libro + chapitre d'ouvrage + Teil oder Kapitel eines Buches + раздел книги + part de llibre + boekdeel + 図書(部分) + kitap bölümü + + + book part + 章节 + capítulo de libro + capítulo de livro + capitolo di libro + chapitre d'ouvrage + Teil oder Kapitel eines Buches + раздел книги + part de llibre + boekdeel + 図書(部分) + kitap bölümü + A defined chapter or section of a book, usually with a separate title or number. + + + + + + + + + + book review + 书评 + reseña de libro + note de lecture + recensione di libro + Buchrezension + рецензия на книгу + ressenya de llibre + recensão de livro + boekbespreking + 書評 + kitap eleştirisi + + + book review + 书评 + reseña de libro + note de lecture + recensione di libro + Buchrezension + рецензия на книгу + ressenya de llibre + recensão de livro + boekbespreking + 書評 + kitap eleştirisi + A written review and critical analysis of the content, scope and quality of a book or other monographic work. + + + + + + + + + + conference proceedings + 会议论文集 + сборник материалов конференции + actes de congrés + actas de congreso + atti di congresso + atas de conferência + Tagungsband + actes de conférence + conference proceedings + 会議録 + konferans bildirileri + + + conference proceedings + 会议论文集 + сборник материалов конференции + actes de congrés + actas de congreso + atti di congresso + atas de conferência + Tagungsband + actes de conférence + conference proceedings + 会議録 + konferans bildirileri + Conference proceedings is the official record of a conference meeting. It is a collection of documents which corresponds to the presentations given at the conference. It may include additional content. + + + + + + + + + + conference object + 会议文档 + contribución a congreso + материалы конференции + contribució a congrés + contributo a congresso + documento de conferência + Konferenzveröffentlichung + contribution à une conférence + conferentiebijdrage + 会議発表資料 + konferans nesnesi + + + conference object + 会议文档 + contribución a congreso + материалы конференции + contribució a congrés + contributo a congresso + documento de conferência + Konferenzveröffentlichung + contribution à une conférence + conferentiebijdrage + 会議発表資料 + konferans nesnesi + All kind of digital resources contributed to a conference, like conference presentation (slides), conference report, conference lecture, abstracts, demonstrations. +For conference papers, posters or proceedings the specific concepts should be used.. + + + + + + + + + + conference paper + 会议论文 + comunicación de congreso + comunicazione a congresso + статья для конференции + comunicació de congrés + comunicação em conferência + Konferenzbeitrag + article dans une conférence + conferentie bijdrage + 会議発表論文 + konferans belgesi + + + conference paper + 会议论文 + comunicación de congreso + comunicazione a congresso + статья для конференции + comunicació de congrés + comunicação em conferência + Konferenzbeitrag + article dans une conférence + conferentie bijdrage + 会議発表論文 + konferans belgesi + A conference paper that is submitted to a conference and presented to the audience. The conference paper is published in proceedings. + + + + + + + + + + conference poster + 会议海报 + póster de congreso + poster in congresso + постер конференции + poster de congrés + póster em conferência + Konferenzposter + poster dans une conférence + conferentieposter + 会議発表ポスター + konferans posteri + + + conference poster + 会议海报 + póster de congreso + poster in congresso + постер конференции + poster de congrés + póster em conferência + Konferenzposter + poster dans une conférence + conferentieposter + 会議発表ポスター + konferans posteri + A conference poster that is submitted to a conference and presented there at a poster presentation. The conference poster is published in proceedings. + + + + + + + + + + contribution to journal + 期刊文献 + contribució a revista + contribución a revista + contributo in rivista + contributo em revista + Zeitschriftenbeitrag + contribution à un journal + вклад в журнал + bijdrage aan dag- en weekbladen + 学術雑誌掲載記事 + + + contribution to journal + 期刊文献 + contribució a revista + contribución a revista + contributo in rivista + contributo em revista + Zeitschriftenbeitrag + contribution à un journal + вклад в журнал + bijdrage aan dag- en weekbladen + 学術雑誌掲載記事 + A contribution to a journal denotes a work published in a journal. If applicable sub-terms should be chosen. + + + + + + + + + + data paper + 数据文章 + artículo de datos + data paper + data paper + публикация данных + article de dades + artigo de dados + Data Paper + datadocumentatie + データ論文 + + + data paper + 数据文章 + artículo de datos + data paper + data paper + публикация данных + article de dades + artigo de dados + Data Paper + datadocumentatie + データ論文 + A data paper is a scholarly publication describing a particular dataset or group of dataset, published in the form of a peer-reviewed article in a scholarly journal. The main purpose of a data paper is to describe data, the circumstances of their collection, and information related to data features, access and potential reuse. Adapted from https://en.wikipedia.org/wiki/Data_paper and http://www.gbif.org/publishing-data/data-papers + + + + + + + + + + doctoral thesis + 博士学位论文 + tesis doctoral + thèse de doctorat + tesi di dottorato + Dissertation oder Habilitation + диссертация на соискание учёной степени + tesi doctoral + tese de doutoramento + proefschrift + 博士論文 + doktora tezi + + + doctoral thesis + 博士学位论文 + tesis doctoral + thèse de doctorat + tesi di dottorato + Dissertation oder Habilitation + диссертация на соискание учёной степени + tesi doctoral + tese de doutoramento + proefschrift + 博士論文 + doktora tezi + A thesis reporting the research undertaken during a period of graduate study leading to a doctoral degree. + + + + + + + + + + lecture + 讲座 + ponencia + lezione + Vorlesung + материалы лекций + ponència + palestra + cours magistral + lecture + 講演 + ders + + + lecture + 讲座 + ponencia + lezione + Vorlesung + материалы лекций + ponència + palestra + cours magistral + lecture + 講演 + ders + A transcription of a talk delivered during an academic event. + + + + + + + + + + letter + + carta + письмо + carta + comunicazione + carta + Brief + lettre + brief + 短報 + mektup + + + letter + + carta + письмо + carta + comunicazione + carta + Brief + lettre + brief + 短報 + mektup + Бумага с написанным на ней от руки или напечатанным текстом, служащая средством общения между физическими лицами и/или представителями юридических лиц. Как правило, письмо доставляется почтовой службой или публикуется в периодическом издании. +В последнем случае, письмо адресовывается редактору/редакции, и комментирует или обсуждает статью, опубликованную ранее в этом периодическом издании, или представляет интерес для конкретной читательской аудитории. + + A brief description of important new research, also known as “communication”. +(adapted from EuroCRIS) + + + + + + + + + + master thesis + 硕士学位论文 + tesina + mémoire de master + tesi di master + диплом магистра + Abschlussarbeit (Master) + tesi de mestratge + dissertação de mestrado + masterscriptie + 修士論文 + yüksek lisans tezi + + + master thesis + 硕士学位论文 + tesina + mémoire de master + tesi di master + диплом магистра + Abschlussarbeit (Master) + tesi de mestratge + dissertação de mestrado + masterscriptie + 修士論文 + yüksek lisans tezi + A thesis reporting a research project undertaken as part of a graduate course of education leading to a master's degree. + + + + + + + + + + periodical + 期刊 + publicación periódica + периодическое издание + publicació en sèrie + periodico + publicação periódica + Periodikum + périodique + periodiek + 逐次刊行物 + süreli yayın + + + periodical + 期刊 + publicación periódica + периодическое издание + publicació en sèrie + periodico + publicação periódica + Periodikum + périodique + periodiek + 逐次刊行物 + süreli yayın + A periodical is a publication issued on a regular and ongoing basis as a series of issues. +(Adapted from fabio) + + + + + + + + + + letter to the editor + 读者来信 + lettera al direttore + carta al director + carta al director + carta ao editor + Leserbrief + lettre à l'éditeur + письмо редактору + ingezonden brief + 来信 + + + letter to the editor + 读者来信 + lettera al direttore + carta al director + carta al director + carta ao editor + Leserbrief + lettre à l'éditeur + письмо редактору + ingezonden brief + 来信 + A letter to the editor is a letter sent to a periodical about issues of concern from its readers. +(adapted from Wikipedia) + + + + + + + + + + preprint + 预印本 + artículo preliminar + prépublication + articolo preliminare + Preprint + препринт + publicació preliminar + preprint + preprint + プレプリント + ön baskı + + + preprint + 预印本 + artículo preliminar + prépublication + articolo preliminare + Preprint + препринт + publicació preliminar + preprint + preprint + プレプリント + ön baskı + Pre-print describes the first draft of the article - before +peer-review, even before any contact with a publisher. This use is common amongst academics for whom the key modification of an article is the peer-review process. + +Another use of the term pre-print is for the finished article, reviewed and amended, ready and accepted for publication - but separate from the version that is type-set or formatted by the publisher. This use is more common amongst publishers, for whom the final and significant stage of modification to an article is the arrangement of the material for putting to print. + + + + + + + + + + report + 报告 + informe + rapport + rapporto + отчёт + Bericht + informe + relatório + rapport + 報告書 + rapor + + + report + 报告 + informe + rapport + rapporto + отчёт + Bericht + informe + relatório + rapport + 報告書 + rapor + A report is a separately published record of research findings, research still in progress, or other technical findings, usually bearing a report number and sometimes a grant number assigned by the funding agency. Also, an official record of the activities of a committee or corporate entity, the proceedings of a government body, or an investigation by an agency, whether published or private, usually archived or submitted to a higher authority, voluntarily or under mandate. In a more general sense, any formal account of facts or information related to a specific event or phenomenon, sometimes given at regular intervals. + + + + + + + + + + report part + 报告部分 + parte de un estudio + chapitre de rapport + capitolo di rapporto tecnico + часть доклада + part d'un informe + capítulo de relatório + Teilbericht + deelrapport + 報告書(部分) + rapor bölümü + + + report part + 报告部分 + parte de un estudio + chapitre de rapport + capitolo di rapporto tecnico + часть доклада + part d'un informe + capítulo de relatório + Teilbericht + deelrapport + 報告書(部分) + rapor bölümü + part of a report + + + + + + + + + + research proposal + 研究计划 + propuesta de investigación + projet de recherche + proposta di progetto + предложение по исследованию + proposta de recerca + proposta de investigação + Exposé + onderzoeksvoorstel + 研究計画書 + araştırma önerisi + + + research proposal + 研究计划 + propuesta de investigación + projet de recherche + proposta di progetto + предложение по исследованию + proposta de recerca + proposta de investigação + Exposé + onderzoeksvoorstel + 研究計画書 + araştırma önerisi + documentation for grant request + + + + + + + + + + review + 评论 + reseña + рецензия + recensione + Rezension + ressenya + recensão + synthèse + review + レビュー + eleştiri + + + review + 评论 + reseña + рецензия + recensione + Rezension + ressenya + recensão + synthèse + review + レビュー + eleştiri + A review of others' published work. + + + + + + + + + + technical documentation + 技术资料 + documentación técnica + manuel technique + documentazione tecnica + техническая документация + Technische Dokumentation + documentació tècnica + documentação técnica + technische documentatie + 技術文書 + teknik dokümantasyon + + + technical documentation + 技术资料 + documentación técnica + manuel technique + documentazione tecnica + техническая документация + Technische Dokumentation + documentació tècnica + documentação técnica + technische documentatie + 技術文書 + teknik dokümantasyon + Technical documentation refers to any type of documentation that describes handling, functionality and architecture of a technical product or a product under development or use. + + + + + + + + + + working paper + 研究手稿 + documento de trabajo + working paper + working paper + Arbeitspapier + рабочий документ + document de treball + working paper + working paper + ワーキングペーパー + ön rapor + + + working paper + 研究手稿 + documento de trabajo + working paper + working paper + Arbeitspapier + рабочий документ + document de treball + working paper + working paper + ワーキングペーパー + ön rapor + A working paper or preprint is a report on research that is still on-going or which has not yet been accepted for publication. + + + + + + + + + + thesis + 学位论文 + tesis + thèse + tesi + научно-исследовательская работа + tesis + tese + schriftliche Abschlussarbeit + scriptie + 学位論文 + tez + + + thesis + 学位论文 + tesis + thèse + tesi + научно-исследовательская работа + tesis + tese + schriftliche Abschlussarbeit + scriptie + 学位論文 + tez + A thesis or dissertation is a document submitted in support of candidature for an academic degree or professional qualification presenting the author's research and findings. + + + + + + + + + + text + текстовый ресурс + texte + texto + testo + 文本 + texto + Text + texte + tekst + テキスト + metin + + + text + текстовый ресурс + texte + texto + testo + 文本 + texto + Text + texte + tekst + テキスト + metin + A resource consisting primarily of words for reading. Examples include books, letters, dissertations, poems, newspapers, articles, archives of mailing lists. Note that facsimiles or images of texts are still of the genre Text. + + + + + + + conference paper not in proceedings + неопубликованный доклад конференции + comunicació no publicada en actes de congrés + comunicación no publicada en actas de congreso + comunicazione non pubblicata in atti di congresso + 未发表在会议论文集中的文章 + comunicação não publicada nas atas da conferência + Konferenzbeitrag nicht im Tagungsband + article dans une conférence non publié dans les actes + conferentie artikel niet in proceedings + 会議発表論文(会議録未掲載) + yayınlanmamış konferans bildirisi + + + conference paper not in proceedings + неопубликованный доклад конференции + comunicació no publicada en actes de congrés + comunicación no publicada en actas de congreso + comunicazione non pubblicata in atti di congresso + 未发表在会议论文集中的文章 + comunicação não publicada nas atas da conferência + Konferenzbeitrag nicht im Tagungsband + article dans une conférence non publié dans les actes + conferentie artikel niet in proceedings + 会議発表論文(会議録未掲載) + yayınlanmamış konferans bildirisi + A conference paper that is submitted to a conference and presented to the audience. The conference paper is not published in proceedings. + + + + + + + + + + conference poster not in proceedings + неопубликованный постер конференции + poster no publicat en actes de congrés + póster no publicado en actas de congreso + poster non pubblicato in atti di congresso + 未发表在会议论文集中的海报 + póster não publicado nas atas da conferência + Konferenzposter nicht im Tagungsband + poster dans une conférence non publié dans les actes + conferentie poster niet in proceedings + 会議発表ポスター(会議録未掲載) + yayınlanmamış konferans posteri + + + conference poster not in proceedings + неопубликованный постер конференции + poster no publicat en actes de congrés + póster no publicado en actas de congreso + poster non pubblicato in atti di congresso + 未发表在会议论文集中的海报 + póster não publicado nas atas da conferência + Konferenzposter nicht im Tagungsband + poster dans une conférence non publié dans les actes + conferentie poster niet in proceedings + 会議発表ポスター(会議録未掲載) + yayınlanmamış konferans posteri + A conference poster that is submitted to a conference and presented there at a poster presentation. The conference poster is not published in proceedings. + + + + + + + + + + musical notation + музыкальная нотация + notació musical + notación musical + notazione musicale + 乐谱 + notação musical + Musiknotation + partition + muzieknotatie + 楽譜 + nota + + + musical notation + музыкальная нотация + notació musical + notación musical + notazione musicale + 乐谱 + notação musical + Musiknotation + partition + muzieknotatie + 楽譜 + nota + Musical notation is any system used to visually represent aurally perceived music through the use of written symbols, including ancient or modern musical symbols. + + + + + + + + + + internal report + внутренний отчёт + informe intern + informe interno + rapporto interno + 内部报告 + interner Bericht + rapport interne + relatório interno + intern rapport + 内部報告書 + dahili rapor + + + internal report + внутренний отчёт + informe intern + informe interno + rapporto interno + 内部报告 + interner Bericht + rapport interne + relatório interno + intern rapport + 内部報告書 + dahili rapor + An internal report is a record of findings collected for internal use. It is not designed to be made public and may include confidential or proprietary information. + + + + + + + + + + memorandum + меморандум + memoràndum + memorándum + memorandum + 备忘录 + memorando + Memorandum + mémo + memorandum + メモランダム + bilgi notu + + + memorandum + меморандум + memoràndum + memorándum + memorandum + 备忘录 + memorando + Memorandum + mémo + memorandum + メモランダム + bilgi notu + It is a note, document or other communication that helps the memory by recording events or observations on a topic. +A memorandum can have only a certain number of formats; it may have a format specific to an office or institution. + + + + + + + + + + + other type of report + прочие отчёты + altre tipus d'informe + otro tipo de informe + altro tipo di rapporto + 其他报告 + sonstiger Report + autre type de rapport + outro relatório + その他の報告書 + rapport overig + diğer rapor türü + + + other type of report + прочие отчёты + altre tipus d'informe + otro tipo de informe + altro tipo di rapporto + 其他报告 + sonstiger Report + autre type de rapport + outro relatório + その他の報告書 + rapport overig + diğer rapor türü + Other types of report may include Business Plans Technical Specifications, data management plans, recommendation reports, white papers, annual reports, auditor's reports, workplace reports, census reports, trip reports, progress reports, investigative reports, budget reports, policy reports, demographic reports, credit reports, appraisal reports, inspection reports, military reports, bound reports, etc. + + + + + + + + + + policy report + общие положения + informe polític + memoria de actuación + informativa politica + 政策报告 + relatório de política + Policy Report + rapport stratégique + ポリシーレポート + beleidsrapport + politika raporu + + + policy report + общие положения + informe polític + memoria de actuación + informativa politica + 政策报告 + relatório de política + Policy Report + rapport stratégique + ポリシーレポート + beleidsrapport + politika raporu + A policy report is a type of report that provides an in-depth look at major policy developments and events + + + + + + + + + + project deliverable + результат проекта + entrega de projecte + entregable de proyecto + deliverable di progetto + 项目可交付成果 + entregável de projeto + Ergebnis im Projekt + livrable + プロジェクト報告書 + projectresultaat + proje çıktısı + + + project deliverable + результат проекта + entrega de projecte + entregable de proyecto + deliverable di progetto + 项目可交付成果 + entregável de projeto + Ergebnis im Projekt + livrable + プロジェクト報告書 + projectresultaat + proje çıktısı + A project deliverable is an “outcome” as a result of a project that is intended to be delivered to a customer (e.g. funder). Examples of deliverable are report, document, work package or any other building block of an overall project. + + + + + + + + + + report to funding agency + informe per una agència de finançament + informe a organismo financiador + rapporto a un'agenzia di finanziamento + 给资助机构的报告 + relatório para organismo financiador + Bericht an Förderorganisation + rapport à l'intention du financeur + финансовый отчёт + 助成研究成果報告書 + fon sağlayıcıya rapor + + + report to funding agency + informe per una agència de finançament + informe a organismo financiador + rapporto a un'agenzia di finanziamento + 给资助机构的报告 + relatório para organismo financiador + Bericht an Förderorganisation + rapport à l'intention du financeur + финансовый отчёт + 助成研究成果報告書 + fon sağlayıcıya rapor + A report to a funding agency is a document written by beneficiaries of project grants. The reporting documents can be e.g. periodic reports about progress of scientific and technical work and final report. For deliverables use ‘Project deliverable’. + + + + + + + + + + research report + научно-исследовательский отчёт + informe de recerca + rapporto di ricerca + 研究报告 + Forschungsbericht + rapport de recherche + relatório de investigação + onderzoeksrapport + 研究報告書 + araştırma raporu + + + research report + научно-исследовательский отчёт + informe de recerca + rapporto di ricerca + 研究报告 + Forschungsbericht + rapport de recherche + relatório de investigação + onderzoeksrapport + 研究報告書 + araştırma raporu + Research Reports are reports that typically provide an in-depth study of a particular topic or describe the results of a research project. + + + + + + + + + + technical report + технический отчёт + informe tècnic + informe técnico + rapporto tecnico + 技术报告 + relatório técnico + technischer Bericht + rapport technique + technisch rapport + テクニカルレポート + teknik rapor + + + technical report + технический отчёт + informe tècnic + informe técnico + rapporto tecnico + 技术报告 + relatório técnico + technischer Bericht + rapport technique + technisch rapport + テクニカルレポート + teknik rapor + A technical report is a document that records the procedure adopted and results obtained from a scientific or technical activity or investigation. + + + + + + + + + + review article + artículo de revisión + 综述文章 + + + review article + artículo de revisión + 综述文章 + A review article is a secondary source, that is, it is written about other articles, and does not report original research of its own. (adapted from http://apus.libanswers.com/faq/2324) + + + + + + + + + + research article + artículo original + 原创研究文章 + + + research article + artículo original + 原创研究文章 + A research article is a primary source, that is, it reports the methods and results of an original study performed by the authors. (adapted from http://apus.libanswers.com/faq/2324) + + + + + + + + + + \ No newline at end of file diff --git a/src/main/resources/schemas/cerif_profile_1_1/vocabularies/issn_medium_types.xsd b/src/main/resources/schemas/cerif_profile_1_1/vocabularies/issn_medium_types.xsd new file mode 100644 index 0000000..9fa9605 --- /dev/null +++ b/src/main/resources/schemas/cerif_profile_1_1/vocabularies/issn_medium_types.xsd @@ -0,0 +1,76 @@ + + + + + ISSN Media List + + + ISSN Media List + List of media types as defined in the "ISSN linked data application profile" (http://www.issn.org/understanding-the-issn/assignment-rules/issn-linked-data-application-profile/) document. + + + + + + + + + + + + + + + + + + + + + Print + + + Print + Print (paper) + + + + + + + Online + + + Online + Online (online publication) + + + + + + + Digital carrier + + + Digital carrier + Digital carrier (CD-ROM, USB keys) + + + + + + + Other + + + Other + Other (Loose-leaf publications, braille, etc.) + + + + + + + \ No newline at end of file diff --git a/src/main/resources/schemas/cerif_profile_1_1/vocabularies/openaire_funding_types.xsd b/src/main/resources/schemas/cerif_profile_1_1/vocabularies/openaire_funding_types.xsd new file mode 100644 index 0000000..a482ab6 --- /dev/null +++ b/src/main/resources/schemas/cerif_profile_1_1/vocabularies/openaire_funding_types.xsd @@ -0,0 +1,136 @@ + + + + + + Types of funding for the OpenAIRE Guidelines for CRIS Managers + + + Types of funding for the OpenAIRE Guidelines for CRIS Managers + Types of funding for the OpenAIRE Guidelines for CRIS Managers. + + + + + + + + + + + + + + + + + + + + + + Funding Programme + + + Funding Programme + A funding programme or a similar scheme that funds some number of proposals. Funding programmes can be broken down into sub-programmes. + + + + + + + + Call + + + Call + Call for proposals: a specific campaign for the funder to solicit proposals from interested researchers and institutions. + + + + + + + + Tender + + + Tender + Tender for services or deliveries: a specific campaign for the funder to solicit offers for services or deliveries. + + + + + + + + Gift + + + Gift + A donation connected with specific terms and conditions. + + + + + + + + Internal Funding + + + Internal Funding + Internal funds used to amend or replace external funding. + + + + + + + + Contract + + + Contract + + + + + + + + + Award + + + Award + + + + + + + + + Grant + + + Grant + + + + + + + + + \ No newline at end of file diff --git a/src/main/resources/schemas/cerif_profile_1_1/vocabularies/openaire_service_compatibilities.xsd b/src/main/resources/schemas/cerif_profile_1_1/vocabularies/openaire_service_compatibilities.xsd new file mode 100644 index 0000000..e39626b --- /dev/null +++ b/src/main/resources/schemas/cerif_profile_1_1/vocabularies/openaire_service_compatibilities.xsd @@ -0,0 +1,58 @@ + + + + + + Compatibility of service with the OpenAIRE Guidelines for CRIS Managers + + + Compatibility of service with the OpenAIRE Guidelines for CRIS Managers + Compatibility of service with the OpenAIRE Guidelines for CRIS Managers. + + + + + + + + + + + + + + + + + + + + + + OpenAIRE Guidelines 1.1 compatible CRIS + + + OpenAIRE Guidelines 1.1 compatible CRIS + CRIS compatible with OpenAIRE Guidelines for CRIS managers version 1.1 + + + + + + + + OpenAIRE Guidelines 1.0 compatible CRIS + + + OpenAIRE Guidelines 1.0 compatible CRIS + CRIS compatible with OpenAIRE Guidelines for CRIS managers version 1.0 + + + + + + + + \ No newline at end of file From bee621f305d557927d816a9a366d145cce489f12 Mon Sep 17 00:00:00 2001 From: Jan Dvorak Date: Tue, 20 Jun 2023 11:21:56 +0200 Subject: [PATCH 04/36] Change metadataPrefix to oai_cerif_openaire_v1_2 --- ...efix=oai_cerif_openaire_v1_2+set=openaire_cris_equipments.xml} | 0 ...taPrefix=oai_cerif_openaire_v1_2+set=openaire_cris_events.xml} | 0 ...aPrefix=oai_cerif_openaire_v1_2+set=openaire_cris_funding.xml} | 0 ...Prefix=oai_cerif_openaire_v1_2+set=openaire_cris_orgunits.xml} | 0 ...aPrefix=oai_cerif_openaire_v1_2+set=openaire_cris_patents.xml} | 0 ...aPrefix=oai_cerif_openaire_v1_2+set=openaire_cris_persons.xml} | 0 ...Prefix=oai_cerif_openaire_v1_2+set=openaire_cris_products.xml} | 0 ...Prefix=oai_cerif_openaire_v1_2+set=openaire_cris_projects.xml} | 0 ...ix=oai_cerif_openaire_v1_2+set=openaire_cris_publications.xml} | 0 9 files changed, 0 insertions(+), 0 deletions(-) rename samples/{_verb=ListRecords+metadataPrefix=oai_cerif_openaire+set=openaire_cris_equipments.xml => _verb=ListRecords+metadataPrefix=oai_cerif_openaire_v1_2+set=openaire_cris_equipments.xml} (100%) rename samples/{_verb=ListRecords+metadataPrefix=oai_cerif_openaire+set=openaire_cris_events.xml => _verb=ListRecords+metadataPrefix=oai_cerif_openaire_v1_2+set=openaire_cris_events.xml} (100%) rename samples/{_verb=ListRecords+metadataPrefix=oai_cerif_openaire+set=openaire_cris_funding.xml => _verb=ListRecords+metadataPrefix=oai_cerif_openaire_v1_2+set=openaire_cris_funding.xml} (100%) rename samples/{_verb=ListRecords+metadataPrefix=oai_cerif_openaire+set=openaire_cris_orgunits.xml => _verb=ListRecords+metadataPrefix=oai_cerif_openaire_v1_2+set=openaire_cris_orgunits.xml} (100%) rename samples/{_verb=ListRecords+metadataPrefix=oai_cerif_openaire+set=openaire_cris_patents.xml => _verb=ListRecords+metadataPrefix=oai_cerif_openaire_v1_2+set=openaire_cris_patents.xml} (100%) rename samples/{_verb=ListRecords+metadataPrefix=oai_cerif_openaire+set=openaire_cris_persons.xml => _verb=ListRecords+metadataPrefix=oai_cerif_openaire_v1_2+set=openaire_cris_persons.xml} (100%) rename samples/{_verb=ListRecords+metadataPrefix=oai_cerif_openaire+set=openaire_cris_products.xml => _verb=ListRecords+metadataPrefix=oai_cerif_openaire_v1_2+set=openaire_cris_products.xml} (100%) rename samples/{_verb=ListRecords+metadataPrefix=oai_cerif_openaire+set=openaire_cris_projects.xml => _verb=ListRecords+metadataPrefix=oai_cerif_openaire_v1_2+set=openaire_cris_projects.xml} (100%) rename samples/{_verb=ListRecords+metadataPrefix=oai_cerif_openaire+set=openaire_cris_publications.xml => _verb=ListRecords+metadataPrefix=oai_cerif_openaire_v1_2+set=openaire_cris_publications.xml} (100%) diff --git a/samples/_verb=ListRecords+metadataPrefix=oai_cerif_openaire+set=openaire_cris_equipments.xml b/samples/_verb=ListRecords+metadataPrefix=oai_cerif_openaire_v1_2+set=openaire_cris_equipments.xml similarity index 100% rename from samples/_verb=ListRecords+metadataPrefix=oai_cerif_openaire+set=openaire_cris_equipments.xml rename to samples/_verb=ListRecords+metadataPrefix=oai_cerif_openaire_v1_2+set=openaire_cris_equipments.xml diff --git a/samples/_verb=ListRecords+metadataPrefix=oai_cerif_openaire+set=openaire_cris_events.xml b/samples/_verb=ListRecords+metadataPrefix=oai_cerif_openaire_v1_2+set=openaire_cris_events.xml similarity index 100% rename from samples/_verb=ListRecords+metadataPrefix=oai_cerif_openaire+set=openaire_cris_events.xml rename to samples/_verb=ListRecords+metadataPrefix=oai_cerif_openaire_v1_2+set=openaire_cris_events.xml diff --git a/samples/_verb=ListRecords+metadataPrefix=oai_cerif_openaire+set=openaire_cris_funding.xml b/samples/_verb=ListRecords+metadataPrefix=oai_cerif_openaire_v1_2+set=openaire_cris_funding.xml similarity index 100% rename from samples/_verb=ListRecords+metadataPrefix=oai_cerif_openaire+set=openaire_cris_funding.xml rename to samples/_verb=ListRecords+metadataPrefix=oai_cerif_openaire_v1_2+set=openaire_cris_funding.xml diff --git a/samples/_verb=ListRecords+metadataPrefix=oai_cerif_openaire+set=openaire_cris_orgunits.xml b/samples/_verb=ListRecords+metadataPrefix=oai_cerif_openaire_v1_2+set=openaire_cris_orgunits.xml similarity index 100% rename from samples/_verb=ListRecords+metadataPrefix=oai_cerif_openaire+set=openaire_cris_orgunits.xml rename to samples/_verb=ListRecords+metadataPrefix=oai_cerif_openaire_v1_2+set=openaire_cris_orgunits.xml diff --git a/samples/_verb=ListRecords+metadataPrefix=oai_cerif_openaire+set=openaire_cris_patents.xml b/samples/_verb=ListRecords+metadataPrefix=oai_cerif_openaire_v1_2+set=openaire_cris_patents.xml similarity index 100% rename from samples/_verb=ListRecords+metadataPrefix=oai_cerif_openaire+set=openaire_cris_patents.xml rename to samples/_verb=ListRecords+metadataPrefix=oai_cerif_openaire_v1_2+set=openaire_cris_patents.xml diff --git a/samples/_verb=ListRecords+metadataPrefix=oai_cerif_openaire+set=openaire_cris_persons.xml b/samples/_verb=ListRecords+metadataPrefix=oai_cerif_openaire_v1_2+set=openaire_cris_persons.xml similarity index 100% rename from samples/_verb=ListRecords+metadataPrefix=oai_cerif_openaire+set=openaire_cris_persons.xml rename to samples/_verb=ListRecords+metadataPrefix=oai_cerif_openaire_v1_2+set=openaire_cris_persons.xml diff --git a/samples/_verb=ListRecords+metadataPrefix=oai_cerif_openaire+set=openaire_cris_products.xml b/samples/_verb=ListRecords+metadataPrefix=oai_cerif_openaire_v1_2+set=openaire_cris_products.xml similarity index 100% rename from samples/_verb=ListRecords+metadataPrefix=oai_cerif_openaire+set=openaire_cris_products.xml rename to samples/_verb=ListRecords+metadataPrefix=oai_cerif_openaire_v1_2+set=openaire_cris_products.xml diff --git a/samples/_verb=ListRecords+metadataPrefix=oai_cerif_openaire+set=openaire_cris_projects.xml b/samples/_verb=ListRecords+metadataPrefix=oai_cerif_openaire_v1_2+set=openaire_cris_projects.xml similarity index 100% rename from samples/_verb=ListRecords+metadataPrefix=oai_cerif_openaire+set=openaire_cris_projects.xml rename to samples/_verb=ListRecords+metadataPrefix=oai_cerif_openaire_v1_2+set=openaire_cris_projects.xml diff --git a/samples/_verb=ListRecords+metadataPrefix=oai_cerif_openaire+set=openaire_cris_publications.xml b/samples/_verb=ListRecords+metadataPrefix=oai_cerif_openaire_v1_2+set=openaire_cris_publications.xml similarity index 100% rename from samples/_verb=ListRecords+metadataPrefix=oai_cerif_openaire+set=openaire_cris_publications.xml rename to samples/_verb=ListRecords+metadataPrefix=oai_cerif_openaire_v1_2+set=openaire_cris_publications.xml From c615c68c4c0702f701fd62f2b5c022837de4ee97 Mon Sep 17 00:00:00 2001 From: Jan Dvorak Date: Tue, 20 Jun 2023 11:22:16 +0200 Subject: [PATCH 05/36] Add examples from OpenAIRE CRIS Guidelines 1.1.1 --- ...aire_v1_1+set=openaire_cris_equipments.xml | 52 ++ ...openaire_v1_1+set=openaire_cris_events.xml | 30 + ...penaire_v1_1+set=openaire_cris_funding.xml | 213 +++++++ ...enaire_v1_1+set=openaire_cris_orgunits.xml | 212 +++++++ ...penaire_v1_1+set=openaire_cris_patents.xml | 165 ++++++ ...penaire_v1_1+set=openaire_cris_persons.xml | 316 ++++++++++ ...enaire_v1_1+set=openaire_cris_products.xml | 249 ++++++++ ...enaire_v1_1+set=openaire_cris_projects.xml | 262 +++++++++ ...re_v1_1+set=openaire_cris_publications.xml | 538 ++++++++++++++++++ 9 files changed, 2037 insertions(+) create mode 100644 samples/_verb=ListRecords+metadataPrefix=oai_cerif_openaire_v1_1+set=openaire_cris_equipments.xml create mode 100644 samples/_verb=ListRecords+metadataPrefix=oai_cerif_openaire_v1_1+set=openaire_cris_events.xml create mode 100644 samples/_verb=ListRecords+metadataPrefix=oai_cerif_openaire_v1_1+set=openaire_cris_funding.xml create mode 100644 samples/_verb=ListRecords+metadataPrefix=oai_cerif_openaire_v1_1+set=openaire_cris_orgunits.xml create mode 100644 samples/_verb=ListRecords+metadataPrefix=oai_cerif_openaire_v1_1+set=openaire_cris_patents.xml create mode 100644 samples/_verb=ListRecords+metadataPrefix=oai_cerif_openaire_v1_1+set=openaire_cris_persons.xml create mode 100644 samples/_verb=ListRecords+metadataPrefix=oai_cerif_openaire_v1_1+set=openaire_cris_products.xml create mode 100644 samples/_verb=ListRecords+metadataPrefix=oai_cerif_openaire_v1_1+set=openaire_cris_projects.xml create mode 100644 samples/_verb=ListRecords+metadataPrefix=oai_cerif_openaire_v1_1+set=openaire_cris_publications.xml diff --git a/samples/_verb=ListRecords+metadataPrefix=oai_cerif_openaire_v1_1+set=openaire_cris_equipments.xml b/samples/_verb=ListRecords+metadataPrefix=oai_cerif_openaire_v1_1+set=openaire_cris_equipments.xml new file mode 100644 index 0000000..431512f --- /dev/null +++ b/samples/_verb=ListRecords+metadataPrefix=oai_cerif_openaire_v1_1+set=openaire_cris_equipments.xml @@ -0,0 +1,52 @@ + + + + + 2018-01-12T14:00:00Z + http://cris.example.org/openaire/connector + + +
+ oai:cris.example.org:Equipments/82394874 + 2018-01-07T14:00:00Z + openaire_cris_equipments +
+ + + SkyArrow 650 TCNS operated by IBIMET CNR + 982340-29481/1999 + The SkyArrow 650 TCNS operated by IBIMET (CNR - Institute of Biometeorology) for the EUFAR project + + + CNR + CONSIGLIO NAZIONALE DELLE RICERCHE + NATIONAL RESEARCH COUNCIL + + + + +
+ + +
+ oai:cris.example.org:Equipments/82394875 + 2018-01-07T14:00:00Z + openaire_cris_equipments +
+ + + Cessna T207A operated by Freie Universität Berlin + 2005:192834/11A + The Cessna T207A operated by Freie Universität Berlin, Institut für Weltraumwissenschaften, for the EUFAR project + + +
+ +
+
\ No newline at end of file diff --git a/samples/_verb=ListRecords+metadataPrefix=oai_cerif_openaire_v1_1+set=openaire_cris_events.xml b/samples/_verb=ListRecords+metadataPrefix=oai_cerif_openaire_v1_1+set=openaire_cris_events.xml new file mode 100644 index 0000000..c7228be --- /dev/null +++ b/samples/_verb=ListRecords+metadataPrefix=oai_cerif_openaire_v1_1+set=openaire_cris_events.xml @@ -0,0 +1,30 @@ + + + + + 2018-01-12T14:00:00Z + http://cris.example.org/openaire/connector + + +
+ oai:cris.example.org:Events/583475 + 2018-01-07T14:00:00Z + openaire_cris_events +
+ + + https://w3id.org/cerif/vocab/EventTypes#Conference + MTSR 2012 + 6th Research Conference on Metadata and Semantics Research + + +
+ +
+
\ No newline at end of file diff --git a/samples/_verb=ListRecords+metadataPrefix=oai_cerif_openaire_v1_1+set=openaire_cris_funding.xml b/samples/_verb=ListRecords+metadataPrefix=oai_cerif_openaire_v1_1+set=openaire_cris_funding.xml new file mode 100644 index 0000000..313e0ad --- /dev/null +++ b/samples/_verb=ListRecords+metadataPrefix=oai_cerif_openaire_v1_1+set=openaire_cris_funding.xml @@ -0,0 +1,213 @@ + + + + + 2018-01-12T14:00:00Z + http://cris.example.org/openaire/connector + + +
+ oai:cris.example.org:Fundings/612345 + 2018-01-07T14:00:00Z + openaire_cris_funding +
+ + + https://www.openaire.eu/cerif-profile/vocab/OpenAIRE_Funding_Types#FundingProgramme + FP7 + Seventh Framework Programme + 50500000000 + The Seventh Framework Programme (FP7) bundles all research-related EU initiatives together under a common roof playing a crucial role in reaching the goals of growth, competitiveness and employment. It is a key pillar for the European Research Area (ERA). + The broad objectives of FP7 have been grouped into four categories: Cooperation, Ideas, People and Capacities. For each type of objective, there is a specific programme corresponding to the main areas of EU + research policy. All specific programmes work together to promote and encourage the creation of European poles of (scientific) excellence. + + European Union + Framework Programme + + + EC + European Commission + http://dx.doi.org/10.13039/501100000780 + + + + + +
+ + +
+ oai:cris.example.org:Fundings/612346 + 2018-01-07T14:00:00Z + openaire_cris_funding +
+ + + https://www.openaire.eu/cerif-profile/vocab/OpenAIRE_Funding_Types#FundingProgramme + Capacities + 40970000000 + The FP7 Capacities programme aims to enhance research and innovation capacities throughout Europe and ensure their optimal use. The Capacities programme operates in seven broad areas: Research infrastructures, Research for the benefit of SMEs, Regions of knowledge and support for regional research-driven clusters, Research potential of Convergence Regions, Science in society, Support to the coherent development of research policies, International + cooperation. + Research capacities + Innovation capacities + + + EC + European Commission + http://dx.doi.org/10.13039/501100000780 + + + + + https://www.openaire.eu/cerif-profile/vocab/OpenAIRE_Funding_Types#FundingProgramme + FP7 + + + + + +
+ + +
+ oai:cris.example.org:Fundings/612347 + 2017-04-30T15:29:24Z + openaire_cris_projects +
+ + + https://www.openaire.eu/cerif-profile/vocab/OpenAIRE_Funding_Types#FundingProgramme + Research infrastructures + 1715000000 + The overall objective of the ‘Research infrastructures’ part of the FP7 Capacities programme is to optimise the use and development of the best research infrastructures existing in Europe. Furthermore, it aims to help to create new research infrastructures of pan-European interest in all fields of science and technology. The European scientific community needs these to remain at the forefront of the advancement of research, and they will help industry to + strengthen its base of knowledge and technological know how. + Research infrastructures + + + https://www.openaire.eu/cerif-profile/vocab/OpenAIRE_Funding_Types#FundingProgramme + Capacities + + + https://www.openaire.eu/cerif-profile/vocab/OpenAIRE_Funding_Types#FundingProgramme + FP7 + + + + + + + + + +
+ + +
+ oai:cris.example.org:Fundings/612351 + 2017-04-30T15:29:24Z + openaire_cris_projects +
+ + + https://www.openaire.eu/cerif-profile/vocab/OpenAIRE_Funding_Types#Contract + FP7 funding for the OpenAIRE project + + + https://www.openaire.eu/cerif-profile/vocab/OpenAIRE_Funding_Types#FundingProgramme + Research infrastructures + + + https://www.openaire.eu/cerif-profile/vocab/OpenAIRE_Funding_Types#FundingProgramme + Capacities + + + https://www.openaire.eu/cerif-profile/vocab/OpenAIRE_Funding_Types#FundingProgramme + FP7 + + + + + + + + + + +
+ + +
+ oai:cris.example.org:Fundings/612352 + 2017-04-30T15:29:24Z + openaire_cris_projects +
+ + + https://www.openaire.eu/cerif-profile/vocab/OpenAIRE_Funding_Types#Contract + FP7 funding for the OpenAIREplus project + + + https://www.openaire.eu/cerif-profile/vocab/OpenAIRE_Funding_Types#FundingProgramme + Research infrastructures + + + https://www.openaire.eu/cerif-profile/vocab/OpenAIRE_Funding_Types#FundingProgramme + Capacities + + + https://www.openaire.eu/cerif-profile/vocab/OpenAIRE_Funding_Types#FundingProgramme + FP7 + + + + + + + + + + +
+ + +
+ oai:cris.example.org:Fundings/612353 + 2017-04-30T15:29:24Z + openaire_cris_projects +
+ + + https://www.openaire.eu/cerif-profile/vocab/OpenAIRE_Funding_Types#Contract + FP7 funding for the EUFAR project + + + https://www.openaire.eu/cerif-profile/vocab/OpenAIRE_Funding_Types#FundingProgramme + Research infrastructures + + + https://www.openaire.eu/cerif-profile/vocab/OpenAIRE_Funding_Types#FundingProgramme + Capacities + + + https://www.openaire.eu/cerif-profile/vocab/OpenAIRE_Funding_Types#FundingProgramme + FP7 + + + + + + + + + + +
+ +
+
\ No newline at end of file diff --git a/samples/_verb=ListRecords+metadataPrefix=oai_cerif_openaire_v1_1+set=openaire_cris_orgunits.xml b/samples/_verb=ListRecords+metadataPrefix=oai_cerif_openaire_v1_1+set=openaire_cris_orgunits.xml new file mode 100644 index 0000000..7ce7818 --- /dev/null +++ b/samples/_verb=ListRecords+metadataPrefix=oai_cerif_openaire_v1_1+set=openaire_cris_orgunits.xml @@ -0,0 +1,212 @@ + + + + + 2018-01-12T14:00:00Z + http://cris.example.org/openaire/connector + + +
+ oai:cris.example.org:OrgUnits/312345 + 2018-01-07T14:00:00Z + openaire_cris_orgunits +
+ + + https://w3id.org/cerif/vocab/OrganisationTypes#HigherEducation + NKUA + ΕΘΝΙΚΟ ΚΑΙ ΚΑΠΟΔΙΣΤΡΙΑΚΟ ΠΑΝΕΠΙΣΤΗΜΙΟ ΑΘΗΝΩΝ + NATIONAL AND KAPODISTRIAN UNIVERSITY OF ATHENS + http://www.uoa.gr + + +
+ +
+ oai:cris.example.org:OrgUnits/312346 + 2018-01-07T14:00:00Z + openaire_cris_orgunits +
+ + + https://w3id.org/cerif/vocab/OrganisationTypes#ResearchInstitute + CNR + CONSIGLIO NAZIONALE DELLE RICERCHE + NATIONAL RESEARCH COUNCIL + http://www.cnr.it + + +
+ +
+ oai:cris.example.org:OrgUnits/312347 + 2018-01-07T14:00:00Z + openaire_cris_orgunits +
+ + + EKT + National Documentation Centre + Εθνικό Κέντρο Τεκμηρίωσης + http://www.ekt.gr + + +
+ +
+ oai:cris.example.org:OrgUnits/312348 + 2018-01-07T14:00:00Z + openaire_cris_orgunits +
+ + + UKOLN + UKOLN + http://www.ukoln.ac.uk + + +
+ +
+ oai:cris.example.org:OrgUnits/310001 + 2018-01-07T14:00:00Z + openaire_cris_orgunits +
+ + + https://w3id.org/cerif/vocab/OrganisationTypes#Intergovernmental + EC + European Commission + Европейска комисия + Comisión Europea + Evropská komise + Europa-Kommissionen + Europäische Kommission + Euroopa Komisjon + Ευρωπαϊκή Επιτροπή + Commission européenne + Commissione europea + Eiropas Komisija + Europos Komisija + Európai Bizottság + Il-Kummissjoni Ewropea + Europese Commissie + Komisja Europejska + Comissão Europeia + Comisia Europeană + Európska komisia + Evropska komisija + Euroopan komissio + Europeiska kommissionen + Europska komisija + http://dx.doi.org/10.13039/501100000780 + https://europa.eu/ + + +
+ +
+ oai:cris.example.org:OrgUnits/329384 + 2018-01-07T14:00:00Z + openaire_cris_orgunits +
+ + + University of California, Berkeley + + +
+ +
+ oai:cris.example.org:OrgUnits/301248 + 2018-01-07T14:00:00Z + openaire_cris_orgunits +
+ + + Museum of Vertebrate Zoology + + + University of California, Berkeley + + + + +
+ +
+ oai:cris.example.org:OrgUnits/301249 + 2018-01-07T14:00:00Z + openaire_cris_orgunits +
+ + + Department of Integrative Biology + + + University of California, Berkeley + + + + +
+ +
+ oai:cris.example.org:OrgUnits/301250 + 2018-01-07T14:00:00Z + openaire_cris_orgunits +
+ + + https://w3id.org/cerif/vocab/OrganisationTypes#Commercial + Springer + + +
+ +
+ oai:cris.example.org:OrgUnits/301253 + 2018-01-07T14:00:00Z + openaire_cris_orgunits +
+ + + Society for the Study of Evolution + + +
+ +
+ oai:cris.example.org:OrgUnits/330001 + 2018-01-07T14:00:00Z + openaire_cris_orgunits +
+ + + European Patent Office + Office européen des brevets + Europäisches Patentamt + + +
+ +
+ oai:cris.example.org:OrgUnits/341234 + 2018-01-07T14:00:00Z + openaire_cris_orgunits +
+ + + Eltek S.P.A + + +
+ +
+
\ No newline at end of file diff --git a/samples/_verb=ListRecords+metadataPrefix=oai_cerif_openaire_v1_1+set=openaire_cris_patents.xml b/samples/_verb=ListRecords+metadataPrefix=oai_cerif_openaire_v1_1+set=openaire_cris_patents.xml new file mode 100644 index 0000000..76092d0 --- /dev/null +++ b/samples/_verb=ListRecords+metadataPrefix=oai_cerif_openaire_v1_1+set=openaire_cris_patents.xml @@ -0,0 +1,165 @@ + + + + + 2018-01-12T14:00:00Z + http://cris.example.org/openaire/connector + + +
+ oai:cris.example.org:Patents/712178 + 2018-01-07T14:00:00Z + openaire_cris_patents +
+ + + + http://purl.org/coar/resource_type/c_15cd + MEDICAL DEVICE, IN PARTICULAR FOR THE SEPARATION OF A FLUID + 2016-01-01 + 2014-11-13 + BR + + + European Patent Office + + + BR20161110203 + + + + + Zanin + Massimo + + + + + + + Pizzi + Marco + + + + + + + Mazzucco + Laura + + + + + + + Bertoni + Marco + + + + + + + + Eltek S.P.A + + + + https://data.epo.org/linked-data/def/cpc/A61B5-150755 + https://data.epo.org/linked-data/def/cpc/A61M1-0009 + https://data.epo.org/linked-data/def/cpc/A61M1-0272 + https://data.epo.org/linked-data/def/cpc/A61M1-3693 + https://data.epo.org/linked-data/def/cpc/B01D21-262 + https://data.epo.org/linked-data/def/cpc/A61M1-0218 + https://data.epo.org/linked-data/def/cpc/A61M1-0236 + https://data.epo.org/linked-data/def/cpc/A61M2202-0427 + http://data.epo.org/linked-data/def/ipc/A61M1-00 + http://data.epo.org/linked-data/def/ipc/A61M1-34 + http://data.epo.org/linked-data/def/ipc/A61M1-36 + + + + + +
+ +
+ oai:cris.example.org:Patents/712179 + 2018-01-07T14:00:00Z + openaire_cris_patents +
+ + + + http://purl.org/coar/resource_type/c_15cd + MEDICAL DEVICE, IN PARTICULAR FOR THE SEPARATION OF A FLUID + 2014-11-13 + WO + + + European Patent Office + + + WO2014IB66015 + + + + + Zanin + Massimo + + + + + + + Pizzi + Marco + + + + + + + Mazzucco + Laura + + + + + + + Bertoni + Marco + + + + + + + + Eltek S.P.A + + + + A medical device for separating a fluid, in particular for separating platelet-rich plasma from whole blood, comprises three containers (10, 20, 30) and at least one corresponding connection line (40) having an intermediate bifurcation (41). Provided on the connection line (40) are valve means (42, 45, 47a, 48a-48b) for enabling or preventing a flow of fluid. At least one container (10) comprises a hollow container body (11) and a plunger (12) associated in a movable way to the container body (11). The device (1) has a modular structure comprising a plurality of modules (A, B, C), which are connected together in a separable way, for enabling separation thereof according to the step of use of the device (1), and include at least one first module (A), which comprises at least the first container (10) and a corresponding portion (40a) of the first connection line (40), and a second module (B), which comprises at least one between the second and third containers (30, 20) with a corresponding portion (40b, 40c) of the first connection line (40). Provided at least at the interface between two modules (A, B, C) of the modular structure are releasable connectors (43, 44), in particular hydraulic connectors comprising at least two parts that can be coupled together, each of which belongs to a corresponding module (A, B, C). + https://data.epo.org/linked-data/def/cpc/A61B5-150755 + https://data.epo.org/linked-data/def/cpc/A61M1-0009 + https://data.epo.org/linked-data/def/cpc/A61M1-0272 + https://data.epo.org/linked-data/def/cpc/A61M1-3693 + https://data.epo.org/linked-data/def/cpc/B01D21-262 + https://data.epo.org/linked-data/def/cpc/A61M1-0218 + https://data.epo.org/linked-data/def/cpc/A61M1-0236 + https://data.epo.org/linked-data/def/cpc/A61M2202-0427 + + +
+
+
\ No newline at end of file diff --git a/samples/_verb=ListRecords+metadataPrefix=oai_cerif_openaire_v1_1+set=openaire_cris_persons.xml b/samples/_verb=ListRecords+metadataPrefix=oai_cerif_openaire_v1_1+set=openaire_cris_persons.xml new file mode 100644 index 0000000..4f355f4 --- /dev/null +++ b/samples/_verb=ListRecords+metadataPrefix=oai_cerif_openaire_v1_1+set=openaire_cris_persons.xml @@ -0,0 +1,316 @@ + + + + + 2018-01-12T14:00:00Z + http://cris.example.org/openaire/connector + + +
+ oai:cris.example.org:Persons/2123451 + 2018-01-07T14:00:00Z + openaire_cris_persons +
+ + + + Houssos + Nikos + + https://orcid.org/0000-0002-5277-285X + F-8684-2012 + 6508266266 + mailto:email1@example.org + tel:+301234567890 + fax:+301234567891 + + + EKT + + + + +
+ + +
+ oai:cris.example.org:Persons/2123452 + 2018-01-07T14:00:00Z + openaire_cris_persons +
+ + + + Manghi + Paolo + + https://orcid.org/0000-0001-7291-3210 + mailto:email@example2.org + tel:+391234567890 + fax:+391234567891 + + +
+ + +
+ oai:cris.example.org:Persons/2123453 + 2018-01-07T14:00:00Z + openaire_cris_persons +
+ + + + Jörg + Brigitte + + https://orcid.org/0000-0001-7941-8108 + mailto:email@example3.org + tel:+491234567890 + fax:+491234567891 + + +
+ + +
+ oai:cris.example.org:Persons/2123454 + 2018-01-07T14:00:00Z + openaire_cris_persons +
+ + + + Mikulicic + Marko + + mailto:email@example4.org + tel:+390123456789 + fax:+390123456781 + + +
+ + +
+ oai:cris.example.org:Persons/2123455 + 2018-01-07T14:00:00Z + openaire_cris_persons +
+ + + + Hoogerwerf + Maarten + + + 0000 0003 9448 2436 + info:eu-repo/dai/nl/30407618X + tel:+390123456789 + + +
+ + +
+ oai:cris.example.org:Persons/2123456 + 2018-01-07T14:00:00Z + openaire_cris_persons +
+ + + + Lösch + Mathias + + + +
+ + +
+ oai:cris.example.org:Persons/2123457 + 2018-01-07T14:00:00Z + openaire_cris_persons +
+ + + + Schirrwagen + Jochen + + https://orcid.org/0000-0002-0458-1004 + mailto:email@example7.org + + +
+ + +
+ oai:cris.example.org:Persons/2123458 + 2018-01-07T14:00:00Z + openaire_cris_persons +
+ + + + Callaghan + Sarah + + tel:+390123456789 + + +
+ + +
+ oai:cris.example.org:Persons/2123459 + 2018-01-07T14:00:00Z + openaire_cris_persons +
+ + + + Iatropoulou + Katerina + + + +
+ + +
+ oai:cris.example.org:Persons/21234510 + 2018-01-07T14:00:00Z + openaire_cris_persons +
+ + + + Keramida + Dimitra + + + +
+ + +
+ oai:cris.example.org:Persons/21234511 + 2018-01-07T14:00:00Z + openaire_cris_persons +
+ + + + Rettberg + Najla + + + +
+ + +
+ oai:cris.example.org:Persons/21234512 + 2018-01-07T14:00:00Z + openaire_cris_persons +
+ + + + Singhal + Sonal + + + +
+ + +
+ oai:cris.example.org:Persons/21234513 + 2018-01-07T14:00:00Z + openaire_cris_persons +
+ + + + Moritz + Craig + + + +
+ + +
+ oai:cris.example.org:Persons/2018964 + 2018-01-07T14:00:00Z + openaire_cris_persons +
+ + + + Mazzucco + Laura + + + +
+ + +
+ oai:cris.example.org:Persons/2018965 + 2018-01-07T14:00:00Z + openaire_cris_persons +
+ + + + Bertoni + Marco + + + +
+ + +
+ oai:cris.example.org:Persons/2018966 + 2018-01-07T14:00:00Z + openaire_cris_persons +
+ + + + Pizzi + Marco + + + +
+ + +
+ oai:cris.example.org:Persons/2018967 + 2018-01-07T14:00:00Z + openaire_cris_persons +
+ + + + Zanin + Massimo + + + +
+ +
+
\ No newline at end of file diff --git a/samples/_verb=ListRecords+metadataPrefix=oai_cerif_openaire_v1_1+set=openaire_cris_products.xml b/samples/_verb=ListRecords+metadataPrefix=oai_cerif_openaire_v1_1+set=openaire_cris_products.xml new file mode 100644 index 0000000..8fb4052 --- /dev/null +++ b/samples/_verb=ListRecords+metadataPrefix=oai_cerif_openaire_v1_1+set=openaire_cris_products.xml @@ -0,0 +1,249 @@ + + + + + 2018-01-12T14:00:00Z + http://cris.example.org/openaire/connector + + +
+ oai:cris.example.org:Products/7123451 + 2018-01-07T14:00:00Z + openaire_cris_datasets +
+ + + http://purl.org/coar/resource_type/c_ddb1 + Airborne In-situ Atmospheric Instruments and Hyperspectral Instruments Data from the Projects Funded Under The European Facility for Airborne Research in Environmental and Geo-sciences (EUFAR) Project + http://catalogue.ceda.ac.uk/uuid/d40e4067ae0121b31bb1ba57e04707de + The dataset combines data from the projects and training courses funded under the European Facility for Airborne Research in Environmental and Geo-sciences (EUFAR) project. +EUFAR is an Integrating Activity of the 7th Framework Program of the European Commission. +EUFAR brings together 32 European institutions and companies involved in airborne research, operating 21 instrumented aircraft and providing access to 6 hyperspectral instruments. Data include measurements by airborne in situ atmospheric instuments and hyperspectral instruments operated on board aircraft of the EUFAR fleet during projects funded under the transnational access part of EUFAR and during training events. + + + EUFAR + + + + + SkyArrow 650 TCNS operated by IBIMET CNR + 982340-29481/1999 + The SkyArrow 650 TCNS operated by IBIMET (CNR - Institute of Biometeorology) for the EUFAR project + + + + + Cessna T207A operated by Freie Universität Berlin + 2005:192834/11A + The Cessna T207A operated by Freie Universität Berlin, Institut für Weltraumwissenschaften, for the EUFAR project + + + http://purl.org/coar/access_right/c_16ec + + +
+ +
+ oai:cris.example.org:Products/729487 + 2017-05-23T23:00:00Z + openaire_cris_datasets +
+ + + http://purl.org/coar/resource_type/c_ddb1 + Data from: Strong selection against hybrids maintains a narrow contact zone between morphologically cryptic lineages in a rainforest lizard + 1 + 10.5061/DRYAD.4GH6HF5G + + + + + Singhal + Sonal + + + + + + + Moritz + Craig + + + + + + Hybridization + Speciation + Phylogeography + Reproductive Isolation + Models/Simulations + Australia + Northeast Queensland + Lampropholis coggeri + + +
+ +
+ oai:cris.example.org:Products/729481 + 2017-05-23T23:00:01Z + openaire_cris_datasets +
+ + + http://purl.org/coar/resource_type/c_ddb1 + Genotypes for Lampropholis coggeri + 1 + 10.5061/DRYAD.4GH6HF5G/1 + + + + + Singhal + Sonal + + + + + + + Moritz + Craig + + + + + Hybridization + Speciation + Phylogeography + Reproductive Isolation + Models/Simulations + Australia + Northeast Queensland + Lampropholis coggeri + + + http://purl.org/coar/resource_type/c_ddb1 + Data from: Strong selection against hybrids maintains a narrow contact zone between morphologically cryptic lineages in a rainforest lizard + 1 + 10.5061/DRYAD.4GH6HF5G + + + + +
+ +
+ oai:cris.example.org:Products/729482 + 2017-05-23T23:00:02Z + openaire_cris_datasets +
+ + + http://purl.org/coar/resource_type/c_5ce6 + Base script used for simulations + 1 + 10.5061/DRYAD.4GH6HF5G/2 + + + + + Singhal + Sonal + + + + + + + Moritz + Craig + + + + + Hybridization + Speciation + Phylogeography + Reproductive Isolation + Models/Simulations + Australia + Northeast Queensland + Lampropholis coggeri + + + http://purl.org/coar/resource_type/c_ddb1 + Data from: Strong selection against hybrids maintains a narrow contact zone between morphologically cryptic lineages in a rainforest lizard + 1 + 10.5061/DRYAD.4GH6HF5G + + + + +
+ +
+ oai:cris.example.org:Products/729483 + 2017-05-23T23:00:03Z + openaire_cris_datasets +
+ + + http://purl.org/coar/resource_type/c_ddb1 + Transcriptome for Lampropholis coggeri + 1 + 10.5061/DRYAD.4GH6HF5G/3 + + + + + Singhal + Sonal + + + + + + + Moritz + Craig + + + + + Hybridization + Speciation + Phylogeography + Reproductive Isolation + Models/Simulations + Australia + Northeast Queensland + Lampropholis coggeri + + + http://purl.org/coar/resource_type/c_ddb1 + Data from: Strong selection against hybrids maintains a narrow contact zone between morphologically cryptic lineages in a rainforest lizard + 1 + 10.5061/DRYAD.4GH6HF5G + + + + +
+
+
\ No newline at end of file diff --git a/samples/_verb=ListRecords+metadataPrefix=oai_cerif_openaire_v1_1+set=openaire_cris_projects.xml b/samples/_verb=ListRecords+metadataPrefix=oai_cerif_openaire_v1_1+set=openaire_cris_projects.xml new file mode 100644 index 0000000..4736afe --- /dev/null +++ b/samples/_verb=ListRecords+metadataPrefix=oai_cerif_openaire_v1_1+set=openaire_cris_projects.xml @@ -0,0 +1,262 @@ + + + + + 2018-01-12T14:00:00Z + http://cris.example.org/openaire/connector + + +
+ oai:cris.example.org:Projects/112345 + 2018-01-07T14:00:00Z + openaire_cris_projects +
+ + + OpenAIREplus + 2nd-Generation Open Access Infrastructure for Research in Europe + 283595 + http://www.openaire.eu + 2011-12-01 + 2014-05-31 + + + + NKUA + ΕΘΝΙΚΟ ΚΑΙ ΚΑΠΟΔΙΣΤΡΙΑΚΟ ΠΑΝΕΠΙΣΤΗΜΙΟ ΑΘΗΝΩΝ + NATIONAL AND KAPODISTRIAN UNIVERSITY OF ATHENS + + + + + CNR + CONSIGLIO NAZIONALE DELLE RICERCHE + NATIONAL RESEARCH COUNCIL + + + + + + + EC + European Commission + http://dx.doi.org/10.13039/501100000780 + + + + + https://www.openaire.eu/cerif-profile/vocab/OpenAIRE_Funding_Types#Contract + FP7 funding for the OpenAIREplus project + + + https://www.openaire.eu/cerif-profile/vocab/OpenAIRE_Funding_Types#FundingProgramme + Research infrastructures + + + https://www.openaire.eu/cerif-profile/vocab/OpenAIRE_Funding_Types#FundingProgramme + Capacities + + + https://www.openaire.eu/cerif-profile/vocab/OpenAIRE_Funding_Types#FundingProgramme + FP7 + + + + + + + + + + + + open access + scholarly communication + research + publications + datasets + OpenAIREplus will build a 2nd-Generation Open Access Infrastructure by significantly expanding in several directions the outcomes of the OpenAIRE project, which implements the EC Open Access (OA) pilot. Capitalizing on the OpenAIRE infrastructure, built for managing FP7 and ERC funded articles, and the associated supporting mechanism of the European Helpdesk System, OpenAIREplus will develop an open access, participatory infrastructure for scientific information. + It will significantly expand its base of harvested publications to also include all OA publications indexed by the DRIVER infrastructure (more than 270 validated institutional repositories) and any other repository containing peer-reviewed literature that complies with certain standards. + It will also generically harvest and index the metadata of scientific datasets in selected diverse OA thematic data repositories. It will support the concept of linked publications by deploying novel + services for linking peer-reviewed literature and associated data sets and collections, from link discovery based on diverse forms of mining (textual, usage, etc.), to storage, visual representation, and on-line exploration. It will offer both user-level services to experts and non-scientists + alike as well as programming interfaces for providers of value-added services to build applications on its content. Deposited articles and data will be openly accessible through an enhanced version of + the OpenAIRE portal, together with any available relevant information on associated project funding and usage statistics. + OpenAIREplus will retain its European footprint, engaging people and scientific repositories in almost all 27 EU member states and beyond. The technical work will be complemented by a suite of studies and associated research efforts that will partly proceed in collaboration with different European initiatives and investigate issues of intellectual property rights, + efficient financing models, and standards. + + + +
+ + +
+ oai:cris.example.org:Projects/112346 + 2018-01-07T14:00:00Z + openaire_cris_projects +
+ + + OpenAIRE + Open Access Infrastructure for Research in Europe + Υποδομή Ανοικτής Πρόσβασης για την Έρευνα στην Ευρώπη + 246686 + http://www.openaire.eu + 2009-12-01 + 2012-11-30 + + + + NKUA + ΕΘΝΙΚΟ ΚΑΙ ΚΑΠΟΔΙΣΤΡΙΑΚΟ ΠΑΝΕΠΙΣΤΗΜΙΟ ΑΘΗΝΩΝ + NATIONAL AND KAPODISTRIAN UNIVERSITY OF ATHENS + + + + + CNR + CONSIGLIO NAZIONALE DELLE RICERCHE + NATIONAL RESEARCH COUNCIL + + + + + + + EC + European Commission + http://dx.doi.org/10.13039/501100000780 + + + + + https://www.openaire.eu/cerif-profile/vocab/OpenAIRE_Funding_Types#Contract + FP7 funding for the OpenAIRE project + + + https://www.openaire.eu/cerif-profile/vocab/OpenAIRE_Funding_Types#FundingProgramme + Research infrastructures + + + https://www.openaire.eu/cerif-profile/vocab/OpenAIRE_Funding_Types#FundingProgramme + Capacities + + + https://www.openaire.eu/cerif-profile/vocab/OpenAIRE_Funding_Types#FundingProgramme + FP7 + + + + + + + + + + + + open access + scholarly communication + research + publications + OpenAIRE will deliver an electronic infrastructure and supporting mechanisms for the identification, deposition, access, and monitoring of FP7 and ERC funded articles, where the main supporting mechanism will be the establishment and operation of the European Helpdesk System. Additionally, the project will offer a special repository for articles that can be stored neither in institutional nor in subject-based/thematic repositories, while it will also prepare the + way for similar functionality on scientific data. All deposited articles and data will be freely accessible worldwide through a new portal to the products of EU-funded research, built as part of this project. It will also connect research input (project contracts) with research output (publications and data) and monitor the system use to obtain statistically-significant trends about both. + Thematically, the project will focus on peer-reviewed publications (primarily, journal articles in + final or pre-print form, but also conference articles, when considered important) in at least the seven disciplines highlighted in the Open Access pilot (energy, environment, health, cognitive systems-interaction-robotics, electronic infrastructures, science in society, and socioeconomic sciences-humanities) and on research datasets in a subset of them. + Geographically, however, it will have a definitive European footprint by covering the European Union in its entirety, engaging people and + scientific repositories in almost all 27 member states and beyond. + The electronic infrastructure built by the project will be based on state-of-the-art software services of the D-NET package developed within the DRIVER and DRIVER-II projects and the Invenio digital repository software developed at CERN. These will be further enhanced and complemented with services developed within OpenAIRE to address critical requirements and issues that arise in the target environment and require further + investigation. + + + +
+ + +
+ oai:cris.example.org:Projects/112347 + 2018-01-07T14:00:00Z + openaire_cris_projects +
+ + + EUFAR + European Facility for Airborne Research in Environmental and Geoscience + 227159 + http://www.eufar.net + 2008-09-22 + 2013-09-30 + + + + CNR + CONSIGLIO NAZIONALE DELLE RICERCHE + NATIONAL RESEARCH COUNCIL + http://www.cnr.it + + + + + + + EC + European Commission + http://dx.doi.org/10.13039/501100000780 + + + + + https://www.openaire.eu/cerif-profile/vocab/OpenAIRE_Funding_Types#Contract + FP7 funding for the EUFAR project + + + https://www.openaire.eu/cerif-profile/vocab/OpenAIRE_Funding_Types#FundingProgramme + Research infrastructures + + + https://www.openaire.eu/cerif-profile/vocab/OpenAIRE_Funding_Types#FundingProgramme + Capacities + + + https://www.openaire.eu/cerif-profile/vocab/OpenAIRE_Funding_Types#FundingProgramme + FP7 + + + + + + + + + + + + airborne research + geoscience + EUFAR is the Integrating Activity for airborne research in Geo-science. It will integrate the airborne community, to ensure that researchers may have access to the most suited infrastructure they need, irrespective of the location of the infrastructure. The EUFAR consortium comprises 33 legal entities. 15 operators of airborne facilities, and 18 experts in airborne research. They contribute to 9 Networking Activities, Trans-national Access to 25 installations, + and 3 Joint Research Activities. A Scientific Advisory Committee, constituted of eminent scientists, contributes to a better integration of the users with the operators to tackle new user driven developments. Transnational Access coordination aims at providing a wider and more efficient access to the infrastructures. The working group for the Future of the Fleet fosters the joint development of airborne infrastructures in terms of capacity and performance. The Expert Working Groups + facilitate a wider sharing of knowledge and technologies across fields. The activity for Education and Training provides training courses to new users. The working group on Standards and Protocols contributes to better structure the way research infrastructures operate. The development of a distributed data base for airborne activities improves the access to the data collected by the aircraft. All these activities rely on an unique web portal to airborne research in Europe. The working + group on the Sustainable Structure aims at promoting solutions for the long term sustainability of EUFAR. Among the JRA, one will develop and characterize airborne hygrometers, the second one will develop and implement quality layers in the processing chains of hyperspectral imagery, and the third one will develop an airborne drop spectrometer based on a new principle. + + + + SkyArrow 650 TCNS operated by IBIMET CNR + + + + + Cessna T207A operated by Freie Universität Berlin + + + + + +
+ +
+
\ No newline at end of file diff --git a/samples/_verb=ListRecords+metadataPrefix=oai_cerif_openaire_v1_1+set=openaire_cris_publications.xml b/samples/_verb=ListRecords+metadataPrefix=oai_cerif_openaire_v1_1+set=openaire_cris_publications.xml new file mode 100644 index 0000000..fd3e752 --- /dev/null +++ b/samples/_verb=ListRecords+metadataPrefix=oai_cerif_openaire_v1_1+set=openaire_cris_publications.xml @@ -0,0 +1,538 @@ + + + + + 2018-01-12T14:00:00Z + http://cris.example.org/openaire/connector + + +
+ oai:cris.example.org:Publications/812348 + 2018-01-07T14:00:00Z + openaire_cris_publications +
+ + + http://purl.org/coar/resource_type/c_6501 + en + Linking Data and Publications: Towards a Cross-Disciplinary Approach + + + http://purl.org/coar/resource_type/c_0640 + The International Journal of Digital Curation + 1746-8256 + + + 2013-06-14 + 8 + 1 + 244 + 254 + 10.2218/ijdc.v8i1.257 + + + Maarten Hoogerwerf + + + Hoogerwerf + Maarten + + + + + Mathias Lösch + + + Lösch + Mathias + + + + + Jochen Schirrwagen + + + Schirrwagen + Jochen + + + + + Sarah Callaghan + + + Callaghan + Sarah + + + + + Paolo Manghi + + + Manghi + Paolo + + https://orcid.org/0000-0001-7291-3210 + + + + Katerina Iatropoulou + + + Iatropoulou + Katerina + + + + + Dimitra Keramida + + + Keramida + Dimitra + + + + + Najla Rettberg + + + Rettberg + Najla + + + + + CCAttribution(CCBY) + In this paper, we tackle the challenge of linking scholarly information in multi-disciplinary research infrastructures. There is a trend towards linking + publications with research data and other information, but, as it is still emerging, this is handled differently by various initiatives and disciplines. For OpenAIRE, a European + cross-disciplinary publication infrastructure, this poses the challenge of supporting these heterogeneous practices. Hence, OpenAIRE wants to contribute to the development of a common approach + for discipline-independent linking practices between publications, data, project information and researchers. To this end, we constructed two demonstrators to identify commonalities and + differences. The results show the importance of stable and unique identifiers, and support a “by reference” approach of interlinking research results. This approach allows discipline-specific + research information to be managed independently in distributed systems and avoids redundant maintenance. Furthermore, it allows these disciplinary systems to manage the specialized structures + of their contents themselves. + + + + OpenAIREplus + 2nd-Generation Open Access Infrastructure for Research in Europe + 283595 + 2011-12-01 + 2014-05-31 + + + + EC + European Commission + http://dx.doi.org/10.13039/501100000780 + + + + + + + + + + http://purl.org/coar/access_right/c_f1cf + + +
+ + +
+ oai:cris.example.org:Publications/894490 + 2018-01-07T14:00:00Z + openaire_cris_publications +
+ + + http://purl.org/coar/resource_type/c_0640 + The International Journal of Digital Curation + 1746-8256 + http://purl.org/coar/access_right/c_14cb + + +
+ + +
+ oai:cris.example.org:Publications/894491 + 2018-01-07T14:00:00Z + openaire_cris_publications +
+ + + http://purl.org/coar/resource_type/c_3e5a + The International Journal of Digital Curation: Special Issue on Open Access Repositories + + + http://purl.org/coar/resource_type/c_0640 + The International Journal of Digital Curation + 1746-8256 + + + + + + + Manghi + Paolo + + https://orcid.org/0000-0001-7291-3210 + + + + + + OpenAIREplus + 2nd-Generation Open Access Infrastructure for Research in Europe + 283595 + 2011-12-01 + 2014-05-31 + + + + EC + European Commission + http://dx.doi.org/10.13039/501100000780 + + + + + + + + + + +
+ +
+ oai:cris.example.org:Publications/4123451 + 2018-01-07T14:00:00Z + openaire_cris_publications +
+ + + http://purl.org/coar/resource_type/c_5794 + en + The Data Model of the OpenAIRE Scientific Communication e-Infrastructure + + + http://purl.org/coar/resource_type/c_f744 + Metadata and Semantics Research + 6th Research Conference, MTSR 2012, Cádiz, Spain, November 28-30, 2012. Proceedings + 10.1007/978-3-642-35233-1 + 978-3-642-35232-4 + 978-3-642-35233-1 + + + + Springer + + + + cultural heritage + digital libraries + learning objects + linked open data + scholarly publications + + + https://w3id.org/cerif/vocab/EventTypes#Conference + MTSR 2012 + 6th Research Conference on Metadata and Semantics Research + + + + + 2012-11-30 + 343 + 168 + 180 + 10.1007/978-3-642-35233-1_18 + + + Paolo Manghi + + + Manghi + Paolo + + https://orcid.org/0000-0001-7291-3210 + + + + CNR + + + + + Nikos Houssos + + + Houssos + Nikos + + https://orcid.org/0000-0002-5277-285X + + + + EKT + + + + + Marko Mikulicic + + + Mikulicic + Marko + + + + + Brigitte Jörg + + + Jörg + Brigitte + + https://orcid.org/0000-0001-7941-8108 + + + + UKOLN + + + + + open access + infrastructure + data model + CERIF + DataCite + The OpenAIREplus project aims to further develop and operate the OpenAIRE e-infrastructure, in order to provide a central entry point to Open Access and + non-Open Access publications and datasets funded by the European Commission and National agencies. The infrastructure provides the services to populate, curate, and enrich an Information Space + by collecting metadata descriptions relative to organizations, data sources, projects, funding programmes, persons, publications, and datasets. Stakeholders in the research process and + scientific communication, such as researchers, funding agencies, organizations involved in projects, project coordinators, can here find the information to improve their research and statistics + to measure the impact of Open Access and funding schemes over research. In this paper, we introduce the functional requirements to be satisfied and describe the OpenAIREplus data model entities + and relationships required to represent information capable of meeting them. + + + + OpenAIREplus + 2nd-Generation Open Access Infrastructure for Research in Europe + 283595 + 2011-12-01 + 2014-05-31 + + + + EC + European Commission + http://dx.doi.org/10.13039/501100000780 + + + + + + + + + + +
+ +
+ oai:cris.example.org:Publications/852734 + 2016-01-07T14:00:00Z + openaire_cris_publications +
+ + + http://purl.org/coar/resource_type/c_6501 + Strong selection against hybrids maintains a narrow contact zone between morphologically cryptic lineages in a rainforest lizard + + + http://purl.org/coar/resource_type/c_0640 + Evolution + 1558-5646 + + + + Society for the Study of Evolution + + + + + + 66 + 5 + 1474 + 1489 + 10.1111/J.1558-5646.2011.01539.X + + + Sonal Singhal + + + Singhal + Sonal + + + + + Museum of Vertebrate Zoology + + + University of California, Berkeley + + + + + + + Department of Integrative Biology + + + University of California, Berkeley + + + + + + + Craig Moritz + + + Moritz + Craig + + + + + Museum of Vertebrate Zoology + + + University of California, Berkeley + + + + + + + Department of Integrative Biology + + + University of California, Berkeley + + + + + + + hybrid zones + phylogeography + speciation + Lampropholis coggeri + simulations + Phenotypically cryptic lineages comprise an important yet understudied part of biodiversity; in particular, we have much to + learn about how these lineages are formed and maintained. To better understand the evolutionary significance of such lineages, + we studied a hybrid zone between two morphologically cryptic phylogeographic lineages in the rainforest lizard, Lampropholis + coggeri. Analyzing a multilocus genetic dataset through cline inference, individual-based methods and population measures of + disequilibrium and using simulations to explore our genetic results in context of theoretical expectations, we inferred the processes + maintaining this hybrid zone. We find that these lineages meet in a hybrid zone that is narrow (≈400 m) relative to inferred + dispersal rate. Further, the hybrid zone exhibits substantial genetic disequilibrium and sharply coincident and largely concordant + clines. Based on our knowledge about the region’s biogeography, the species’ natural history, and our simulation results, we + suggest that strong selection against hybrids structures this system. As all clines show a relatively narrow range of introgression, + we posit that this hybrid zone might not yet be in equilibrium. Nonetheless, our results clearly show that phylogeographic lineages + can evolve substantial reproductive isolation without concomitant morphological diversification, suggesting that such lineages + can constitute a significant component of evolutionary diversity. + + + http://purl.org/coar/resource_type/c_ddb1 + Data from: Strong selection against hybrids maintains a narrow contact zone between morphologically cryptic lineages in a rainforest lizard + 1 + 10.5061/DRYAD.4GH6HF5G + + + + +
+ + +
+ oai:cris.example.org:Publications/893204 + 2016-01-07T14:00:00Z + openaire_cris_publications +
+ + + http://purl.org/coar/resource_type/c_0640 + Evolution + 1558-5646 + + + + Society for the Study of Evolution + + + + + +
+ +
+ oai:cris.example.org:Publications/895501 + 2016-01-07T14:00:00Z + openaire_cris_publications +
+ + + http://purl.org/coar/resource_type/c_f744 + Metadata and Semantics Research + 6th Research Conference, MTSR 2012, Cádiz, Spain, November 28-30, 2012. Proceedings + 10.1007/978-3-642-35233-1 + 978-3-642-35232-4 + 978-3-642-35233-1 + + + Springer, Berlin, Heidelberg + + Springer + + + + cultural heritage + digital libraries + learning objects + linked open data + scholarly publications + + + https://w3id.org/cerif/vocab/EventTypes#Conference + MTSR 2012 + 6th Research Conference on Metadata and Semantics Research + + + + +
+ +
+ oai:cris.example.org:Publications/899999 + 2018-05-15T14:00:00Z + openaire_cris_publications +
+
+
+
\ No newline at end of file From 454e8a1a0270a6c671ee9b42a6bf904a88b6ac67 Mon Sep 17 00:00:00 2001 From: Jan Dvorak Date: Tue, 20 Jun 2023 23:34:35 +0200 Subject: [PATCH 06/36] Add method CheckingIterable.map() --- .../cris/validator/util/CheckingIterable.java | 38 +++++++++++++++++++ .../validator/util/CheckingIterableTest.java | 12 ++++++ 2 files changed, 50 insertions(+) diff --git a/src/main/java/org/eurocris/openaire/cris/validator/util/CheckingIterable.java b/src/main/java/org/eurocris/openaire/cris/validator/util/CheckingIterable.java index b191ac7..2ab2412 100644 --- a/src/main/java/org/eurocris/openaire/cris/validator/util/CheckingIterable.java +++ b/src/main/java/org/eurocris/openaire/cris/validator/util/CheckingIterable.java @@ -61,6 +61,44 @@ protected void close() { }; } + + /** + * When iterating, call the given function on each element. + * The result of this call is sent further up the CheckingIterable chain. + * @param the target class of the mapping + * @param f the function to apply + * @return a CheckingIterable + */ + public CheckingIterable map( final Function f ) { + final CheckingIterable parentChecker = this; + return new CheckingIterable() { + + @Override + public Iterator iterator() { + final Iterator parentIterator = parentChecker.iterator(); + return new Iterator() { + + @Override + public boolean hasNext() { + return parentIterator.hasNext(); + } + + @Override + public U next() { + final T x = parentIterator.next(); + return f.apply( x ); + } + + }; + } + + @Override + protected void close() { + parentChecker.close(); + } + + }; + } /** * Build a CheckingIterable which checks that the collection contains at least one element for which the given predicate is true. diff --git a/src/test/java/org/eurocris/openaire/cris/validator/util/CheckingIterableTest.java b/src/test/java/org/eurocris/openaire/cris/validator/util/CheckingIterableTest.java index c5afeaa..6eabd69 100644 --- a/src/test/java/org/eurocris/openaire/cris/validator/util/CheckingIterableTest.java +++ b/src/test/java/org/eurocris/openaire/cris/validator/util/CheckingIterableTest.java @@ -212,6 +212,18 @@ public void testForAllEqualsFail() { runChecker( list, c1 ); } + /** + * Test that {@link CheckingIterable#map(Function)} works: convert to uppercase. + */ + @Test + public void testMapOk() { + final List list = Arrays.asList( "hello", "beautiful", "world" ); + final CheckingIterable c0 = CheckingIterable.over( list ); + final CheckingIterable c1 = c0.map( String::toUpperCase ); + final CheckingIterable c2 = c1.checkForAllEquals( String::toUpperCase, String::toString, "Entries should be uppercased" ); + runChecker( list, c2 ); + } + /** * Run the checker and see if the number of elements is preserved. * @param list the list the checker was constructed from From 63a6768eff27d39023619bfce0c420e57f9831ac Mon Sep 17 00:00:00 2001 From: Jan Dvorak Date: Tue, 20 Jun 2023 23:36:11 +0200 Subject: [PATCH 07/36] Add cached schemas to this project --- pom.xml | 20 +- src/main/xjc/bindings.xjc | 2 +- src/main/xjc/schemas/cached/OAI-PMH.xsd | 317 +++ src/main/xjc/schemas/cached/XMLSchema.xsd | 1896 +++++++++++++++++ src/main/xjc/schemas/cached/catalog.xml | 25 + .../xjc/schemas/cached/iso-schematron.xsd | 733 +++++++ .../xjc/schemas/cached/oai-identifier.xsd | 47 + .../schemas/cached/schematron-quickFix.xsd | 566 +++++ src/main/xjc/schemas/cached/xml.xsd | 287 +++ 9 files changed, 3881 insertions(+), 12 deletions(-) create mode 100644 src/main/xjc/schemas/cached/OAI-PMH.xsd create mode 100644 src/main/xjc/schemas/cached/XMLSchema.xsd create mode 100644 src/main/xjc/schemas/cached/catalog.xml create mode 100644 src/main/xjc/schemas/cached/iso-schematron.xsd create mode 100644 src/main/xjc/schemas/cached/oai-identifier.xsd create mode 100644 src/main/xjc/schemas/cached/schematron-quickFix.xsd create mode 100644 src/main/xjc/schemas/cached/xml.xsd diff --git a/pom.xml b/pom.xml index 5b7e407..00da6eb 100644 --- a/pom.xml +++ b/pom.xml @@ -50,7 +50,6 @@ UTF-8 - org.jvnet.jaxb2.maven2 maven-jaxb2-plugin @@ -72,11 +71,10 @@
true - ${guidelines.project.dir}/schemas + src/main/xjc/schemas - cached/oai-identifier.xsd - cached/OAI-PMH.xsd - + cached/oai-identifier.xsd + cached/OAI-PMH.xsd src/main/xjc @@ -127,17 +125,17 @@ copy-resources - ${basedir}/target/classes + ${basedir}/target/classes/schemas - src/main/resources/schemas/ + src/main/resources/schemas/cached **/*.xsd - schemas + cached - ${guidelines.project.dir}/schemas/ + ${guidelines.project.dir}/schemas/cached **/*.xsd - schemas + cached @@ -170,7 +168,7 @@ - ${guidelines.project.dir}/schemas/cached/catalog.xml + file:./schemas/cached/catalog.xml ${guidelines.project.dir}/schemas/catalog.xml diff --git a/src/main/xjc/bindings.xjc b/src/main/xjc/bindings.xjc index a89ab7e..355e285 100644 --- a/src/main/xjc/bindings.xjc +++ b/src/main/xjc/bindings.xjc @@ -1,6 +1,6 @@ - + diff --git a/src/main/xjc/schemas/cached/OAI-PMH.xsd b/src/main/xjc/schemas/cached/OAI-PMH.xsd new file mode 100644 index 0000000..3fce3b5 --- /dev/null +++ b/src/main/xjc/schemas/cached/OAI-PMH.xsd @@ -0,0 +1,317 @@ + + + + + XML Schema which can be used to validate replies to all OAI-PMH + v2.0 requests. Herbert Van de Sompel, 2002-05-13. + Validated with XML Spy v.4.3 on 2002-05-13. + Validated with XSV 1.203.2.45/1.106.2.22 on 2002-05-13. + Added definition of protocolVersionType instead of using anonymous + type. No change of function. Simeon Warner, 2004-03-29. + Tightened definition of UTCdatetimeType to enforce the restriction + to UTC Z notation. Simeon Warner, 2004-09-14. + Corrected pattern matches for setSpecType and metadataPrefixType + to agree with protocol specification. Simeon Warner, 2004-10-12. + Spelling correction. Simeon Warner, 2008-12-07. + $Date: 2004/10/12 15:20:29 $ + + + + + + + + + + + + + + + + + + + + + + + + Define requestType, indicating the protocol request that + led to the response. Element content is BASE-URL, attributes are arguments + of protocol request, attribute-values are values of arguments of protocol + request + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + A record has a header, a metadata part, and + an optional about container + + + + + + + + + + + A header has a unique identifier, a datestamp, + and setSpec(s) in case the item from which + the record is disseminated belongs to set(s). + the header can carry a deleted status indicating + that the record is deleted. + + + + + + + + + + + + + + + + + + + + + + Metadata must be expressed in XML that complies + with another XML Schema (namespace=#other). Metadata must be + explicitly qualified in the response. + + + + + + + + + Data "about" the record must be expressed in XML + that is compliant with an XML Schema defined by a community. + + + + + + + + + A resumptionToken may have 3 optional attributes + and can be used in ListSets, ListIdentifiers, ListRecords + responses. + + + + + + + + + + + + + The descriptionType is used for the description + element in Identify and for setDescription element in ListSets. + Content must be compliant with an XML Schema defined by a + community. + + + + + + + + + Datestamps are to either day (type date) + or to seconds granularity (type oai:UTCdateTimeZType) + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/src/main/xjc/schemas/cached/XMLSchema.xsd b/src/main/xjc/schemas/cached/XMLSchema.xsd new file mode 100644 index 0000000..f02a579 --- /dev/null +++ b/src/main/xjc/schemas/cached/XMLSchema.xsd @@ -0,0 +1,1896 @@ + + + + + Part 1 version: structures.xsd (rec-20120405) + Part 2 version: datatypes.xsd (rec-20120405) + + + + + + The schema corresponding to this document is normative, + with respect to the syntactic constraints it expresses in the + XML Schema Definition Language. The documentation (within 'documentation' elements) + below, is not normative, but rather highlights important aspects of + the W3C Recommendation of which this is a part. + + See below (at the bottom of this document) for information about + the revision and namespace-versioning policy governing this + schema document. + + + + + + The simpleType element and all of its members are defined + towards the end of this schema document. + + + + + Get access to the xml: attribute groups for xml:lang + as declared on 'schema' and 'documentation' below + + + + + + + This type is extended by almost all schema types + to allow attributes from other namespaces to be + added to user schemas. + + + + + + + + + + + + This type is extended by all types which allow annotation + other than <schema> itself + + + + + + + + + + + + + + + + + + + + + + + + This group is for the + elements which occur freely at the top level of schemas. + All of their types are based on the "annotated" type by extension. + + + + + + + + + + + + This group is for the + elements which can self-redefine (see <redefine> below). + + + + + + + + + + + + A utility type, not for public use + + + + + + + + + + A utility type, not for public use + + + + + + + + + + A utility type, not for public use + + #all or (possibly empty) subset of {extension, restriction} + + + + + + + + + + + + + + + + A utility type, not for public use + + + + + + + + + + + + A utility type, not for public use + + #all or (possibly empty) subset of {extension, restriction, list, union} + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + for maxOccurs + + + + + + + + + + + + + for all particles + + + + + + + + for element, group and attributeGroup, + which both define and reference + + + + + + + + 'complexType' uses this + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + This branch is short for + <complexContent> + <restriction base="xs:anyType"> + ... + </restriction> + </complexContent> + + + + + + + + + + + + + + + + Will be restricted to required or prohibited + + + + + + Not allowed if simpleContent child is chosen. + May be overridden by setting on complexContent child. + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + This choice is added simply to + make this a valid restriction per the REC + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + Overrides any setting on complexType parent. + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + This choice is added simply to + make this a valid restriction per the REC + + + + + + + + + + + + + + + + + No typeDefParticle group reference + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + A utility type, not for public use + + #all or (possibly empty) subset of {substitution, extension, + restriction} + + + + + + + + + + + + + + + + + + + + + + + + The element element can be used either + at the top level to define an element-type binding globally, + or within a content model to either reference a globally-defined + element or type or declare an element-type binding locally. + The ref form is not allowed at the top level. + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + This type is used for 'alternative' elements. + + + + + + + + + + + + + + + + + + group type for explicit groups, named top-level groups and + group references + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + group type for the three kinds of group + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + This choice with min/max is here to + avoid a pblm with the Elt:All/Choice/Seq + Particle derivation constraint + + + + + + + + + + + + + + + + + + + + + + + Only elements allowed inside + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + simple type for the value of the 'namespace' attr of + 'any' and 'anyAttribute' + + + + Value is + ##any - - any non-conflicting WFXML/attribute at all + + ##other - - any non-conflicting WFXML/attribute from + namespace other than targetNS + + ##local - - any unqualified non-conflicting WFXML/attribute + + one or - - any non-conflicting WFXML/attribute from + more URI the listed namespaces + references + (space separated) + + ##targetNamespace or ##local may appear in the above list, to + refer to the targetNamespace of the enclosing + schema or an absent targetNamespace respectively + + + + + A utility type, not for public use + + + + + + + + A utility type, not for public use + + + + + + + + + + + + + + + + + + A utility type, not for public use + + + + + + + + + + A utility type, not for public use + + + + + + + + + + + + + + + + + + + A utility type, not for public use + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + A subset of XPath expressions for use +in selectors + A utility type, not for public +use + + + + + + + + + + + + + + + + + + + + + A subset of XPath expressions for use +in fields + A utility type, not for public +use + + + + + + + + + + + + + + + + + + + + + + + + + The three kinds of identity constraints, all with + type of or derived from 'keybase'. + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + A utility type, not for public use + + A public identifier, per ISO 8879 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + notations for use within schema documents + + + + + + + Not the real urType, but as close an approximation as we can + get in the XML representation + + + + + + + + + + In keeping with the XML Schema WG's standard versioning policy, + the material in this schema document will persist at the URI + http://www.w3.org/2012/04/XMLSchema.xsd. + + At the date of issue it can also be found at the URI + http://www.w3.org/2009/XMLSchema/XMLSchema.xsd. + + The schema document at that URI may however change in the future, + in order to remain compatible with the latest version of XSD + and its namespace. In other words, if XSD or the XML Schema + namespace change, the version of this document at + http://www.w3.org/2009/XMLSchema/XMLSchema.xsd will change accordingly; + the version at http://www.w3.org/2012/04/XMLSchema.xsd will not change. + + Previous dated (and unchanging) versions of this schema document + include: + + http://www.w3.org/2012/01/XMLSchema.xsd + (XSD 1.1 Proposed Recommendation) + + http://www.w3.org/2011/07/XMLSchema.xsd + (XSD 1.1 Candidate Recommendation) + + http://www.w3.org/2009/04/XMLSchema.xsd + (XSD 1.1 Candidate Recommendation) + + http://www.w3.org/2004/10/XMLSchema.xsd + (XSD 1.0 Recommendation, Second Edition) + + http://www.w3.org/2001/05/XMLSchema.xsd + (XSD 1.0 Recommendation, First Edition) + + + + + + + + + + + + A utility type, not for public use + + + + + + + + + + + + + + + + + + + + #all or (possibly empty) subset of {restriction, extension, union, list} + + + A utility type, not for public use + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + Can be restricted to required or forbidden + + + + + + + + + + + + + + + + + Required at the top level + + + + + + + + + + + + + + + + + + Forbidden when nested + + + + + + + + + + + + + + + + + An abstract element, representing facets in general. + The facets defined by this spec are substitutable for + this element, and implementation-defined facets should + also name this as a substitution-group head. + + + + + + + + + + + + + + + + + base attribute and simpleType child are mutually + exclusive, but one or other is required + + + + + + + + + + + + + + + itemType attribute and simpleType child are mutually + exclusive, but one or other is required + + + + + + + + + + + + + + + + + memberTypes attribute must be non-empty or there must be + at least one simpleType child + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + In keeping with the XML Schema WG's standard versioning policy, + this schema document will persist at the URI + http://www.w3.org/2012/04/datatypes.xsd. + + At the date of issue it can also be found at the URI + http://www.w3.org/2009/XMLSchema/datatypes.xsd. + + The schema document at that URI may however change in the future, + in order to remain compatible with the latest version of XSD + and its namespace. In other words, if XSD or the XML Schema + namespace change, the version of this document at + http://www.w3.org/2009/XMLSchema/datatypes.xsd will change accordingly; + the version at http://www.w3.org/2012/04/datatypes.xsd will not change. + + Previous dated (and unchanging) versions of this schema document + include: + + http://www.w3.org/2012/01/datatypes.xsd + (XSD 1.1 Proposed Recommendation) + + http://www.w3.org/2011/07/datatypes.xsd + (XSD 1.1 Candidate Recommendation) + + http://www.w3.org/2009/04/datatypes.xsd + (XSD 1.1 Candidate Recommendation) + + http://www.w3.org/2004/10/datatypes.xsd + (XSD 1.0 Recommendation, Second Edition) + + http://www.w3.org/2001/05/datatypes.xsd + (XSD 1.0 Recommendation, First Edition) + + + + + + + diff --git a/src/main/xjc/schemas/cached/catalog.xml b/src/main/xjc/schemas/cached/catalog.xml new file mode 100644 index 0000000..d5bd499 --- /dev/null +++ b/src/main/xjc/schemas/cached/catalog.xml @@ -0,0 +1,25 @@ + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/src/main/xjc/schemas/cached/iso-schematron.xsd b/src/main/xjc/schemas/cached/iso-schematron.xsd new file mode 100644 index 0000000..4cb3201 --- /dev/null +++ b/src/main/xjc/schemas/cached/iso-schematron.xsd @@ -0,0 +1,733 @@ + + + + + + + Get access to the xml: attribute groups for xml:lang + + + + + + + + + + The top-level element of a Schematron schema. + + + + + + + + + + + + + + + + + This attribute enables unique identification of the element. According + to XML specification the value of an attribute of ID type can contain only characters + permitted for NMTOKEN and must start with a letter. No element type may have more than + one ID attribute specified. The value of an ID attribute must be unique between all + values of all ID attributes. + + + + + + The optional schemaVersion attribute gives the version of the schema. + Its allowed values are not defined by this part of ISO/IEC 19757 and its use is + implementation-dependent. + + + + + The defaultPhase attribute may be used to indicate the phase to use in + the absence of explicit user-supplied information. + + + + + The optional queryBinding attribute provides the short name of the query + language binding in use. If this attribute is specified, it is an error if it has a + value that the current implementation does not support. + + + + + + + + Defines the pattern that is active in the current phase. + + + + + + + + + + + The required pattern attribute is a reference to a pattern that is + active in the current phase. + + + + + + + + An assertion made about the context nodes. The data content is a + natural-language assertion. The natural-language assertion shall be a positive statement of + a constraint.
NOTE:
The natural-language assertion may contain information about + actual values in addition to expected values and may contain diagnostic information. Users + should note, however, that the diagnostic element is provided for such information to + encourage clear statement of the natural-language assertion.
+
+
+ + + + + + + + + + + + The required test attribute is an assertion test evaluated in the + current context. If the test evaluates positive, the assert succeeds. + + + + + The flag attribute allows more detailed outcomes. A boolean variable + with initial value false. A flag is implicitly declared by an assertion or rule having a + flag attribute with that name. The value of a flag becomes true when an assertion with + that flag fails or a rule with that flag fires. The purpose of flags is to convey state + or severity information to a subsequent process. + + + + + The unique identifier with the schema for the element. + + + + + + The optional diagnostics attribute is a reference to further diagnostic + information. + + + + + + + + + + A natural-language message giving more specific details concerning a failed + assertion, such as found versus expected values and repair hints. NOTE:
In multiple + languages may be supported by using a different diagnostic element for each language, with + the appropriate xml:lang language attribute, and referencing all the unique identifiers of + the diagnostic elements in the diagnostics attribute of the assertion.
An + implementation is not required to make use of this element.
+
+ + + + + + + + + + + The unique identifier with the schema for the diagnostic element. + + + + + + +
+ + + Section containing individual diagnostic elements. An implementation is not + required to make use of this element. + + + + + + + + + + + + + A section of natural-language text with a direction specified by the value + attribute.
An implementation is not required to make use of this element. +
+
+ + + + + Specify the direction of the text. The value ltr indicates + left-to-right text; the value rtl indicates right-to-left text. + + + + + + The value ltr indicates left-to-right text. + + + + + The value rtl indicates right-to-left text. + + + + + + + +
+ + + A portion of text that should be rendered with some emphasis. An + implementation is not required to make use of this element. + + + + + + + + + + + + + A declaration of a named variable. If the let element is the child of a + rule element, the variable is calculated and scoped to the current rule and context. + Otherwise, the variable is calculated with the context of the instance document root.
+ The variable is substituted into assertion tests and other expressions in the same rule + before the test or expression is evaluated.
+
+ + + + The required name attribute is the name of the variable. + + + + + + The required value attribute is an expression evaluated in the current + context. + + + + +
+ + + Provides the names of nodes from the instance document to allow clearer + assertions and diagnostics.
An implementation which does not report natural-language + assertions is not required to make use of this element.
+
+ + + + The optional path attribute is an expression evaluated in the current + context that returns a string that is the name of a node. In the latter case, the name + of the node is used. + + + + +
+ + + Specification of a namespace prefix and URI. NOTE:
Because the + characters allowed as names may change in versions of XML subsequent to W3C XML 1.0, the + RELAX NG Compact schema for Schematron does not constrain the prefix to particular + characters. In an ISO Schematron schema, namespace prefixes in context expressions, + assertion tests and other query expressions should use the namespace bindings provided by + this element. Namespace prefixes should not use the namespace bindings in scope for element + and attribute names.
+
+ + + + The required uri attribute is a namespace URI. + + + + + The required prefix attribute is an XML name with no colon character. + + + + + +
+ + + A paragraph of natural language text containing maintainer and user + information about the parent element.
An implementation is not required to make use of + this element.
+
+ + + + + + + + + + The unique identifier with the schema for the p element. + + + + + + The schema can nominate paragraphs that should be rendered in a + distinct way, keyed with the class attribute. + + + + + The location of a graphics file containing some visible representation + of the severity, significance or other grouping of the associated element.
An + implementation is not required to make use of this attribute.
+
+
+ +
+
+ + + A name-value pair providing parameters for an abstract pattern. + + + + + + The required name attribute is an XML name with no colon. + + + + + + The required value attribute is a fragment of a query. + + + + + + + + + A structure, simple or complex. A set of rules giving constraints that are + in some way related. The id attribute provides a unique name for the pattern and is required + for abstract patterns.
When a pattern element has the attribute abstract with a value + true, then the pattern defines an abstract pattern. An abstract pattern shall not have a + is-a attribute and shall have an id attribute.
When a pattern element has the attribute + is-a with a value specifying the name of an abstract pattern, then the pattern is an + instance of an abstract pattern. Such a pattern shall not contain any rule elements, but + shall have param elements for all parameters used in the abstract + pattern.
+
+ + + + + + + + + + + + + + + If true defines an abstract pattern. Possible values are true and + false. + + + + + + Defines an abstract pattern. + + + + + Specifies that the pattern is not abstract. + + + + + + + + The id attribute provides a unique name for the pattern and is required + for abstract patterns. + + + + + When a pattern element has the attribute is-a with a value specifying + the name of an abstract pattern, then the pattern is an instance of an abstract pattern. + + + + +
+ + + A grouping of patterns, to name and declare variations in schemas, for + example, to support progressive validation. The implementation determines which phase to use + for validating documents, for example by user command.
Two names, #ALL and #DEFAULT, + have special meanings. The name #ALL is reserved and available for use by implementations to + denote that all patterns are active. The name #DEFAULT is reserved and available for use by + implementations to denote that the name given in in the defaultPhase attribute on the schema + element should be used. If no defaultPhase is specified, then all patterns are active. + NOTE:
The names #ALL and #DEFAULT shall not be used in a Schematron schema. They are + for use when invoking or configuring schema validation, for example as a command-line + parameter.
The icon, see and fpi attributes allow rich interfaces and documentation. +
+
+ + + + + + + + + + + The required id attribute is the name of the phase. + + + + + +
+ + + An assertion made about the context nodes. The data content is a + natural-language assertion.
The natural-language assertion shall be a positive + statement of a found pattern or a negative statement of a constraint. NOTE:
The + natural-language assertion may contain information about actual values in addition to + expected values and may contain diagnostic information. Users should note, however,that the + diagnostic element is provided for such information to encourage clear statement of the + natural-language assertion.
+
+
+ + + A list of assertions tested within the context specified by the required + context attribute. NOTE:
It is not an error if a rule never fires in a document. In + order to test that a document always has some context, a new pattern should be created from + the context of the document, with an assertion requiring the element or attribute.
When + the rule element has the attribute abstract with a value true, then the rule is an abstract + rule. An abstract rule shall not have a context attribute. An abstract rule is a list of + assertions that will be invoked by other rules belonging to the same pattern using the + extends element. Abstract rules provide a mechanism for reducing schema size. +
+
+ + + + + + + + + + Abstract rules are named lists of assertions without a context expression. + The current rule uses all the assertions from the abstract rule it extends. + + + + + + The required rule attribute references an abstract rule. + + + + + + + + + + The flag attribute allows more detailed outcomes. + + + + + + + + When the rule element has the attribute abstract with a value true, + then the rule is an abstract rule. + + + + + + Declares an abstract rule. + + + + + Explicitely specify that the rule is not abstract. + + + + + + + + + The unique identifier with the schema for the rule element. + + + + + + The context attribute specifies the rule context expression. + + + + +
+ + + A portion of some paragraph that should be rendered in a distinct way, + keyed with the class attribute.
An implementation is not required to make use of this + element.
+
+ + + + + An attribute that can be used for stylesheet style + + + + +
+ + + A summary of the purpose or role of the schema or pattern, for the purpose + of documentation or a rich user interface.
An implementation is not required to make + use of this element.
+
+ + + + + + +
+ + + Finds or calculates values from the instance document to allow clearer + assertions and diagnostics.
Variable references in the select attribute are resolved + in the scope of the current schema, phase, pattern and rule.
An implementation which + does not report natural-language assertions is not required to make use of this + element.
+
+
+ + + + The required select attribute is an expression evaluated in the current + context that returns a string. + + + + +
+ + + + The required href attribute references an external well-formed XML document + whose document element is a Schematron element of a type which allowed by the grammar for + Schematron at the current position in the schema. The external document is inserted in place + of the include element. + + + + + References an external well-formed XML document. + + + + + + + + +

This element allows you to include components from another Schematron module.

+ +

The required href attribute references an external Schematron document. + The result is the inclusion of the top-level components from the referred Schematron document into the current document.

+ +

WARNING: This element is experimental and it isn't included in ISO Schematron standard.

+
+
+ + + + References an external well-formed XML document. + + + +
+ + + + + The location of a graphics file containing some visible representation of + the severity, significance or other grouping of the associated element. + + + + + + The URI of external information of interest to maintainers and users of + the schema. + + + + + A formal public identifier for the schema, phase or other element. + + + + + + + + + + A name describing the function of the assertion or context node in the + pattern. If the assertion has a subject attribute, then the role labels the arc between + the context node and any nodes which match the path expression given by the subject + attribute. + + + + + A path allowing more precise specification of nodes. The path expression + is evaluated in the context of the context node of the current rule. If no subject + attribute is specified, the current subject node may be used. + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
diff --git a/src/main/xjc/schemas/cached/oai-identifier.xsd b/src/main/xjc/schemas/cached/oai-identifier.xsd new file mode 100644 index 0000000..a6301f4 --- /dev/null +++ b/src/main/xjc/schemas/cached/oai-identifier.xsd @@ -0,0 +1,47 @@ + + + + + Schema for description section of Identify reply of OAI-PMH v2.0. + For repositories that comply with the oai format for unique identifiers + for items records. + See: http://www.openarchives.org/OAI/2.0/guidelines-oai-identifier.htm + Validated with http://www.w3.org/2001/03/webdata/xsv on 2002-05-16 + Corrected to handle single letter elements in domain name, e.g ebibpol.p.lodz.pl 2007-05-22 + Simeon Warner $Date: 2007-06-07 19:28:11 $ + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/src/main/xjc/schemas/cached/schematron-quickFix.xsd b/src/main/xjc/schemas/cached/schematron-quickFix.xsd new file mode 100644 index 0000000..d96adb6 --- /dev/null +++ b/src/main/xjc/schemas/cached/schematron-quickFix.xsd @@ -0,0 +1,566 @@ + + + + + + + + + + + Schematron QuickFix reference + + + Schematron QuickFix Referenz + + + + + In this documentation the following expressions will be used. The table bellow shows the definitions of these expressions: + A possible fix for a Schematron report or assert. An implementation should provide it to the user (per default) for each reported assert or report. The QuickFix will be executed if the user chooses it. + A QuickFix which is defined in the top-level sqf:fixes element. A global QuickFix is available in each Schematron rule. + A QuickFix which is defined for a Schematron rule. It is only available in this Schematron rule. + All activity elements which the QuickFix contains will be performed. + implements a change command. + defined by an activity element for a change of the XML instance. A change command can have the activity kinds "add", "delete", "replace" and "stringReplace". + creates one or more nodes and adds them relatively to an anchor node to the XML instance. + deletes one or more nodes. + creates one or more nodes and replaces nodes of the XML instance with them. + creates one or more nodes and replaces substrings of a text node of the XML instance with them. + context node of an activity element. The node is the subject of the change command of the activity element. + + + + + Attribute zur Zuweisung eins oder mehrerer QuickFixes zu einem Schematron-Assert oder -Report. + Attributes to assign one or more QuickFixes to a Schematron assert or report. + + + + This attribute refers to one or more QuickFixes which should be assigned to the Schematron assert or report. Each referred QuickFix must be defined globally or locally for the same Schematron rule. + The reference works with the ID of the QuickFix. If there is a local and a global QuickFix having the same ID, the local QuickFix will be selected. + A list of IDs of the referred QuickFixes separated by white space. + + + + + This attribute sets a default QuickFix for the Schematron assert or report. The default QuickFix must also be referred by the sqf:fix attribute. + The ID of a QuickFix which is referred by the sqf:fix attribute. + + + + + + + The attribute defines the used Schematron QuickFix version. The attribute should be set, if the Schematron schema uses the Schematron QuickFix extensions. + + + + + + + + This attribute defines the name of the parameter or User Entry. + Must be unique within a QuickFix. + + + + + This attribute defines a default value for a parameter or User Entry by using a XPath expression. If the attribute is set to a sqf:param element, the element must be empty. + Must be a valid XPath expression. + + + + + This attribute defines the type of the parameter or User Entry. + The value should be a valid XML Schema type. + + + + + + + + This element group describes the content of the activity elements. The behavior is similar to the content of the xsl:template element. Additionally, the elements sch:value-of and sch:let are treated as xsl:value-of and xsl:variable. Also the sqf:keep element is available. + + + + + + + + + + An activity element defines a change command for one or more nodes of the instance element. This change command is specified by the kind of activity element, the content and several attributes. + + + + + + + + + + + + + Elements to define QuickFixes or QuickFix groups inside of a Schematron schema. + + + + + + + + + + Contains globally useable Schematron QuickFixes and QuickFix groups. + + + + + + + + + + + + + Defines a Schematron QuickFix group. If the group is linked by an assert or report, all QuickFixes of this group will be associated with the assert/report. + + + + + + + + The ID to reference the QuickFix group. + characters of type xs:ID. The value must be unique in the parent element. + + + + + The condition to provide the QuickFixes of the QuickFix group. + XPath expression. It expects as return value an xs:boolean. + + + + + + + + + Defines a Schematron QuickFix with its content. All commands will be processed if the QuickFix is activated by the user. + + + + + + + + + + + + + + + + + + + + + + + + + + The ID to reference the QuickFix. + characters of type xs:ID. The value must be unique in the parent element. + + + + + The condition to provide the QuickFix. + XPath expression. It expects as return value an xs:boolean. + + + + + With this attribute the role of the QuickFix can be set manually. + The role of a QuickFix describes the type of change which it makes. If the role is not set manually, the role is the type of the used activity element ("add", "delete", "replace" or "stringReplace"). If two different activity elements are used in a QuickFix, the role is automatically "mix". + Depends on which activity element is used by the QuickFix. + + + + + + + + + + + + + + + + + + Adds a human readable description to the parent element. + + + + + + + + + + + + + Defines a user entry. With the help of the user entry, the user can interact with the QuickFix. The user entry refers to a sqf:param element. The value of the parameter is set manually by the user. The implementation should provide the user entry when the user selects the QuickFix. + + + + + + + + + + + + + This element calls another QuickFix within a QuickFix. The called QuickFix must be defined globally or for the same Schematron rule as the calling QuickFix. A calling QuickFix should not have other activity elements. + The calling QuickFix adopts the activity elements of the called QuickFix. With the help of parameters, these can be specified (see sqf:with-param). + The description and other characteristics (e.g. @use-when) of the called QuickFix will not be adopted. + + + + + + + + This attribute refers to a QuickFix by using the ID. The referred QuickFix must be defined globally or for the same Schematron rule as the referring QuickFix. + + + + + + + + With the help of this element, QuickFix calls can be specified. A sqf:with-param element refers to a parameter of the called QuickFix. + The content or the select attribute define the value of the parameter. If there is content, the sqf:with-param element should not have a select attribute. + + + + + + + + The name of the referred parameter. + + + + + This attribute defines with a XPath expression the value of the parameter. If the attribute is set, the sqf:with-param element must be empty. + Must be a valid XPath expression. + + + + + + + + This element defines a parameter for a QuickFix. The parameter can be used like a variable within the QuickFix. The value can be set by the sqf:with-param element. + The content defines a default value for the parameter. + Abstract parameters (see attribute abstract) cannot be used as normal XPath variables. An abstract parameter declares, that the current QuickFix uses a parameter of an abstract pattern. A QuickFix with one or more abstract parameters can be used just by abstract patterns. The value of the parameter will be set by the instantiation of the abstract pattern according to the Schematron specification. The instantiation of the abstract pattern must specify a value for every abstract parameter of the QuickFix. + + + + + + + + This attribute sets for the parameter whether it is optional or required. + If the parameter is required, it cannot have a default attribute or any content. + The value yes is used for required, no for optional. + + + + + + + + + + + This attribute sets for the parameter whether it is abstract or not. + + The current quick fix can be instantiate only from an abstract pattern that defines this abstract parameter. Inside of a global QuickFix every used parameter of an abstract pattern must be declared by an abstract parameter. + If a parameter is defined as abstract, it can not have a type, required or default attribute. Its value will be only form the abstract pattern instantiation. + The value true is used for abstract parameter, false for regular parameter. + + + + + + + + + Name of a QuickFix or a user entry. + + + + + + + + + + + + + + + + Paragraph within a description. + + + + + + + + + + + + + + + + + + + + This activity element replaces one or more nodes of the XML instance by a node. The activity command combines the delete and the add command. + The nodes to be deleted are defined by the match attribute. The nodes to be added are defined by the attributes node-type and select and the content of the sqf:replace element. + The position of the nodes to be added is the position of the nodes to be deleted. + + + + + + + + + + + + This activity element deletes one or more nodes of the XML instance. + The match attribute defines the nodes to be deleted. + + + + + + + + This activity element adds a node to one or more nodes of the XML instance. + The attributes match and position define the position where the nodes will be added. The position is determined by the anchor node(s) (@match) and the insertion direction (@position). + The attributes node-type, select and target and the content of the element define the nodes to be added. + + + + + + + + The position attribute defines the position of the nodes to be added relatively to the anchor node (see @match). + If the value of the node-type attribute is attribute, the position attribute should not be set, because the node to be added will always be inserted as attribute. Otherwise the default value is first-child. + + + + + + + + This activity element replaces substrings of text nodes by other nodes. The text nodes are defined by the match attribute. The regex attribute defines the substrings of the text nodes. + The nodes to be inserted are defined by the content of the sqf:stringReplace element or the select attribute. Note: The context within the sqf:stringReplace element is set to the substrings. So, it is an atomic value. + + + + + + + + + Regular expression. The expression can be specified by XPath expressions which are marked by curly brackets. After processing, the regular expression must meet the requirements of the regex attribute of the xsl:analyze-string element. + + + + + The select attribute defines nodes or an atomic value as the nodes to be inserted. If the select attribute is set, the sqf:stringReplace element should be empty. + The selected nodes will be copied. Unlike a deep copy function, the copied nodes could be manipulated by the current or other activity elements. + XPath expression. The context of relative expressions is the substring to replace. + Note: The context will be always an atomic value. To select nodes from the XML instance, the use of variables outside of the sqf:stringReplace element is necessary. + There is no default value. If the select attribute is not set, the content of the activity element defines the nodes to be inserted. + + + + + + + + + The match attribute defines anchor nodes for an activity element. + For each selected anchor node, the command of the activity element will be executed. For each execution, the context will be set to the anchor node. + Exception: The match attribute of the sqf:stringReplace element should only select text nodes. + XPath expression. The context of relative expressions is the context of the related Schematron rule. + By default the anchor node is the context node of the related Schematron rule. + + + + + A condition for the action of the activity Element. The action will just be executed, if the condition returns true. + XPath expression. It expects as return value an xs:boolean. + + + + + + + + + The node-type attribute defines the node type of the nodes to be added. The attribute is required, if the target attribute is set. + If the node-type value is missing, the activity element should not have a target attribute. In this case the nodes to be added will be defined by the activity elements content or select attribute. + + + + + The select attribute defines nodes or an atomic value as the content of the node to be added. If the select attribute is set, the activity element should be empty. + The selected nodes will be copied into the node to be added. Unlike a deep copy function, the copied nodes could be manipulated by the current or other activity elements. + XPath expression. The context of relative expressions is the anchor node. + There is no default value. If the select attribute is not set, the content of the activity element defines the content of the nodes to be added. + + + + + This attribute defines the name of the node to be added. The attribute is required if the node-type attribute is specified and the value is not comment. + A string to define a node name. The string can be specified by XPath expressions which are marked by curly brackets. After processing, the name must be valid to the XML Schema type xs:QName. + Prefixes must be attached to a namespace in the current context of the Schematron schema. Names without prefixes will be attached to the namespace declared by the sqf:default-namespace element or to the null namespace. + + + + + + + + + + + The nodes to be added will be inserted after the anchor node. + + + + + The nodes to be added will be inserted before the anchor node. + + + + + The nodes to be added will be inserted as the first child of the anchor node. + + + + + The nodes to be added will be inserted as the last child of the anchor node. + + + + + + + + + The node type of the node to be added will be defined by the anchor node. + + + + + The node to be added will be an element. + + + + + The node to be added will be an attribute. The position attribute should not be set. + + + + + The node to be added will be a processing instruction. + + + + + The short notation of "processing-instruction". + + + + + The node to be added will be a comment. If the value of the node-type attribute is comment, the activity element should not have a target attribute. + + + + + + + + This element is available within activity elements. The function is to copy nodes selected by the select attribute. Unlike a deep copy function, with this function the copied nodes can be manipulated by the current or other activity elements. + + + + + The attribute selects nodes to be copied. + XPath expression. + + + + + + + + + + + + + + + + + + diff --git a/src/main/xjc/schemas/cached/xml.xsd b/src/main/xjc/schemas/cached/xml.xsd new file mode 100644 index 0000000..aea7d0d --- /dev/null +++ b/src/main/xjc/schemas/cached/xml.xsd @@ -0,0 +1,287 @@ + + + + + + +
+

About the XML namespace

+ +
+

+ This schema document describes the XML namespace, in a form + suitable for import by other schema documents. +

+

+ See + http://www.w3.org/XML/1998/namespace.html and + + http://www.w3.org/TR/REC-xml for information + about this namespace. +

+

+ Note that local names in this namespace are intended to be + defined only by the World Wide Web Consortium or its subgroups. + The names currently defined in this namespace are listed below. + They should not be used with conflicting semantics by any Working + Group, specification, or document instance. +

+

+ See further below in this document for more information about how to refer to this schema document from your own + XSD schema documents and about the + namespace-versioning policy governing this schema document. +

+
+
+
+
+ + + + +
+ +

lang (as an attribute name)

+

+ denotes an attribute whose value + is a language code for the natural language of the content of + any element; its value is inherited. This name is reserved + by virtue of its definition in the XML specification.

+ +
+
+

Notes

+

+ Attempting to install the relevant ISO 2- and 3-letter + codes as the enumerated possible values is probably never + going to be a realistic possibility. +

+

+ See BCP 47 at + http://www.rfc-editor.org/rfc/bcp/bcp47.txt + and the IANA language subtag registry at + + http://www.iana.org/assignments/language-subtag-registry + for further information. +

+

+ The union allows for the 'un-declaration' of xml:lang with + the empty string. +

+
+
+
+ + + + + + + + + +
+ + + + +
+ +

space (as an attribute name)

+

+ denotes an attribute whose + value is a keyword indicating what whitespace processing + discipline is intended for the content of the element; its + value is inherited. This name is reserved by virtue of its + definition in the XML specification.

+ +
+
+
+ + + + + + +
+ + + +
+ +

base (as an attribute name)

+

+ denotes an attribute whose value + provides a URI to be used as the base for interpreting any + relative URIs in the scope of the element on which it + appears; its value is inherited. This name is reserved + by virtue of its definition in the XML Base specification.

+ +

+ See http://www.w3.org/TR/xmlbase/ + for information about this attribute. +

+
+
+
+
+ + + + +
+ +

id (as an attribute name)

+

+ denotes an attribute whose value + should be interpreted as if declared to be of type ID. + This name is reserved by virtue of its definition in the + xml:id specification.

+ +

+ See http://www.w3.org/TR/xml-id/ + for information about this attribute. +

+
+
+
+
+ + + + + + + + + + +
+ +

Father (in any context at all)

+ +
+

+ denotes Jon Bosak, the chair of + the original XML Working Group. This name is reserved by + the following decision of the W3C XML Plenary and + XML Coordination groups: +

+
+

+ In appreciation for his vision, leadership and + dedication the W3C XML Plenary on this 10th day of + February, 2000, reserves for Jon Bosak in perpetuity + the XML name "xml:Father". +

+
+
+
+
+
+ + + +
+

About this schema document

+ +
+

+ This schema defines attributes and an attribute group suitable + for use by schemas wishing to allow xml:base, + xml:lang, xml:space or + xml:id attributes on elements they define. +

+

+ To enable this, such a schema must import this schema for + the XML namespace, e.g. as follows: +

+
+          <schema . . .>
+           . . .
+           <import namespace="http://www.w3.org/XML/1998/namespace"
+                      schemaLocation="http://www.w3.org/2001/xml.xsd"/>
+     
+

+ or +

+
+           <import namespace="http://www.w3.org/XML/1998/namespace"
+                      schemaLocation="http://www.w3.org/2009/01/xml.xsd"/>
+     
+

+ Subsequently, qualified reference to any of the attributes or the + group defined below will have the desired effect, e.g. +

+
+          <type . . .>
+           . . .
+           <attributeGroup ref="xml:specialAttrs"/>
+     
+

+ will define a type which will schema-validate an instance element + with any of those attributes. +

+
+
+
+
+ + + +
+

Versioning policy for this schema document

+
+

+ In keeping with the XML Schema WG's standard versioning + policy, this schema document will persist at + + http://www.w3.org/2009/01/xml.xsd. +

+

+ At the date of issue it can also be found at + + http://www.w3.org/2001/xml.xsd. +

+

+ The schema document at that URI may however change in the future, + in order to remain compatible with the latest version of XML + Schema itself, or with the XML namespace itself. In other words, + if the XML Schema or XML namespaces change, the version of this + document at + http://www.w3.org/2001/xml.xsd + + will change accordingly; the version at + + http://www.w3.org/2009/01/xml.xsd + + will not change. +

+

+ Previous dated (and unchanging) versions of this schema + document are at: +

+ +
+
+
+
+ +
+ From ab54d7ed4bc091f7fc853ad15e17df314c0d114a Mon Sep 17 00:00:00 2001 From: Jan Dvorak Date: Sun, 25 Jun 2023 16:12:35 +0200 Subject: [PATCH 08/36] Relax both the current, as well as the historic schemas --- pom.xml | 17 ++++++++++++++--- 1 file changed, 14 insertions(+), 3 deletions(-) diff --git a/pom.xml b/pom.xml index 00da6eb..c3f0d25 100644 --- a/pom.xml +++ b/pom.xml @@ -2,7 +2,7 @@ 4.0.0 org.eurocris openaire-cris-validator - 1.4.1-SNAPSHOT + 2.0.0-SNAPSHOT OpenAIRE CRIS Prototype Validator A basic prototype validator to assess whether an OAI-PMH endpoint complies with the requirements set by the OpenAIRE Guidelines for CRIS Manager 1.1. @@ -151,19 +151,30 @@ transform + process-resources true - ${basedir}/target/classes/schemas + src/main/resources/schemas + + **/openaire-cerif-profile.xsd + **/includes/**/*.xsd + **/vocabularies/**/*.xsd + + ${basedir}/target/classes/schemas + src/tools/xslt/relax-xml-schema-for-first-validation.xslt + + + ${guidelines.project.dir}/schemas openaire-cerif-profile.xsd includes/**/*.xsd vocabularies/**/*.xsd - ${basedir}/target/classes/schemas/relaxed + ${basedir}/target/classes/schemas/current src/tools/xslt/relax-xml-schema-for-first-validation.xslt From bfcd5f16ce6173116d2d93e1d3a8e12e5984834d Mon Sep 17 00:00:00 2001 From: Jan Dvorak Date: Sun, 25 Jun 2023 16:19:03 +0200 Subject: [PATCH 09/36] Work for both the current, as well as the historic schemas --- .../cris/validator/CRISValidator.java | 217 +++++++++++------- .../cris/validator/util/SamplesTest.java | 6 +- 2 files changed, 142 insertions(+), 81 deletions(-) diff --git a/src/main/java/org/eurocris/openaire/cris/validator/CRISValidator.java b/src/main/java/org/eurocris/openaire/cris/validator/CRISValidator.java index 593f2c6..5d17311 100644 --- a/src/main/java/org/eurocris/openaire/cris/validator/CRISValidator.java +++ b/src/main/java/org/eurocris/openaire/cris/validator/CRISValidator.java @@ -8,7 +8,6 @@ import java.io.IOException; import java.io.InputStream; -import java.net.MalformedURLException; import java.net.URI; import java.net.URL; import java.net.URLConnection; @@ -17,9 +16,11 @@ import java.nio.file.Paths; import java.time.LocalDateTime; import java.time.format.DateTimeFormatter; +import java.util.ArrayList; import java.util.Arrays; import java.util.HashMap; import java.util.HashSet; +import java.util.List; import java.util.Map; import java.util.Optional; import java.util.Set; @@ -29,7 +30,6 @@ import java.util.regex.Pattern; import javax.xml.bind.JAXBElement; -import javax.xml.namespace.QName; import javax.xml.parsers.DocumentBuilder; import javax.xml.parsers.DocumentBuilderFactory; import javax.xml.parsers.ParserConfigurationException; @@ -121,7 +121,7 @@ public class CRISValidator { /** * The URI of the XML namespace. */ - public static final String OPENAIRE_CERIF_XMLNS = "https://www.openaire.eu/cerif-profile/1.1/"; + public static final String OPENAIRE_CERIF_XMLNS_PREFIX = "https://www.openaire.eu/cerif-profile/"; /** * The URL base for the XML Schema locations by version. @@ -143,6 +143,11 @@ public class CRISValidator { */ public static final ConnectionStreamFactory CONN_STREAM_FACTORY = new FileLoggingConnectionStreamFactory( "data" ); + private static final Map metadataFormatsByPrefix = new HashMap<>(); + + private static final Map schemaUrlsByNs = new HashMap<>(); + private static final Map nssBySchemaUrl = new HashMap<>(); + /** * The main method: used for running the JUnit4 test suite from the command line. * The first command line argument should be the URL of the endpoint to test. @@ -160,11 +165,12 @@ public static void main( final String[] args ) throws Exception { /** * Set up the test suite. - * @throws MalformedURLException on an invalid endpoint URL * @throws MissingArgumentException when the endpoint URL is not specified * @throws SAXException when the parser schema cannot be created + * @throws IOException on a problem accessing a schema + * @throws ParserConfigurationException when an XML parser cannot be instantiated */ - public CRISValidator() throws MalformedURLException, MissingArgumentException, SAXException { + public CRISValidator() throws MissingArgumentException, SAXException, IOException, ParserConfigurationException { if ( endpoint == null ) { final String endpointPropertyKey = "endpoint.to.validate"; final String endpointUrl = System.getProperty( endpointPropertyKey ); @@ -183,24 +189,41 @@ public String getName() { return endpoint.getBaseUrl(); } + private static Schema getSchema( final StreamSource ... sources ) throws IOException, SAXException, ParserConfigurationException { + final List schemaList = new ArrayList<>(); + for ( final StreamSource source : sources ) { + schemaList.add( source ); + final String schemaUrl = source.getSystemId(); + final Document doc = getDocumentBuilderFactory().newDocumentBuilder().parse( source.getInputStream() ); + final String targetNamespace = doc.getDocumentElement().getAttribute( "targetNamespace" ); + schemaUrlsByNs.put( targetNamespace, schemaUrl ); + nssBySchemaUrl.put( schemaUrl, targetNamespace ); + System.out.println( "Will use " + schemaUrl + " for namespace " + targetNamespace ); + } + return getXmlSchemaFactory().newSchema( schemaList.toArray( new Source[0] ) ); + } + private static Schema parserSchema = null; /** * Create the schema for the validating XML parser. * @return the compound schema - * @throws SAXException when problem reading the schema + * @throws SAXException on a problem reading the schema + * @throws IOException on a problem accessing the schema + * @throws ParserConfigurationException */ - protected static synchronized Schema getParserSchema() throws SAXException { + protected static synchronized Schema getParserSchema() throws SAXException, IOException, ParserConfigurationException { if ( parserSchema == null ) { - parserSchema = getXmlSchemaFactory().newSchema( new Source[] { - schema( "/cached/xml.xsd", "http://www.w3.org/2001/xml.xsd" ), - schema( "/cached/oai-identifier.xsd" ), - schema( "/cached/simpledc20021212.xsd", "http://dublincore.org/schemas/xmls/simpledc20021212.xsd" ), - schema( "/cached/oai_dc.xsd" ), - schema( "/cached/provenance.xsd", "http://www.openarchives.org/OAI/2.0/provenance.xsd" ), - schema( "/cached/OAI-PMH.xsd" ), - schema( "/relaxed/openaire-cerif-profile.xsd" ), - } ); + parserSchema = getSchema( + schema( "/cached/xml.xsd", "http://www.w3.org/2001/xml.xsd" ), + schema( "/cached/oai-identifier.xsd" ), + schema( "/cached/simpledc20021212.xsd", "http://dublincore.org/schemas/xmls/simpledc20021212.xsd" ), + schema( "/cached/oai_dc.xsd" ), + schema( "/cached/provenance.xsd", "http://www.openarchives.org/OAI/2.0/provenance.xsd" ), + schema( "/cached/OAI-PMH.xsd" ), + schema( "/current/openaire-cerif-profile.xsd", "https://www.openaire.eu/schema/cris/1.2/openaire-cerif-profile.xsd" ), + schema( "/cerif_profile_1_1/openaire-cerif-profile.xsd", "https://www.openaire.eu/schema/cris/1.1.1/openaire-cerif-profile.xsd" ) + ); } return parserSchema; } @@ -215,11 +238,12 @@ protected static synchronized Schema getParserSchema() throws SAXException { protected static synchronized Schema getValidatorSchema() { if ( validatorSchema == null ) { try { - validatorSchema = getXmlSchemaFactory().newSchema( new Source[] { - schema( "/cached/xml.xsd", "http://www.w3.org/2001/xml.xsd" ), - schema( "/relaxed/openaire-cerif-profile.xsd" ), - } ); - } catch ( final SAXException e ) { + validatorSchema = getSchema( + schema( "/cached/xml.xsd", "http://www.w3.org/2001/xml.xsd" ), + schema( "/current/openaire-cerif-profile.xsd", "https://www.openaire.eu/schema/cris/1.2/openaire-cerif-profile.xsd" ), + schema( "/cerif_profile_1_1/openaire-cerif-profile.xsd", "https://www.openaire.eu/schema/cris/1.1.1/openaire-cerif-profile.xsd" ) + ); + } catch ( final SAXException | IOException | ParserConfigurationException e ) { throw new IllegalStateException( "While initializing validator schema", e ); } } @@ -235,20 +259,21 @@ private static synchronized SchemaFactory getXmlSchemaFactory() { return xmlSchemaFactory; } - private static Source schema( final String path ) { + private static StreamSource schema( final String path ) { return schema( path, null ); } - private static Source schema( final String path, final String externalUrl ) { + private static StreamSource schema( final String path, final String externalUrl ) { final String path1 = "/schemas" + path; final URL url = OAIPMHEndpoint.class.getResource( path1 ); if ( url == null ) { throw new IllegalArgumentException( "Resource " + path1 + " not found" ); } - final StreamSource src = new StreamSource(); - src.setInputStream( OAIPMHEndpoint.class.getResourceAsStream( path1 ) ); - src.setSystemId( ( externalUrl != null ) ? externalUrl : url.toExternalForm() ); - return src; + return new StreamSource( (InputStream) null, url.toExternalForm() ) { + public InputStream getInputStream() { + return OAIPMHEndpoint.class.getResourceAsStream( path1 ); + } + }; } @SuppressWarnings( "unused" ) @@ -289,7 +314,7 @@ public boolean test( final DescriptionType description ) { final Object obj = description.getAny(); if ( obj instanceof Element ) { final Element el = (Element) obj; - if ( "Service".equals( el.getLocalName() ) && OPENAIRE_CERIF_XMLNS.equals( el.getNamespaceURI() ) ) { + if ( "Service".equals( el.getLocalName() ) && el.getNamespaceURI() != null && el.getNamespaceURI().startsWith( OPENAIRE_CERIF_XMLNS_PREFIX ) ) { serviceAcronym = XmlUtils.getTextContents( XmlUtils.getFirstMatchingChild( el, "Acronym", el.getNamespaceURI() ) ); validateMetadataPayload( el ); return true; @@ -319,34 +344,39 @@ public void check010_MetadataFormats() throws Exception { checker = checker.checkUnique( MetadataFormatType::getMetadataPrefix, "Metadata prefix not unique" ); checker = checker.checkUnique( MetadataFormatType::getMetadataNamespace, "Metadata namespace not unique" ); checker = checker.checkUnique( MetadataFormatType::getSchema, "Metadata schema location not unique" ); - checker = wrapCheckMetadataFormatPresent( checker, OAI_CERIF_OPENAIRE__METADATA_PREFIX, OPENAIRE_CERIF_XMLNS ); - checker.run(); + checker = wrapCheckMetadataFormatPresent( checker ); + checker = checker.map( (MetadataFormatType mft) -> { + final String prefix = mft.getMetadataPrefix(); + if ( prefix.startsWith(OAI_CERIF_OPENAIRE__METADATA_PREFIX) ) { + metadataFormatsByPrefix.put( prefix, mft ); + } + return mft; + } ); + System.out.println( "Having " + metadataFormatsByPrefix.size() + " OpenAIRE CRIS metadata formats" ); } - private CheckingIterable wrapCheckMetadataFormatPresent( final CheckingIterable parent, final String expectedMetadataFormatPrefix, final String expectedMetadataFormatNamespace ) { + private CheckingIterable wrapCheckMetadataFormatPresent( final CheckingIterable parent ) { final Predicate predicate = new Predicate() { @Override public boolean test( final MetadataFormatType mf ) { - if ( expectedMetadataFormatPrefix.equals( mf.getMetadataPrefix() ) ) { - assertEquals( "Non-matching set name for set '" + expectedMetadataFormatPrefix + "' (2)", expectedMetadataFormatNamespace, mf.getMetadataNamespace() ); - final DocumentBuilderFactory dbf = DocumentBuilderFactory.newInstance(); - dbf.setNamespaceAware( true ); - dbf.setValidating( false ); - dbf.setIgnoringComments( true ); + final String metadataNs = mf.getMetadataNamespace(); + if ( metadataNs.startsWith( OPENAIRE_CERIF_XMLNS_PREFIX ) ) { + assertTrue( "The metadata prefix of an OpenAIRE CRIS Guidelines namespace shall start with " + OAI_CERIF_OPENAIRE__METADATA_PREFIX, mf.getMetadataPrefix().startsWith(OAI_CERIF_OPENAIRE__METADATA_PREFIX) ); try { - final DocumentBuilder db = dbf.newDocumentBuilder(); + final DocumentBuilder db = getDocumentBuilderFactory().newDocumentBuilder(); final String schemaUrl = mf.getSchema(); + System.out.println( "Metadata namespace " + mf.getMetadataPrefix() + " with ns " + mf.getMetadataNamespace() ); assertTrue( "Please reference the official XML Schema at " + OPENAIRE_CERIF_SCHEMAS_ROOT + " (2)", schemaUrl.startsWith( OPENAIRE_CERIF_SCHEMAS_ROOT ) ); assertTrue( "The schema file should be " + OPENAIRE_CERIF_SCHEMA_FILENAME + " (2)", schemaUrl.endsWith( "/" + OPENAIRE_CERIF_SCHEMA_FILENAME ) ); - final String realSchemaUrl = ( schemaUrl.equals( CURRENT_XML_SCHEMA_URL_PREFIX + "openaire-cerif-profile.xsd" ) ) - ? this.getClass().getResource( "/schemas/openaire-cerif-profile.xsd" ).toExternalForm() - : schemaUrl; - System.out.println( "Fetching " + realSchemaUrl ); - final Document doc = db.parse( realSchemaUrl ); - final Element schemaRootEl = doc.getDocumentElement(); - final String targetNsUri = schemaRootEl.getAttribute( "targetNamespace" ); - assertEquals( "The schema does not have the advertised target namespace URI (2)", mf.getMetadataNamespace(), targetNsUri ); + final String localSchemaUrl = schemaUrlsByNs.get( metadataNs ); + assertNotNull( "This validator shall cover the metadata namespace " + metadataNs, localSchemaUrl ); + if ( !localSchemaUrl.contains( "/current/" ) ) { + final Document doc = db.parse( localSchemaUrl ); + final Element schemaRootEl = doc.getDocumentElement(); + final String targetNsUri = schemaRootEl.getAttribute( "targetNamespace" ); + assertEquals( "The schema does not have the advertised target namespace URI (2)", metadataNs, targetNsUri ); + } } catch ( final ParserConfigurationException | SAXException | IOException e ) { throw new IllegalStateException( e ); } @@ -356,9 +386,21 @@ public boolean test( final MetadataFormatType mf ) { } }; - return parent.checkContains( predicate, new AssertionError( "MetadataFormat '" + expectedMetadataFormatPrefix + "' not present (2)" ) ); + return parent.checkContains( predicate, new AssertionError( "MetadataFormat for the OpenAIRE Guidelines for CRIS Managers not present (2)" ) ); } + /** + * Get a {@link DocumentBuilderFactory} for parsing. + * @return + */ + protected static DocumentBuilderFactory getDocumentBuilderFactory() { + final DocumentBuilderFactory dbf = DocumentBuilderFactory.newInstance(); + dbf.setNamespaceAware( true ); + dbf.setValidating( false ); + dbf.setIgnoringComments( true ); + return dbf; + } + /** * Ask for ?verb=ListSets and test it for consistence – checks (3). * @throws Exception on any unexpected circumstance @@ -401,9 +443,11 @@ public boolean test( final SetType s ) { */ @Test public void check100_CheckPublications() throws Exception { - final Iterable records = endpoint.callListRecords( OAI_CERIF_OPENAIRE__METADATA_PREFIX, OPENAIRE_CRIS_PUBLICATIONS__SET_SPEC, null, null ); - final CheckingIterable checker = buildCommonCheckersChain( records, "Publication" ); - checker.run(); + for ( final String prefix : metadataFormatsByPrefix.keySet() ) { + final Iterable records = endpoint.callListRecords( prefix, OPENAIRE_CRIS_PUBLICATIONS__SET_SPEC, null, null ); + final CheckingIterable checker = buildCommonCheckersChain( records, "Publication" ); + checker.run(); + } } /** @@ -412,9 +456,11 @@ public void check100_CheckPublications() throws Exception { */ @Test public void check200_CheckProducts() throws Exception { - final Iterable records = endpoint.callListRecords( OAI_CERIF_OPENAIRE__METADATA_PREFIX, OPENAIRE_CRIS_PRODUCTS__SET_SPEC, null, null ); - final CheckingIterable checker = buildCommonCheckersChain( records, "Product" ); - checker.run(); + for ( final String prefix : metadataFormatsByPrefix.keySet() ) { + final Iterable records = endpoint.callListRecords( prefix, OPENAIRE_CRIS_PRODUCTS__SET_SPEC, null, null ); + final CheckingIterable checker = buildCommonCheckersChain( records, "Product" ); + checker.run(); + } } /** @@ -423,9 +469,11 @@ public void check200_CheckProducts() throws Exception { */ @Test public void check300_CheckPatents() throws Exception { - final Iterable records = endpoint.callListRecords( OAI_CERIF_OPENAIRE__METADATA_PREFIX, OPENAIRE_CRIS_PATENTS__SET_SPEC, null, null ); - final CheckingIterable checker = buildCommonCheckersChain( records, "Patent" ); - checker.run(); + for ( final String prefix : metadataFormatsByPrefix.keySet() ) { + final Iterable records = endpoint.callListRecords( prefix, OPENAIRE_CRIS_PATENTS__SET_SPEC, null, null ); + final CheckingIterable checker = buildCommonCheckersChain( records, "Patent" ); + checker.run(); + } } /** @@ -434,9 +482,11 @@ public void check300_CheckPatents() throws Exception { */ @Test public void check400_CheckPersons() throws Exception { - final Iterable records = endpoint.callListRecords( OAI_CERIF_OPENAIRE__METADATA_PREFIX, OPENAIRE_CRIS_PERSONS__SET_SPEC, null, null ); - final CheckingIterable checker = buildCommonCheckersChain( records, "Person" ); - checker.run(); + for ( final String prefix : metadataFormatsByPrefix.keySet() ) { + final Iterable records = endpoint.callListRecords( prefix, OPENAIRE_CRIS_PERSONS__SET_SPEC, null, null ); + final CheckingIterable checker = buildCommonCheckersChain( records, "Person" ); + checker.run(); + } } /** @@ -445,9 +495,11 @@ public void check400_CheckPersons() throws Exception { */ @Test public void check500_CheckOrgUnits() throws Exception { - final Iterable records = endpoint.callListRecords( OAI_CERIF_OPENAIRE__METADATA_PREFIX, OPENAIRE_CRIS_ORGUNITS__SET_SPEC, null, null ); - final CheckingIterable checker = buildCommonCheckersChain( records, "OrgUnit" ); - checker.run(); + for ( final String prefix : metadataFormatsByPrefix.keySet() ) { + final Iterable records = endpoint.callListRecords( prefix, OPENAIRE_CRIS_ORGUNITS__SET_SPEC, null, null ); + final CheckingIterable checker = buildCommonCheckersChain( records, "OrgUnit" ); + checker.run(); + } } /** @@ -456,9 +508,11 @@ public void check500_CheckOrgUnits() throws Exception { */ @Test public void check600_CheckProjects() throws Exception { - final Iterable records = endpoint.callListRecords( OAI_CERIF_OPENAIRE__METADATA_PREFIX, OPENAIRE_CRIS_PROJECTS__SET_SPEC, null, null ); - final CheckingIterable checker = buildCommonCheckersChain( records, "Project" ); - checker.run(); + for ( final String prefix : metadataFormatsByPrefix.keySet() ) { + final Iterable records = endpoint.callListRecords( prefix, OPENAIRE_CRIS_PROJECTS__SET_SPEC, null, null ); + final CheckingIterable checker = buildCommonCheckersChain( records, "Project" ); + checker.run(); + } } /** @@ -467,9 +521,11 @@ public void check600_CheckProjects() throws Exception { */ @Test public void check700_CheckFundings() throws Exception { - final Iterable records = endpoint.callListRecords( OAI_CERIF_OPENAIRE__METADATA_PREFIX, OPENAIRE_CRIS_FUNDING__SET_SPEC, null, null ); - final CheckingIterable checker = buildCommonCheckersChain( records, "Funding" ); - checker.run(); + for ( final String prefix : metadataFormatsByPrefix.keySet() ) { + final Iterable records = endpoint.callListRecords( prefix, OPENAIRE_CRIS_FUNDING__SET_SPEC, null, null ); + final CheckingIterable checker = buildCommonCheckersChain( records, "Funding" ); + checker.run(); + } } /** @@ -478,9 +534,11 @@ public void check700_CheckFundings() throws Exception { */ @Test public void check800_CheckEquipment() throws Exception { - final Iterable records = endpoint.callListRecords( OAI_CERIF_OPENAIRE__METADATA_PREFIX, OPENAIRE_CRIS_EQUIPMENTS__SET_SPEC, null, null ); - final CheckingIterable checker = buildCommonCheckersChain( records, "Equipment" ); - checker.run(); + for ( final String prefix : metadataFormatsByPrefix.keySet() ) { + final Iterable records = endpoint.callListRecords( prefix, OPENAIRE_CRIS_EQUIPMENTS__SET_SPEC, null, null ); + final CheckingIterable checker = buildCommonCheckersChain( records, "Equipment" ); + checker.run(); + } } /** @@ -489,9 +547,11 @@ public void check800_CheckEquipment() throws Exception { */ @Test public void check900_CheckEvents() throws Exception { - final Iterable records = endpoint.callListRecords( OAI_CERIF_OPENAIRE__METADATA_PREFIX, OPENAIRE_CRIS_EVENTS__SET_SPEC, null, null ); - final CheckingIterable checker = buildCommonCheckersChain( records, "Event" ); - checker.run(); + for ( final String prefix : metadataFormatsByPrefix.keySet() ) { + final Iterable records = endpoint.callListRecords( prefix, OPENAIRE_CRIS_EVENTS__SET_SPEC, null, null ); + final CheckingIterable checker = buildCommonCheckersChain( records, "Event" ); + checker.run(); + } } /** @@ -501,8 +561,7 @@ public void check900_CheckEvents() throws Exception { * @return a {@link CheckingIterable} that checks the namespace, the uniqueness of the OAI identifiers of the records and their consistence with the types and IDs of the objects */ protected CheckingIterable buildCommonCheckersChain( final Iterable records, final String expectedElementLocalName ) { - final QName expectedQName = new QName( OPENAIRE_CERIF_XMLNS, expectedElementLocalName ); - return wrapCheckPayloadQNameAndAccummulate( expectedQName, + return wrapCheckPayloadQNameAndAccummulate( expectedElementLocalName, wrapCheckUniqueness( wrapCheckOAIIdentifier( CheckingIterable.over( records ) @@ -547,7 +606,7 @@ public Set apply( final RecordType x ) { private static Map recordsByName = new HashMap<>(); private static Map recordsByOaiIdentifier = new HashMap<>(); - private CheckingIterable wrapCheckPayloadQNameAndAccummulate( final QName expectedQName, final CheckingIterable checker ) { + private CheckingIterable wrapCheckPayloadQNameAndAccummulate( final String expectedElementLocalName, final CheckingIterable checker ) { return checker.checkForAll( new Predicate() { @Override @@ -557,8 +616,8 @@ public boolean test( final RecordType t ) { final Object obj = recordMetadata.getAny(); if ( obj instanceof Element ) { final Element el = (Element) obj; - assertEquals( "The payload element not in the right namespace", expectedQName.getNamespaceURI(), el.getNamespaceURI() ); - assertEquals( "The payload element does not have the right local name", expectedQName.getLocalPart(), el.getLocalName() ); + assertTrue( "The payload element not in the right namespace", el.getNamespaceURI().startsWith(OPENAIRE_CERIF_XMLNS_PREFIX) ); + assertEquals( "The payload element does not have the right local name", expectedElementLocalName, el.getLocalName() ); validateMetadataPayload( el ); final CERIFNode node = CERIFNode.buildTree( el ); recordsByName.put( node.getName(), node ); diff --git a/src/test/java/org/eurocris/openaire/cris/validator/util/SamplesTest.java b/src/test/java/org/eurocris/openaire/cris/validator/util/SamplesTest.java index 5478131..ef1b21c 100644 --- a/src/test/java/org/eurocris/openaire/cris/validator/util/SamplesTest.java +++ b/src/test/java/org/eurocris/openaire/cris/validator/util/SamplesTest.java @@ -1,6 +1,8 @@ package org.eurocris.openaire.cris.validator.util; -import java.net.MalformedURLException; +import java.io.IOException; + +import javax.xml.parsers.ParserConfigurationException; import org.apache.commons.cli.MissingArgumentException; import org.eurocris.openaire.cris.validator.CRISValidator; @@ -12,7 +14,7 @@ public class SamplesTest extends CRISValidator { @SuppressWarnings("javadoc") - public SamplesTest() throws MalformedURLException, MissingArgumentException, SAXException { + public SamplesTest() throws MissingArgumentException, SAXException, IOException, ParserConfigurationException { super(); } From 019ec4407635f52bb929333584103cd8dcc2d170 Mon Sep 17 00:00:00 2001 From: Jan Dvorak Date: Sun, 25 Jun 2023 16:35:50 +0200 Subject: [PATCH 10/36] Github Actions: use checkout@v3 and setup-java@v3 (were: @v2) --- .github/workflows/maven.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/maven.yml b/.github/workflows/maven.yml index bca1de8..9e8a451 100644 --- a/.github/workflows/maven.yml +++ b/.github/workflows/maven.yml @@ -15,11 +15,11 @@ jobs: runs-on: ubuntu-latest steps: - - uses: actions/checkout@v2 + - uses: actions/checkout@v3 - name: Checkout the OpenAIRE Guidelines for CRIS Managers repo run: git clone --branch=master https://github.com/openaire/guidelines-cris-managers.git ../guidelines-cris-managers - name: Set up JDK 17 - uses: actions/setup-java@v2 + uses: actions/setup-java@v3 with: java-version: '17' distribution: 'adopt' From a36922ec668c86082e61f9cdef4a60eeb3007c56 Mon Sep 17 00:00:00 2001 From: Jan Dvorak Date: Sun, 25 Jun 2023 16:40:24 +0200 Subject: [PATCH 11/36] Use a matching version of the Guidelines project --- .github/workflows/maven.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/maven.yml b/.github/workflows/maven.yml index 9e8a451..405c8d8 100644 --- a/.github/workflows/maven.yml +++ b/.github/workflows/maven.yml @@ -17,7 +17,7 @@ jobs: steps: - uses: actions/checkout@v3 - name: Checkout the OpenAIRE Guidelines for CRIS Managers repo - run: git clone --branch=master https://github.com/openaire/guidelines-cris-managers.git ../guidelines-cris-managers + run: git clone --branch=prepare-v1.2 https://github.com/jdvorak001/guidelines-cris-managers.git ../guidelines-cris-managers - name: Set up JDK 17 uses: actions/setup-java@v3 with: From 968486d06ca2d6358a7bda8ca8508dac2e86df40 Mon Sep 17 00:00:00 2001 From: Jan Dvorak Date: Tue, 27 Jun 2023 16:58:49 +0200 Subject: [PATCH 12/36] Run the checker in ListMetadataFormats and write the counts --- .../org/eurocris/openaire/cris/validator/CRISValidator.java | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/main/java/org/eurocris/openaire/cris/validator/CRISValidator.java b/src/main/java/org/eurocris/openaire/cris/validator/CRISValidator.java index 5d17311..e359bf8 100644 --- a/src/main/java/org/eurocris/openaire/cris/validator/CRISValidator.java +++ b/src/main/java/org/eurocris/openaire/cris/validator/CRISValidator.java @@ -352,7 +352,8 @@ public void check010_MetadataFormats() throws Exception { } return mft; } ); - System.out.println( "Having " + metadataFormatsByPrefix.size() + " OpenAIRE CRIS metadata formats" ); + final long nMetadataFormats = checker.run(); + System.out.println( "Having " + metadataFormatsByPrefix.size() + " OpenAIRE CRIS metadata formats (out of the total " + nMetadataFormats + " metadata formats)" ); } private CheckingIterable wrapCheckMetadataFormatPresent( final CheckingIterable parent ) { From e810c058b5814c7801c0a483029008d693cf596a Mon Sep 17 00:00:00 2001 From: Jan Dvorak Date: Tue, 27 Jun 2023 16:59:19 +0200 Subject: [PATCH 13/36] Make the debug line more clear --- .../org/eurocris/openaire/cris/validator/CRISValidator.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/main/java/org/eurocris/openaire/cris/validator/CRISValidator.java b/src/main/java/org/eurocris/openaire/cris/validator/CRISValidator.java index e359bf8..3f3f66d 100644 --- a/src/main/java/org/eurocris/openaire/cris/validator/CRISValidator.java +++ b/src/main/java/org/eurocris/openaire/cris/validator/CRISValidator.java @@ -367,7 +367,7 @@ public boolean test( final MetadataFormatType mf ) { try { final DocumentBuilder db = getDocumentBuilderFactory().newDocumentBuilder(); final String schemaUrl = mf.getSchema(); - System.out.println( "Metadata namespace " + mf.getMetadataPrefix() + " with ns " + mf.getMetadataNamespace() ); + System.out.println( "Metadata format prefix " + mf.getMetadataPrefix() + " with ns " + mf.getMetadataNamespace() ); assertTrue( "Please reference the official XML Schema at " + OPENAIRE_CERIF_SCHEMAS_ROOT + " (2)", schemaUrl.startsWith( OPENAIRE_CERIF_SCHEMAS_ROOT ) ); assertTrue( "The schema file should be " + OPENAIRE_CERIF_SCHEMA_FILENAME + " (2)", schemaUrl.endsWith( "/" + OPENAIRE_CERIF_SCHEMA_FILENAME ) ); final String localSchemaUrl = schemaUrlsByNs.get( metadataNs ); From 502dc7dc21b01b7d13fe6ccc60aa32bdf404a7dc Mon Sep 17 00:00:00 2001 From: Jan Dvorak Date: Tue, 27 Jun 2023 17:25:09 +0200 Subject: [PATCH 14/36] Do w/o a separate getValidatorSchema(), use getParserSchema() everywhere This way the configuration of the available XML Schemas is concentrated at one place only. --- .../cris/validator/CRISValidator.java | 26 ++----------------- 1 file changed, 2 insertions(+), 24 deletions(-) diff --git a/src/main/java/org/eurocris/openaire/cris/validator/CRISValidator.java b/src/main/java/org/eurocris/openaire/cris/validator/CRISValidator.java index 3f3f66d..2257dca 100644 --- a/src/main/java/org/eurocris/openaire/cris/validator/CRISValidator.java +++ b/src/main/java/org/eurocris/openaire/cris/validator/CRISValidator.java @@ -228,28 +228,6 @@ protected static synchronized Schema getParserSchema() throws SAXException, IOEx return parserSchema; } - private static Schema validatorSchema = null; - - /** - * Create the schema for the second-phase validation. - * @return the compound schema - * @throws SAXException when problem reading the schema - */ - protected static synchronized Schema getValidatorSchema() { - if ( validatorSchema == null ) { - try { - validatorSchema = getSchema( - schema( "/cached/xml.xsd", "http://www.w3.org/2001/xml.xsd" ), - schema( "/current/openaire-cerif-profile.xsd", "https://www.openaire.eu/schema/cris/1.2/openaire-cerif-profile.xsd" ), - schema( "/cerif_profile_1_1/openaire-cerif-profile.xsd", "https://www.openaire.eu/schema/cris/1.1.1/openaire-cerif-profile.xsd" ) - ); - } catch ( final SAXException | IOException | ParserConfigurationException e ) { - throw new IllegalStateException( "While initializing validator schema", e ); - } - } - return validatorSchema; - } - private static SchemaFactory xmlSchemaFactory = null; private static synchronized SchemaFactory getXmlSchemaFactory() { @@ -683,8 +661,8 @@ private void doCheckFunctionalDependency( final CERIFNode node, final String oai */ protected void validateMetadataPayload( final Element el ) { final String elString = el.getLocalName() + "[@id=\"" + el.getAttribute( "id" ) + "\"]"; - final Validator validator = getValidatorSchema().newValidator(); try { + final Validator validator = getParserSchema().newValidator(); final ErrorHandler errorHandler = new ErrorHandler() { private boolean patternValidErrorSignalled = false; @@ -716,7 +694,7 @@ public void error( final SAXParseException exception ) throws SAXException { }; validator.setErrorHandler( errorHandler ); validator.validate( new DOMSource( el ) ); - } catch ( final SAXException | IOException e ) { + } catch ( final SAXException | IOException | ParserConfigurationException e ) { fail( "While validating element " + elString + ": " + e ); } } From c5b37666949cb2d92a967426176c58134884b70c Mon Sep 17 00:00:00 2001 From: Jan Dvorak Date: Tue, 27 Jun 2023 19:27:59 +0200 Subject: [PATCH 15/36] Add constructor(URL endpointBaseUrl) Make CRISValidator more testable --- .../openaire/cris/validator/CRISValidator.java | 13 ++++++++++++- .../openaire/cris/validator/util/SamplesTest.java | 9 +++------ 2 files changed, 15 insertions(+), 7 deletions(-) diff --git a/src/main/java/org/eurocris/openaire/cris/validator/CRISValidator.java b/src/main/java/org/eurocris/openaire/cris/validator/CRISValidator.java index 2257dca..27fb28e 100644 --- a/src/main/java/org/eurocris/openaire/cris/validator/CRISValidator.java +++ b/src/main/java/org/eurocris/openaire/cris/validator/CRISValidator.java @@ -178,10 +178,21 @@ public CRISValidator() throws MissingArgumentException, SAXException, IOExceptio throw new MissingArgumentException( "Please specify the OAI-PMH endpoint URL as the value of the " + endpointPropertyKey + " system property or as the first argument on the command line" ); } final URL endpointBaseUrl = URI.create( endpointUrl ).toURL(); - endpoint = new OAIPMHEndpoint( endpointBaseUrl, getParserSchema(), CONN_STREAM_FACTORY ); + endpoint = new OAIPMHEndpoint( endpointBaseUrl, getParserSchema(), CONN_STREAM_FACTORY ); } } + /** + * Set up the test suite with a given endpoint base URL. + * @param endpointBaseUrl the URL base of the endpoint to test + * @throws SAXException when the parser schema cannot be created + * @throws IOException on a problem accessing a schema + * @throws ParserConfigurationException when an XML parser cannot be instantiated + */ + public CRISValidator( final URL endpointBaseUrl ) throws SAXException, IOException, ParserConfigurationException { + endpoint = new OAIPMHEndpoint( endpointBaseUrl, getParserSchema(), CONN_STREAM_FACTORY ); + } + /** * @return the URL of the endpoint */ diff --git a/src/test/java/org/eurocris/openaire/cris/validator/util/SamplesTest.java b/src/test/java/org/eurocris/openaire/cris/validator/util/SamplesTest.java index ef1b21c..7952fef 100644 --- a/src/test/java/org/eurocris/openaire/cris/validator/util/SamplesTest.java +++ b/src/test/java/org/eurocris/openaire/cris/validator/util/SamplesTest.java @@ -1,6 +1,7 @@ package org.eurocris.openaire.cris.validator.util; import java.io.IOException; +import java.net.URI; import javax.xml.parsers.ParserConfigurationException; @@ -9,17 +10,13 @@ import org.xml.sax.SAXException; /** - * The test suite to test the OpenAIRE Guidelines 1.1 set of samples. + * The test suite to test the current OpenAIRE CRIS Guidelines set of examples. */ public class SamplesTest extends CRISValidator { @SuppressWarnings("javadoc") public SamplesTest() throws MissingArgumentException, SAXException, IOException, ParserConfigurationException { - super(); - } - - static { - System.setProperty( "endpoint.to.validate", "file:samples/" ); + super( URI.create( "file:samples/" ).toURL() ); } } From e7996ec9f123fee456205790101c4c78c69f0119 Mon Sep 17 00:00:00 2001 From: Jan Dvorak Date: Tue, 27 Jun 2023 19:31:15 +0200 Subject: [PATCH 16/36] Clear metadata formats map on ListMetadataFormat or a new CRISValidator --- .../org/eurocris/openaire/cris/validator/CRISValidator.java | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/main/java/org/eurocris/openaire/cris/validator/CRISValidator.java b/src/main/java/org/eurocris/openaire/cris/validator/CRISValidator.java index 27fb28e..96e69bf 100644 --- a/src/main/java/org/eurocris/openaire/cris/validator/CRISValidator.java +++ b/src/main/java/org/eurocris/openaire/cris/validator/CRISValidator.java @@ -179,6 +179,7 @@ public CRISValidator() throws MissingArgumentException, SAXException, IOExceptio } final URL endpointBaseUrl = URI.create( endpointUrl ).toURL(); endpoint = new OAIPMHEndpoint( endpointBaseUrl, getParserSchema(), CONN_STREAM_FACTORY ); + metadataFormatsByPrefix.clear(); } } @@ -191,6 +192,7 @@ public CRISValidator() throws MissingArgumentException, SAXException, IOExceptio */ public CRISValidator( final URL endpointBaseUrl ) throws SAXException, IOException, ParserConfigurationException { endpoint = new OAIPMHEndpoint( endpointBaseUrl, getParserSchema(), CONN_STREAM_FACTORY ); + metadataFormatsByPrefix.clear(); } /** @@ -329,6 +331,7 @@ public boolean test( final DescriptionType description ) { */ @Test public void check010_MetadataFormats() throws Exception { + metadataFormatsByPrefix.clear(); CheckingIterable checker = CheckingIterable.over( endpoint.callListMetadataFormats().getMetadataFormat() ); checker = checker.checkUnique( MetadataFormatType::getMetadataPrefix, "Metadata prefix not unique" ); checker = checker.checkUnique( MetadataFormatType::getMetadataNamespace, "Metadata namespace not unique" ); From 7841ddfe314c4ed622316ac834f53641e807422c Mon Sep 17 00:00:00 2001 From: Jan Dvorak Date: Tue, 27 Jun 2023 19:34:17 +0200 Subject: [PATCH 17/36] Make better reporting --- .../org/eurocris/openaire/cris/validator/CRISValidator.java | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/main/java/org/eurocris/openaire/cris/validator/CRISValidator.java b/src/main/java/org/eurocris/openaire/cris/validator/CRISValidator.java index 96e69bf..b51f320 100644 --- a/src/main/java/org/eurocris/openaire/cris/validator/CRISValidator.java +++ b/src/main/java/org/eurocris/openaire/cris/validator/CRISValidator.java @@ -345,7 +345,8 @@ public void check010_MetadataFormats() throws Exception { return mft; } ); final long nMetadataFormats = checker.run(); - System.out.println( "Having " + metadataFormatsByPrefix.size() + " OpenAIRE CRIS metadata formats (out of the total " + nMetadataFormats + " metadata formats)" ); + final int nOpenAireMetadataFormats = metadataFormatsByPrefix.size(); + System.out.println( "Having " + nOpenAireMetadataFormats + " OpenAIRE CRIS metadata formats (out of the total " + nMetadataFormats + " metadata formats)" ); } private CheckingIterable wrapCheckMetadataFormatPresent( final CheckingIterable parent ) { From 66f7c85585e6113dabe3478e5be848d48ecaf39b Mon Sep 17 00:00:00 2001 From: Jan Dvorak Date: Tue, 27 Jun 2023 19:42:41 +0200 Subject: [PATCH 18/36] Adjust the description to reflect more versions are supported --- README.md | 2 +- pom.xml | 2 +- .../eurocris/openaire/cris/validator/CRISValidator.java | 8 +++++--- 3 files changed, 7 insertions(+), 5 deletions(-) diff --git a/README.md b/README.md index a11619c..5895b07 100644 --- a/README.md +++ b/README.md @@ -1,7 +1,7 @@ # OpenAIRE CRIS validator A tool to assess whether an OAI-PMH endpoint can provide research information -complying with the [OpenAIRE Guidelines for CRIS Managers 1.1](https://github.com/openaire/guidelines-cris-managers). +complying with the [OpenAIRE Guidelines for CRIS Managers](https://github.com/openaire/guidelines-cris-managers) version 1.1 or higher. It covers [these checks](CHECKS.md). This is a command-line Java tool that is organized as a [JUnit](https://junit.org/junit4/) test suite. diff --git a/pom.xml b/pom.xml index c3f0d25..d1e17a8 100644 --- a/pom.xml +++ b/pom.xml @@ -4,7 +4,7 @@ openaire-cris-validator 2.0.0-SNAPSHOT OpenAIRE CRIS Prototype Validator - A basic prototype validator to assess whether an OAI-PMH endpoint complies with the requirements set by the OpenAIRE Guidelines for CRIS Manager 1.1. + A basic prototype validator to assess whether an OAI-PMH endpoint complies with the requirements set by the OpenAIRE Guidelines for CRIS Manager 1.1 or higher. euroCRIS https://www.eurocris.org/ diff --git a/src/main/java/org/eurocris/openaire/cris/validator/CRISValidator.java b/src/main/java/org/eurocris/openaire/cris/validator/CRISValidator.java index b51f320..8cc90b9 100644 --- a/src/main/java/org/eurocris/openaire/cris/validator/CRISValidator.java +++ b/src/main/java/org/eurocris/openaire/cris/validator/CRISValidator.java @@ -66,12 +66,12 @@ import org.xml.sax.SAXParseException; /** - * Validating a given OAI-PMH endpoint for compliance with the OpenAIRE Guidelines for CRIS Managers 1.1. + * Validating a given OAI-PMH endpoint for compliance with the OpenAIRE Guidelines for CRIS Managers 1.1 or higher. * This is organized as a JUnit4 test suite that works over a given OAI-PMH endpoint. * @author jdvorak001 * @see the text of the specification * @see the github project of the specification, XML Schema and examples - * @see this project on GitHub + * @see this project on GitHub */ @FixMethodOrder( value=MethodSorters.NAME_ASCENDING ) public class CRISValidator { @@ -341,12 +341,14 @@ public void check010_MetadataFormats() throws Exception { final String prefix = mft.getMetadataPrefix(); if ( prefix.startsWith(OAI_CERIF_OPENAIRE__METADATA_PREFIX) ) { metadataFormatsByPrefix.put( prefix, mft ); + assertTrue( "The metadata NS for prefix " + prefix + " does not start with " + OPENAIRE_CERIF_XMLNS_PREFIX, mft.getMetadataNamespace().startsWith(OPENAIRE_CERIF_XMLNS_PREFIX) ); } return mft; } ); final long nMetadataFormats = checker.run(); final int nOpenAireMetadataFormats = metadataFormatsByPrefix.size(); System.out.println( "Having " + nOpenAireMetadataFormats + " OpenAIRE CRIS metadata formats (out of the total " + nMetadataFormats + " metadata formats)" ); + assertTrue( "No OpenAIRE CRIS metadata prefix", nOpenAireMetadataFormats > 0 ); } private CheckingIterable wrapCheckMetadataFormatPresent( final CheckingIterable parent ) { @@ -380,7 +382,7 @@ public boolean test( final MetadataFormatType mf ) { } }; - return parent.checkContains( predicate, new AssertionError( "MetadataFormat for the OpenAIRE Guidelines for CRIS Managers not present (2)" ) ); + return parent.checkContains( predicate, new AssertionError( "Metadata format for the OpenAIRE Guidelines for CRIS Managers not present (2)" ) ); } /** From dcdad9082e2dfb17203f8f8c1af149ff422bef16 Mon Sep 17 00:00:00 2001 From: Jan Dvorak Date: Tue, 27 Jun 2023 19:49:05 +0200 Subject: [PATCH 19/36] JRE javadoc at https://devdocs.io/openjdk~17/ --- README.md | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/README.md b/README.md index 5895b07..eb75f7e 100644 --- a/README.md +++ b/README.md @@ -51,17 +51,17 @@ The validator copies the responses to the requests it makes into files in the `d [CRISValidator](./src/main/java/org/eurocris/openaire/cris/validator/CRISValidator.java) 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](./src/main/java/org/eurocris/openaire/cris/validator/util/CheckingIterable.java)); and - * it builds an internal representation: a [HashMap](https://docs.oracle.com/javase/8/docs/api/java/util/HashMap.html) of trees that consist of [CERIFNode](./src/main/java/org/eurocris/openaire/cris/validator/tree/CERIFNode.java)s. The last test, `check990_CheckReferentialIntegrityAndFunctionalDependency`, works on this internal representation. + * it builds an internal representation: a [HashMap](https://devdocs.io/openjdk~17/java.base/java/util/hashmap) of trees that consist of [CERIFNode](./src/main/java/org/eurocris/openaire/cris/validator/tree/CERIFNode.java)s. The last test, `check990_CheckReferentialIntegrityAndFunctionalDependency`, works on this internal representation. [OAIPMHEndpoint](./src/main/java/org/eurocris/openaire/cris/validator/OAIPMHEndpoint.java) is an independent implementation of an [OAI-PMH 2.0](https://www.openarchives.org/OAI/openarchivesprotocol.html) 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](https://docs.oracle.com/javase/8/docs/api/java/lang/Iterable.html) is returned +For requests that list objects (i.e., `ListIdentifiers`, `ListRecords` or `ListSets`) an [Iterable](https://devdocs.io/openjdk~17/java.base/java/lang/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](./src/main/java/org/eurocris/openaire/cris/validator/http/CompressionHandlingHttpURLConnectionAdapter.java) is a transparent compression-handling wrapper around an [HttpURLConnection](https://docs.oracle.com/javase/8/docs/api/java/net/HttpURLConnection.html). +[CompressionHandlingHttpURLConnectionAdapter](./src/main/java/org/eurocris/openaire/cris/validator/http/CompressionHandlingHttpURLConnectionAdapter.java) is a transparent compression-handling wrapper around an [HttpURLConnection](https://devdocs.io/openjdk~17/java.base/java/net/httpurlconnection). ## Feedback From 9d171e18f772d4f25b311bb9d28f68f1e1681830 Mon Sep 17 00:00:00 2001 From: Jan Dvorak Date: Tue, 27 Jun 2023 19:50:39 +0200 Subject: [PATCH 20/36] Use relative URLs to reference a subdirectory and a file in this project --- README.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index eb75f7e..6402c96 100644 --- a/README.md +++ b/README.md @@ -12,7 +12,7 @@ This is Open Source software, available under the terms of the [Apache 2.0 Licen ![CI workflow](https://github.com/euroCRIS/openaire-cris-validator/actions/workflows/maven.yml/badge.svg) -← checking if the software builds and runs on the [example files from the standard](https://github.com/openaire/guidelines-cris-managers/tree/master/samples). +← checking if the software builds and runs on the [example files from the standard](./samples). ## Usage @@ -23,7 +23,7 @@ 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](https://github.com/EuroCRIS/openaire-cris-validator/blob/master/pom.xml#L16). +We compile for Java 17 by default, but you can switch to 11 or 1.8 [in the POM file](./pom.xml#L16). ### Run From ebd43d16cb696dbf3ba10107c1268e395b96dfa2 Mon Sep 17 00:00:00 2001 From: Jan Dvorak Date: Tue, 27 Jun 2023 19:51:21 +0200 Subject: [PATCH 21/36] Put the current year in the copyright --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index 6402c96..044cb8a 100644 --- a/README.md +++ b/README.md @@ -72,7 +72,7 @@ Please submit a [github issue](https://github.com/euroCRIS/openaire-cris-validat ## License -Copyright 2018–2022 Jan Dvořák ORCID iD icon https://orcid.org/0000-0001-8985-152X and other contributors +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. From c923fed61854eeb3adbbbd9a86514d362253f8df Mon Sep 17 00:00:00 2001 From: Jan Dvorak Date: Tue, 27 Jun 2023 21:01:48 +0200 Subject: [PATCH 22/36] Adjust the description to reflect more versions are supported --- CHECKS.md | 24 ++++++++++++++++-------- 1 file changed, 16 insertions(+), 8 deletions(-) diff --git a/CHECKS.md b/CHECKS.md index 4d95730..af432a6 100644 --- a/CHECKS.md +++ b/CHECKS.md @@ -2,28 +2,36 @@ The meaning of the SHALL keyword is specified in [RFC 2119](https://www.ietf.org/rfc/rfc2119.txt). -(0) Any XML response returned by the endpoint to the requests specified below SHALL validate with respect to the following XML Schemas: - for the namespace , - for the namespace and - for the namespace . +Upon startup, the validator constructs the table of supported OpenAIRE CRIS metadata schemas (the *TSOACMS* in the sequel). +It currently includes the following schemas: +| XML namespace URI | XML Schema source location | +|--------------------------------------------|-----------------------------------------------------------------------------------| +| https://www.openaire.eu/cerif-profile/1.1/ | [src/main/resources/schemas/cerif_profile_1_1/openaire-cerif-profile.xsd](./src/main/resources/schemas/cerif_profile_1_1/openaire-cerif-profile.xsd) | +| https://www.openaire.eu/cerif-profile/1.2/ | [schemas/openaire-cerif-profile.xsd](../../../../openaire/guidelines-cris-managers/blob/v1.2/schemas/openaire-cerif-profile.xsd) in the [OpenAIRE CRIS Guidelines project](../../../../openaire/guidelines-cris-managers) | + +(0) Any XML response returned by the endpoint to the requests specified below SHALL validate with respect to the XML Schemas from the *TSOACMS* and the following XML Schemas: +| XML namespace URI | XML Schema source location | +|-------------------|----------------------------| +| http://www.openarchives.org/OAI/2.0/ | http://www.openarchives.org/OAI/2.0/OAI-PMH.xsd | +| http://www.openarchives.org/OAI/2.0/oai-identifier | http://www.openarchives.org/OAI/2.0/oai-identifier.xsd | (1) The response to an `Identify` request SHALL include: -(a) exactly one `description` element that contains a `Service` element from namespace and +(a) exactly one `description` element that contains a `Service` element from a namespace from the *TSOACMS* and (b) exactly one `description` element that contains an `oai-identifier` element from namespace . 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 -as per [specification](http://openaire-guidelines-for-cris-managers.readthedocs.io/en/latest/implementation.html#metadata-format-and-prefix). +at least one prefix starting with `oai_cerif_openaire` with namespace URI starting with +as per the [specification](http://openaire-guidelines-for-cris-managers.readthedocs.io/en/latest/implementation.html#metadata-format-and-prefix). (3) The list of supported sets returned by the `ListSets` request SHALL include all of the sets as per the [specification](http://openaire-guidelines-for-cris-managers.readthedocs.io/en/latest/implementation.html#openaire-oai-pmh-sets). (4) - removed -(5) When all objects from the sets as per the [specification](http://openaire-guidelines-for-cris-managers.readthedocs.io/en/latest/implementation.html#openaire-oai-pmh-sets) +(5) When all objects from the sets and metadata formats as per the [specification](http://openaire-guidelines-for-cris-managers.readthedocs.io/en/latest/implementation.html#openaire-oai-pmh-sets) 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](http://openaire-guidelines-for-cris-managers.readthedocs.io/en/latest/implementation.html#oai-identifiers), 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. From 712bfdb58878697665d1680dc1e40f5b9eade611 Mon Sep 17 00:00:00 2001 From: Jan Dvorak Date: Tue, 27 Jun 2023 21:26:26 +0200 Subject: [PATCH 23/36] Checks (2a) and (2b) on metadata prefixes --- CHECKS.md | 7 +-- pom.xml | 17 ++++++ .../cris/validator/CRISValidator.java | 5 +- .../metadataTests/MetadataFormatTest.java | 53 +++++++++++++++++++ .../metadataTests/check_2a/_verb=Identify.xml | 51 ++++++++++++++++++ .../check_2a/_verb=ListMetadataFormats.xml | 22 ++++++++ .../metadataTests/check_2b/_verb=Identify.xml | 51 ++++++++++++++++++ .../check_2b/_verb=ListMetadataFormats.xml | 28 ++++++++++ 8 files changed, 228 insertions(+), 6 deletions(-) create mode 100644 src/test/java/org/eurocris/openaire/cris/validator/metadataTests/MetadataFormatTest.java create mode 100644 src/test/java/org/eurocris/openaire/cris/validator/metadataTests/check_2a/_verb=Identify.xml create mode 100644 src/test/java/org/eurocris/openaire/cris/validator/metadataTests/check_2a/_verb=ListMetadataFormats.xml create mode 100644 src/test/java/org/eurocris/openaire/cris/validator/metadataTests/check_2b/_verb=Identify.xml create mode 100644 src/test/java/org/eurocris/openaire/cris/validator/metadataTests/check_2b/_verb=ListMetadataFormats.xml diff --git a/CHECKS.md b/CHECKS.md index af432a6..53b7f3f 100644 --- a/CHECKS.md +++ b/CHECKS.md @@ -22,9 +22,10 @@ The `oai-identifier/repositoryIdentifier` from (b) will be refered to as `{CRIS_ (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 -at least one prefix starting with `oai_cerif_openaire` with namespace URI starting with -as per the [specification](http://openaire-guidelines-for-cris-managers.readthedocs.io/en/latest/implementation.html#metadata-format-and-prefix). +(2) As per the [specification](http://openaire-guidelines-for-cris-managers.readthedocs.io/en/latest/implementation.html#metadata-format-and-prefix), +the list of supported metadata formats returned by the general `ListMetadataFormats` request (i.e., no `identifier` parameter specified) +(a) SHALL include at least one prefix starting with `oai_cerif_openaire`; +(b) if the metadata prefix starts with `oai_cerif_openaire`, the corresponding XML namespace URI SHALL start with . (3) The list of supported sets returned by the `ListSets` request SHALL include all of the sets as per the [specification](http://openaire-guidelines-for-cris-managers.readthedocs.io/en/latest/implementation.html#openaire-oai-pmh-sets). diff --git a/pom.xml b/pom.xml index d1e17a8..fb37d8f 100644 --- a/pom.xml +++ b/pom.xml @@ -140,6 +140,23 @@ + + copy-test-resources + generate-sources + + testResources + + + ${basedir}/target + + + src/test/java + **/_verb*.xml + test-classes + + + + diff --git a/src/main/java/org/eurocris/openaire/cris/validator/CRISValidator.java b/src/main/java/org/eurocris/openaire/cris/validator/CRISValidator.java index 8cc90b9..f444586 100644 --- a/src/main/java/org/eurocris/openaire/cris/validator/CRISValidator.java +++ b/src/main/java/org/eurocris/openaire/cris/validator/CRISValidator.java @@ -341,14 +341,13 @@ public void check010_MetadataFormats() throws Exception { final String prefix = mft.getMetadataPrefix(); if ( prefix.startsWith(OAI_CERIF_OPENAIRE__METADATA_PREFIX) ) { metadataFormatsByPrefix.put( prefix, mft ); - assertTrue( "The metadata NS for prefix " + prefix + " does not start with " + OPENAIRE_CERIF_XMLNS_PREFIX, mft.getMetadataNamespace().startsWith(OPENAIRE_CERIF_XMLNS_PREFIX) ); + assertTrue( "The metadata NS for prefix " + prefix + " does not start with " + OPENAIRE_CERIF_XMLNS_PREFIX + " (2b)", mft.getMetadataNamespace().startsWith(OPENAIRE_CERIF_XMLNS_PREFIX) ); } return mft; } ); final long nMetadataFormats = checker.run(); final int nOpenAireMetadataFormats = metadataFormatsByPrefix.size(); System.out.println( "Having " + nOpenAireMetadataFormats + " OpenAIRE CRIS metadata formats (out of the total " + nMetadataFormats + " metadata formats)" ); - assertTrue( "No OpenAIRE CRIS metadata prefix", nOpenAireMetadataFormats > 0 ); } private CheckingIterable wrapCheckMetadataFormatPresent( final CheckingIterable parent ) { @@ -382,7 +381,7 @@ public boolean test( final MetadataFormatType mf ) { } }; - return parent.checkContains( predicate, new AssertionError( "Metadata format for the OpenAIRE Guidelines for CRIS Managers not present (2)" ) ); + return parent.checkContains( predicate, new AssertionError( "Metadata format for the OpenAIRE Guidelines for CRIS Managers not present (2a)" ) ); } /** diff --git a/src/test/java/org/eurocris/openaire/cris/validator/metadataTests/MetadataFormatTest.java b/src/test/java/org/eurocris/openaire/cris/validator/metadataTests/MetadataFormatTest.java new file mode 100644 index 0000000..3fb83a3 --- /dev/null +++ b/src/test/java/org/eurocris/openaire/cris/validator/metadataTests/MetadataFormatTest.java @@ -0,0 +1,53 @@ +package org.eurocris.openaire.cris.validator.metadataTests; + +import static org.junit.Assert.assertEquals; +import static org.junit.Assert.fail; + +import java.net.URL; + +import org.eurocris.openaire.cris.validator.CRISValidator; +import org.junit.Test; + +/** + * Test the behaviour of the CRISValidator in diverse edge cases. + * @author jdvorak001 + */ +public class MetadataFormatTest { + + /** + * Test that {@link CRISValidator} reports when no OpenAIRE CRIS metadata format is offered. + * @see (2a) in CHECKS.md + * @throws Exception in case of some error + */ + @Test + public void testCheck2a() throws Exception { + final URL url = MetadataFormatTest.class.getResource( "check_2a/" ); + final CRISValidator validator = new CRISValidator( url ); + validator.check000_Identify(); + try { + validator.check010_MetadataFormats(); + fail( "Problem: check (2a) undetected" ); + } catch ( final AssertionError e ) { + assertEquals( "Metadata format for the OpenAIRE Guidelines for CRIS Managers not present (2a)", e.getMessage() ); + } + } + + /** + * Test that {@link CRISValidator} reports when an OpenAIRE CRIS metadata format has a wrong namespace URI. + * @see (2b) in CHECKS.md + * @throws Exception in case of some error + */ + @Test + public void testCheck2b() throws Exception { + final URL url = MetadataFormatTest.class.getResource( "check_2b/" ); + final CRISValidator validator = new CRISValidator( url ); + validator.check000_Identify(); + try { + validator.check010_MetadataFormats(); + fail( "Problem: check (2b) undetected" ); + } catch ( final AssertionError e ) { + assertEquals( "The metadata NS for prefix oai_cerif_openaire does not start with " + CRISValidator.OPENAIRE_CERIF_XMLNS_PREFIX + " (2b)", e.getMessage() ); + } + } + +} diff --git a/src/test/java/org/eurocris/openaire/cris/validator/metadataTests/check_2a/_verb=Identify.xml b/src/test/java/org/eurocris/openaire/cris/validator/metadataTests/check_2a/_verb=Identify.xml new file mode 100644 index 0000000..33427c8 --- /dev/null +++ b/src/test/java/org/eurocris/openaire/cris/validator/metadataTests/check_2a/_verb=Identify.xml @@ -0,0 +1,51 @@ + + + + + 2018-04-07T12:26:10Z + http://cris.example.org/openaire/connector + + + cris.example.org + https://cris.example.org/openaire/connector + 2.0 + admin@cris.example.org + 2008-11-23T13:11:02Z + no + YYYY-MM-DDThh:mm:ssZ + + + + oai + cris.example.org + : + oai:cris.example.org:OrgUnits/312347 + + + + + + https://www.openaire.eu/cerif-profile/vocab/OpenAIRE_Service_Compatibility#1.2 + cris.example.org + The example CRIS + An example CRIS that complies with the OpenAIRE Guidelines for CRIS Managers v.1.2. + + https://cris.example.org/ + https://cris.example.org/openaire/connector + https://cris.example.org/openaire/resources/subject-headings.xml + + + + EKT + + + + + + + + \ No newline at end of file diff --git a/src/test/java/org/eurocris/openaire/cris/validator/metadataTests/check_2a/_verb=ListMetadataFormats.xml b/src/test/java/org/eurocris/openaire/cris/validator/metadataTests/check_2a/_verb=ListMetadataFormats.xml new file mode 100644 index 0000000..c9fb668 --- /dev/null +++ b/src/test/java/org/eurocris/openaire/cris/validator/metadataTests/check_2a/_verb=ListMetadataFormats.xml @@ -0,0 +1,22 @@ + + + + + 2023-06-18T10:27:20Z + http://cris.example.org/openaire/connector + + + + + oai_blablablah + https://www.openaire.eu/schema/cris-xxx/42.0/openaire-cerif-profile.xsd + https://www.openaire.eu/cerif-profile-xxx/ + + + + + \ No newline at end of file diff --git a/src/test/java/org/eurocris/openaire/cris/validator/metadataTests/check_2b/_verb=Identify.xml b/src/test/java/org/eurocris/openaire/cris/validator/metadataTests/check_2b/_verb=Identify.xml new file mode 100644 index 0000000..33427c8 --- /dev/null +++ b/src/test/java/org/eurocris/openaire/cris/validator/metadataTests/check_2b/_verb=Identify.xml @@ -0,0 +1,51 @@ + + + + + 2018-04-07T12:26:10Z + http://cris.example.org/openaire/connector + + + cris.example.org + https://cris.example.org/openaire/connector + 2.0 + admin@cris.example.org + 2008-11-23T13:11:02Z + no + YYYY-MM-DDThh:mm:ssZ + + + + oai + cris.example.org + : + oai:cris.example.org:OrgUnits/312347 + + + + + + https://www.openaire.eu/cerif-profile/vocab/OpenAIRE_Service_Compatibility#1.2 + cris.example.org + The example CRIS + An example CRIS that complies with the OpenAIRE Guidelines for CRIS Managers v.1.2. + + https://cris.example.org/ + https://cris.example.org/openaire/connector + https://cris.example.org/openaire/resources/subject-headings.xml + + + + EKT + + + + + + + + \ No newline at end of file diff --git a/src/test/java/org/eurocris/openaire/cris/validator/metadataTests/check_2b/_verb=ListMetadataFormats.xml b/src/test/java/org/eurocris/openaire/cris/validator/metadataTests/check_2b/_verb=ListMetadataFormats.xml new file mode 100644 index 0000000..6262ff8 --- /dev/null +++ b/src/test/java/org/eurocris/openaire/cris/validator/metadataTests/check_2b/_verb=ListMetadataFormats.xml @@ -0,0 +1,28 @@ + + + + + 2023-06-18T10:27:20Z + http://cris.example.org/openaire/connector + + + + + oai_cerif_openaire + https://www.openaire.eu/schema/cris-xxx/42.0/openaire-cerif-profile.xsd + https://www.openaire.eu/cerif-profile-xxx/ + + + + oai_cerif_openaire_v1_1 + https://www.openaire.eu/schema/cris/1.1.1/openaire-cerif-profile.xsd + https://www.openaire.eu/cerif-profile/1.1/ + + + + + \ No newline at end of file From 41c765d540854fab21f4f7015f6f74f893e42c98 Mon Sep 17 00:00:00 2001 From: Jan Dvorak Date: Tue, 27 Jun 2023 22:00:03 +0200 Subject: [PATCH 24/36] Check (2c) on metadata prefixes --- CHECKS.md | 3 +- .../cris/validator/CRISValidator.java | 2 +- .../metadataTests/MetadataFormatTest.java | 18 +++++++ .../metadataTests/check_2c/_verb=Identify.xml | 51 +++++++++++++++++++ .../check_2c/_verb=ListMetadataFormats.xml | 22 ++++++++ 5 files changed, 94 insertions(+), 2 deletions(-) create mode 100644 src/test/java/org/eurocris/openaire/cris/validator/metadataTests/check_2c/_verb=Identify.xml create mode 100644 src/test/java/org/eurocris/openaire/cris/validator/metadataTests/check_2c/_verb=ListMetadataFormats.xml diff --git a/CHECKS.md b/CHECKS.md index 53b7f3f..ee268a0 100644 --- a/CHECKS.md +++ b/CHECKS.md @@ -25,7 +25,8 @@ The `oai-identifier/repositoryIdentifier` from (b) will be refered to as `{CRIS_ (2) As per the [specification](http://openaire-guidelines-for-cris-managers.readthedocs.io/en/latest/implementation.html#metadata-format-and-prefix), the list of supported metadata formats returned by the general `ListMetadataFormats` request (i.e., no `identifier` parameter specified) (a) SHALL include at least one prefix starting with `oai_cerif_openaire`; -(b) if the metadata prefix starts with `oai_cerif_openaire`, the corresponding XML namespace URI SHALL start with . +(b) if the metadata prefix starts with `oai_cerif_openaire`, the corresponding XML namespace URI SHALL start with ; +(c) if XML namespace URI starts with , the metadata prefix SHALL start `oai_cerif_openaire`. (3) The list of supported sets returned by the `ListSets` request SHALL include all of the sets as per the [specification](http://openaire-guidelines-for-cris-managers.readthedocs.io/en/latest/implementation.html#openaire-oai-pmh-sets). diff --git a/src/main/java/org/eurocris/openaire/cris/validator/CRISValidator.java b/src/main/java/org/eurocris/openaire/cris/validator/CRISValidator.java index f444586..6810a6b 100644 --- a/src/main/java/org/eurocris/openaire/cris/validator/CRISValidator.java +++ b/src/main/java/org/eurocris/openaire/cris/validator/CRISValidator.java @@ -357,7 +357,7 @@ private CheckingIterable wrapCheckMetadataFormatPresent( fin public boolean test( final MetadataFormatType mf ) { final String metadataNs = mf.getMetadataNamespace(); if ( metadataNs.startsWith( OPENAIRE_CERIF_XMLNS_PREFIX ) ) { - assertTrue( "The metadata prefix of an OpenAIRE CRIS Guidelines namespace shall start with " + OAI_CERIF_OPENAIRE__METADATA_PREFIX, mf.getMetadataPrefix().startsWith(OAI_CERIF_OPENAIRE__METADATA_PREFIX) ); + assertTrue( "The metadata prefix for XML namespace " + metadataNs + " does not start with " + OAI_CERIF_OPENAIRE__METADATA_PREFIX + " (2c)", mf.getMetadataPrefix().startsWith(OAI_CERIF_OPENAIRE__METADATA_PREFIX) ); try { final DocumentBuilder db = getDocumentBuilderFactory().newDocumentBuilder(); final String schemaUrl = mf.getSchema(); diff --git a/src/test/java/org/eurocris/openaire/cris/validator/metadataTests/MetadataFormatTest.java b/src/test/java/org/eurocris/openaire/cris/validator/metadataTests/MetadataFormatTest.java index 3fb83a3..80eb6a6 100644 --- a/src/test/java/org/eurocris/openaire/cris/validator/metadataTests/MetadataFormatTest.java +++ b/src/test/java/org/eurocris/openaire/cris/validator/metadataTests/MetadataFormatTest.java @@ -50,4 +50,22 @@ public void testCheck2b() throws Exception { } } + /** + * Test that {@link CRISValidator} reports when an OpenAIRE CRIS XML namespace has a wrong metadata format. + * @see (2c) in CHECKS.md + * @throws Exception in case of some error + */ + @Test + public void testCheck2c() throws Exception { + final URL url = MetadataFormatTest.class.getResource( "check_2c/" ); + final CRISValidator validator = new CRISValidator( url ); + validator.check000_Identify(); + try { + validator.check010_MetadataFormats(); + fail( "Problem: check (2c) undetected" ); + } catch ( final AssertionError e ) { + assertEquals( "The metadata prefix for XML namespace https://www.openaire.eu/cerif-profile/1.2/ does not start with " + CRISValidator.OAI_CERIF_OPENAIRE__METADATA_PREFIX + " (2c)", e.getMessage() ); + } + } + } diff --git a/src/test/java/org/eurocris/openaire/cris/validator/metadataTests/check_2c/_verb=Identify.xml b/src/test/java/org/eurocris/openaire/cris/validator/metadataTests/check_2c/_verb=Identify.xml new file mode 100644 index 0000000..33427c8 --- /dev/null +++ b/src/test/java/org/eurocris/openaire/cris/validator/metadataTests/check_2c/_verb=Identify.xml @@ -0,0 +1,51 @@ + + + + + 2018-04-07T12:26:10Z + http://cris.example.org/openaire/connector + + + cris.example.org + https://cris.example.org/openaire/connector + 2.0 + admin@cris.example.org + 2008-11-23T13:11:02Z + no + YYYY-MM-DDThh:mm:ssZ + + + + oai + cris.example.org + : + oai:cris.example.org:OrgUnits/312347 + + + + + + https://www.openaire.eu/cerif-profile/vocab/OpenAIRE_Service_Compatibility#1.2 + cris.example.org + The example CRIS + An example CRIS that complies with the OpenAIRE Guidelines for CRIS Managers v.1.2. + + https://cris.example.org/ + https://cris.example.org/openaire/connector + https://cris.example.org/openaire/resources/subject-headings.xml + + + + EKT + + + + + + + + \ No newline at end of file diff --git a/src/test/java/org/eurocris/openaire/cris/validator/metadataTests/check_2c/_verb=ListMetadataFormats.xml b/src/test/java/org/eurocris/openaire/cris/validator/metadataTests/check_2c/_verb=ListMetadataFormats.xml new file mode 100644 index 0000000..b32231f --- /dev/null +++ b/src/test/java/org/eurocris/openaire/cris/validator/metadataTests/check_2c/_verb=ListMetadataFormats.xml @@ -0,0 +1,22 @@ + + + + + 2023-06-18T10:27:20Z + http://cris.example.org/openaire/connector + + + + + oai_xxx + https://www.openaire.eu/schema/cris/1.2/openaire-cerif-profile.xsd + https://www.openaire.eu/cerif-profile/1.2/ + + + + + \ No newline at end of file From a7d5608c757885cd4d8a200391ac8b6cae0bcadb Mon Sep 17 00:00:00 2001 From: Jan Dvorak Date: Tue, 27 Jun 2023 22:23:03 +0200 Subject: [PATCH 25/36] Checks (2d), (2e) and (2f) on metadata prefixes - uniqueness --- CHECKS.md | 7 ++- .../cris/validator/CRISValidator.java | 6 +-- .../metadataTests/MetadataFormatTest.java | 54 +++++++++++++++++++ .../metadataTests/check_2d/_verb=Identify.xml | 51 ++++++++++++++++++ .../check_2d/_verb=ListMetadataFormats.xml | 28 ++++++++++ .../metadataTests/check_2e/_verb=Identify.xml | 51 ++++++++++++++++++ .../check_2e/_verb=ListMetadataFormats.xml | 28 ++++++++++ .../metadataTests/check_2f/_verb=Identify.xml | 51 ++++++++++++++++++ .../check_2f/_verb=ListMetadataFormats.xml | 28 ++++++++++ 9 files changed, 299 insertions(+), 5 deletions(-) create mode 100644 src/test/java/org/eurocris/openaire/cris/validator/metadataTests/check_2d/_verb=Identify.xml create mode 100644 src/test/java/org/eurocris/openaire/cris/validator/metadataTests/check_2d/_verb=ListMetadataFormats.xml create mode 100644 src/test/java/org/eurocris/openaire/cris/validator/metadataTests/check_2e/_verb=Identify.xml create mode 100644 src/test/java/org/eurocris/openaire/cris/validator/metadataTests/check_2e/_verb=ListMetadataFormats.xml create mode 100644 src/test/java/org/eurocris/openaire/cris/validator/metadataTests/check_2f/_verb=Identify.xml create mode 100644 src/test/java/org/eurocris/openaire/cris/validator/metadataTests/check_2f/_verb=ListMetadataFormats.xml diff --git a/CHECKS.md b/CHECKS.md index ee268a0..e1bcaa9 100644 --- a/CHECKS.md +++ b/CHECKS.md @@ -25,8 +25,11 @@ The `oai-identifier/repositoryIdentifier` from (b) will be refered to as `{CRIS_ (2) As per the [specification](http://openaire-guidelines-for-cris-managers.readthedocs.io/en/latest/implementation.html#metadata-format-and-prefix), the list of supported metadata formats returned by the general `ListMetadataFormats` request (i.e., no `identifier` parameter specified) (a) SHALL include at least one prefix starting with `oai_cerif_openaire`; -(b) if the metadata prefix starts with `oai_cerif_openaire`, the corresponding XML namespace URI SHALL start with ; -(c) if XML namespace URI starts with , the metadata prefix SHALL start `oai_cerif_openaire`. +(b) if the metadata prefix starts with `oai_cerif_openaire`, the corresponding XML namespace URI SHALL start with . +(c) If XML namespace URI starts with , the metadata prefix SHALL start `oai_cerif_openaire`. +(d) The metadata prefixes SHALL be unique. +(e) The XML namespace URIs SHALL be unique. +(f) The XML Schema location URLs SHALL be unique. (3) The list of supported sets returned by the `ListSets` request SHALL include all of the sets as per the [specification](http://openaire-guidelines-for-cris-managers.readthedocs.io/en/latest/implementation.html#openaire-oai-pmh-sets). diff --git a/src/main/java/org/eurocris/openaire/cris/validator/CRISValidator.java b/src/main/java/org/eurocris/openaire/cris/validator/CRISValidator.java index 6810a6b..905e74e 100644 --- a/src/main/java/org/eurocris/openaire/cris/validator/CRISValidator.java +++ b/src/main/java/org/eurocris/openaire/cris/validator/CRISValidator.java @@ -333,9 +333,9 @@ public boolean test( final DescriptionType description ) { public void check010_MetadataFormats() throws Exception { metadataFormatsByPrefix.clear(); CheckingIterable checker = CheckingIterable.over( endpoint.callListMetadataFormats().getMetadataFormat() ); - checker = checker.checkUnique( MetadataFormatType::getMetadataPrefix, "Metadata prefix not unique" ); - checker = checker.checkUnique( MetadataFormatType::getMetadataNamespace, "Metadata namespace not unique" ); - checker = checker.checkUnique( MetadataFormatType::getSchema, "Metadata schema location not unique" ); + checker = checker.checkUnique( MetadataFormatType::getMetadataPrefix, "Metadata prefix not unique (2d)" ); + checker = checker.checkUnique( MetadataFormatType::getMetadataNamespace, "Metadata namespace not unique (2e)" ); + checker = checker.checkUnique( MetadataFormatType::getSchema, "Metadata schema location not unique (2f)" ); checker = wrapCheckMetadataFormatPresent( checker ); checker = checker.map( (MetadataFormatType mft) -> { final String prefix = mft.getMetadataPrefix(); diff --git a/src/test/java/org/eurocris/openaire/cris/validator/metadataTests/MetadataFormatTest.java b/src/test/java/org/eurocris/openaire/cris/validator/metadataTests/MetadataFormatTest.java index 80eb6a6..5517b9c 100644 --- a/src/test/java/org/eurocris/openaire/cris/validator/metadataTests/MetadataFormatTest.java +++ b/src/test/java/org/eurocris/openaire/cris/validator/metadataTests/MetadataFormatTest.java @@ -68,4 +68,58 @@ public void testCheck2c() throws Exception { } } + /** + * Test that {@link CRISValidator} reports a non-unique metadata format. + * @see (2d) in CHECKS.md + * @throws Exception in case of some error + */ + @Test + public void testCheck2d() throws Exception { + final URL url = MetadataFormatTest.class.getResource( "check_2d/" ); + final CRISValidator validator = new CRISValidator( url ); + validator.check000_Identify(); + try { + validator.check010_MetadataFormats(); + fail( "Problem: check (2d) undetected" ); + } catch ( final AssertionError e ) { + assertEquals( "Metadata prefix not unique (2d); value: oai_cerif_openaire", e.getMessage() ); + } + } + + /** + * Test that {@link CRISValidator} reports a non-unique metadata namespace URI. + * @see (2e) in CHECKS.md + * @throws Exception in case of some error + */ + @Test + public void testCheck2e() throws Exception { + final URL url = MetadataFormatTest.class.getResource( "check_2e/" ); + final CRISValidator validator = new CRISValidator( url ); + validator.check000_Identify(); + try { + validator.check010_MetadataFormats(); + fail( "Problem: check (2e) undetected" ); + } catch ( final AssertionError e ) { + assertEquals( "Metadata namespace not unique (2e); value: https://www.openaire.eu/cerif-profile/1.2/", e.getMessage() ); + } + } + + /** + * Test that {@link CRISValidator} reports a non-unique XML Schema URL. + * @see (2f) in CHECKS.md + * @throws Exception in case of some error + */ + @Test + public void testCheck2f() throws Exception { + final URL url = MetadataFormatTest.class.getResource( "check_2f/" ); + final CRISValidator validator = new CRISValidator( url ); + validator.check000_Identify(); + try { + validator.check010_MetadataFormats(); + fail( "Problem: check (2f) undetected" ); + } catch ( final AssertionError e ) { + assertEquals( "Metadata schema location not unique (2f); value: https://www.openaire.eu/schema/cris/1.2/openaire-cerif-profile.xsd", e.getMessage() ); + } + } + } diff --git a/src/test/java/org/eurocris/openaire/cris/validator/metadataTests/check_2d/_verb=Identify.xml b/src/test/java/org/eurocris/openaire/cris/validator/metadataTests/check_2d/_verb=Identify.xml new file mode 100644 index 0000000..33427c8 --- /dev/null +++ b/src/test/java/org/eurocris/openaire/cris/validator/metadataTests/check_2d/_verb=Identify.xml @@ -0,0 +1,51 @@ + + + + + 2018-04-07T12:26:10Z + http://cris.example.org/openaire/connector + + + cris.example.org + https://cris.example.org/openaire/connector + 2.0 + admin@cris.example.org + 2008-11-23T13:11:02Z + no + YYYY-MM-DDThh:mm:ssZ + + + + oai + cris.example.org + : + oai:cris.example.org:OrgUnits/312347 + + + + + + https://www.openaire.eu/cerif-profile/vocab/OpenAIRE_Service_Compatibility#1.2 + cris.example.org + The example CRIS + An example CRIS that complies with the OpenAIRE Guidelines for CRIS Managers v.1.2. + + https://cris.example.org/ + https://cris.example.org/openaire/connector + https://cris.example.org/openaire/resources/subject-headings.xml + + + + EKT + + + + + + + + \ No newline at end of file diff --git a/src/test/java/org/eurocris/openaire/cris/validator/metadataTests/check_2d/_verb=ListMetadataFormats.xml b/src/test/java/org/eurocris/openaire/cris/validator/metadataTests/check_2d/_verb=ListMetadataFormats.xml new file mode 100644 index 0000000..8ec1b82 --- /dev/null +++ b/src/test/java/org/eurocris/openaire/cris/validator/metadataTests/check_2d/_verb=ListMetadataFormats.xml @@ -0,0 +1,28 @@ + + + + + 2023-06-18T10:27:20Z + http://cris.example.org/openaire/connector + + + + + oai_cerif_openaire + https://www.openaire.eu/schema/cris/1.2/openaire-cerif-profile.xsd + https://www.openaire.eu/cerif-profile/1.2/ + + + + oai_cerif_openaire + https://www.openaire.eu/schema/cris/1.1.1/openaire-cerif-profile.xsd + https://www.openaire.eu/cerif-profile/1.1/ + + + + + \ No newline at end of file diff --git a/src/test/java/org/eurocris/openaire/cris/validator/metadataTests/check_2e/_verb=Identify.xml b/src/test/java/org/eurocris/openaire/cris/validator/metadataTests/check_2e/_verb=Identify.xml new file mode 100644 index 0000000..33427c8 --- /dev/null +++ b/src/test/java/org/eurocris/openaire/cris/validator/metadataTests/check_2e/_verb=Identify.xml @@ -0,0 +1,51 @@ + + + + + 2018-04-07T12:26:10Z + http://cris.example.org/openaire/connector + + + cris.example.org + https://cris.example.org/openaire/connector + 2.0 + admin@cris.example.org + 2008-11-23T13:11:02Z + no + YYYY-MM-DDThh:mm:ssZ + + + + oai + cris.example.org + : + oai:cris.example.org:OrgUnits/312347 + + + + + + https://www.openaire.eu/cerif-profile/vocab/OpenAIRE_Service_Compatibility#1.2 + cris.example.org + The example CRIS + An example CRIS that complies with the OpenAIRE Guidelines for CRIS Managers v.1.2. + + https://cris.example.org/ + https://cris.example.org/openaire/connector + https://cris.example.org/openaire/resources/subject-headings.xml + + + + EKT + + + + + + + + \ No newline at end of file diff --git a/src/test/java/org/eurocris/openaire/cris/validator/metadataTests/check_2e/_verb=ListMetadataFormats.xml b/src/test/java/org/eurocris/openaire/cris/validator/metadataTests/check_2e/_verb=ListMetadataFormats.xml new file mode 100644 index 0000000..9bb9b6a --- /dev/null +++ b/src/test/java/org/eurocris/openaire/cris/validator/metadataTests/check_2e/_verb=ListMetadataFormats.xml @@ -0,0 +1,28 @@ + + + + + 2023-06-18T10:27:20Z + http://cris.example.org/openaire/connector + + + + + oai_cerif_openaire_v1_2 + https://www.openaire.eu/schema/cris/1.2/openaire-cerif-profile.xsd + https://www.openaire.eu/cerif-profile/1.2/ + + + + oai_cerif_openaire_v1_1 + https://www.openaire.eu/schema/cris/1.1.1/openaire-cerif-profile.xsd + https://www.openaire.eu/cerif-profile/1.2/ + + + + + \ No newline at end of file diff --git a/src/test/java/org/eurocris/openaire/cris/validator/metadataTests/check_2f/_verb=Identify.xml b/src/test/java/org/eurocris/openaire/cris/validator/metadataTests/check_2f/_verb=Identify.xml new file mode 100644 index 0000000..33427c8 --- /dev/null +++ b/src/test/java/org/eurocris/openaire/cris/validator/metadataTests/check_2f/_verb=Identify.xml @@ -0,0 +1,51 @@ + + + + + 2018-04-07T12:26:10Z + http://cris.example.org/openaire/connector + + + cris.example.org + https://cris.example.org/openaire/connector + 2.0 + admin@cris.example.org + 2008-11-23T13:11:02Z + no + YYYY-MM-DDThh:mm:ssZ + + + + oai + cris.example.org + : + oai:cris.example.org:OrgUnits/312347 + + + + + + https://www.openaire.eu/cerif-profile/vocab/OpenAIRE_Service_Compatibility#1.2 + cris.example.org + The example CRIS + An example CRIS that complies with the OpenAIRE Guidelines for CRIS Managers v.1.2. + + https://cris.example.org/ + https://cris.example.org/openaire/connector + https://cris.example.org/openaire/resources/subject-headings.xml + + + + EKT + + + + + + + + \ No newline at end of file diff --git a/src/test/java/org/eurocris/openaire/cris/validator/metadataTests/check_2f/_verb=ListMetadataFormats.xml b/src/test/java/org/eurocris/openaire/cris/validator/metadataTests/check_2f/_verb=ListMetadataFormats.xml new file mode 100644 index 0000000..e1a4061 --- /dev/null +++ b/src/test/java/org/eurocris/openaire/cris/validator/metadataTests/check_2f/_verb=ListMetadataFormats.xml @@ -0,0 +1,28 @@ + + + + + 2023-06-18T10:27:20Z + http://cris.example.org/openaire/connector + + + + + oai_cerif_openaire_v1_2 + https://www.openaire.eu/schema/cris/1.2/openaire-cerif-profile.xsd + https://www.openaire.eu/cerif-profile/1.2/ + + + + oai_cerif_openaire_v1_1 + https://www.openaire.eu/schema/cris/1.2/openaire-cerif-profile.xsd + https://www.openaire.eu/cerif-profile/1.1/ + + + + + \ No newline at end of file From 0387c69f88a5df4b10e7361ec486a05109075bec Mon Sep 17 00:00:00 2001 From: Jan Dvorak Date: Tue, 27 Jun 2023 22:36:59 +0200 Subject: [PATCH 26/36] Check (2g) - report unsupported OpenAIRE CRIS XML namespace --- CHECKS.md | 1 + .../cris/validator/CRISValidator.java | 2 +- .../metadataTests/MetadataFormatTest.java | 18 +++++++ .../metadataTests/check_2g/_verb=Identify.xml | 51 +++++++++++++++++++ .../check_2g/_verb=ListMetadataFormats.xml | 22 ++++++++ 5 files changed, 93 insertions(+), 1 deletion(-) create mode 100644 src/test/java/org/eurocris/openaire/cris/validator/metadataTests/check_2g/_verb=Identify.xml create mode 100644 src/test/java/org/eurocris/openaire/cris/validator/metadataTests/check_2g/_verb=ListMetadataFormats.xml diff --git a/CHECKS.md b/CHECKS.md index e1bcaa9..7f9fa0f 100644 --- a/CHECKS.md +++ b/CHECKS.md @@ -30,6 +30,7 @@ the list of supported metadata formats returned by the general `ListMetadataForm (d) The metadata prefixes SHALL be unique. (e) The XML namespace URIs SHALL be unique. (f) The XML Schema location URLs SHALL be unique. +(g) If the XML namespace starts with , it shall be found in the *TSOACMS*. (3) The list of supported sets returned by the `ListSets` request SHALL include all of the sets as per the [specification](http://openaire-guidelines-for-cris-managers.readthedocs.io/en/latest/implementation.html#openaire-oai-pmh-sets). diff --git a/src/main/java/org/eurocris/openaire/cris/validator/CRISValidator.java b/src/main/java/org/eurocris/openaire/cris/validator/CRISValidator.java index 905e74e..efd10ea 100644 --- a/src/main/java/org/eurocris/openaire/cris/validator/CRISValidator.java +++ b/src/main/java/org/eurocris/openaire/cris/validator/CRISValidator.java @@ -365,7 +365,7 @@ public boolean test( final MetadataFormatType mf ) { assertTrue( "Please reference the official XML Schema at " + OPENAIRE_CERIF_SCHEMAS_ROOT + " (2)", schemaUrl.startsWith( OPENAIRE_CERIF_SCHEMAS_ROOT ) ); assertTrue( "The schema file should be " + OPENAIRE_CERIF_SCHEMA_FILENAME + " (2)", schemaUrl.endsWith( "/" + OPENAIRE_CERIF_SCHEMA_FILENAME ) ); final String localSchemaUrl = schemaUrlsByNs.get( metadataNs ); - assertNotNull( "This validator shall cover the metadata namespace " + metadataNs, localSchemaUrl ); + assertNotNull( "This validator does not cover the metadata namespace " + metadataNs + " (2g)", localSchemaUrl ); if ( !localSchemaUrl.contains( "/current/" ) ) { final Document doc = db.parse( localSchemaUrl ); final Element schemaRootEl = doc.getDocumentElement(); diff --git a/src/test/java/org/eurocris/openaire/cris/validator/metadataTests/MetadataFormatTest.java b/src/test/java/org/eurocris/openaire/cris/validator/metadataTests/MetadataFormatTest.java index 5517b9c..577334c 100644 --- a/src/test/java/org/eurocris/openaire/cris/validator/metadataTests/MetadataFormatTest.java +++ b/src/test/java/org/eurocris/openaire/cris/validator/metadataTests/MetadataFormatTest.java @@ -122,4 +122,22 @@ public void testCheck2f() throws Exception { } } + /** + * Test that {@link CRISValidator} reports an unsupported OpenAIRE CRIS XML namespace. + * @see (2g) in CHECKS.md + * @throws Exception in case of some error + */ + @Test + public void testCheck2g() throws Exception { + final URL url = MetadataFormatTest.class.getResource( "check_2g/" ); + final CRISValidator validator = new CRISValidator( url ); + validator.check000_Identify(); + try { + validator.check010_MetadataFormats(); + fail( "Problem: check (2g) undetected" ); + } catch ( final AssertionError e ) { + assertEquals( "This validator does not cover the metadata namespace https://www.openaire.eu/cerif-profile/0.0/ (2g)", e.getMessage() ); + } + } + } diff --git a/src/test/java/org/eurocris/openaire/cris/validator/metadataTests/check_2g/_verb=Identify.xml b/src/test/java/org/eurocris/openaire/cris/validator/metadataTests/check_2g/_verb=Identify.xml new file mode 100644 index 0000000..33427c8 --- /dev/null +++ b/src/test/java/org/eurocris/openaire/cris/validator/metadataTests/check_2g/_verb=Identify.xml @@ -0,0 +1,51 @@ + + + + + 2018-04-07T12:26:10Z + http://cris.example.org/openaire/connector + + + cris.example.org + https://cris.example.org/openaire/connector + 2.0 + admin@cris.example.org + 2008-11-23T13:11:02Z + no + YYYY-MM-DDThh:mm:ssZ + + + + oai + cris.example.org + : + oai:cris.example.org:OrgUnits/312347 + + + + + + https://www.openaire.eu/cerif-profile/vocab/OpenAIRE_Service_Compatibility#1.2 + cris.example.org + The example CRIS + An example CRIS that complies with the OpenAIRE Guidelines for CRIS Managers v.1.2. + + https://cris.example.org/ + https://cris.example.org/openaire/connector + https://cris.example.org/openaire/resources/subject-headings.xml + + + + EKT + + + + + + + + \ No newline at end of file diff --git a/src/test/java/org/eurocris/openaire/cris/validator/metadataTests/check_2g/_verb=ListMetadataFormats.xml b/src/test/java/org/eurocris/openaire/cris/validator/metadataTests/check_2g/_verb=ListMetadataFormats.xml new file mode 100644 index 0000000..002944e --- /dev/null +++ b/src/test/java/org/eurocris/openaire/cris/validator/metadataTests/check_2g/_verb=ListMetadataFormats.xml @@ -0,0 +1,22 @@ + + + + + 2023-06-18T10:27:20Z + http://cris.example.org/openaire/connector + + + + + oai_cerif_openaire_v0_0 + https://www.openaire.eu/schema/cris/0.0/openaire-cerif-profile.xsd + https://www.openaire.eu/cerif-profile/0.0/ + + + + + \ No newline at end of file From 33b47a931ead1d7fa37a3f47fb868ac5d2646de3 Mon Sep 17 00:00:00 2001 From: Jan Dvorak Date: Wed, 28 Jun 2023 23:13:51 +0200 Subject: [PATCH 27/36] Checks (2h), (2i) and (2j) --- CHECKS.md | 3 ++ .../cris/validator/CRISValidator.java | 6 +-- .../metadataTests/MetadataFormatTest.java | 36 +++++++++++++ .../metadataTests/check_2h/_verb=Identify.xml | 51 +++++++++++++++++++ .../check_2h/_verb=ListMetadataFormats.xml | 28 ++++++++++ .../metadataTests/check_2i/_verb=Identify.xml | 51 +++++++++++++++++++ .../check_2i/_verb=ListMetadataFormats.xml | 28 ++++++++++ 7 files changed, 200 insertions(+), 3 deletions(-) create mode 100644 src/test/java/org/eurocris/openaire/cris/validator/metadataTests/check_2h/_verb=Identify.xml create mode 100644 src/test/java/org/eurocris/openaire/cris/validator/metadataTests/check_2h/_verb=ListMetadataFormats.xml create mode 100644 src/test/java/org/eurocris/openaire/cris/validator/metadataTests/check_2i/_verb=Identify.xml create mode 100644 src/test/java/org/eurocris/openaire/cris/validator/metadataTests/check_2i/_verb=ListMetadataFormats.xml diff --git a/CHECKS.md b/CHECKS.md index 7f9fa0f..e52a045 100644 --- a/CHECKS.md +++ b/CHECKS.md @@ -31,6 +31,9 @@ the list of supported metadata formats returned by the general `ListMetadataForm (e) The XML namespace URIs SHALL be unique. (f) The XML Schema location URLs SHALL be unique. (g) If the XML namespace starts with , it shall be found in the *TSOACMS*. +(h) If the XML namespace starts with , the XML Schema location shall be under . +(i) If the XML namespace starts with , the filename of the XML Schema shall be `openaire-cerif-profile.xsd`. +(j) The targetNamespace of a referenced XML Schema SHALL be the same as the one advertised for the metadata format in the `ListMetadataFormats` response. (3) The list of supported sets returned by the `ListSets` request SHALL include all of the sets as per the [specification](http://openaire-guidelines-for-cris-managers.readthedocs.io/en/latest/implementation.html#openaire-oai-pmh-sets). diff --git a/src/main/java/org/eurocris/openaire/cris/validator/CRISValidator.java b/src/main/java/org/eurocris/openaire/cris/validator/CRISValidator.java index efd10ea..6bc2625 100644 --- a/src/main/java/org/eurocris/openaire/cris/validator/CRISValidator.java +++ b/src/main/java/org/eurocris/openaire/cris/validator/CRISValidator.java @@ -362,15 +362,15 @@ public boolean test( final MetadataFormatType mf ) { final DocumentBuilder db = getDocumentBuilderFactory().newDocumentBuilder(); final String schemaUrl = mf.getSchema(); System.out.println( "Metadata format prefix " + mf.getMetadataPrefix() + " with ns " + mf.getMetadataNamespace() ); - assertTrue( "Please reference the official XML Schema at " + OPENAIRE_CERIF_SCHEMAS_ROOT + " (2)", schemaUrl.startsWith( OPENAIRE_CERIF_SCHEMAS_ROOT ) ); - assertTrue( "The schema file should be " + OPENAIRE_CERIF_SCHEMA_FILENAME + " (2)", schemaUrl.endsWith( "/" + OPENAIRE_CERIF_SCHEMA_FILENAME ) ); + assertTrue( "Please reference the official XML Schema at " + OPENAIRE_CERIF_SCHEMAS_ROOT + " (2h)", schemaUrl.startsWith( OPENAIRE_CERIF_SCHEMAS_ROOT ) ); + assertTrue( "The schema file should be " + OPENAIRE_CERIF_SCHEMA_FILENAME + " (2i)", schemaUrl.endsWith( "/" + OPENAIRE_CERIF_SCHEMA_FILENAME ) ); final String localSchemaUrl = schemaUrlsByNs.get( metadataNs ); assertNotNull( "This validator does not cover the metadata namespace " + metadataNs + " (2g)", localSchemaUrl ); if ( !localSchemaUrl.contains( "/current/" ) ) { final Document doc = db.parse( localSchemaUrl ); final Element schemaRootEl = doc.getDocumentElement(); final String targetNsUri = schemaRootEl.getAttribute( "targetNamespace" ); - assertEquals( "The schema does not have the advertised target namespace URI (2)", metadataNs, targetNsUri ); + assertEquals( "The schema does not have the advertised target namespace URI (2j)", metadataNs, targetNsUri ); } } catch ( final ParserConfigurationException | SAXException | IOException e ) { throw new IllegalStateException( e ); diff --git a/src/test/java/org/eurocris/openaire/cris/validator/metadataTests/MetadataFormatTest.java b/src/test/java/org/eurocris/openaire/cris/validator/metadataTests/MetadataFormatTest.java index 577334c..a4e8d93 100644 --- a/src/test/java/org/eurocris/openaire/cris/validator/metadataTests/MetadataFormatTest.java +++ b/src/test/java/org/eurocris/openaire/cris/validator/metadataTests/MetadataFormatTest.java @@ -140,4 +140,40 @@ public void testCheck2g() throws Exception { } } + /** + * Test that {@link CRISValidator} reports an unsupported OpenAIRE CRIS XML namespace. + * @see (2h) in CHECKS.md + * @throws Exception in case of some error + */ + @Test + public void testCheck2h() throws Exception { + final URL url = MetadataFormatTest.class.getResource( "check_2h/" ); + final CRISValidator validator = new CRISValidator( url ); + validator.check000_Identify(); + try { + validator.check010_MetadataFormats(); + fail( "Problem: check (2h) undetected" ); + } catch ( final AssertionError e ) { + assertEquals( "Please reference the official XML Schema at https://www.openaire.eu/schema/cris/ (2h)", e.getMessage() ); + } + } + + /** + * Test that {@link CRISValidator} reports an unsupported OpenAIRE CRIS XML namespace. + * @see (2i) in CHECKS.md + * @throws Exception in case of some error + */ + @Test + public void testCheck2i() throws Exception { + final URL url = MetadataFormatTest.class.getResource( "check_2i/" ); + final CRISValidator validator = new CRISValidator( url ); + validator.check000_Identify(); + try { + validator.check010_MetadataFormats(); + fail( "Problem: check (2i) undetected" ); + } catch ( final AssertionError e ) { + assertEquals( "The schema file should be openaire-cerif-profile.xsd (2i)", e.getMessage() ); + } + } + } diff --git a/src/test/java/org/eurocris/openaire/cris/validator/metadataTests/check_2h/_verb=Identify.xml b/src/test/java/org/eurocris/openaire/cris/validator/metadataTests/check_2h/_verb=Identify.xml new file mode 100644 index 0000000..33427c8 --- /dev/null +++ b/src/test/java/org/eurocris/openaire/cris/validator/metadataTests/check_2h/_verb=Identify.xml @@ -0,0 +1,51 @@ + + + + + 2018-04-07T12:26:10Z + http://cris.example.org/openaire/connector + + + cris.example.org + https://cris.example.org/openaire/connector + 2.0 + admin@cris.example.org + 2008-11-23T13:11:02Z + no + YYYY-MM-DDThh:mm:ssZ + + + + oai + cris.example.org + : + oai:cris.example.org:OrgUnits/312347 + + + + + + https://www.openaire.eu/cerif-profile/vocab/OpenAIRE_Service_Compatibility#1.2 + cris.example.org + The example CRIS + An example CRIS that complies with the OpenAIRE Guidelines for CRIS Managers v.1.2. + + https://cris.example.org/ + https://cris.example.org/openaire/connector + https://cris.example.org/openaire/resources/subject-headings.xml + + + + EKT + + + + + + + + \ No newline at end of file diff --git a/src/test/java/org/eurocris/openaire/cris/validator/metadataTests/check_2h/_verb=ListMetadataFormats.xml b/src/test/java/org/eurocris/openaire/cris/validator/metadataTests/check_2h/_verb=ListMetadataFormats.xml new file mode 100644 index 0000000..d8b1f48 --- /dev/null +++ b/src/test/java/org/eurocris/openaire/cris/validator/metadataTests/check_2h/_verb=ListMetadataFormats.xml @@ -0,0 +1,28 @@ + + + + + 2023-06-18T10:27:20Z + http://cris.example.org/openaire/connector + + + + + oai_cerif_openaire_v1_2 + https://www.openaire.eu/schema/cris/1.2/openaire-cerif-profile.xsd + https://www.openaire.eu/cerif-profile/1.2/ + + + + oai_cerif_openaire_v1_1 + https://www.openaire.eu/schema/cros/1.1/openaire-cerif-profile.xsd + https://www.openaire.eu/cerif-profile/1.1/ + + + + + \ No newline at end of file diff --git a/src/test/java/org/eurocris/openaire/cris/validator/metadataTests/check_2i/_verb=Identify.xml b/src/test/java/org/eurocris/openaire/cris/validator/metadataTests/check_2i/_verb=Identify.xml new file mode 100644 index 0000000..33427c8 --- /dev/null +++ b/src/test/java/org/eurocris/openaire/cris/validator/metadataTests/check_2i/_verb=Identify.xml @@ -0,0 +1,51 @@ + + + + + 2018-04-07T12:26:10Z + http://cris.example.org/openaire/connector + + + cris.example.org + https://cris.example.org/openaire/connector + 2.0 + admin@cris.example.org + 2008-11-23T13:11:02Z + no + YYYY-MM-DDThh:mm:ssZ + + + + oai + cris.example.org + : + oai:cris.example.org:OrgUnits/312347 + + + + + + https://www.openaire.eu/cerif-profile/vocab/OpenAIRE_Service_Compatibility#1.2 + cris.example.org + The example CRIS + An example CRIS that complies with the OpenAIRE Guidelines for CRIS Managers v.1.2. + + https://cris.example.org/ + https://cris.example.org/openaire/connector + https://cris.example.org/openaire/resources/subject-headings.xml + + + + EKT + + + + + + + + \ No newline at end of file diff --git a/src/test/java/org/eurocris/openaire/cris/validator/metadataTests/check_2i/_verb=ListMetadataFormats.xml b/src/test/java/org/eurocris/openaire/cris/validator/metadataTests/check_2i/_verb=ListMetadataFormats.xml new file mode 100644 index 0000000..2f11058 --- /dev/null +++ b/src/test/java/org/eurocris/openaire/cris/validator/metadataTests/check_2i/_verb=ListMetadataFormats.xml @@ -0,0 +1,28 @@ + + + + + 2023-06-18T10:27:20Z + http://cris.example.org/openaire/connector + + + + + oai_cerif_openaire_v1_2 + https://www.openaire.eu/schema/cris/1.2/openaire-cerif-profile.xsd + https://www.openaire.eu/cerif-profile/1.2/ + + + + oai_cerif_openaire_v1_1 + https://www.openaire.eu/schema/cris/1.1/our-cerif-profile.xsd + https://www.openaire.eu/cerif-profile/1.1/ + + + + + \ No newline at end of file From 29d2eefaf884c33b3df70fd2ec3bf4dd74a33826 Mon Sep 17 00:00:00 2001 From: Jan Dvorak Date: Wed, 28 Jun 2023 23:19:02 +0200 Subject: [PATCH 28/36] Give a more specific list of supported versions (1.1 and 1.2) --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index 044cb8a..b180a71 100644 --- a/README.md +++ b/README.md @@ -1,7 +1,7 @@ # OpenAIRE CRIS validator A tool to assess whether an OAI-PMH endpoint can provide research information -complying with the [OpenAIRE Guidelines for CRIS Managers](https://github.com/openaire/guidelines-cris-managers) version 1.1 or higher. +complying with the [OpenAIRE Guidelines for CRIS Managers](https://github.com/openaire/guidelines-cris-managers) versions 1.1 and 1.2. It covers [these checks](CHECKS.md). This is a command-line Java tool that is organized as a [JUnit](https://junit.org/junit4/) test suite. From 7b1fec776e2bb8099d583c2457fb378e29e8bbfe Mon Sep 17 00:00:00 2001 From: Jan Dvorak Date: Thu, 29 Jun 2023 10:13:26 +0200 Subject: [PATCH 29/36] Check (2k) - declared compatibility level has a matching metadata format --- CHECKS.md | 1 + .../cris/validator/CRISValidator.java | 28 +++++++++- .../metadataTests/MetadataFormatTest.java | 40 ++++++++++++++- .../check_2k1/_verb=Identify.xml | 51 +++++++++++++++++++ .../check_2k1/_verb=ListMetadataFormats.xml | 22 ++++++++ .../check_2k2/_verb=Identify.xml | 51 +++++++++++++++++++ .../check_2k2/_verb=ListMetadataFormats.xml | 22 ++++++++ 7 files changed, 212 insertions(+), 3 deletions(-) create mode 100644 src/test/java/org/eurocris/openaire/cris/validator/metadataTests/check_2k1/_verb=Identify.xml create mode 100644 src/test/java/org/eurocris/openaire/cris/validator/metadataTests/check_2k1/_verb=ListMetadataFormats.xml create mode 100644 src/test/java/org/eurocris/openaire/cris/validator/metadataTests/check_2k2/_verb=Identify.xml create mode 100644 src/test/java/org/eurocris/openaire/cris/validator/metadataTests/check_2k2/_verb=ListMetadataFormats.xml diff --git a/CHECKS.md b/CHECKS.md index e52a045..c02dce8 100644 --- a/CHECKS.md +++ b/CHECKS.md @@ -34,6 +34,7 @@ the list of supported metadata formats returned by the general `ListMetadataForm (h) If the XML namespace starts with , the XML Schema location shall be under . (i) If the XML namespace starts with , the filename of the XML Schema shall be `openaire-cerif-profile.xsd`. (j) The targetNamespace of a referenced XML Schema SHALL be the same as the one advertised for the metadata format in the `ListMetadataFormats` response. +(k) If the Identify response in (1) includes a Service/Compatibility of a certain version of these Guidelines, then the ListMetadataFormats response SHALL include the corresponding namespace. (3) The list of supported sets returned by the `ListSets` request SHALL include all of the sets as per the [specification](http://openaire-guidelines-for-cris-managers.readthedocs.io/en/latest/implementation.html#openaire-oai-pmh-sets). diff --git a/src/main/java/org/eurocris/openaire/cris/validator/CRISValidator.java b/src/main/java/org/eurocris/openaire/cris/validator/CRISValidator.java index 6bc2625..4a4c9a5 100644 --- a/src/main/java/org/eurocris/openaire/cris/validator/CRISValidator.java +++ b/src/main/java/org/eurocris/openaire/cris/validator/CRISValidator.java @@ -138,6 +138,11 @@ public class CRISValidator { */ public static final String OPENAIRE_CERIF_SCHEMA_FILENAME = "openaire-cerif-profile.xsd"; + /** + * The namespace URI of the namespace that hosts the declared compatibility statements. + */ + public static final String COMPATIBILITY_NSURI = "https://www.openaire.eu/cerif-profile/vocab/OpenAIRE_Service_Compatibility"; + /** * The connection stream factory to use for getting the response stream from a connection. */ @@ -272,6 +277,8 @@ public InputStream getInputStream() { private static Optional serviceAcronym = Optional.empty(); + private static Element serviceDescription = null; + /** * Ask for ?verb=Identity and test it for consistence – checks (1). * @throws Exception on any unexpected circumstance @@ -306,6 +313,7 @@ public boolean test( final DescriptionType description ) { if ( obj instanceof Element ) { final Element el = (Element) obj; if ( "Service".equals( el.getLocalName() ) && el.getNamespaceURI() != null && el.getNamespaceURI().startsWith( OPENAIRE_CERIF_XMLNS_PREFIX ) ) { + serviceDescription = el; serviceAcronym = XmlUtils.getTextContents( XmlUtils.getFirstMatchingChild( el, "Acronym", el.getNamespaceURI() ) ); validateMetadataPayload( el ); return true; @@ -381,7 +389,25 @@ public boolean test( final MetadataFormatType mf ) { } }; - return parent.checkContains( predicate, new AssertionError( "Metadata format for the OpenAIRE Guidelines for CRIS Managers not present (2a)" ) ); + CheckingIterable checker = parent.checkContains( predicate, new AssertionError( "Metadata format for the OpenAIRE Guidelines for CRIS Managers not present (2a)" ) ); + if ( serviceDescription != null ) { + for ( final Element el : XmlUtils.nodeListToIterableOfElements( serviceDescription.getElementsByTagNameNS( COMPATIBILITY_NSURI, "Compatibility" ) ) ) { + final String compatibilityUri = el.getTextContent(); + final String compatibilityVersion = compatibilityUri.replaceFirst( ".*#", "" ); + if ( !"1.0".equals( compatibilityVersion ) ) { // This validator does not support version 1.0 of the Guidelines + checker = checker.checkContains( new Predicate() { + + @Override + public boolean test( final MetadataFormatType t ) { + final String metadataFormatVersion = t.getMetadataNamespace().replace( OPENAIRE_CERIF_XMLNS_PREFIX, "" ).replaceFirst( "/$", "" ); + return compatibilityVersion.equals( metadataFormatVersion ); + } + + }, "No metadata format specified for declared compatibility " + compatibilityUri + " (2k)" ); + } + } + } + return checker; } /** diff --git a/src/test/java/org/eurocris/openaire/cris/validator/metadataTests/MetadataFormatTest.java b/src/test/java/org/eurocris/openaire/cris/validator/metadataTests/MetadataFormatTest.java index a4e8d93..1253d5b 100644 --- a/src/test/java/org/eurocris/openaire/cris/validator/metadataTests/MetadataFormatTest.java +++ b/src/test/java/org/eurocris/openaire/cris/validator/metadataTests/MetadataFormatTest.java @@ -141,7 +141,7 @@ public void testCheck2g() throws Exception { } /** - * Test that {@link CRISValidator} reports an unsupported OpenAIRE CRIS XML namespace. + * Test that {@link CRISValidator} reports an inofficial XML Schema location. * @see (2h) in CHECKS.md * @throws Exception in case of some error */ @@ -159,7 +159,7 @@ public void testCheck2h() throws Exception { } /** - * Test that {@link CRISValidator} reports an unsupported OpenAIRE CRIS XML namespace. + * Test that {@link CRISValidator} reports an unsupported XML Schema filename. * @see (2i) in CHECKS.md * @throws Exception in case of some error */ @@ -176,4 +176,40 @@ public void testCheck2i() throws Exception { } } + /** + * Test that {@link CRISValidator} reports a declared, but unsupported 1.1 compatibility. + * @see (2k) in CHECKS.md + * @throws Exception in case of some error + */ + @Test + public void testCheck2k1() throws Exception { + final URL url = MetadataFormatTest.class.getResource( "check_2k1/" ); + final CRISValidator validator = new CRISValidator( url ); + validator.check000_Identify(); + try { + validator.check010_MetadataFormats(); + fail( "Problem: check (2k) undetected" ); + } catch ( final AssertionError e ) { + assertEquals( "No metadata format specified for declared compatibility https://www.openaire.eu/cerif-profile/vocab/OpenAIRE_Service_Compatibility#1.1 (2k)", e.getMessage() ); + } + } + + /** + * Test that {@link CRISValidator} reports a declared, but unsupported 1.2 compatibility. + * @see (2k) in CHECKS.md + * @throws Exception in case of some error + */ + @Test + public void testCheck2k2() throws Exception { + final URL url = MetadataFormatTest.class.getResource( "check_2k2/" ); + final CRISValidator validator = new CRISValidator( url ); + validator.check000_Identify(); + try { + validator.check010_MetadataFormats(); + fail( "Problem: check (2l) undetected" ); + } catch ( final AssertionError e ) { + assertEquals( "No metadata format specified for declared compatibility https://www.openaire.eu/cerif-profile/vocab/OpenAIRE_Service_Compatibility#1.2 (2k)", e.getMessage() ); + } + } + } diff --git a/src/test/java/org/eurocris/openaire/cris/validator/metadataTests/check_2k1/_verb=Identify.xml b/src/test/java/org/eurocris/openaire/cris/validator/metadataTests/check_2k1/_verb=Identify.xml new file mode 100644 index 0000000..fa8fc0c --- /dev/null +++ b/src/test/java/org/eurocris/openaire/cris/validator/metadataTests/check_2k1/_verb=Identify.xml @@ -0,0 +1,51 @@ + + + + + 2018-04-07T12:26:10Z + http://cris.example.org/openaire/connector + + + cris.example.org + https://cris.example.org/openaire/connector + 2.0 + admin@cris.example.org + 2008-11-23T13:11:02Z + no + YYYY-MM-DDThh:mm:ssZ + + + + oai + cris.example.org + : + oai:cris.example.org:OrgUnits/312347 + + + + + + https://www.openaire.eu/cerif-profile/vocab/OpenAIRE_Service_Compatibility#1.1 + cris.example.org + The example CRIS + An example CRIS that complies with the OpenAIRE Guidelines for CRIS Managers v.1.1. + + https://cris.example.org/ + https://cris.example.org/openaire/connector + https://cris.example.org/openaire/resources/subject-headings.xml + + + + EKT + + + + + + + + \ No newline at end of file diff --git a/src/test/java/org/eurocris/openaire/cris/validator/metadataTests/check_2k1/_verb=ListMetadataFormats.xml b/src/test/java/org/eurocris/openaire/cris/validator/metadataTests/check_2k1/_verb=ListMetadataFormats.xml new file mode 100644 index 0000000..426e545 --- /dev/null +++ b/src/test/java/org/eurocris/openaire/cris/validator/metadataTests/check_2k1/_verb=ListMetadataFormats.xml @@ -0,0 +1,22 @@ + + + + + 2023-06-18T10:27:20Z + http://cris.example.org/openaire/connector + + + + + oai_cerif_openaire_v1_2 + https://www.openaire.eu/schema/cris/1.2/openaire-cerif-profile.xsd + https://www.openaire.eu/cerif-profile/1.2/ + + + + + \ No newline at end of file diff --git a/src/test/java/org/eurocris/openaire/cris/validator/metadataTests/check_2k2/_verb=Identify.xml b/src/test/java/org/eurocris/openaire/cris/validator/metadataTests/check_2k2/_verb=Identify.xml new file mode 100644 index 0000000..33427c8 --- /dev/null +++ b/src/test/java/org/eurocris/openaire/cris/validator/metadataTests/check_2k2/_verb=Identify.xml @@ -0,0 +1,51 @@ + + + + + 2018-04-07T12:26:10Z + http://cris.example.org/openaire/connector + + + cris.example.org + https://cris.example.org/openaire/connector + 2.0 + admin@cris.example.org + 2008-11-23T13:11:02Z + no + YYYY-MM-DDThh:mm:ssZ + + + + oai + cris.example.org + : + oai:cris.example.org:OrgUnits/312347 + + + + + + https://www.openaire.eu/cerif-profile/vocab/OpenAIRE_Service_Compatibility#1.2 + cris.example.org + The example CRIS + An example CRIS that complies with the OpenAIRE Guidelines for CRIS Managers v.1.2. + + https://cris.example.org/ + https://cris.example.org/openaire/connector + https://cris.example.org/openaire/resources/subject-headings.xml + + + + EKT + + + + + + + + \ No newline at end of file diff --git a/src/test/java/org/eurocris/openaire/cris/validator/metadataTests/check_2k2/_verb=ListMetadataFormats.xml b/src/test/java/org/eurocris/openaire/cris/validator/metadataTests/check_2k2/_verb=ListMetadataFormats.xml new file mode 100644 index 0000000..0550d0b --- /dev/null +++ b/src/test/java/org/eurocris/openaire/cris/validator/metadataTests/check_2k2/_verb=ListMetadataFormats.xml @@ -0,0 +1,22 @@ + + + + + 2023-06-18T10:27:20Z + http://cris.example.org/openaire/connector + + + + + oai_cerif_openaire_v1_1 + https://www.openaire.eu/schema/cris/1.1/openaire-cerif-profile.xsd + https://www.openaire.eu/cerif-profile/1.1/ + + + + + \ No newline at end of file From 13aee00f1a93a31362f5197df0fd89756074a6b1 Mon Sep 17 00:00:00 2001 From: Jan Dvorak Date: Wed, 5 Jul 2023 08:54:37 +0200 Subject: [PATCH 30/36] Revert "Do w/o a separate getValidatorSchema(), use getParserSchema() everywhere" This reverts commit 502dc7dc21b01b7d13fe6ccc60aa32bdf404a7dc. --- .../cris/validator/CRISValidator.java | 26 +++++++++++++++++-- 1 file changed, 24 insertions(+), 2 deletions(-) diff --git a/src/main/java/org/eurocris/openaire/cris/validator/CRISValidator.java b/src/main/java/org/eurocris/openaire/cris/validator/CRISValidator.java index 4a4c9a5..d0a4189 100644 --- a/src/main/java/org/eurocris/openaire/cris/validator/CRISValidator.java +++ b/src/main/java/org/eurocris/openaire/cris/validator/CRISValidator.java @@ -246,6 +246,28 @@ protected static synchronized Schema getParserSchema() throws SAXException, IOEx return parserSchema; } + private static Schema validatorSchema = null; + + /** + * Create the schema for the second-phase validation. + * @return the compound schema + * @throws SAXException when problem reading the schema + */ + protected static synchronized Schema getValidatorSchema() { + if ( validatorSchema == null ) { + try { + validatorSchema = getSchema( + schema( "/cached/xml.xsd", "http://www.w3.org/2001/xml.xsd" ), + schema( "/current/openaire-cerif-profile.xsd", "https://www.openaire.eu/schema/cris/1.2/openaire-cerif-profile.xsd" ), + schema( "/cerif_profile_1_1/openaire-cerif-profile.xsd", "https://www.openaire.eu/schema/cris/1.1.1/openaire-cerif-profile.xsd" ) + ); + } catch ( final SAXException | IOException | ParserConfigurationException e ) { + throw new IllegalStateException( "While initializing validator schema", e ); + } + } + return validatorSchema; + } + private static SchemaFactory xmlSchemaFactory = null; private static synchronized SchemaFactory getXmlSchemaFactory() { @@ -703,8 +725,8 @@ private void doCheckFunctionalDependency( final CERIFNode node, final String oai */ protected void validateMetadataPayload( final Element el ) { final String elString = el.getLocalName() + "[@id=\"" + el.getAttribute( "id" ) + "\"]"; + final Validator validator = getValidatorSchema().newValidator(); try { - final Validator validator = getParserSchema().newValidator(); final ErrorHandler errorHandler = new ErrorHandler() { private boolean patternValidErrorSignalled = false; @@ -736,7 +758,7 @@ public void error( final SAXParseException exception ) throws SAXException { }; validator.setErrorHandler( errorHandler ); validator.validate( new DOMSource( el ) ); - } catch ( final SAXException | IOException | ParserConfigurationException e ) { + } catch ( final SAXException | IOException e ) { fail( "While validating element " + elString + ": " + e ); } } From 70f6ba571069c91fe72446224980e41df064373a Mon Sep 17 00:00:00 2001 From: Jan Dvorak Date: Wed, 5 Jul 2023 09:33:26 +0200 Subject: [PATCH 31/36] Construct and use two subtrees of schemas: original/ and relaxed/ --- pom.xml | 23 +++++++++++++++++-- .../cris/validator/CRISValidator.java | 8 +++---- 2 files changed, 25 insertions(+), 6 deletions(-) diff --git a/pom.xml b/pom.xml index fb37d8f..503bbb6 100644 --- a/pom.xml +++ b/pom.xml @@ -118,6 +118,10 @@ maven-resources-plugin 3.3.1 + + default-resources + none + copy-resources generate-sources @@ -136,6 +140,21 @@ ${guidelines.project.dir}/schemas/cached **/*.xsd cached + + + src/main/resources/schemas + **/openaire-cerif-profile.xsd + **/includes/**/*.xsd + **/vocabularies/**/*.xsd + cached + original + + + ${guidelines.project.dir}/schemas + openaire-cerif-profile.xsd + includes/**/*.xsd + vocabularies/**/*.xsd + original/current @@ -181,7 +200,7 @@ **/includes/**/*.xsd **/vocabularies/**/*.xsd - ${basedir}/target/classes/schemas + ${basedir}/target/classes/schemas/relaxed src/tools/xslt/relax-xml-schema-for-first-validation.xslt @@ -191,7 +210,7 @@ includes/**/*.xsd vocabularies/**/*.xsd - ${basedir}/target/classes/schemas/current + ${basedir}/target/classes/schemas/relaxed/current src/tools/xslt/relax-xml-schema-for-first-validation.xslt diff --git a/src/main/java/org/eurocris/openaire/cris/validator/CRISValidator.java b/src/main/java/org/eurocris/openaire/cris/validator/CRISValidator.java index d0a4189..4fb5954 100644 --- a/src/main/java/org/eurocris/openaire/cris/validator/CRISValidator.java +++ b/src/main/java/org/eurocris/openaire/cris/validator/CRISValidator.java @@ -239,8 +239,8 @@ protected static synchronized Schema getParserSchema() throws SAXException, IOEx schema( "/cached/oai_dc.xsd" ), schema( "/cached/provenance.xsd", "http://www.openarchives.org/OAI/2.0/provenance.xsd" ), schema( "/cached/OAI-PMH.xsd" ), - schema( "/current/openaire-cerif-profile.xsd", "https://www.openaire.eu/schema/cris/1.2/openaire-cerif-profile.xsd" ), - schema( "/cerif_profile_1_1/openaire-cerif-profile.xsd", "https://www.openaire.eu/schema/cris/1.1.1/openaire-cerif-profile.xsd" ) + schema( "/relaxed/current/openaire-cerif-profile.xsd", "https://www.openaire.eu/schema/cris/1.2/openaire-cerif-profile.xsd" ), + schema( "/relaxed/cerif_profile_1_1/openaire-cerif-profile.xsd", "https://www.openaire.eu/schema/cris/1.1.1/openaire-cerif-profile.xsd" ) ); } return parserSchema; @@ -258,8 +258,8 @@ protected static synchronized Schema getValidatorSchema() { try { validatorSchema = getSchema( schema( "/cached/xml.xsd", "http://www.w3.org/2001/xml.xsd" ), - schema( "/current/openaire-cerif-profile.xsd", "https://www.openaire.eu/schema/cris/1.2/openaire-cerif-profile.xsd" ), - schema( "/cerif_profile_1_1/openaire-cerif-profile.xsd", "https://www.openaire.eu/schema/cris/1.1.1/openaire-cerif-profile.xsd" ) + schema( "/original/current/openaire-cerif-profile.xsd", "https://www.openaire.eu/schema/cris/1.2/openaire-cerif-profile.xsd" ), + schema( "/original/cerif_profile_1_1/openaire-cerif-profile.xsd", "https://www.openaire.eu/schema/cris/1.1.1/openaire-cerif-profile.xsd" ) ); } catch ( final SAXException | IOException | ParserConfigurationException e ) { throw new IllegalStateException( "While initializing validator schema", e ); From 501499d24a4f92f2be81c3131d3a72f0a04887ba Mon Sep 17 00:00:00 2001 From: Jan Dvorak Date: Wed, 5 Jul 2023 10:08:06 +0200 Subject: [PATCH 32/36] Fail a particular top-level entity test if no metadata format available --- .../openaire/cris/validator/CRISValidator.java | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/src/main/java/org/eurocris/openaire/cris/validator/CRISValidator.java b/src/main/java/org/eurocris/openaire/cris/validator/CRISValidator.java index 4fb5954..bf4b2a9 100644 --- a/src/main/java/org/eurocris/openaire/cris/validator/CRISValidator.java +++ b/src/main/java/org/eurocris/openaire/cris/validator/CRISValidator.java @@ -2,6 +2,7 @@ import static javax.xml.XMLConstants.W3C_XML_SCHEMA_NS_URI; import static org.junit.Assert.assertEquals; +import static org.junit.Assert.assertFalse; import static org.junit.Assert.assertNotNull; import static org.junit.Assert.assertTrue; import static org.junit.Assert.fail; @@ -486,6 +487,7 @@ public boolean test( final SetType s ) { */ @Test public void check100_CheckPublications() throws Exception { + assertFalse( "No metadata prefix to fetch?", metadataFormatsByPrefix.isEmpty() ); for ( final String prefix : metadataFormatsByPrefix.keySet() ) { final Iterable records = endpoint.callListRecords( prefix, OPENAIRE_CRIS_PUBLICATIONS__SET_SPEC, null, null ); final CheckingIterable checker = buildCommonCheckersChain( records, "Publication" ); @@ -499,6 +501,7 @@ public void check100_CheckPublications() throws Exception { */ @Test public void check200_CheckProducts() throws Exception { + assertFalse( "No metadata prefix to fetch?", metadataFormatsByPrefix.isEmpty() ); for ( final String prefix : metadataFormatsByPrefix.keySet() ) { final Iterable records = endpoint.callListRecords( prefix, OPENAIRE_CRIS_PRODUCTS__SET_SPEC, null, null ); final CheckingIterable checker = buildCommonCheckersChain( records, "Product" ); @@ -512,6 +515,7 @@ public void check200_CheckProducts() throws Exception { */ @Test public void check300_CheckPatents() throws Exception { + assertFalse( "No metadata prefix to fetch?", metadataFormatsByPrefix.isEmpty() ); for ( final String prefix : metadataFormatsByPrefix.keySet() ) { final Iterable records = endpoint.callListRecords( prefix, OPENAIRE_CRIS_PATENTS__SET_SPEC, null, null ); final CheckingIterable checker = buildCommonCheckersChain( records, "Patent" ); @@ -525,6 +529,7 @@ public void check300_CheckPatents() throws Exception { */ @Test public void check400_CheckPersons() throws Exception { + assertFalse( "No metadata prefix to fetch?", metadataFormatsByPrefix.isEmpty() ); for ( final String prefix : metadataFormatsByPrefix.keySet() ) { final Iterable records = endpoint.callListRecords( prefix, OPENAIRE_CRIS_PERSONS__SET_SPEC, null, null ); final CheckingIterable checker = buildCommonCheckersChain( records, "Person" ); @@ -538,6 +543,7 @@ public void check400_CheckPersons() throws Exception { */ @Test public void check500_CheckOrgUnits() throws Exception { + assertFalse( "No metadata prefix to fetch?", metadataFormatsByPrefix.isEmpty() ); for ( final String prefix : metadataFormatsByPrefix.keySet() ) { final Iterable records = endpoint.callListRecords( prefix, OPENAIRE_CRIS_ORGUNITS__SET_SPEC, null, null ); final CheckingIterable checker = buildCommonCheckersChain( records, "OrgUnit" ); @@ -551,6 +557,7 @@ public void check500_CheckOrgUnits() throws Exception { */ @Test public void check600_CheckProjects() throws Exception { + assertFalse( "No metadata prefix to fetch?", metadataFormatsByPrefix.isEmpty() ); for ( final String prefix : metadataFormatsByPrefix.keySet() ) { final Iterable records = endpoint.callListRecords( prefix, OPENAIRE_CRIS_PROJECTS__SET_SPEC, null, null ); final CheckingIterable checker = buildCommonCheckersChain( records, "Project" ); @@ -564,6 +571,7 @@ public void check600_CheckProjects() throws Exception { */ @Test public void check700_CheckFundings() throws Exception { + assertFalse( "No metadata prefix to fetch?", metadataFormatsByPrefix.isEmpty() ); for ( final String prefix : metadataFormatsByPrefix.keySet() ) { final Iterable records = endpoint.callListRecords( prefix, OPENAIRE_CRIS_FUNDING__SET_SPEC, null, null ); final CheckingIterable checker = buildCommonCheckersChain( records, "Funding" ); @@ -577,6 +585,7 @@ public void check700_CheckFundings() throws Exception { */ @Test public void check800_CheckEquipment() throws Exception { + assertFalse( "No metadata prefix to fetch?", metadataFormatsByPrefix.isEmpty() ); for ( final String prefix : metadataFormatsByPrefix.keySet() ) { final Iterable records = endpoint.callListRecords( prefix, OPENAIRE_CRIS_EQUIPMENTS__SET_SPEC, null, null ); final CheckingIterable checker = buildCommonCheckersChain( records, "Equipment" ); @@ -590,6 +599,7 @@ public void check800_CheckEquipment() throws Exception { */ @Test public void check900_CheckEvents() throws Exception { + assertFalse( "No metadata prefix to fetch?", metadataFormatsByPrefix.isEmpty() ); for ( final String prefix : metadataFormatsByPrefix.keySet() ) { final Iterable records = endpoint.callListRecords( prefix, OPENAIRE_CRIS_EVENTS__SET_SPEC, null, null ); final CheckingIterable checker = buildCommonCheckersChain( records, "Event" ); From 875a0893dc2523842fb348c4ad624a74cb3a2e87 Mon Sep 17 00:00:00 2001 From: Jan Dvorak Date: Wed, 5 Jul 2023 10:09:25 +0200 Subject: [PATCH 33/36] Set up new endpoint only if there has been none or the base url changes --- .../org/eurocris/openaire/cris/validator/CRISValidator.java | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/src/main/java/org/eurocris/openaire/cris/validator/CRISValidator.java b/src/main/java/org/eurocris/openaire/cris/validator/CRISValidator.java index bf4b2a9..1164be8 100644 --- a/src/main/java/org/eurocris/openaire/cris/validator/CRISValidator.java +++ b/src/main/java/org/eurocris/openaire/cris/validator/CRISValidator.java @@ -197,8 +197,10 @@ public CRISValidator() throws MissingArgumentException, SAXException, IOExceptio * @throws ParserConfigurationException when an XML parser cannot be instantiated */ public CRISValidator( final URL endpointBaseUrl ) throws SAXException, IOException, ParserConfigurationException { - endpoint = new OAIPMHEndpoint( endpointBaseUrl, getParserSchema(), CONN_STREAM_FACTORY ); - metadataFormatsByPrefix.clear(); + if ( endpoint == null || ! endpointBaseUrl.toExternalForm().equals( endpoint.getBaseUrl() ) ) { + endpoint = new OAIPMHEndpoint( endpointBaseUrl, getParserSchema(), CONN_STREAM_FACTORY ); + metadataFormatsByPrefix.clear(); + } } /** From e2cbb7945d11a32b60dde8bdefd91cd0e010e306 Mon Sep 17 00:00:00 2001 From: Jan Dvorak Date: Wed, 5 Jul 2023 11:22:01 +0200 Subject: [PATCH 34/36] Have a separate ListMetadataFormats response with both 1.1 and 1.2 --- samples/_verb=ListMetadataFormats.xml | 29 ++++++++++++++++++++++++++- 1 file changed, 28 insertions(+), 1 deletion(-) mode change 120000 => 100644 samples/_verb=ListMetadataFormats.xml diff --git a/samples/_verb=ListMetadataFormats.xml b/samples/_verb=ListMetadataFormats.xml deleted file mode 120000 index 429d393..0000000 --- a/samples/_verb=ListMetadataFormats.xml +++ /dev/null @@ -1 +0,0 @@ -../../guidelines-cris-managers/samples/openaire_oaipmh_example_ListMetadataFormats.xml \ No newline at end of file diff --git a/samples/_verb=ListMetadataFormats.xml b/samples/_verb=ListMetadataFormats.xml new file mode 100644 index 0000000..ae7d16b --- /dev/null +++ b/samples/_verb=ListMetadataFormats.xml @@ -0,0 +1,28 @@ + + + + + 2023-06-18T10:27:20Z + http://cris.example.org/openaire/connector + + + + + oai_cerif_openaire_v1_2 + https://www.openaire.eu/schema/cris/1.2/openaire-cerif-profile.xsd + https://www.openaire.eu/cerif-profile/1.2/ + + + + oai_cerif_openaire_v1_1 + https://www.openaire.eu/schema/cris/1.1/openaire-cerif-profile.xsd + https://www.openaire.eu/cerif-profile/1.1/ + + + + + \ No newline at end of file From b4b85349ae1e44a73df8d8a38ba48ffe619bb7b5 Mon Sep 17 00:00:00 2001 From: Jan Dvorak Date: Thu, 6 Jul 2023 15:29:17 +0200 Subject: [PATCH 35/36] Use branch v1.2 from the official CRIS Guidelines repo --- .github/workflows/maven.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/maven.yml b/.github/workflows/maven.yml index 405c8d8..3279df5 100644 --- a/.github/workflows/maven.yml +++ b/.github/workflows/maven.yml @@ -17,7 +17,7 @@ jobs: steps: - uses: actions/checkout@v3 - name: Checkout the OpenAIRE Guidelines for CRIS Managers repo - run: git clone --branch=prepare-v1.2 https://github.com/jdvorak001/guidelines-cris-managers.git ../guidelines-cris-managers + run: git clone --branch=v1.2 https://github.com/euroCRIS/guidelines-cris-managers.git ../guidelines-cris-managers - name: Set up JDK 17 uses: actions/setup-java@v3 with: From fbb98f66a13225e632f51d62e1f6cb00fa404278 Mon Sep 17 00:00:00 2001 From: Jan Dvorak Date: Thu, 6 Jul 2023 15:34:50 +0200 Subject: [PATCH 36/36] Be more precise about the sample files that are checked --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index b180a71..730e17c 100644 --- a/README.md +++ b/README.md @@ -12,7 +12,7 @@ This is Open Source software, available under the terms of the [Apache 2.0 Licen ![CI workflow](https://github.com/euroCRIS/openaire-cris-validator/actions/workflows/maven.yml/badge.svg) -← checking if the software builds and runs on the [example files from the standard](./samples). +← checking if the software builds and runs on the [example files](./samples). ## Usage