Skip to content

Commit

Permalink
doc - review metadata doc and fix some typos (refs #271)
Browse files Browse the repository at this point in the history
  • Loading branch information
mborne committed Jan 17, 2022
1 parent 2339c67 commit 7f08223
Show file tree
Hide file tree
Showing 9 changed files with 47 additions and 64 deletions.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ Le schéma suivant illustre le [principe de fonctionnement du validateur de docu

## Utilisation

Le validateur se présente sous la forme d'un exécutable java (`validator-cli.jar`) utilisable en ligne de commande. Il n'offre pas d'interface graphique car il a vocation à être intégré pour la mise en oeuvre de service web offrant ces interfaces.
Le validateur se présente sous la forme d'un exécutable java (`validator-cli.jar`) utilisable en ligne de commande. Il n'offre pas d'interface graphique car il a vocation à être utilisé pour la mise en oeuvre de services web tel le [Géoportail de l'Urbanisme](https://www.geoportail-urbanisme.gouv.fr) offrant ces interfaces.

Les techniciens peuvent se référer à la documentation [utilisation du validateur en ligne de commande](doc/cli.md).

Expand Down
8 changes: 1 addition & 7 deletions doc/cli.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,13 +8,7 @@

## Installation du validateur

* Identifier la dernière release sur GITHUB : [https://github.com/IGNF/validator/releases](https://github.com/IGNF/validator/releases)
* Voir les fichiers associés à la release : [Exemple pour release v4.2.3](https://github.com/IGNF/validator/releases/tag/v4.2.3)
* Télécharger l'exécutable [validator-cli.jar](https://github.com/IGNF/validator/releases/download/v4.2.3/validator-cli.jar)

## Téléchargement du validateur

Les livrables pour chaque versions sont attachés aux [releases sur github.com](https://github.com/IGNF/validator/releases).
Pour chaque version, les livrables sont attachés à une [release sur github.com](https://github.com/IGNF/validator/releases).

Vous pouvez télécharger le fichier `validator-cli.jar` pour la dernière release et tester à l'aide de la commande `java validator-cli.jar version` qui affichera la version du validateur.

Expand Down
1 change: 0 additions & 1 deletion doc/cli/document_validator.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,6 @@ java -jar validator-cli.jar document_validator --help
Pour valider le fichier "GeoVendee_LeTallud-StGemme.gml" dans le dossier "document-test" en fonction du modèle [CNIG_PCRS_v2.0](https://ignf.github.io/validator/validator-core/src/test/resources/config-json/CNIG_PCRS_v2.0/document.json), on appellera par exemple la commande suivante :

```bash
# Appel au validateur JAVA avec le modèle PCRS
java -jar validator-cli.jar document_validator \
--report-format jsonl \
--model https://ignf.github.io/validator/validator-core/src/test/resources/config-json/CNIG_PCRS_v2.0/document.json \
Expand Down
34 changes: 17 additions & 17 deletions doc/metadata.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,31 +14,31 @@ Metadata "attributes" with INSPIRE multiplicity for datasets according to INSPIR

| name | type | title | multiplicity |
| ------------------------- | ------------------------------- | ------------------------------------ | ------------ |
| contraints | `Contraint[]` | Resource constraints | [0..*] |
| distributionFormats | `Format` | Encoding | [0..*] |
| spatialResolutions | `Resolution` | Spatial resolution | [0..*] |
| fileidentifier | `String` | File identifier | [0..1] |
| title | `String` | Resource title | [1] |
| abstract | `String` | Resource abstract | [1] |
| type | `ScopeCode` | Resource type | [1] |
| locators | `OnlineResource[]` | Resource locator | [1..*] |
| identifiers | `String[]` | Unique resource identifier | [1..*] |
| language | `LanguageCode` | Resource langage | [0..*] (1) |
| topicCategory | `TopicCategoryCode` | Topic category | [1..*] (1) |
| keywords | `Keywords` | Keyword | [1..*] |
| referenceSystemIdentifier | `ReferenceSystemIdentifier` | Coordinate Reference System | [0..*] (1) |
| dateOfPublication | `Date` | Date of publication | [0..*] (1) |
| contact | `ResponsibleParty` | Responsible party | [0..*] (1) |
| fileIdentifier | `String` | File identifier | [0..1] |
| dateOfLastRevision | `Date` | Date of last revision | [0..1] |
| dateOfCreation | `Date` | Date of creation | [0..1] |
| locators | `OnlineResource[]` | Resource locator | [1..*] |
| identifiers | `String[]` | Unique resource identifier | [1..*] |
| keywords | `Keywords` | Keyword | [1..*] |
| extents | `Extent[]` | Extents with geographic bounding box | [1..*] |
| specifications | `Specification` | Specification title and degree | [1..*] |
| topicCategory | `TopicCategoryCode` | Topic category | [1..*] (1) |
| characterSet | `CharacterSetCode` | Character Encoding | [1..*] (1) |
| spatialRepresentationType | `SpatialRepresentationTypeCode` | Spatial representation type | [1..*] (1) |
| metadataContact | `ResponsibleParty` | Metadata point of contact | [1..*] (1) |
| title | `String` | Resource title | [1] |
| abstract | `String` | Resource abstract | [1] |
| type | `ScopeCode` | Resource type | [1] |
| lineage | `String` | Lineage | [1] |
| spatialResolutions | `Resolution` | Spatial resolution | [0..*] |
| specifications | `Specification` | Specification title and degree | [1..*] |
| contact | `ResponsibleParty` | Responsible party | [0..*] (1) |
| metadataContact | `ResponsibleParty` | Metadata point of contact | [1..*] (1) |
| metadataDate | `Date` | Metadata date | [1] |
| metadataLanguage | `LanguageCode` | Metadata langage | [1] |
| extents | `Extent[]` | Extents with geographic bounding box | [1..*] |
| contraints | `Contraint[]` | Resource constraints | [0..*] |
| distributionFormats | `Format` | Encoding | [0..*] |

> (1) multiplicity is adapted, only the first element is parsed
Expand Down Expand Up @@ -258,7 +258,7 @@ Source : INSPIRE_GUIDELINE_2017

### XPath

```(xpath)
```xpath
identificationInfo[1]/*/extent/*/geographicElement/*/westBoundLongitude
identificationInfo[1]/*/extent/*/geographicElement/*/eastBoundLongitude
identificationInfo[1]/*/extent/*/geographicElement/*/southBoundLatitude
Expand Down Expand Up @@ -389,7 +389,7 @@ identificationInfo[1]/*/characterSet
Source : INSPIRE_GUIDELINE_2017

[details about constraints](resourceConstraints.md)
[details about constraints](./metadata/resourceContraints.md)

### XPath

Expand Down
60 changes: 25 additions & 35 deletions doc/metadata/resourceContraints.md
Original file line number Diff line number Diff line change
@@ -1,37 +1,32 @@
# Constraints
# Metadata - resourceConstraints

Implementation notes about `gmd:resourceConstraints` parsing.

## resourceConstraints
## Principles

* `identificationInfo[1]/*/resourceConstraints` provides different categories of constraints applicable to the resource (or its metadata)
* Each `resourceConstraints` contains either a `MD_Constraints`, a `MD_LegalConstraints` or a `MD_SecurityConstraints`

## Constraint types

### MD_Constraints
| Type | Description |
| ---------------------- | -------------------------------------------------------------------------------------------------------------------------------- |
| MD_Constraints | Restrictions on the access and use of a dataset or metadata. |
| MD_LegalConstraints | Subclass of MD_Constraints describing restrictions and legal prerequisites for accessing and using the dataset. |
| MD_SecurityConstraints | Subclass of MD_Constraints handling restrictions imposed on the dataset because of national security, privacy, or other concerns |

Restrictions on the access and use of a dataset or metadata
## Attributes for each constraint type

### MD_LegalConstraints

Subclass of MD_Constraints describing restrictions and legal prerequisites for accessing and using the dataset.

### MD_SecurityConstraints

Subclass of MD_Constraints handling restrictions imposed on the dataset because of national security, privacy, or other concerns

## Attributes type and multiplicity for each class

| | Type | MD_Constraints | MD_LegalConstraints | MD_SecurityConstraints |
| -------------------- | --------------------- | -------------- | -------------------- | ---------------------- |
| useLimitation | String | [0..*] | [0..*] | [0..*] |
| accessConstraints | MD_RestrictionCode | 0 | [0..*] | 0 |
| useConstraints | MD_RestrictionCode | 0 | [0..*] | 0 |
| otherConstraints | String | 0 | [0..*] | 0 |
| classification | MD_ClassificationCode | 0 | 0 | [1..1] |
| userNote | String | 0 | 0 | [0..1] |
| classificationSystem | String | 0 | 0 | [0..1] |
| handlingDescription | String | 0 | 0 | [0..1] |
| | Type | MD_Constraints | MD_LegalConstraints | MD_SecurityConstraints |
| -------------------- | --------------------- | -------------- | ------------------- | ---------------------- |
| useLimitation | String | [0..*] | [0..*] | [0..*] |
| accessConstraints | MD_RestrictionCode | 0 | [0..*] | 0 |
| useConstraints | MD_RestrictionCode | 0 | [0..*] | 0 |
| otherConstraints | String | 0 | [0..*] | 0 |
| classification | MD_ClassificationCode | 0 | 0 | [1..1] |
| userNote | String | 0 | 0 | [0..1] |
| classificationSystem | String | 0 | 0 | [0..1] |
| handlingDescription | String | 0 | 0 | [0..1] |

## MD_RestrictionCode

Expand All @@ -58,25 +53,20 @@ Source : http://www.isotc211.org/2005/resources/Codelist/gmxCodelists.xml#MD_Cla

## Limitations on public access

* identificationInfo[1]/*/resourceConstraints/*/accessConstraints : MD_RestrictionCode (ex : intellectualPropertyRights)
* identificationInfo[1]/*/resourceConstraints/*/otherConstraints : Free text
* identificationInfo[1]/*/resourceConstraints/*/classification : MD_ClassificationCode (ex : restricted)
* `identificationInfo[1]/*/resourceConstraints/*/accessConstraints` : MD_RestrictionCode (ex : intellectualPropertyRights)
* `identificationInfo[1]/*/resourceConstraints/*/otherConstraints` : Free text
* `identificationInfo[1]/*/resourceConstraints/*/classification` : MD_ClassificationCode (ex : restricted)

Quotes from TODO_REF :

* "The value of accessConstraints is otherRestrictions, if and only if they are instances of otherConstraints expressing limitations on public access"

## Condition applying to access and use

* identificationInfo[1]/*/resourceConstraints/*/useLimitation
* `identificationInfo[1]/*/resourceConstraints/*/useLimitation`


## Resources

* [TODO_REF - 2.9 Constraints](http://inspire.ec.europa.eu/reports/ImplementingRules/metadata/MD_IR_and_ISO_20071210.pdf#page=25)

Introduction about constraints

* [](http://www.datypic.com/sc/niem20/e-gmd_resourceConstraints-1.html)

Schema explorer.
* [inspire.ec.europa.eu - Relation between ISO 19115 and ISO 19119 and the elements of the INSPIRE draft metadata implementing rules (informative) - 2.9 Constraints](http://inspire.ec.europa.eu/reports/ImplementingRules/metadata/MD_IR_and_ISO_20071210.pdf#page=25)
* [gmd:resourceConstraints](http://www.datypic.com/sc/niem20/e-gmd_resourceConstraints-1.html)
2 changes: 1 addition & 1 deletion doc/principe.md
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ Le validateur prépare un répertoire de travail pour la validation où il écri

Le validateur liste les fichiers (`DocumentFile`) ayant des extensions connues dans le document à valider (dossier `--input`).

## 4) Recherche des modèles de fichier correspondant aux fichiers (`DocumentFile`)
## 4) Recherche des modèles de fichier correspondant aux fichiers

Le validateur recherche le modèle de fichier (`FileModel`) correspondant aux `DocumentFile` trouvés à l'étape précédente.

Expand Down
Binary file modified doc/uml/metadata.dia
Binary file not shown.
Binary file modified doc/uml/metadata.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
4 changes: 2 additions & 2 deletions validator-core/src/main/resources/schema/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ Le concept de [Document.json](Document.json) est utilisé pour modéliser un dos
| `document.title` | `string` | Le nom du modèle pour l'affichage | N | 4.0 |
| `document.description` | `string` | La description du modèle | N | 4.0 |
| `document.files` | `File[]` | La liste des fichiers attendus dans le dossier | O | 4.0 |
| `document.constraints` | `DocumentConstraints` | Constraintes au niveau du document | N | 4.0 |
| `document.constraints` | `DocumentConstraints` | Contraintes au niveau du document | N | 4.0 |

### DocumentConstraints

Expand Down Expand Up @@ -88,7 +88,7 @@ Le concept de [Column.json](Column.json) est utilisé pour modéliser une table

### ColumnType

Le validateur supporte une liste finie de type :
Le validateur supporte une liste finie de types :

| Nom | Description | Version |
| --------------------------------------- | ---------------------------------------------------- | :-----: |
Expand Down

0 comments on commit 7f08223

Please sign in to comment.