Re: GN 3.2.0 Red Asterisks [SEC=UNCLASSIFIED]

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
2 messages Options
Reply | Threaded
Open this post in threaded view
|

Re: GN 3.2.0 Red Asterisks [SEC=UNCLASSIFIED]

Bleys, Evert-3
Hi Guys
Start with an apology: I suspect this has been discussed earlier

Note: I'm using ISO19115-3 as my base metadata standard

I have inherited a v3.2 editing interfaces.
     There are elements that have a red asterisk by them
          Some are mandatory in the XSDs
          Some are optional in the XSDs
     There are elements that have red boxes
          Some are mandatory in the XSDs
          Some are optional in the XSDs
Can someone please tell me from whence those are controlled
In version 2.X documentation there is a discussion about "Highly Recommended" but I cannot find where these are set in V3.X
     As part of a Community of Practice, we would like to highlight elements that are of particular use
           Eg mro:MD_Identification<<Abstract>>/mri:purpose


Cheers

e
BLEYS Evert Mr
Data Manager
Australian Bureau of Agricultural and Resource Economics and Sciences
Department of Agriculture and Water Resources
GPO Box 858 Canberra City   ACT   Australia   2601
Ph: +61 (0)2 6272 5627
Email: [hidden email]

------
IMPORTANT - This email and any attachments have been issued by the Australian Government Department of Agriculture and Water Resources. The material transmitted is for the use of the intended recipient only and may contain confidential, legally privileged, copyright or personal information. You should not copy, use or disclose it without authorisation from the Department. It is your responsibility to check any attachments for viruses and defects before opening or forwarding them.

If you are not an intended recipient, please contact the sender of this email at once by return email and then delete both messages. Unintended recipients must not copy, use, disclose, rely on or publish this email or attachments. The Department of Agriculture and Water Resources is not liable for any loss or damage resulting from unauthorised use or dissemination of, or any reliance on, this email or attachments.

If you have received this e-mail as part of a valid mailing list and no longer want to receive a message such as this one, advise the sender by return e-mail accordingly. This notice should not be deleted or altered
------

------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, SlashDot.org! http://sdm.link/slashdot
_______________________________________________
GeoNetwork-users mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/geonetwork-users
GeoNetwork OpenSource is maintained at http://sourceforge.net/projects/geonetwork
Reply | Threaded
Open this post in threaded view
|

Re: GN 3.2.0 Red Asterisks [SEC=UNCLASSIFIED]

Jose Garcia
Hi Evert

The mandatory stuff is controlled mainly in this code:
https://github.com/geonetwork/core-geonetwork/blob/3.2.x/web/src/main/webapp/xslt/ui-metadata/form-builder.xsl#L108-L119
for all metadata profiles.

In that snippet is check if the cardinalities of the parent (if available)
or from the element. This is usually not useful at all as in some profiles
you want to set mandatory elements also for elements that are optional in
the xsd.

For some projects we have extended to take also the mandatory conditions
from labels.xml, so for example in this case Use Constraints will get the
mandatory indicator:

 <element id="71.0" name="gmd:useConstraints">
        <label>Use Constraints</label>
        <description></description>
*        <condition>mandatory</condition>*
 </element>


Code snippet updated:

<xsl:variable name="isRequired" as="xs:boolean">
  <xsl:choose>
    <xsl:when
      test="($parentEditInfo and $parentEditInfo/@min = 1 and
$parentEditInfo/@max = 1) or
      (not($parentEditInfo) and $editInfo and $editInfo/@min = 1 and
$editInfo/@max = 1)">
      <xsl:value-of select="true()"/>
    </xsl:when>
*    <xsl:when test="gn-fn-metadata:getLabel($schema, name(),
$labels)/condition = 'mandatory'">*
*      <xsl:value-of select="true()"/>*
*    </xsl:when>*
    <xsl:otherwise>
      <xsl:value-of select="false()"/>
    </xsl:otherwise>
  </xsl:choose>
</xsl:variable>

I'll check with other developers for any comment about the code and to
commit it.

Regards,
Jose García

On Tue, Feb 21, 2017 at 12:56 AM, Bleys, Evert <
[hidden email]> wrote:

> Hi Guys
> Start with an apology: I suspect this has been discussed earlier
>
> Note: I'm using ISO19115-3 as my base metadata standard
>
> I have inherited a v3.2 editing interfaces.
>      There are elements that have a red asterisk by them
>           Some are mandatory in the XSDs
>           Some are optional in the XSDs
>      There are elements that have red boxes
>           Some are mandatory in the XSDs
>           Some are optional in the XSDs
> Can someone please tell me from whence those are controlled
> In version 2.X documentation there is a discussion about "Highly
> Recommended" but I cannot find where these are set in V3.X
>      As part of a Community of Practice, we would like to highlight
> elements that are of particular use
>            Eg mro:MD_Identification<<Abstract>>/mri:purpose
>
>
> Cheers
>
> e
> BLEYS Evert Mr
> Data Manager
> Australian Bureau of Agricultural and Resource Economics and Sciences
> Department of Agriculture and Water Resources
> GPO Box 858 Canberra City   ACT   Australia   2601
> Ph: +61 (0)2 6272 5627
> Email: [hidden email]
>
> ------
> IMPORTANT - This email and any attachments have been issued by the
> Australian Government Department of Agriculture and Water Resources. The
> material transmitted is for the use of the intended recipient only and may
> contain confidential, legally privileged, copyright or personal
> information. You should not copy, use or disclose it without authorisation
> from the Department. It is your responsibility to check any attachments for
> viruses and defects before opening or forwarding them.
>
> If you are not an intended recipient, please contact the sender of this
> email at once by return email and then delete both messages. Unintended
> recipients must not copy, use, disclose, rely on or publish this email or
> attachments. The Department of Agriculture and Water Resources is not
> liable for any loss or damage resulting from unauthorised use or
> dissemination of, or any reliance on, this email or attachments.
>
> If you have received this e-mail as part of a valid mailing list and no
> longer want to receive a message such as this one, advise the sender by
> return e-mail accordingly. This notice should not be deleted or altered
> ------
>
> ------------------------------------------------------------
> ------------------
> Check out the vibrant tech community on one of the world's most
> engaging tech sites, SlashDot.org! http://sdm.link/slashdot
> _______________________________________________
> GeoNetwork-users mailing list
> [hidden email]
> https://lists.sourceforge.net/lists/listinfo/geonetwork-users
> GeoNetwork OpenSource is maintained at http://sourceforge.net/
> projects/geonetwork
>



--













*Vriendelijke groeten / Kind regards,Jose García
<http://www.geocat.net/>Veenderweg 136721 WD BennekomThe NetherlandsT: +31
(0)318 416664 <+31318416664> <https://www.facebook.com/geocatbv>
<https://twitter.com/geocat_bv>
<https://plus.google.com/u/1/+GeocatNetbv/posts>Please consider the
environment before printing this email.*
------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, SlashDot.org! http://sdm.link/slashdot
_______________________________________________
GeoNetwork-users mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/geonetwork-users
GeoNetwork OpenSource is maintained at http://sourceforge.net/projects/geonetwork