[GeoNetwork-users] Programmatically setting record privileges

Hi,

I currently have a web service that inserts a record to Geonetwork via the CSW interface (using a CSW transaction). This works fine except the records always end up being set to unreadable by the general public. Is there any supported mechanism for remotely setting a record's access privileges? By remotely I mean an external service that doesn't interact with the Geonetwork GUI.

I currently have an ugly hack that firstly parses the HTML from a 'metadata.show' page for a 'record ID' (not the UUID that is returned from the CSW) so it can then make a subsequent request to 'metadata.admin'. Surely there is a more 'stable' way of going about this? I'd really like to not have to update my code every time the HTML on the Geonetwork page changes.

Thanks
Josh Vote

Just an update for anyone stumbling across the issue in the future (Thanks to Simon Pigot for his advice):

It appears that my perceived 'workaround' is the accepted method for setting the record privileges.

See http://osgeo-org.1803224.n2.nabble.com/setting-privileges-for-CSW-pushed-in-metadata-files-td5038475.html

For converting a UUID to an internal ID (so the privileges can be set) I parsed the response from http://geonetwork-opensource.org/latest/developers/xml_services/metadata_xml_services.html#get-metadata-xml-metadata-get

Hope this helps someone else in the future
Josh Vote

-----Original Message-----
From: Josh.Vote@anonymised.com [mailto:Josh.Vote@anonymised.com]
Sent: Friday, 1 July 2011 2:51 PM
To: geonetwork-users@lists.sourceforge.net
Subject: [ExternalEmail] [GeoNetwork-users] Programmatically setting record privileges

Hi,

I currently have a web service that inserts a record to Geonetwork via the CSW interface (using a CSW transaction). This works fine except the records always end up being set to unreadable by the general public. Is there any supported mechanism for remotely setting a record's access privileges? By remotely I mean an external service that doesn't interact with the Geonetwork GUI.

I currently have an ugly hack that firstly parses the HTML from a 'metadata.show' page for a 'record ID' (not the UUID that is returned from the CSW) so it can then make a subsequent request to 'metadata.admin'. Surely there is a more 'stable' way of going about this? I'd really like to not have to update my code every time the HTML on the Geonetwork page changes.

Thanks
Josh Vote
------------------------------------------------------------------------------
All of the data generated in your IT infrastructure is seriously valuable.
Why? It contains a definitive record of application performance, security
threats, fraudulent activity, and more. Splunk takes this data and makes
sense of it. IT sense. And common sense.
http://p.sf.net/sfu/splunk-d2d-c2
_______________________________________________
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