Esri / geoportal-server

Geoportal Server is a standards-based, open source product that enables discovery and use of geospatial resources including data and services.
https://gptogc.esri.com/geoportal
Apache License 2.0
246 stars 149 forks source link

in DCAT implementation allow defining cascading elements to look up values #150

Closed mhogeweg closed 9 years ago

mhogeweg commented 9 years ago

The crosswalks for mapping CSDGM and ISO to schema 1.1 has many POD elements with a cascading series of potential mappings from the source metadata: if xpath1 exists, use it, if not, then use xpath2, and on and on.

Include in geoportal also the ability to cascade through indexed fields to find one that has a value usable for the specific POD JSON output.

mhogeweg commented 9 years ago

Adding a bit more implementation details. Here is a configuration example:

<field name="publisher"
  index="dcat.publisher;dcat.org.org+dcat.org.per;dcat.per.org+dcat.per.per;dcat.publisher.origin"
  required="true" 
  joinOperator=" "/>

In the above the data.json field publisher will be fed from the first matching element in the index attribute. In this case that's dcat.publisher. if this field has a value in the index for the current document, it will be used. if it doesn't geoportal server will look at the next element in the index attribute (note these are separated by semi-colon): dcat.org.org+dcat.org.per. this next lookup is a concatenation of two index fields: dcat.org.org and dcat.org.per. The two are concatenated using the defined joinOperator.

mhogeweg commented 9 years ago

included in 1.2.6