[GeoNetwork-devel] [GN 3.0.4] Field cardinality

Hi all,

i have to modify the cardinality to these fields because of the inspire standard (http://inspire-geoportal.ec.europa.eu/editor/). Currenty cardinality is 1, i need to change to 1 to N

<field name="metadataPointOfContact" templateModeOnly="true" notDisplayedIfMissing="true" xpath="/gmd:MD_Metadata/gmd:contact" del="." in="/gmd:MD_Metadata" or="metadataPointOfContact">

<field name="pointOfContact" templateModeOnly="true" notDisplayedIfMissing="true"
           in="/gmd:MD_Metadata" or="pointOfContact"
xpath="/gmd:MD_Metadata/gmd:identificationInfo/srv:SV_ServiceIdentification/gmd:pointOfContact"

           del="." if="count(gmd:MD_Metadata/gmd:identificationInfo/srv:SV_ServiceIdentification) > 0">

I try to modify the metadataEntity.xsd adding these two lines but nothing happened:

<xs:element name="pointOfContact" type="gmd:CI_ResponsibleParty_PropertyType" minOccurs="1" maxOccurs="unbounded"/>
<xs:element name="metadataPointOfContact" type="gmd:contact_PropertyType" minOccurs="1" maxOccurs="unbounded"/>

Regards,
Marco

--
This email was Virus checked by Astaro Security Gateway. http://www.sophos.com

Hi Marco

The cardinality for metadata contact seem is already 1…N (see metadataEntity.xsd):

···

On Thu, Jan 26, 2017 at 10:52 AM, Marco Spagnulo <marco.spagnulo@anonymised.com141…> wrote:

Hi all,

i have to modify the cardinality to these fields because of the inspire
standard (http://inspire-geoportal.ec.europa.eu/editor/). Currenty
cardinality is 1, i need to change to 1 to N

<field name=“pointOfContact” templateModeOnly=“true”
notDisplayedIfMissing=“true”
in=“/gmd:MD_Metadata” or=“pointOfContact”
xpath=“/gmd:MD_Metadata/gmd:identificationInfo/srv:SV_ServiceIdentification/gmd:pointOfContact”

del=“.”
if="count(gmd:MD_Metadata/gmd:identificationInfo/srv:SV_ServiceIdentification)

0">

I try to modify the metadataEntity.xsd adding these two lines but
nothing happened:

<xs:element name=“pointOfContact”
type=“gmd:CI_ResponsibleParty_PropertyType” minOccurs=“1”
maxOccurs=“unbounded”/>
<xs:element name=“metadataPointOfContact”
type=“gmd:contact_PropertyType” minOccurs=“1” maxOccurs=“unbounded”/>

Regards,
Marco


This email was Virus checked by Astaro Security Gateway. http://www.sophos.com


Check out the vibrant tech community on one of the world’s most
engaging tech sites, SlashDot.org! http://sdm.link/slashdot


GeoNetwork-devel mailing list
GeoNetwork-devel@…537…sourceforge.net
https://lists.sourceforge.net/lists/listinfo/geonetwork-devel
GeoNetwork OpenSource is maintained at http://sourceforge.net/projects/geonetwork

Vriendelijke groeten / Kind regards,

Jose García


Veenderweg 13
6721 WD Bennekom
The Netherlands
T: +31 (0)318 416664

Please consider the environment before printing this email.

Hi Jose,

thanks for your fast reply. I have tried to restore the field’s configuration as you describe but the problem still remain. I noticed that the issue (if there is an issue and it is not my mistake) affects only the fields with a template inside.

I’ve already tried with success to modify the cardinality on other field, for example EX_GeographicBoundingBox. In this case i remove the add action from the config editor and and i have added only this line in metadataEntity

<xs:element name=“EX_GeographicBoundingBox” type=“gmd:EX_GeographicBoundingBox_PropertyType” minOccurs=“1” maxOccurs=“unbounded”/>

and the form builder automatically generate the add action without declaring it in the config-editor.

thanks for your support,

Marco

···

Il 26/01/2017 11:56, Jose Garcia ha scritto:

Hi Marco

The cardinality for metadata contact seem is already 1…N (see metadataEntity.xsd):


```
<xs:complexType name="MD_Metadata_Type">
  <xs:annotation>
    <xs:documentation>Information about the metadata</xs:documentation>
  </xs:annotation>
  <xs:complexContent>
    <xs:extension base="gco:AbstractObject_Type">
      <xs:sequence>
        <xs:element name="fileIdentifier" type="gco:CharacterString_PropertyType" minOccurs="0"/>
        <xs:element name="language" type="gco:CharacterString_PropertyType" minOccurs="0"/>
        <xs:element name="characterSet" type="gmd:MD_CharacterSetCode_PropertyType"
                    minOccurs="0"/>
        <xs:element name="parentIdentifier" type="gco:CharacterString_PropertyType"
                    minOccurs="0"/>
        <xs:element name="hierarchyLevel" type="gmd:MD_ScopeCode_PropertyType" minOccurs="0"
                    maxOccurs="unbounded"/>
        <xs:element name="hierarchyLevelName" type="gco:CharacterString_PropertyType"
                    minOccurs="0" maxOccurs="unbounded"/>
        <xs:element name="contact" type="gmd:CI_ResponsibleParty_PropertyType"
                    maxOccurs="unbounded"/>
```

If you want to add to the editor multiple points of contact, probably you need to add an action in the config-editor.xml, something like this:

<action type="add" name="metadataPointOfContact"
        addDirective="data-gn-directory-entry-selector" or="contact"
        in="/gmd:MD_Metadata">
  <directiveAttributes
          data-template-add-action="true"
          data-template-type="contact"
          data-variables="gmd:role/gmd:CI_RoleCode/@codeListValue~{role}"/>
</action>

But at least in the default view seem already there (https://github.com/geonetwork/core-geonetwork/blob/3.2.x/schemas/iso19139/src/main/plugin/iso19139/layout/config-editor.xml#L1202-L1266), so should be displayed, unless any bug …

Regards,
Jose García

On Thu, Jan 26, 2017 at 10:52 AM, Marco Spagnulo <marco.spagnulo@anonymised.com> wrote:

Hi all,

i have to modify the cardinality to these fields because of the inspire
standard (http://inspire-geoportal.ec.europa.eu/editor/). Currenty
cardinality is 1, i need to change to 1 to N

<field name=“pointOfContact” templateModeOnly=“true”
notDisplayedIfMissing=“true”
in=“/gmd:MD_Metadata” or=“pointOfContact”
xpath=“/gmd:MD_Metadata/gmd:identificationInfo/srv:SV_ServiceIdentification/gmd:pointOfContact”

del=“.”
if="count(gmd:MD_Metadata/gmd:identificationInfo/srv:SV_ServiceIdentification)

0">

I try to modify the metadataEntity.xsd adding these two lines but
nothing happened:

<xs:element name=“pointOfContact”
type=“gmd:CI_ResponsibleParty_PropertyType” minOccurs=“1”
maxOccurs=“unbounded”/>
<xs:element name=“metadataPointOfContact”
type=“gmd:contact_PropertyType” minOccurs=“1” maxOccurs=“unbounded”/>

Regards,
Marco


This email was Virus checked by Astaro Security Gateway. http://www.sophos.com


Check out the vibrant tech community on one of the world’s most
engaging tech sites, SlashDot.org! http://sdm.link/slashdot


GeoNetwork-devel mailing list
GeoNetwork-devel@anonymised.comsourceforge.net
https://lists.sourceforge.net/lists/listinfo/geonetwork-devel
GeoNetwork OpenSource is maintained at http://sourceforge.net/projects/geonetwork

Vriendelijke groeten / Kind regards,

Jose García


Veenderweg 13
6721 WD Bennekom
The Netherlands
T: +31 (0)318 416664

Please consider the environment before printing this email.

-- 
This email was Virus checked by Astaro Security Gateway. [http://www.sophos.com](http://www.sophos.com)

Hi,

there is an issue with the conformity field, the date type is not displayed (see the attachment).

The field is not defined in the template but is present in the snippet, here the xml in config-editor.xml:

<field name="conformity" templateModeOnly="true"
xpath="/gmd:MD_Metadata/gmd:dataQualityInfo/gmd:DQ_DataQuality/gmd:report/gmd:DQ_DomainConsistency/gmd:result" del="../..">
                         <template>
                             <values>
                                 <key label="conformity_title"
xpath="gmd:DQ_ConformanceResult/gmd:specification/gmd:CI_Citation/gmd:title/gco:CharacterString" tooltip="gmd:pass">
                                     <helper name="gmd:title" context="/gmd:MD_Metadata/gmd:dataQualityInfo/gmd:DQ_DataQuality/gmd:report/gmd:DQ_DomainConsistency/gmd:result/gmd:DQ_ConformanceResult/gmd:specification/gmd:CI_Citation/gmd:title" />
                                 </key>
                                 <key label="conformity_date" xpath="gmd:DQ_ConformanceResult/
gmd:specification/gmd:CI_Citation/gmd:date/gmd:CI_Date/gmd:date/gco:Date" use="date" />
                                 <key label="explanation" xpath="gmd:DQ_ConformanceResult/
                           gmd:explanation/gco:CharacterString" use="textarea" />
                                 <key label="pass" xpath="gmd:DQ_ConformanceResult/gmd:pass/gco:Boolean" use="gn-checkbox-with-nilreason">
                                     <directiveAttributes data-tag-name="gmd:pass" data-nilreason="eval#gmd:DQ_ConformanceResult/gmd:pass/@gco:nilReason" data-labels='{"true": "conformant", "false": "notConformant", "unknown": "notEvaluated"}' />
                                 </key>
                             </values>
                             <snippet>
                                 <gmd:result>
                                     <gmd:DQ_ConformanceResult>
                                         <gmd:specification>
                                             <gmd:CI_Citation>
                                                 <gmd:title>
<gco:CharacterString>{{conformity_title}}</gco:CharacterString>
                                                     <gn:copy select="gmd:PT_FreeText" />
                                                 </gmd:title>
                                                 <gn:copy select="gmd:alternateTitle" />
                                                 <gmd:date>
<gmd:CI_Date>
<gmd:date>
<gco:Date>{{conformity_date}}</gco:Date>
</gmd:date>
<gmd:dateType>
<gmd:CI_DateTypeCode codeList="http://standards.iso.org/ittf/PubliclyAvailableStandards/ISO_19139_Schemas/resources/codelist/ML_gmxCodelists.xml#CI_DateTypeCode&quot; codeListValue="publication" />
</gmd:dateType>
</gmd:CI_Date>
                                                 </gmd:date>
                                                 <gn:copy select="gmd:edition" />
                                                 <gn:copy select="gmd:editionDate" />
                                                 <gn:copy select="gmd:identifier" />
                                                 <gn:copy select="gmd:citedResponsibleParty" />
                                                 <gn:copy select="gmd:presentationForm" />
                                                 <gn:copy select="gmd:series" />
                                                 <gn:copy select="gmd:otherCitationDetails" />
                                                 <gn:copy select="gmd:collectiveTitle" />
                                                 <gn:copy select="gmd:ISBN" />
                                                 <gn:copy select="gmd:ISSN" />
                                             </gmd:CI_Citation>
                                         </gmd:specification>
                                         <gmd:explanation>
<gco:CharacterString>{{explanation}}</gco:CharacterString>
                                             <gn:copy select="gmd:PT_FreeText" />
                                         </gmd:explanation>
                                         {{pass}}
</gmd:DQ_ConformanceResult>
                                 </gmd:result>
                             </snippet>
                         </template>
                     </field>

Can somebody help me?

Regards,
Marco

--
This email was Virus checked by Astaro Security Gateway. http://www.sophos.com

(attachments)

conformity.png