Hi Everyone,
I am currently trying to automate some black box regression testing for geonetwork through Jenkins and would like to somehow automatically create a harvest entry. I can see that I just need to create some entry in the resource and settings table but have no idea how to generate the uuid associated with each harvest record.
Are there any other solutions to programmatically insert a harvesting setup?
Please advice
Victor Tey
Software Engineer
ASRDC
CSIRO Earth Science and Resource Engineering
Phone: +61 8 6436 8944
Victor.Tey@anonymised.com | www.csiro.au |
Address: Australian Resources Research Centre, 26 Dick Perry Avenue, Kensington WA 6151
PLEASE NOTE
The information contained in this email may be confidential or privileged. Any unauthorised use or disclosure is prohibited. If you have received this email in error, please delete it immediately and notify the sender by return email. Thank you. To the extent permitted by law, CSIRO does not represent, warrant and/or guarantee that the integrity of this communication has been maintained or that the communication is free of errors, virus, interception or interference.
Please consider the environment before printing this email.
-----Original Message-----
From: andrew walsh [mailto:awalsh@anonymised.com]
Sent: Monday, 3 September 2012 3:02 PM
To: John Callahan
Cc: geonetwork-users@lists.sourceforge.net
Subject: Re: [GeoNetwork-users] adding missing metadata elements
Hi John,
I tested importing some ISO19139 metadata with your 2 XML cases and below and tried using the editor with auto-fixes disabled.
The 1st case just showed 'Version' with no box to enter anything.
The 2nd case gave a highlighted red box in which I entered the version (see screenshot attached).
2nd case allowed you to enter the XML and it was saved OK but not inside the correct gco:CharacterString
element:
<gmd:MD_Format>
<gmd:name>
<gco:CharacterString>feature class</gco:CharacterString> </gmd:name> <gmd:version>1.26x</gmd:version> </gmd:MD_Format>
A metadata view of the 2nd case (see screenshot) doesn't show the version just a duplicate 'name'=feature class. I guess its because the XML is not legal
Maybe there is a functional lack with the metadata editor ..e when is sees an empty version element <gmd:version /> you might expect it to generate generate a gco:Character String and within that place the '1.26x'.
Things work OK if you provide this import this XML and then the editor understands it:
<gmd:MD_Format>
<gmd:name>
<gco:CharacterString>feature class</gco:CharacterString> </gmd:name> <gmd:version> <gco:CharacterString>TO BE ENTERED</gco:CharacterString> </gmd:version> </gmd:MD_Format>
Maybe another way for you, if this fits in in with your metadata workflow
HTH
Andrew
----- Original Message -----
From: John Callahan
To: andrew walsh
Cc: geonetwork-users@lists.sourceforge.net
Sent: Monday, September 03, 2012 1:21 PM
Subject: Re: [GeoNetwork-users] adding missing metadata elements
Andrew,
Thanks for your response. In this case, disabling Automatic Fixes didn't work.
My metadata actually had gco:nilReason="missing" before the import. The problem
is that the GeoNetwork editor provides an empty text box to enter a value. Any
value entered is not accepted.
For example, trying to update the version of the data format, the error occurs
in either of these two cases:
<gmd:MD_Format>
<gmd:name>
<gco:CharacterString>Personal GeoDatabase Feature Class</gco:CharacterString>
</gmd:name>
<gmd:version gco:nilReason="missing" />
</gmd:MD_Format>
and
<gmd:MD_Format>
<gmd:name>
<gco:CharacterString>Personal GeoDatabase Feature Class</gco:CharacterString>
</gmd:name>
<gmd:version />
</gmd:MD_Format>
The only fix I found was to edit the metadata directly in XML mode. I can
remove the gco:nilReason="missing" and add the full gco:CharacterString value.
- John
***********************************************
John Callahan, Research Scientist
Delaware Geological Survey, University of Delaware
URL: http://www.dgs.udel.edu
*************************************************
On Sun, Sep 2, 2012 at 7:11 PM, andrew walsh <awalsh@anonymised.com> wrote:
Hi John,
I saw your ticket http://trac.osgeo.org/geonetwork/ticket/1031
about certain fields not able to be added. I notice that the script
WEB-INF\data\config\schema_plugins\iso19139\update-fixed-info.xsl
which runs whenever you do an edit/save/close and automatically adds
a gco:nilReason="missing" to the parent element when the child
<gco:CharacterString>
element is empty. For example
<gmd:hierarchyLevelName gco:nilReason="missing">
<gco:CharacterString/>
</gmd:hierarchyLevelName>
A side effect of this might be locking out addition of your missing elements.
It looks like the update-fixed-info.xsl script can be switched off by
deselecting
automatic fixes in the Admin-System Config. page. Maybe its worth a try
switching off the auto-fixes, re-import your metadata and then try editing
again to see if its lets you add the elements.
Let us know how you go...
Andrew
----- Original Message ----- From: "John Callahan" <john.callahan@anonymised.com>
To: "Geonetwork Users" <geonetwork-users@lists.sourceforge.net>
Sent: Sunday, September 02, 2012 1:26 AM
Subject: [GeoNetwork-users] adding missing metadata elements
I have some metadata entries that were imported without an UUID generated
for them. Some of these entries were also missing various elements,
particularly the geographic extent (bounding box.) How do I add these
elements to my metadata entries? Is it possible?
I'm using GN 2.8.x nightly build (as of maybe 10 days ago) and the new
metadata editor. Thanks.
- John
***********************************************
John Callahan, Research Scientist
Delaware Geological Survey, University of Delaware
URL: http://www.dgs.udel.edu
*************************************************
------------------------------------------------------------------------------
Live Security Virtual Conference
Exclusive live event will cover all the ways today's security and
threat landscape has changed and how IT managers can respond. Discussions
will include endpoint security, mobile security and the latest in malware
threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/
_______________________________________________
GeoNetwork-users mailing list
GeoNetwork-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/geonetwork-users
GeoNetwork OpenSource is maintained at
http://sourceforge.net/projects/geonetwork