[GeoNetwork-devel] [GeoNetwork opensource Developer website] #1062: Metadata info: version for update + id/uuid mapping.

#1062: Metadata info: version for update + id/uuid mapping.
------------------------------------+---------------------------------------
Reporter: etj | Owner: geonetwork-devel@…
     Type: enhancement | Status: new
Priority: major | Milestone: v2.6.4
Component: Catalog server | Version: v2.6.4
Keywords: version id uuid update |
------------------------------------+---------------------------------------
1) When updating metadata programmatically there is no easy way to get the
'''metadata version number''', used by geonetwork to avoid concurrent
updates.

2) There is no way to retrieve the '''internal id''' of a metadata, given
its uuid. This may be a problem if you need to perform a programmatic
update, and all you have is the uuid.

The attached patch provides two services:

== {{{xml.metadata.info.get}}} ==
A ''guest accessible'' service which takes as query param either "id" or
"uuid", and returns both:

e.g. 1
{{{
     http://localhost:8080/geonetwork/srv/it/xml.metadata.info.get?id=15
}}}
{{{
<?xml version="1.0" encoding="UTF-8"?>
<response>
   <id>15</id>
   <uuid>49509107-abc4-4d0a-9b83-2aa27c9f1cb8</uuid>
</response>
}}}
e.g. 2
{{{
http://localhost:8080/geonetwork/srv/it/xml.metadata.info.get?uuid=49509107-abc4
-4d0a-9b83-2aa27c9f1cb8
}}}
{{{
<?xml version="1.0" encoding="UTF-8"?>
<response>
   <id>15</id>
   <uuid>49509107-abc4-4d0a-9b83-2aa27c9f1cb8</uuid>
</response>
}}}

== {{{xml.metadata.info.getForUpdate}}} ==
An ''editor-accessible'' service similar to the above one, but that also
increments and return the internal metadata version number:

e.g. 3
{{{
http://localhost:8080/geonetwork/srv/it/xml.metadata.info.getForUpdate?id=15
}}}
{{{
<?xml version="1.0" encoding="UTF-8"?>
<response>
   <id>15</id>
   <uuid>49509107-abc4-4d0a-9b83-2aa27c9f1cb8</uuid>
   <version>5</version>
</response>
}}}

e.g. 4
{{{
http://localhost:8080/geonetwork/srv/it/xml.metadata.info.getForUpdate?uuid=49509107-abc4
-4d0a-9b83-2aa27c9f1cb8
}}}
{{{
<?xml version="1.0" encoding="UTF-8"?>
<response>
   <id>15</id>
   <uuid>49509107-abc4-4d0a-9b83-2aa27c9f1cb8</uuid>
   <version>6</version>
</response>
}}}

--
Ticket URL: <http://trac.osgeo.org/geonetwork/ticket/1062&gt;
GeoNetwork opensource Developer website <http://sourceforge.net/projects/geonetwork/&gt;
GeoNetwork opensource is a standards based, Free and Open Source catalog application to manage spatially referenced resources through the web. It provides powerful metadata editing and search functions as well as an embedded interactive web map viewer. This website contains information related to the development of the software.

#1062: Metadata info: version for update + id/uuid mapping.
------------------------------------+---------------------------------------
Reporter: etj | Owner: geonetwork-devel@…
     Type: enhancement | Status: new
Priority: major | Milestone: v2.6.4
Component: Catalog server | Version: v2.6.4
Keywords: version id uuid update |
------------------------------------+---------------------------------------

Comment(by fxp):

To get the internal id or uuid, you could use the search service:
  * for the UUID: http://localhost:8080/geonetwork/srv/eng/q?_uuid=c156fb97
-f3ea-4e61-b33f-b48236cb7f30
  * for the internal id: http://localhost:8080/geonetwork/srv/eng/q?_id=966

--
Ticket URL: <http://trac.osgeo.org/geonetwork/ticket/1062#comment:1&gt;
GeoNetwork opensource Developer website <http://sourceforge.net/projects/geonetwork/&gt;
GeoNetwork opensource is a standards based, Free and Open Source catalog application to manage spatially referenced resources through the web. It provides powerful metadata editing and search functions as well as an embedded interactive web map viewer. This website contains information related to the development of the software.

#1062: Metadata info: version for update + id/uuid mapping.
------------------------------------+---------------------------------------
Reporter: etj | Owner: geonetwork-devel@…
     Type: enhancement | Status: new
Priority: major | Milestone: v2.6.5
Component: Catalog server | Version: v2.6.4
Keywords: version id uuid update |
------------------------------------+---------------------------------------
Changes (by ianwallen):

  * milestone: v2.6.4 => v2.6.5

--
Ticket URL: <http://trac.osgeo.org/geonetwork/ticket/1062#comment:2&gt;
GeoNetwork opensource Developer website <http://sourceforge.net/projects/geonetwork/&gt;
GeoNetwork opensource is a standards based, Free and Open Source catalog application to manage spatially referenced resources through the web. It provides powerful metadata editing and search functions as well as an embedded interactive web map viewer. This website contains information related to the development of the software.