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
245 stars 149 forks source link

New INSPIRE guidelines: use of gmx:Anchor #321

Closed gcampanile closed 4 years ago

gcampanile commented 5 years ago

Hi all,

the new INSPIRE technical guidelines will be much more based on URIs, therefore the use of <gmx_Anchor xlink:href="https://some.link">Some Description<gmx:Anchor> will be all over the metadata document. For example the INSPIRE themes, the GEMET thesaurus, the Spatial references, etc. shall be n that forma. I am trying to implement this in 1.2.7 (I can't move from this version) but up to now I could not find the right way. The problem is mainly with SelectOne or SelectMany elements.

For example:

<g:element g:targetName="gmx:Anchor" g:extends="$base/schema/gco/gcoBase/CodeListValue_Type.xml">
    <g:body>
        <g:attribute g:targetName="xlink:href" g:extends="$base/schema/gco/gcoBase/CodeListValue_Type.xml">
            <g:body>
                <g:input g:extends="$base/core/ui/InputSelectOne.xml">
                    <g:options>
                        <g:option g:label="One" g:value="http://one.one"/>
                        <g:option g:label="Two" g:value="http://two.two"/>
                        <g:option g:label="Three" g:value="http://three.three"/>
                    </g:options>
                </g:input>
            </g:body>          
        </g:attribute>     
    </g:body> 
</g:element>

But this creates only this: <gmx_Anchor xlink:href="https://two.two"/>

For SelectMany, like for example INSPIRE themes I had no success at all. I don't know if I must write a completely new editor "class" and/or modify the Gxe.js engine. Does someone have a suggestion ?

Thanks Gianni

mhogeweg commented 5 years ago

in this example, I would make the gmx: Anchor element just an element, not a codelistvalue type. the xlink:href attribute of the gmd:Anchor element is the one that's the codelist.

gcampanile commented 5 years ago

I tried this:

<g:element g:targetName="gmd:keyword" h:tag="div" g:extends="$base/schema/gco/basicTypes/CharacterString_PropertyType.xml">
                <g:body>
                    <g:element g:targetName="gmx:Anchor" g:minOccurs="1">
                        <g:body>
                            <g:attribute g:targetName="xlink:href" g:extends="$base/schema/gco/gcoBase/CodeListValue_Type.xml">
                                <g:input g:extends="$base/core/ui/InputSelectOne.xml">
                                    <g:options>
                                        <g:option g:label="One" g:value="ONE"/>
                                        <g:option g:label="Two" g:value="TWO"/>
                                        <g:option g:label="Three" g:value="THREE"/>
                                    </g:options>
                                </g:input>
                            </g:attribute> 
                        </g:body>                       
                    </g:element>
                </g:body> 
            </g:element>

But in this case there are two inputs, one for the element and one for the attribute; in addition if I use the InputSelectMany this fragment won't work at all. My problem is to find a gxe class that "knows" that it should write the element (gmxAnchor) string AND the attribute (xlink:href) , using the same value (or a value and an alias) just like in :

<g:element g:targetName="gmd:keyword" g:minOccurs="1" g:maxOccurs="unbounded"
          g:label="$i18n.catalog.mdParam.inspire.keyword.dataTheme.label"
          g:info="$i18n.catalog.rdnt.dataset.hint.temaInspireTI"
          g:extends="$base/schema/gco/basicTypes/CharacterString_PropertyType.xml">
                <g:body>
                    <g:element g:isIsoWMVL="true">
                        <g:body>
                            <g:input g:extends="$base/core/ui/InputSelectMany.xml">
                                <g:options g:i18nBase="catalog.mdParam.inspire.keyword.dataTheme">
                                    <g:option g:value="$i18nBase.atmosphericConditions" g:alias="Atmospheric conditions" g:label="$i18nBase.atmosphericConditions"/>
                                    <g:option g:value="$i18nBase.landCover" g:alias="Land cover" g:label="$i18nBase.landCover"/>

Gianni

gcampanile commented 5 years ago

Still struggling with these new specifications... After changing the gxe.js to accept "xlink:href" at the same way of "codeListValue" we finally managed to solve the InputSelectOne input type. The problem now is with InputSelectMany, for example INSPIRE themes:

<gmd:descriptiveKeywords>
    <gmd:MD_Keywords>
        <gmd:keyword>
            <gco:CharacterString>Buildings</gco:CharacterString>
        </gmd:keyword>
        <gmd:keyword>
            <gco:CharacterString>Land Cover</gco:CharacterString>
        </gmd:keyword>
        <gmd:keyword>
            <gco:CharacterString>Elevation</gco:CharacterString>
        </gmd:keyword>

This is obtained from the following gxe structure:

<g:element g:targetName="gmd:keyword" g:minOccurs="1" g:maxOccurs="unbounded"
          g:label="$i18n.catalog.mdParam.inspire.keyword.dataTheme.label"
          g:extends="$base/schema/gco/basicTypes/CharacterString_PropertyType.xml">
          <g:body>
            <g:element g:isIsoWMVL="true">
              <g:body>
                <g:input g:extends="$base/core/ui/InputSelectMany.xml">
                  <g:options g:i18nBase="catalog.mdParam.inspire.keyword.dataTheme">
                      <g:option g:value="Addresses" g:alias="Addresses" g:label="$i18nBase.addresses"/>
                      <g:option g:value="Administrative units" g:alias="Administrative_units" g:label="$i18nBase.administrativeUnits"/>

The new specs request instead the following XML code:

<gmd:descriptiveKeywords>
    <gmd:MD_Keywords>
        <gmd:keyword>
            <gmx:Anchor xlink:href='https://www.eionet.europa.eu/gemet/en/inspire-theme/bu'>Buildings</gmx:Anchor>
        </gmd:keyword>
        <gmd:keyword>
            <gmx:Anchor xlink:href='https://www.eionet.europa.eu/gemet/en/inspire-theme/lc'>Land Cover</gmx:Anchor>
        </gmd:keyword>
        <gmd:keyword>
            <gmx:Anchor xlink:href='https://www.eionet.europa.eu/gemet/en/inspire-theme/el'>Elevation</gmx:Anchor>
        </gmd:keyword>

But we did not found any way to obtain it. We tried several approaches, but without success.

Now we are stuck: any idea ?

Thanks.

Gianni

Cimentar commented 4 years ago

Hi, I am solving a similar problem. Did you manage to solve it? May I ask what change needs to be made in the gxe.js file?

Thanks

gcampanile commented 4 years ago

Hi,

I'am afraid I can be of great help because our changes are mixed with other ones we had to make to fulfil national profile, which includes many other tags and constraints than INSPIRE ones. Although I am sure that we had to create a new type similar to ISOCodeListValue and add a section in gxe.js to handle the type and the associated label.

Sorry not to be more precise. Gianni

mhogeweg commented 4 years ago

We are currently working on implementing the updated INSPIRE metadata specification in ArcGIS for INSPIRE 10.8.1. Our goal is to use Geoportal Server 2.x for that.

mhogeweg commented 4 years ago

As part of ArcGIS for INSPIRE 10.8 we had implemented the new INSPIRE metadata specification. That code was already available in the develop branch, but has now been merged into the master. While not formally released, this was tagged as 1.2.9.1. To see the difference between 1.2.9 and 1.2.9.1 see: https://github.com/Esri/geoportal-server/compare/v1.2.9...v1.2.9.1.

Please pull the latest code.

Cimentar commented 4 years ago

Thank you for valuable information, we will consider all possibilities of the implementation. Version 1.2.9.1 looks great.

mhogeweg commented 4 years ago

thanks. I would encourage you to look at 2.x though. The 1.x generation will not see a lot of development. We have switch to 2.x for several years now. Please see: https://github.com/Esri/geoportal-server-catalog

StefanJaq commented 4 years ago

As part of ArcGIS for INSPIRE 10.8 we had implemented the new INSPIRE metadata specification. That code was already available in the develop branch, but has now been merged into the master. While not formally released, this was tagged as 1.2.9.1. To see the difference between 1.2.9 and 1.2.9.1 see: v1.2.9...v1.2.9.1.

Please pull the latest code.

@mhogeweg is there a binary (geoportal.war file) for this version too? Or are those updates allready included in the 1.2.9 zip file?

mhogeweg commented 4 years ago

the ArcGIS for INSPIRE 10.8 release includes the INSPIRE metadata updates

StefanJaq commented 4 years ago

OK, thanks, that's fine. I just wanted to be sure.