Create a Theme

Create a Theme

Create theme

A theme is a re-usable configuration object used to define common settings for data set metadata, service publishing and transformation, for which the theme manager is responsible.

The process for the creation of a theme is typically:

  1. Create Schema
  2. Upload transformation project
  3. Create theme
  4. Edit theme

When you created the schema and transformation project, follow these steps as a logged in theme manager or organisation superuser to create a new theme:

  1. Go to «Themes»
  2. Go to «Create new theme» at the bottom of the theme list
  3. In the first step, decide whether you want to re-use an existing theme configuration by deriving your new theme from the selected one. YOu will be able to edit ever part of the configuration later on.
  4. Assign a name to the theme
  5. Provide additional information, such as a version number, the author, and a description.
  6. Click «Create» to save the theme
When you derive your theme from an existing one, later changes to the original theme do not influence your derived theme.
You can only delete a theme when no data sets are associated with it anymore.

Add Feature Types

To validate whether an uploaded file’s content matches a theme’s definition, you have to assign feature types from previously uploaded schemas to the theme. This step is furthermore necessary to configure display properties and to enable certain autofill rules.

To assign feature types, follow these steps as a logged in theme manager or organisation superuser:

  1. Go to «Themes»
  2. Pick the theme you’d like to assign feature types to
  3. Go to «Feature Types»
  4. Click on «Add new type» aus
  5. Choose a schema from the list by clicking on the » button
  6. Choose a single feature type from the list of feature types by clicking on the » button

You can assign as many features types as you want to a theme. A single feature type can be associated with many themes. If you want to remove the assignment of a single feature type, click the red «remove» icon in the top right corner of the feature type. If you want to remove all feature types of a single schema currently associated to the theme, click the red «remove» icon in the top right corner of the schema.

Edit display properties

A common issue with type and property names from data schemas is that they are hard to unserstand. They tend to be cryptic abbreviations, especially when they come form a Shapefile, or they are defined using a foreign language. To provide well-usable view services despite this, you can define display properties which are then used for legens and GetFeatureInfo popups.

To set display properties, follow these steps as a logged in theme manager or organisation superuser:

  1. Go to «Themes»
  2. Pick the theme you’d like to change the configuration for
  3. Go to «Feature Types»
  4. Click on the properties of the feature type for which you’d like to edit the display properties
  5. In the table that appears, first decide which fields you want to be visible in a popup by setting the «Display» property to «Yes», and then pick an «Alias» for those that should be visible.
  6. Save your configuration by clicking on the «Save» button at the end of the table.

Edit metadata configuration

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 futhermore contains so-called 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»
  4. Modify the configuration in the text editor, as described below.

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 find of content is allowed, ans 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.
  • 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.
  • 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"
                }
            }
        ]
    } 
]

Define complex usage conditions

In some cases, it might be necessary to formally define complex usage rights on a data set. The system provides a specific syntax for expressing such licenses.

Such complex licenses can be used in the path „md-dataset.identification.constraints.mdConstraintPredefined“. As a theme manager or organisation superuser, you provide such licenses to the data managers, who can then pick the appropriate license from a select field. You define licenses these licenses as an enumeration, for which you provide a label and a license definition in the field value.

The license definition needs to be built using the following grammar:

('constraint' '['
  ('useLimitation='<TEXT>)?
   (
     ('useConstraint=' <TEXT>)
     |('accessConstraint=' iso:RestrictionCode)
     |('otherConstraint=' <TEXT>)
     |('otherConstraint-opendata=' 
       '['  
           'id=' <TEXT>
           'name=' <TEXT>
           'source=' <TEXT>
           'url=' <TEXT>
       ']'
   )*
']')*

Explanation of the syntax:

  • 'abc': Keywords, provided without quotes.
  • ( inhalt )?: optional content, content can be skipped when entering
  • ( inhalt )*: high-cardinality content, content can entered multiple times
  • (inhalt-1 | inhalt-2): logical or, value needs to be either inhalt-1 or inhalt-2
  • <TEXT>: Text placeholders, insert text without angle brackets

The following characters are permitted in TEXT: '+'|':'|'-'|','|'.'|';'|'?'|'!'|'„'|'ö'|'ä'|'ü'|'Ö'|'Ä'|'Ü'|'ß'|'“'|'('|')'|'@'|'/'|'#'|'{'|'}'|'©'

Note that no new lines or breaks are permitted in the license definition. We thus recommend creating the license in a text editor first, then to compact it and then to copy it into the metadata editor.

Configure Services

Configure View Services

All data sets linked to a theme share a common configuration for the creation of view services, such as OGC Web Map Services or INSPIRE View Services. In the View Service configuration, you can adjust aspects such as the type of service, the coordinate reference systems and the cartographic styling.

To edit this 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 change the configuration for
  3. Go to «View Services»
  4. Pick the type of service you’d like to publish (as of 1.0, only WMS 1.3.0 and WMTS 1.0.0 are available)
  5. Choose at least one coordinate reference system (CRS) that should be supported. You can add additional CRS by clicking the «+» button.
  6. Decide whether GetFeatureInfo should be enabled or not.
  7. Upload a Styled Layer Descriptor to define the cartographic configuration for the view service.

The Styled Layer Descriptor (SLD) has to comply with several requirements. In particular, we use the following structure to define how layers are displayed in the WMS (name, description, style):

<StyledLayerDescriptor version="1.1.0" xmlns:usgovserv="http://inspire.ec.europa.eu/schemas/us-govserv/4.0" … >
  <NamedLayer>
    <se:Name>areas</se:Name>
    <se:Description>
      <se:Title>Bezirke</se:Title>
      <se:Abstract></se:Abstract>
    </se:Description>
    <UserStyle>
      <se:Name>US.GovernmentalService_1</se:Name>
      <se:FeatureTypeStyle>
        <se:FeatureTypeName>…:GovernmentalService</se:FeatureTypeName>
        <se:Rule>
          <se:PolygonSymbolizer>
            <se:Name>symbolizer_Schulstandorte</se:Name>
            <se:Geometry>
              <ogc:PropertyName>…:areaOfResponsibilityByPolygon
              </ogc:PropertyName>
            </se:Geometry>
            …
You have to make sure that the SLD you upload is valid according to the SLD schema. Make sure to declare all required XML namespaces, in particular those namespaces required for the feature types for which styling is defined in the se:FeatureTypeName element.
In case you do not provide an SLD, the system will automatically generate one.

Configure Download Services

As for View Services, all data sets linked to a theme share a common configuration for the creation of download services, such as OGC Web Feature Services or INSPIRE Predefined Dataset Download Services. In the Download Service configuration, you can adjust aspects such as the type of service and the supported file formats and coordinate reference systems.

To edit this 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 change the configuration for
  3. Go to «Download Services»
  4. Pick the type of service you’d like to publish (as of 1.0, only Predefined Dataset is available)
  5. Choose at least one coordinate reference system (CRS) that should be supported. You can add additional CRS by clicking the «+» button.
  6. Choose at least one file format that should be supported. You can add additional formats by clicking the «+» button.

Configure Transformation Projects and Automated Workflows

You can associate a transformation project with every theme. Files in data sets that a re linked to the theme are transformed to a different format and schema by means of this transformation project. A common example is to upload non-interoperable data in Shapefile and to transform it to INSPIRE compliant GML.

To associate a transformation project with a theme, follow these steps as a logged in theme manager or organisation superuser:

  1. Go to «Themes»
  2. Pick the theme you’d like to change the configuration for
  3. Go to «Transformation»
  4. Click on «Select Project»
  5. Choose the applicable transformation project from the list by clicking on the » button
  6. Optionally, click «Select Target Theme» to choose a theme that the data sets produced by the transformation should be associated with.
    • If you intend these transformed data sets to be automatically published, the target theme association is mandatory.
  7. Choose the applicable theme from the list by clicking on the » button

Automated Publishing and Transformation

Wehn set up, the automated workflow performs service publishing and data transformation as a background process that doesn’t require any user interaction. The automated workflow can be set up to listen to events, such as the creation of a new data set. When this happens, services can be created and published, and transformation projects be executed. A typical automated workflow looks like this:

  1. Creation of a non-INSPIRE data set
  2. Publication of services for the non-INSPIRE data set
  3. Transformation of data to an INSPIRE target model
  4. Publication of services for the newly created INSPIRE data set

When logged in as a theme manager or organisation superuser, follow these steps to set up the automated workflow:

  1. Go to «Themes»
  2. Pick the theme you’d like to automate from the list of themes
  3. Go to «Automation»
  4. Decide which events should trigger the automated workflow. For each event type such as the creation of a new data set or a modification of an existing one, decide when the execution should happen - manually, immediately or with a delay. We recommend immediate execution for new data sets and manual or delayed execution for updates.
  5. If you’ve selected «Later» for one of the event types, proceed to set up when exactly the transformation and publishing should be executed:
    • Dayly: Pick the time of the day at which the transformation and publishing should be executed.
    • Weekly: Pick the weekday and the time of the day at which the transformation and publishing should be executed.
    • Monthly: Pick the day of the month and the time of the day at which the transformation and publishing should be executed.