Skip to content

Usage@Validation profiles

Jan Tomášek edited this page Dec 23, 2020 · 5 revisions
  • Usecase: administration of validation profiles

Validation profile is a structured XML file that specifes the process of SIP validation performed during ingest process.

Action Description
Create From the dashboard, user creates a new validation profile by specifying a name and an XML definition of the validation profile.
Edit From the dashboard, user clicks on one validation profile from list. On the validation profile detail page the validation profile can be edited. User clicks on the Save and close button to save the changes.
Delete From the dashboard, user clicks on the Delete button next to a list item.

Validation profile consist of a list of validation rules. Validation rule is an elementary test of a property related to the SIP package that is used during the process of SIP validation. There are three types of validation rules:

  1. validationSchemaCheck - check of a file against Validation scheme, consists of two parts:
    • filePathGlobPattern - pattern expression describing path to a file in scope of a SIP package
    • schema - XML schema used for the validation encoded in the Base64 format

If there is no file matching the glob pattern found, specific exception is thrown.
The mapped file is checked against the provided schema as a whole. For example, if the mapped file is a METS XML and one wants to validate some mods or dublin_core subsections nested in METS:xmlData, then the provided schema should be a METS schema with xsd:import of mods/dublin_core schemas (it is not possible to paste only the DC schema, since the dublin_core part is only a fragment of the whole XML).

  1. nodeCheck - check of value of an element/attribute, consists of three parts:
    • filePathGlobPattern - pattern expression describing path to a file in scope of a SIP package
    • xPath - XPath 3.1 (without namespace prefixes) to a node in within the file
    • value / regex - value or regex expression against which the node value is compared

If there is no file matching the glob pattern found, specific exception is thrown.

  1. fileExistenceCheck - check of existence of a file, has only one part:
    • filePathGlobPattern - glob pattern expression describing path to a file in scope of a SIP package

The precise definition of the format can be seen at system/src/main/resources/xmlSchemas/validationProfile.xsd and a sample validation profile at system/src/test/resources/validation/validationProfileMixedChecks.xml.

Clone this wiki locally