Documentation

Edit metadata configuration

The metadata configuration defines which metadata data managers need to provide for all data sets associated with a theme. The metadata configuration contains autofill rules and default values, which you can use to automate metadata entry almost entirely. When you create a theme, a default metadata configuration is provided. Only the system administrator can modify this default configuration, and it cannot be changed for public cloud deployments. If you use a private cloud instance, contact support for any desired changes.

To edit the metadata configuration, follow these steps as a logged in theme manager or organisation superuser:

  1. Go to «Themes»
  2. Pick the theme you’d like to edit the metadata configuration for
  3. Go to «Metadata». The metadata editor is displayed by default.
  4. Select the metadata source in the dropdown menu. Available options include:
    • Use metadata editor- Select this option to let hale connect generate the metadata. To define how hale connect should generate the metadata, the system provides a special-purpose text editor. The default metadata configuration displays INSPIRE compliant metadata elements. When you choose to use the metadata editor, haleconnect generates dataset and service metadata based on the user-supplied input. For some fields, such as Keywords, haleconnect automatically applies the values entered for dataset metadata to the service metadata. If you want to use different Keywords in your service metadata, enter the values in the text field provided.
    • Republish existing metadata- Select this option to upload your existing metadata file during data set creation. When you choose to republish dataset metadata, haleconnect generates dataset metadata based on a copy of the URL or file upload provided.
    • Link to existing metadata- Select this option to provide a link to your metadata file during data set creation. When you choose to provide a link to existing metadata, haleconnect generates dataset metadata by accessing the remote URL provided.
  5. Select the metadata language in the dropdown menu. All European languages are supported.

  6. The Show metadata editor on data set creation toggle switch enables you to control where metadata is entered:
    • Toggle switch is active: Display the metadata editor during data set creation.
    • Toggle switch is deactivated: Don’t display the metadata editor during data set creation. Deactivating the editor means that users don’t have any control over metadata in the initial dataset creation, but can still later on go to the data set -> metadata section to edit the generated metadata.
  7. If you have chosen to use the metadata editor, modify the configuration in the text editor as described below. Click «Save» when you are finished.

You define the metadata configuration via editing of a JSON object in an embedded, special-purpose text editor. This editor will automatically check whether the syntax and schema of your configuration file are valid, and provides an assistant for autofill rules.

In the JSON format, objects are defined by using curly braces {}, lists by using square brackets [], and strings are delimited by using double quotes "". All these characters appear pairwise to start and end a substructure, and need to be provided in the correct order. If this is not the case, the editor will display an Invalid JSON error.

At the top level, the metadata configuration is a list of category objects. We use category objects to structure inputs that belong to related metadata properties into groups in the user interface.

Every category has a list of field objects. Every field object describes how the input should look and behave in the user interface, what kind of content is allowed, and whether default values or derived values should be inserted. Edit the object to set the following properties:

  • name: A unique name for the field that needs to comply to the internal domain model (see below).
  • label: The label that should be displayed to the user next to the input field.
  • description: A longer, explanatory text for the fields that is displayed on hovering over the label.
  • type: The primitive type of data this field expects. One of string, object, array, integer and float.
  • schema: The schema or format of the value to be inserted. One of email, enum, geojson, json, wkt and csv. For more information about enumeration fields, see Working with Enumeration Fields
  • defaultValue: A fixed default value that will always be assigned to the field.
  • autofillRule: A dynamic default value that will be assigned to the field. This value is calculated from the current environment variables such as the user, the organisation context, the data set and the theme. When you click into a row with an autofillRule property key, an assistant for choosing a value appears in the upper right corner of the editor. For more information about autofill rules, see Working with Autofill Rules
  • required: Set to true if a type and schema compliant value must be provided.
  • editable: Set totrue when the data manager should be able to edit the value in this field.
  • minOccurs: Defines the minimum count of valid values for this input.
  • maxOccurs: Defines the maximum count of valid values for this input.
  • targets: This is a list with mapping rules to external services, such as metadata catalogues. By default, there should always be at least a bsp target defined. bsp is the internal service publisher.

The following paths can be used for the name and target fields:

  • md-dataset.citation.title
  • md-dataset.identification.*
    • md-dataset.identification.abstract
    • md-dataset.identification.keyword_inspire
    • md-dataset.identification.keyword_simple
    • md-dataset.identification.topicCategory
    • md-dataset.identification.geographicExtent.eastBoundLongitude
    • md-dataset.identification.geographicExtent.northBoundLatitude
    • md-dataset.identification.geographicExtent.southBoundLatitude
    • md-dataset.identification.geographicExtent.westBoundLongitude
    • md-dataset.identification.topicCategory
    • md-dataset.identification.constraints.useLimitations
    • md-dataset.identification.constraints.useConstraints
    • md-dataset.identification.constraints.accessContraints
    • md-dataset.identification.contactForResource.*
      • md-dataset.identification.contactForResource.individualName
      • md-dataset.identification.contactForResource.authorityUrl
      • md-dataset.identification.contactForResource.organisationName
      • md-dataset.identification.contactForResource.positionName
      • md-dataset.identification.contactForResource.roleCode
      • md-dataset.identification.contactForResource.email
      • md-dataset.identification.contactForResource.deliveryPoint
      • md-dataset.identification.contactForResource.postalCode
      • md-dataset.identification.contactForResource.city
      • md-dataset.identification.contactForResource.administrativeArea
      • md-dataset.identification.contactForResource.country
      • md-dataset.identification.contactForResource.voicePhone
      • md-dataset.identification.contactForResource.facsimile
  • md-dataset.contactForMetadata.*
    • md-dataset.contactForMetadata.individualName
    • md-dataset.contactForMetadata.authorityUrl
    • md-dataset.contactForMetadata.organisationName
    • md-dataset.contactForMetadata.positionName
    • md-dataset.contactForMetadata.roleCode
    • md-dataset.contactForMetadata.email
    • md-dataset.contactForMetadata.deliveryPoint
    • md-dataset.contactForMetadata.postalCode
    • md-dataset.contactForMetadata.city
    • md-dataset.contactForMetadata.administrativeArea
    • md-dataset.contactForMetadata.country
    • md-dataset.contactForMetadata.voicePhone
    • md-dataset.contactForMetadata.facsimile
  • md-dataset.fileidentifier
  • md-dataset.mdIdentifierLocalId
  • md-dataset.mdIdentifierNamespace

Example configuration excerpt

[
    {
        "categoryName": "general",
        "title": "Allgemeine Angaben",
        "name": "general",
        "fields": [
            {
                "name": "md-dataset.citation.title",
                "required": true,
                "minOccurs": 1,
                "maxOccurs": 1,
                "comment": "ISO 3.2.1 #360",
                "label": "Datensatz-Titel",
                "description": "Bezeichnung, unter der der Datensatz bekannt ist",
                "type": "string",
                "schema": null,
                "defaultValue": null,
                "autofillRule": "",
                "editable": true,
                "targets": {
                    "bsp": "md-dataset.citation.title"
                }
            },
            {
                "name": "md-dataset.identification.abstract",
                "required": true,
                "minOccurs": 1,
                "maxOccurs": 1,
                "comment": "ISO B2.2.1 #24",
                "label": "Kurzbeschreibung Datensatz",
                "description": "kurze, beschreibende Zusammenfassung des Datensatzes",
                "type": "string",
                "schema": null,
                "defaultValue": null,
                "autofillRule": null,
                "editable": true,
                "targets": {
                    "bsp": "md-dataset.identification.abstract"
                }
            }
        ]
    }
]

Working with Enumeration Fields

Enumeration fields enable you to create dropdown menus on fields. Dropdown menus limit the end-user’s data entry options to a set of pre-defined values, making metadata entry easier and less error prone. To use an enumeration field, enter “enum” in the schema field. Next, create a new field named “enumValues” at the end of the category object. The values are contained within square brackets []. Each label/value pair is contained within curly brackets {}. Copy the pattern of the “enumValues” field in the code block below to create an enumeration field in the category object of your choice. Replace the values after the colons in the label/value pairs with your own data.

    {
        "name": "md-dataset.contactForMetadata.roleCode",
        "required": true,
        "minOccurs": 1,
        "maxOccurs": 1,
        "comment": "roleCode",
        "label": "Role",
        "description": null,
        "type": "enum",
        "schema": null,
        "defaultValue": "pointOfContact",
        "autofillRule": null,
        "visibility": true,
        "editable": true,
        "enumValues": [
              {
                  "label": "author",
                  "value": "author"
              },
              {
                  "label": "custodian",
                  "value": "custodian"
              },
              {
                  "label": "distributor",
                  "value": "distributor"
              },
              {
                  "label": "originator",
                  "value": "originator"
              },
              {
                  "label": "owner",
                  "value": "owner"
              },
              {
                  "label": "pointOfContact",
                  "value": "pointOfContact"
              },
              {
                  "label": "principalInvestigator",
                  "value": "principalInvestigator"
              },
              {
                  "label": "processor",
                  "value": "processor"
              },
              {
                  "label": "publisher",
                  "value": "publisher"
              },
              {
                  "label": "resourceProvider",
                  "value": "resourceProvider"
              },
              {
                  "label": "user",
                  "value": "user"
              }
              ],
              "targets": {
                  "bsp": "md-dataset.contactForMetadata.roleCode"
              }
    }

Metadata configured to use an enumeration field

The image below displays the configured enumeration field. The dropdown menu is implemented on the “Role” field and it is populated with the user-provided values.

Working with Autofill Rules

Autofill rules enable the automatic generation of metadata through the use of variables. haleconnect allows you to use data you have previously provided to populate metadata fields. A few examples of these data include the contact details of your organisation, the name of your dataset, or attribute data associated with your dataset’s feature types. To create an autofill rule, click on the value next to the autofillRule property key. The Autofill assistant appears in the top right corner of the Metadata editor. When you click on a value in the Autofill assistant, the autofill rule is inserted at the cursor position.

Populating a keywords field using attribute data

The Autofill assistant provides several options for you to choose from. To populate a Keywords field using attribute values from your dataset, select “File Analysis” in the Autofill assistant. Next, select “Attribute Values”. You should see the name of your dataset appear. Select your dataset and the feature type that contains the attribute values you would like to add as keywords. Finally, select the attribute field that contains your keywords. The autofill rule below is an example of a keywords field populated with attribute data.

    {
        "name": "md-dataset.identification.keyword_simple",
        "required": false,
        "minOccurs": 0,
        "maxOccurs": -1,
        "comment": "keyword_simple",
        "label": "Keywords",
        "description": "Search terms under which the record should be found.",
        "type": "string",
        "schema": null,
        "defaultValue": null,
        "autofillRule":  "{{fileAnalysis.attributeValues.SchoolDistrict.SchoolDistrictFeatures.NAME}}",
        "visibility": true,
        "editable": true,
        "targets": {
            "bsp": "md-dataset.identification.keyword_simple"
        }
    }

Metadata configured to use feature type attribute values as keywords

The image below displays the configured Keywords field as it appears in the dataset metadata. The field is populated with the attribute values selected in the Metadata editor, the school district names.