geonetwork / core-geonetwork

GeoNetwork is a catalog application to manage spatially referenced resources. It provides powerful metadata editing and search functions as well as an interactive web map viewer. It is currently used in numerous Spatial Data Infrastructure initiatives across the world.
http://geonetwork-opensource.org/
GNU General Public License v2.0
420 stars 489 forks source link

Can I remove the list of INSPIRE TGs in .../mdq:specification? #6834

Closed laers closed 1 year ago

laers commented 1 year ago

Hi François

In GN 4.2.2 I want to add field for:

/mdb:MD_Metadata/mdb:dataQualityInfo/mdq:DQ_DataQuality/mdq:report/mdq:DQ_DomainConsistency/mdq:result/mdq:DQ_ConformanceResult/mdq:specification

It works ok, but I notice that a list with INSPIRE TG appears (in French...). Can I somehow remove the list so only an empty text-box is left where the data owner can write the title of the specification:

billede

I have an idea that I might have to do some modifications in:

<for name="mdq:report" addDirective="data-gn-directory-entry-selector">
  <directiveAttributes
          data-template-add-action="true"
          data-search-action="true"
          data-popup-action="false"
          data-template-type="report"
          data-filter='{"root": "mdq:DQ_*"}'/>
</for>

Br Lars

fxprunayre commented 1 year ago

Yes @laers it make more sense to use directory entry selector for that.

laers commented 1 year ago

I tried to add:

<for name="cit:title" 
xpath="/mdb:MD_Metadata/mdb:dataQualityInfo/mdq:DQ_DataQuality/mdq:report/mdq:DQ_DomainConsistency/mdq:result/mdq:DQ_ConformanceResult/mdq:specification/cit:CI_Citation/cit:title"
use="data-gn-directory-entry-selector"/>

But with no success

I tried to do more or less the same as done in Metawal - SPW editor where cit:title has to use the data-gn-keyword-picker:

<for name="cit:title"
 xpath="/mdb:MD_Metadata/mdb:dataQualityInfo/mdq:DQ_DataQuality/mdq:report/mdq:DQ_DomainConsistency/mdq:result/mdq:DQ_ConformanceResult/mdq:specification/cit:CI_Citation/cit:title"
 use="data-gn-keyword-picker">
<directiveAttributes data-thesaurus-key="external.theme.inspire-technical-guidelines"
 data-thesaurus-concept-id-attribute="xlinkCOLONhref"/>
</for>
fxprunayre commented 1 year ago

You can't assign a full mdq:DQ_DomainConsistency to the cit:title (or create a directory of only titles). So indeed, you could use a thesaurus to only populate the title value or you should create a directory of mdq:DQ* elements and probably do something like:

    <for name="mdq:report" addDirective="data-gn-directory-entry-selector">
      <directiveAttributes
              data-template-add-action="true"
              data-search-action="true"
              data-popup-action="false"
              data-template-type="report"
              data-filter='{"root": "mdq:DQ_*"}'/>
    </for>

So when you select one it populates the full report.

The other option less flexible is to use a dropdown button with the options cf. https://geonetwork-opensource.org/manuals/4.0.x/en/customizing-application/editor-ui/creating-custom-editor.html#adding-a-button

laers commented 1 year ago

I am still wondering why the list of exact the INSPIRE specifications occurs and can be selected as specifications, and why their titles are in French?

billede

The list occurs from the default config-file. Is it not possible to remove them somehow? Is there a list of exact these INSPIRE specifications somewhere in another file in the GN installation?

laers commented 1 year ago

I found it! The list of specifications, INSPIRE annex 1, is in the files:

geonetwork\WEB-INF\data\config\schema_plugins\iso19115-3.2018\loc\eng\labels.xml geonetwork\WEB-INF\data\config\schema_plugins\iso19115-3.2018\loc\fre\labels.xml

starting at line 4355 "element name="cit:title" id="360.0"".