Hi
I have a problem adding a point of contact from metadata default editor view, using [+] button. The profile I’m using makes mandatory gmd:individualName and some other elements of gmd:CI_ResponsibleParty, but when adding the contact these mandatory elements are not added.
The problem seem to be in the following highlighted check in EditLib.fillElement:
<b>if (
(schema.isSimpleElement(elemName, childName) || !elemType.isOrType()) ||
(elemType.isOrType() && elemType.getElementList().contains("gco:CharacterString") && !hasSuggestion && minCard == 0)
) {
String name = getUnqualifiedName(childName);
String ns = getNamespace(childName, md, schema);
String prefix = getPrefix(childName);
Element child = new Element(name, prefix, ns);
md.addContent(child);
fillElement(schema, sugg, md, child);</b>
<b>} else {
if (elemType.isOrType()) {
if (elemType.getElementList().contains("gco:CharacterString") && !hasSuggestion) {
if(Log.isDebugEnabled(Geonet.EDITOR))
Log.debug(Geonet.EDITOR,"#### - (INNER) Requested expansion of an OR element having gco:CharacterString substitute and no suggestion: " + md.getName());
} else {
if(Log.isDebugEnabled(Geonet.EDITOR))
Log.debug(Geonet.EDITOR,"#### - WARNING (INNER): requested expansion of an OR element : " +childName);
}
}
}</b>
Sorry, but no clear about the check of minCard == 0. I understand should be an obvious reason for this check, but I’m not getting it.
The problem is that using a profile with gmd:individualName mandatory and adding a point of contact in default metadata editor means that previous condition fails due to minCard = 1, and gmd:individualName is not added to the point of contact section, what produces an invalid metadata according to the profile.
Anyone has an explanation about the reason of the check? and how to fix the case I described, maybe can remove safely the minCard == 0 check?
Regards,
Jose García
–
GeoCat Bridge for ArcGIS allows instant publishing of data and metadata on GeoServer and GeoNetwork. Visit http://geocat.net for details.
Jose García
GeoCat bv
Veenderweg 13
6721 WD Bennekom
The Netherlands
http://GeoCat.net
Hi
Nobody has any idea about this?
Regards,
Jose García
On Wed, Mar 13, 2013 at 2:48 PM, Jose Garcia <jose.garcia@anonymised.com> wrote:
Hi
I have a problem adding a point of contact from metadata default editor view, using [+] button. The profile I’m using makes mandatory gmd:individualName and some other elements of gmd:CI_ResponsibleParty, but when adding the contact these mandatory elements are not added.
The problem seem to be in the following highlighted check in EditLib.fillElement:
<b>if (
(schema.isSimpleElement(elemName, childName) || !elemType.isOrType()) ||
(elemType.isOrType() && elemType.getElementList().contains("gco:CharacterString") && !hasSuggestion && minCard == 0)
) {
String name = getUnqualifiedName(childName);
String ns = getNamespace(childName, md, schema);
String prefix = getPrefix(childName);
Element child = new Element(name, prefix, ns);
md.addContent(child);
fillElement(schema, sugg, md, child);</b>
<b>} else {
if (elemType.isOrType()) {
if (elemType.getElementList().contains("gco:CharacterString") && !hasSuggestion) {
if(Log.isDebugEnabled(Geonet.EDITOR))
Log.debug(Geonet.EDITOR,"#### - (INNER) Requested expansion of an OR element having gco:CharacterString substitute and no suggestion: " + md.getName());
} else {
if(Log.isDebugEnabled(Geonet.EDITOR))
Log.debug(Geonet.EDITOR,"#### - WARNING (INNER): requested expansion of an OR element : " +childName);
}
}
}</b>
Sorry, but no clear about the check of minCard == 0. I understand should be an obvious reason for this check, but I’m not getting it.
The problem is that using a profile with gmd:individualName mandatory and adding a point of contact in default metadata editor means that previous condition fails due to minCard = 1, and gmd:individualName is not added to the point of contact section, what produces an invalid metadata according to the profile.
Anyone has an explanation about the reason of the check? and how to fix the case I described, maybe can remove safely the minCard == 0 check?
Regards,
Jose García
–
GeoCat Bridge for ArcGIS allows instant publishing of data and metadata on GeoServer and GeoNetwork. Visit http://geocat.net for details.
Jose García
GeoCat bv
Veenderweg 13
6721 WD Bennekom
The Netherlands
http://GeoCat.net
–
GeoCat Bridge for ArcGIS allows instant publishing of data and metadata on GeoServer and GeoNetwork. Visit http://geocat.net for details.
Jose García
GeoCat bv
Veenderweg 13
6721 WD Bennekom
The Netherlands
http://GeoCat.net
Hi Francois
Please check if this makes sense to you and it’s similar to what you’re working on:
- If the element is optional and exists a suggestion → add the suggestion
- If the element is mandatory and it is not a choice element → add it
- If the element is mandatory and it is a choice element → take from a config file the preferred choice (maybe take it also from suggestions file?) and if not preferred option, just take the first option from xsd? At least, this would avoid to create invalid md as described in previous mails.
Probably some other cases I’m missing, but something like this can be much easy to manage and understand how works.
Regards,
Jose García
···
On Tue, Apr 16, 2013 at 10:37 AM, Francois Prunayre <fx.prunayre@anonymised.com> wrote:
Jose,
–
GeoCat Bridge for ArcGIS allows instant publishing of data and metadata on GeoServer and GeoNetwork. Visit http://geocat.net for details.
Jose García
GeoCat bv
Veenderweg 13
6721 WD Bennekom
The Netherlands
http://GeoCat.net
2013/3/14 Jose Garcia <jose.garcia@anonymised.com>
Hi
Nobody has any idea about this?
I’m investigating that issue
http://trac.osgeo.org/geonetwork/ticket/1267
and should have a fix shortly.
Cheers.
Francois
Regards,
Jose García
On Wed, Mar 13, 2013 at 2:48 PM, Jose Garcia <jose.garcia@anonymised.com> wrote:
Hi
I have a problem adding a point of contact from metadata default editor view, using [+] button. The profile I’m using makes mandatory gmd:individualName and some other elements of gmd:CI_ResponsibleParty, but when adding the contact these mandatory elements are not added.
The problem seem to be in the following highlighted check in EditLib.fillElement:
<b>if (
(schema.isSimpleElement(elemName, childName) || !elemType.isOrType()) ||
(elemType.isOrType() && elemType.getElementList().contains("gco:CharacterString") && !hasSuggestion && minCard == 0)
) {
String name = getUnqualifiedName(childName);
String ns = getNamespace(childName, md, schema);
String prefix = getPrefix(childName);
Element child = new Element(name, prefix, ns);
md.addContent(child);
fillElement(schema, sugg, md, child);</b>
<b>} else {
if (elemType.isOrType()) {
if (elemType.getElementList().contains("gco:CharacterString") && !hasSuggestion) {
if(Log.isDebugEnabled(Geonet.EDITOR))
Log.debug(Geonet.EDITOR,"#### - (INNER) Requested expansion of an OR element having gco:CharacterString substitute and no suggestion: " + md.getName());
} else {
if(Log.isDebugEnabled(Geonet.EDITOR))
Log.debug(Geonet.EDITOR,"#### - WARNING (INNER): requested expansion of an OR element : " +childName);
}
}
}</b>
Sorry, but no clear about the check of minCard == 0. I understand should be an obvious reason for this check, but I’m not getting it.
The problem is that using a profile with gmd:individualName mandatory and adding a point of contact in default metadata editor means that previous condition fails due to minCard = 1, and gmd:individualName is not added to the point of contact section, what produces an invalid metadata according to the profile.
Anyone has an explanation about the reason of the check? and how to fix the case I described, maybe can remove safely the minCard == 0 check?
Regards,
Jose García
–
GeoCat Bridge for ArcGIS allows instant publishing of data and metadata on GeoServer and GeoNetwork. Visit http://geocat.net for details.
Jose García
GeoCat bv
Veenderweg 13
6721 WD Bennekom
The Netherlands
http://GeoCat.net
–
GeoCat Bridge for ArcGIS allows instant publishing of data and metadata on GeoServer and GeoNetwork. Visit http://geocat.net for details.
Jose García
GeoCat bv
Veenderweg 13
6721 WD Bennekom
The Netherlands
http://GeoCat.net
Everyone hates slow websites. So do we.
Make your web apps faster with AppDynamics
Download AppDynamics Lite for free today:
http://p.sf.net/sfu/appdyn_d2d_mar
GeoNetwork-devel mailing list
GeoNetwork-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/geonetwork-devel
GeoNetwork OpenSource is maintained at http://sourceforge.net/projects/geonetwork