Skip to content
Jesse Eichar edited this page Mar 14, 2014 · 9 revisions
Date 14-03-2014 Contacts Jesse Eichar
Status Under Development Release 2.12
Resources Available Ticket # https://github.com/geonetwork/core-geonetwork/issues/421
Source code https://github.com/jesseeichar/core-geonetwork/tree/feature/schematron-admin-refactored-ui
Funding Swisstopo

Overview

Schematrons are a Geonetwork tool used to verify that a metadata satisfies certain criteria. For example, the iso19139 inspire schematron checks that a metadata satisfies all the criteria required to be inspire compliant.

In the current implementation, a schematron is added by adding the 'sch' file to a schema plugin's schematron folder. All schematrons in the schematron folder will be ran on each metadata (of the correct schema) to determine if the metadata is valid.

This proposal intends to enrich this behaviour in the following ways.

Selective Schematron Application

This feature allows schematrons to be configured to only run on certain metadata that satisfy certain criteria. For example it may be desirable to require that all metadata of a particular group have French translations in order to be considered valid. This feature would make it possible to have a schematron that is only applied to metadata in the specified group and that checks that the French translation requirement is full filled.

Schematron Recommendations

Currently if a schematron is applied to a metadata and an assertion fails the metadata is considered invalid. This feature would allow schematrons to be considered recommendations and the schematron failures would show up in the schematron report as warnings but not failures and the metadata could still be valid. (assuming the other schematron pass)

Schematron admin page

The support these news features an administrative page will be created allowing an administrator to configure the schematrons application criteria and importance.

Schematron title translations

Currently the translations for the schematron rules are in the schematron plugin loc directory in a file with the same name as the schematron name. However the title is not there. This will be changed so that if there is a element in the translations file called schematron.title it will be used in the UI as the title of the schematron. In this way there can be a translation for each language.

Technical Details:

Definitions

  • Schematron
  • A set of rules (defined in a .sch file) that can be ran against a metadata to determine if the metadata satisfies those rules and provide advice to fix the errors. Schematrons are declared in the schema plugin's schematron folder.
  • Schematron Criteria Group
  • A set of criteria that must all apply for the schematron to be ran against the metadata. A schematron can have multiple rules only one of which has to apply for the schematron to apply to the metadata. You can think of a logical OR, where the criteria in a group must all apply (logical AND).
  • Schematron Criteria
  • A rule for determining if a schematron should be applied to a metadata. For example the criteria might be: groupowner == 2. Therefore the criteria will "accept" any metadata that is owned by group 2.

Three new tables will be created to sort this feature. A table containing the list of schematrons, a table containing the criteria groups and a table containing the criteria that make up the criteria groups.

A schematron will be applied during validation if the following are true:

  • The schema of the schematron is the same as the metadata
  • All the criteria of at least one of the criteria groups are true when evaluated against the metadata.

Each schematron group had a requirement level (SchematronRequirement) which has three values:

  • Required
  • Report only
  • Disabled

Once a schematron is determined to apply to a particular metadata, the requirement level is determined based on the group with the highest requirement. (required is the highest level) Upon start-up the schematrons folder of each schema plugin is scanned and any schematrons not currently in the database will be added to the database. A default requirement level can be chosen by having the requirement name at the end of the schematron rule name. For example:

  • schematron-rule-mine-REPORT_ONLY.sch will have a requirement level of Report only (the name can be lower-upper, case in the name is unimportant)
  • schematron-rule-mine-DISABLED.sch will be disabled by default and can be enabled via the admin UI.

Admin UI

The Schematron Administration UI is under the Metadata section of the Administration UI that allows an administrator to configure the Schematron criteria, groups and the order the schematrons reports will appear in the validation UI.

Schematron Administration UI

Proposal Type:

  • Type:
  • Module:

Voting History

  • Vote Proposed: TBA

Participants

  • All
Clone this wiki locally