ANZLIC File Identifier issue (and MCP)

classic Classic list List threaded Threaded
6 messages Options
Reply | Threaded
Open this post in threaded view
|

ANZLIC File Identifier issue (and MCP)

ByronCinNZ
Hello,

This question is for those using the ANZLIC Profile.

I recently discovered that when using the ANZLIC Profile that the fileIdentifier can easily get out of sync with the UUID that GeoNetwork generates for that metadata record. The process that led to this was as follows:

- Create metadata record in the ANZLIC Profile.
- Create a second metadata record in he ANZLIC Profile and set the first record as parent using the GUI tool provided.
- Save changes. Then try to access the Parent from the child. This will fail. The parent record cannot be found.

It would seem that the GUI to select the Parent metadata record is retrieving the value from the <gmd:fileIdentifier> tag in the metadata record itself and not the UUID field in the "metadata" table and that the two are not in sync. I cannot imagine that this is a good. On research I discovered that the fileIdentifier element held in the metadata created in the ANZLIC profile most often is not the same as the value in the UUID field of the "metadata" table in the database. In fact many ANZLIC records share the same <gmd:fileIdentifier> value.

The culprit seems to be the "update-fixed-info.xml". In particular the following section (lines 28 - 39):

	<xsl:choose>
		<xsl:when test="not(gmd:fileIdentifier)">
		 	<gmd:fileIdentifier>
				<gco:CharacterString><xsl:value-of select="/root/env/uuid"/></gco:CharacterString>
			</gmd:fileIdentifier>
		</xsl:when>
		<xsl:otherwise>
			<xsl:apply-templates select="gmd:fileIdentifier"/>
		</xsl:otherwise>
	</xsl:choose>

Deleting selected lines as follows to remove the test fixes the problem:


	<gmd:fileIdentifier>
		<gco:CharacterString><xsl:value-of select="/root/env/uuid"/></gco:CharacterString>
	</gmd:fileIdentifier>


Am I breaking anything by removing this test? It does not seem to be present in all profiles. It is not present in the default ISO 19139 schema "update-fixed-info.xml". (I do see this test in the MCP as well.) Also, is this in any way related to ticket #1205?

Cheers,
Byron
Reply | Threaded
Open this post in threaded view
|

Re: ANZLIC File Identifier issue (and MCP)

SimonPigot
Hi Byron,

update-fixed-info.xsl for iso19139.anzlic was missing a specific template for gmd:fileIdentifier which assigns /root/env/uuid to it so the fileIdentifier in the record was getting out of step with the geonetwork database table. MCP has this template so it wasn't doing the same thing. Curious this hasn't come up before? Maybe ANZLIC users are using the base iso19139 schema?

In any case the fix is committed in 81019547aea5e775cbb2c9851ff43dd20468d948 on
https://github.com/geonetwork/schema-plugins

Cheers and thanks,
Simon
_______________________________________
From: ByronCinNZ [[hidden email]]
Sent: Saturday, 8 February 2014 10:03 AM
To: [hidden email]
Subject: [GeoNetwork-devel] ANZLIC File Identifier issue (and MCP)

Hello,

This question is for those using the ANZLIC Profile.

I recently discovered that when using the ANZLIC Profile that the
fileIdentifier can easily get out of sync with the UUID that GeoNetwork
generates for that metadata record. The process that led to this was as
follows:

- Create metadata record in the ANZLIC Profile.
- Create a second metadata record in he ANZLIC Profile and set the first
record as parent using the GUI tool provided.
- Save changes. Then try to access the Parent from the child. This will
fail. The parent record cannot be found.

It would seem that the GUI to select the Parent metadata record is
retrieving the value from the <gmd:fileIdentifier> tag in the metadata
record itself and not the UUID field in the "metadata" table and that the
two are not in sync. I cannot imagine that this is a good. On research I
discovered that the fileIdentifier element held in the metadata created in
the ANZLIC profile most often is not the same as the value in the UUID field
of the "metadata" table in the database. In fact many ANZLIC records share
the same <gmd:fileIdentifier> value.

The culprit seems to be the "update-fixed-info.xml". In particular the
following section (lines 28 - 39):



Deleting selected lines as follows to remove the test fixes the problem:



Am I breaking anything by removing this test? It does not seem to be present
in all profiles. It is not present in the default ISO 19139 schema
"update-fixed-info.xml". (I do see this test in the MCP as well.) Also, is
this in any way related to ticket #1205?

Cheers,
Byron



--
View this message in context: http://osgeo-org.1560.x6.nabble.com/ANZLIC-File-Identifier-issue-and-MCP-tp5102625.html
Sent from the GeoNetwork developer mailing list archive at Nabble.com.

------------------------------------------------------------------------------
Managing the Performance of Cloud-Based Applications
Take advantage of what the Cloud has to offer - Avoid Common Pitfalls.
Read the Whitepaper.
http://pubads.g.doubleclick.net/gampad/clk?id=121051231&iu=/4140/ostg.clktrk
_______________________________________________
GeoNetwork-devel mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/geonetwork-devel
GeoNetwork OpenSource is maintained at http://sourceforge.net/projects/geonetwork

------------------------------------------------------------------------------
Managing the Performance of Cloud-Based Applications
Take advantage of what the Cloud has to offer - Avoid Common Pitfalls.
Read the Whitepaper.
http://pubads.g.doubleclick.net/gampad/clk?id=121051231&iu=/4140/ostg.clktrk
_______________________________________________
GeoNetwork-devel mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/geonetwork-devel
GeoNetwork OpenSource is maintained at http://sourceforge.net/projects/geonetwork
Reply | Threaded
Open this post in threaded view
|

Re: ANZLIC File Identifier issue (and MCP)

Rainer Spittel
Hi Byron, Hi Simon,

I upgraded from BlueNetMest to GeoNetwork 2.10 with the ANZLIC profile and discover that the XML.INSERT API behaves differently. New inserted records via the XML.metadata do not receive a new created UUID anymore.
The API response after inserting a document contains an id and an UUID but the UUID is not added to the XML. The Geonetwork documentation (http://geonetwork-opensource.org/manuals/trunk/eng/developer/xml_services/metadata_xml_insert_update_delete.html) also refers to the behaviour that the identifier which is returned get inserted into the XML document.

As I see this behaviour is gone, I wonder if the removal of the test in the update-fixed-info.xml file causes this issue now as the test would be used if the provided document does not have a file-identifier and the UUID gets injected.

Cheers,
Rainer
Reply | Threaded
Open this post in threaded view
|

Re: ANZLIC File Identifier issue (and MCP)

SimonPigot
Hi Rainer,

Let me check this out today - the behaviour you're seeing looks like a bug to me.

Just to check: are you using the standard 2.10.x or the anzmest fork (which is 2.10.x + AU/NZ schema plugins) on http://github.com/anzmest?

Cheers,
Simon
________________________________________
From: Rainer Spittel [[hidden email]]
Sent: Tuesday, 22 April 2014 10:40 AM
To: [hidden email]
Subject: Re: [GeoNetwork-devel] ANZLIC File Identifier issue (and MCP)

Hi Byron, Hi Simon,

I upgraded from BlueNetMest to GeoNetwork 2.10 with the ANZLIC profile and
discover that the XML.INSERT API behaves differently. New inserted records
via the XML.metadata do not receive a new created UUID anymore.
The API response after inserting a document contains an id and an UUID but
the UUID is not added to the XML. The Geonetwork documentation
(http://geonetwork-opensource.org/manuals/trunk/eng/developer/xml_services/metadata_xml_insert_update_delete.html)
also refers to the behaviour that the identifier which is returned get
inserted into the XML document.

As I see this behaviour is gone, I wonder if the removal of the test in the
update-fixed-info.xml file causes this issue now as the test would be used
if the provided document does not have a file-identifier and the UUID gets
injected.

Cheers,
Rainer



--
View this message in context: http://osgeo-org.1560.x6.nabble.com/ANZLIC-File-Identifier-issue-and-MCP-tp5102625p5136313.html
Sent from the GeoNetwork developer mailing list archive at Nabble.com.

------------------------------------------------------------------------------
Start Your Social Network Today - Download eXo Platform
Build your Enterprise Intranet with eXo Platform Software
Java Based Open Source Intranet - Social, Extensible, Cloud Ready
Get Started Now And Turn Your Intranet Into A Collaboration Platform
http://p.sf.net/sfu/ExoPlatform
_______________________________________________
GeoNetwork-devel mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/geonetwork-devel
GeoNetwork OpenSource is maintained at http://sourceforge.net/projects/geonetwork

------------------------------------------------------------------------------
Start Your Social Network Today - Download eXo Platform
Build your Enterprise Intranet with eXo Platform Software
Java Based Open Source Intranet - Social, Extensible, Cloud Ready
Get Started Now And Turn Your Intranet Into A Collaboration Platform
http://p.sf.net/sfu/ExoPlatform
_______________________________________________
GeoNetwork-devel mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/geonetwork-devel
GeoNetwork OpenSource is maintained at http://sourceforge.net/projects/geonetwork
Reply | Threaded
Open this post in threaded view
|

Re: ANZLIC File Identifier issue (and MCP)

SimonPigot
In reply to this post by Rainer Spittel
Very puzzling - I can't seem to reproduce this (BTW I've updated the documentation on xml.insert to include the uuidAction parameter - uuidAction must be set to generateUUID if you want a new uuid, by default it is nothing).

I'm using anzmest 2.10.3 - though I very much doubt that makes any difference.

Any further ideas on why this is happening? NOTE: update-fixed-info.xsl doesn't get run here so the earlier bug isn't applicable.

Cheers,
Simon
________________________________________
From: Rainer Spittel [[hidden email]]
Sent: Tuesday, 22 April 2014 10:40 AM
To: [hidden email]
Subject: Re: [GeoNetwork-devel] ANZLIC File Identifier issue (and MCP)

Hi Byron, Hi Simon,

I upgraded from BlueNetMest to GeoNetwork 2.10 with the ANZLIC profile and
discover that the XML.INSERT API behaves differently. New inserted records
via the XML.metadata do not receive a new created UUID anymore.
The API response after inserting a document contains an id and an UUID but
the UUID is not added to the XML. The Geonetwork documentation
(http://geonetwork-opensource.org/manuals/trunk/eng/developer/xml_services/metadata_xml_insert_update_delete.html)
also refers to the behaviour that the identifier which is returned get
inserted into the XML document.

As I see this behaviour is gone, I wonder if the removal of the test in the
update-fixed-info.xml file causes this issue now as the test would be used
if the provided document does not have a file-identifier and the UUID gets
injected.

Cheers,
Rainer



--
View this message in context: http://osgeo-org.1560.x6.nabble.com/ANZLIC-File-Identifier-issue-and-MCP-tp5102625p5136313.html
Sent from the GeoNetwork developer mailing list archive at Nabble.com.

------------------------------------------------------------------------------
Start Your Social Network Today - Download eXo Platform
Build your Enterprise Intranet with eXo Platform Software
Java Based Open Source Intranet - Social, Extensible, Cloud Ready
Get Started Now And Turn Your Intranet Into A Collaboration Platform
http://p.sf.net/sfu/ExoPlatform
_______________________________________________
GeoNetwork-devel mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/geonetwork-devel
GeoNetwork OpenSource is maintained at http://sourceforge.net/projects/geonetwork

------------------------------------------------------------------------------
Start Your Social Network Today - Download eXo Platform
Build your Enterprise Intranet with eXo Platform Software
Java Based Open Source Intranet - Social, Extensible, Cloud Ready
Get Started Now And Turn Your Intranet Into A Collaboration Platform
http://p.sf.net/sfu/ExoPlatform
_______________________________________________
GeoNetwork-devel mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/geonetwork-devel
GeoNetwork OpenSource is maintained at http://sourceforge.net/projects/geonetwork
Reply | Threaded
Open this post in threaded view
|

Re: ANZLIC File Identifier issue (and MCP)

SimonPigot
BTW When I went to update the doco I found that the trunk doco link you're using doesn't describe uuidAction but the 2.10.3 doco link does. Take a look at:

http://geonetwork-opensource.org/manuals/2.10.3/eng/developer/xml_services/metadata_xml_insert_update_delete.html

Cheers,
Simon
________________________________________
From: [hidden email] [[hidden email]]
Sent: Wednesday, 23 April 2014 11:41 AM
To: [hidden email]; [hidden email]
Subject: [ExternalEmail] Re: [GeoNetwork-devel] ANZLIC File Identifier issue (and MCP)

Very puzzling - I can't seem to reproduce this (BTW I've updated the documentation on xml.insert to include the uuidAction parameter - uuidAction must be set to generateUUID if you want a new uuid, by default it is nothing).

I'm using anzmest 2.10.3 - though I very much doubt that makes any difference.

Any further ideas on why this is happening? NOTE: update-fixed-info.xsl doesn't get run here so the earlier bug isn't applicable.

Cheers,
Simon
________________________________________
From: Rainer Spittel [[hidden email]]
Sent: Tuesday, 22 April 2014 10:40 AM
To: [hidden email]
Subject: Re: [GeoNetwork-devel] ANZLIC File Identifier issue (and MCP)

Hi Byron, Hi Simon,

I upgraded from BlueNetMest to GeoNetwork 2.10 with the ANZLIC profile and
discover that the XML.INSERT API behaves differently. New inserted records
via the XML.metadata do not receive a new created UUID anymore.
The API response after inserting a document contains an id and an UUID but
the UUID is not added to the XML. The Geonetwork documentation
(http://geonetwork-opensource.org/manuals/trunk/eng/developer/xml_services/metadata_xml_insert_update_delete.html)
also refers to the behaviour that the identifier which is returned get
inserted into the XML document.

As I see this behaviour is gone, I wonder if the removal of the test in the
update-fixed-info.xml file causes this issue now as the test would be used
if the provided document does not have a file-identifier and the UUID gets
injected.

Cheers,
Rainer



--
View this message in context: http://osgeo-org.1560.x6.nabble.com/ANZLIC-File-Identifier-issue-and-MCP-tp5102625p5136313.html
Sent from the GeoNetwork developer mailing list archive at Nabble.com.

------------------------------------------------------------------------------
Start Your Social Network Today - Download eXo Platform
Build your Enterprise Intranet with eXo Platform Software
Java Based Open Source Intranet - Social, Extensible, Cloud Ready
Get Started Now And Turn Your Intranet Into A Collaboration Platform
http://p.sf.net/sfu/ExoPlatform
_______________________________________________
GeoNetwork-devel mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/geonetwork-devel
GeoNetwork OpenSource is maintained at http://sourceforge.net/projects/geonetwork

------------------------------------------------------------------------------
Start Your Social Network Today - Download eXo Platform
Build your Enterprise Intranet with eXo Platform Software
Java Based Open Source Intranet - Social, Extensible, Cloud Ready
Get Started Now And Turn Your Intranet Into A Collaboration Platform
http://p.sf.net/sfu/ExoPlatform
_______________________________________________
GeoNetwork-devel mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/geonetwork-devel
GeoNetwork OpenSource is maintained at http://sourceforge.net/projects/geonetwork

------------------------------------------------------------------------------
Start Your Social Network Today - Download eXo Platform
Build your Enterprise Intranet with eXo Platform Software
Java Based Open Source Intranet - Social, Extensible, Cloud Ready
Get Started Now And Turn Your Intranet Into A Collaboration Platform
http://p.sf.net/sfu/ExoPlatform
_______________________________________________
GeoNetwork-devel mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/geonetwork-devel
GeoNetwork OpenSource is maintained at http://sourceforge.net/projects/geonetwork