I am uploading our metadata through MEF file imports into GeoNetwork 2.4 via a multipart/form-data POST to the mef.import service.
However, I am running into "MySQLIntegrityConstraintViolationException : Duplicate entry '09777D0E-F6CD-4F39-A9D9-4BB74123190B' for key 'uuid'" errors. I have updated the MEF's <changeDate> element in the info.xml file but it appears not to be honored. I am using our ISO 19139 metadata record's <gmd:fileIdentifier> (a UUID) for the MEF <uuid>.
Can I update metadata records through a MEF upload or do I have to delete the existing records first?
If the later is the case, how can I delete a record through a service (I am using Python ETL scripts)?
Ciao, Wolfgang
--
_______________________________
Wolfgang Grunberg
Arizona Geological Survey
wgrunberg@anonymised.com
520-770-3500
Yes, you might have to delete the existing record as it doesn't like duplicate
UUID. Not sure how you would do this with Python ETL script, but I am
sure others might know.
An alternative is to upload a MEF through GN's web forms. This gives you 2 options
on upload:
'Overwrite metadata with same UUID'
'Generate UUID for inserted metadata'
Above way may fix your UUID problem but maybe you want to do things through
Python?
The MEF's <changeDate> is what comes from GN's database tables it's
not the same as any dates in the XML metadata. So probably that's why
you say 'not honored'. If you do upload a MEF browse the GN db metadata
table and check the 'createDate' and 'changeDate', they should be the same as those in
the info.xml file within the MEF.
Andrew
----- Original Message ----- From: "Wolfgang Grunberg" <wgrunberg@anonymised.com>
To: <GeoNetwork-devel@lists.sourceforge.net>
Sent: Thursday, February 04, 2010 4:09 AM
Subject: [GeoNetwork-devel] How to update metadata through MEF upload? -duplicate UUID error
Hi,
I am uploading our metadata through MEF file imports into GeoNetwork 2.4 via a multipart/form-data POST to the mef.import service.
However, I am running into "MySQLIntegrityConstraintViolationException : Duplicate entry '09777D0E-F6CD-4F39-A9D9-4BB74123190B' for key 'uuid'" errors. I have updated the MEF's <changeDate> element in the info.xml file but it appears not to be honored. I am using our ISO 19139 metadata record's <gmd:fileIdentifier> (a UUID) for the MEF <uuid>.
Can I update metadata records through a MEF upload or do I have to delete the existing records first?
If the later is the case, how can I delete a record through a service (I am using Python ETL scripts)?
Ciao, Wolfgang
--
_______________________________
Wolfgang Grunberg
Arizona Geological Survey
wgrunberg@anonymised.com
520-770-3500
------------------------------------------------------------------------------
The Planet: dedicated and managed hosting, cloud storage, colocation
Stay online with enterprise data centers and the best network in the business
Choose flexible plans and management services without long-term contracts
Personal 24x7 support from experience hosting pros just a phone call away. http://p.sf.net/sfu/theplanet-com
_______________________________________________
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
Thank you Andrew! I assumed that <changeDate> was used to determine the newer metadata in a replacement. However, import is not equal to replacement.
I generate my own ISO 19139-based MEF files (not exported from an other GN - hence my own <changeDate>) and upload them by the thousands through GN's mef.import service (e.g. http://localhost:8080/srv/en/mef.import). It's much faster than doing CSW inserts and it gives us more control over GN specific metadata attributes (permissions, attached files, etc).
Does anyone know if the mef.import service supports a "Overwrite metadata with same UUID" parameter?
Alternatively, how would I go about deleting a metadata record through a GN service?
Ciao, Wolfgang
_______________________________
Wolfgang Grunberg
Arizona Geological Survey
wgrunberg@anonymised.com
520-770-3500
On 2/3/2010 16:09, awalsh wrote:
Wolfgang,
Yes, you might have to delete the existing record as it doesn't like duplicate
UUID. Not sure how you would do this with Python ETL script, but I am
sure others might know.
An alternative is to upload a MEF through GN's web forms. This gives you 2 options
on upload:
'Overwrite metadata with same UUID'
'Generate UUID for inserted metadata'
Above way may fix your UUID problem but maybe you want to do things through
Python?
The MEF's <changeDate> is what comes from GN's database tables it's
not the same as any dates in the XML metadata. So probably that's why
you say 'not honored'. If you do upload a MEF browse the GN db metadata
table and check the 'createDate' and 'changeDate', they should be the same as those in
the info.xml file within the MEF.
Andrew
----- Original Message ----- From: "Wolfgang Grunberg" <wgrunberg@anonymised.com>
To: <GeoNetwork-devel@lists.sourceforge.net>
Sent: Thursday, February 04, 2010 4:09 AM
Subject: [GeoNetwork-devel] How to update metadata through MEF upload? -duplicate UUID error
Hi,
I am uploading our metadata through MEF file imports into GeoNetwork 2.4 via a multipart/form-data POST to the mef.import service.
However, I am running into "MySQLIntegrityConstraintViolationException : Duplicate entry '09777D0E-F6CD-4F39-A9D9-4BB74123190B' for key 'uuid'" errors. I have updated the MEF's <changeDate> element in the info.xml file but it appears not to be honored. I am using our ISO 19139 metadata record's <gmd:fileIdentifier> (a UUID) for the MEF <uuid>.
Can I update metadata records through a MEF upload or do I have to delete the existing records first?
If the later is the case, how can I delete a record through a service (I am using Python ETL scripts)?
Ciao, Wolfgang
--
_______________________________
Wolfgang Grunberg
Arizona Geological Survey
wgrunberg@anonymised.com
520-770-3500
The Planet: dedicated and managed hosting, cloud storage, colocation
Stay online with enterprise data centers and the best network in the business
Choose flexible plans and management services without long-term contracts
Personal 24x7 support from experience hosting pros just a phone call away. http://p.sf.net/sfu/theplanet-com
_______________________________________________
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
Yes, the changeDate is used for other things like harvesting i.e
the record gets harvested if its changeDate is newer.
Andrew
----- Original Message ----- From: "Wolfgang Grunberg" <wgrunberg@anonymised.com>
To: <geonetwork-devel@lists.sourceforge.net>
Sent: Thursday, February 04, 2010 10:46 AM
Subject: Re: [GeoNetwork-devel] How to update metadata through MEF upload? -duplicate UUID error
Thank you Andrew! I assumed that <changeDate> was used to determine the newer metadata in a replacement. However, import is not equal to replacement.
I generate my own ISO 19139-based MEF files (not exported from an other GN - hence my own <changeDate>) and upload them by the thousands through GN's mef.import service (e.g. http://localhost:8080/srv/en/mef.import). It's much faster than doing CSW inserts and it gives us more control over GN specific metadata attributes (permissions, attached files, etc).
Does anyone know if the mef.import service supports a "Overwrite metadata with same UUID" parameter?
Alternatively, how would I go about deleting a metadata record through a GN service?
Ciao, Wolfgang
_______________________________
Wolfgang Grunberg
Arizona Geological Survey
wgrunberg@anonymised.com
520-770-3500
On 2/3/2010 16:09, awalsh wrote:
Wolfgang,
Yes, you might have to delete the existing record as it doesn't like duplicate
UUID. Not sure how you would do this with Python ETL script, but I am
sure others might know.
An alternative is to upload a MEF through GN's web forms. This gives you 2 options
on upload:
'Overwrite metadata with same UUID'
'Generate UUID for inserted metadata'
Above way may fix your UUID problem but maybe you want to do things through
Python?
The MEF's <changeDate> is what comes from GN's database tables it's
not the same as any dates in the XML metadata. So probably that's why
you say 'not honored'. If you do upload a MEF browse the GN db metadata
table and check the 'createDate' and 'changeDate', they should be the same as those in
the info.xml file within the MEF.
Andrew
----- Original Message ----- From: "Wolfgang Grunberg" <wgrunberg@anonymised.com>
To: <GeoNetwork-devel@lists.sourceforge.net>
Sent: Thursday, February 04, 2010 4:09 AM
Subject: [GeoNetwork-devel] How to update metadata through MEF upload? -duplicate UUID error
Hi,
I am uploading our metadata through MEF file imports into GeoNetwork 2.4 via a multipart/form-data POST to the mef.import service.
However, I am running into "MySQLIntegrityConstraintViolationException : Duplicate entry '09777D0E-F6CD-4F39-A9D9-4BB74123190B' for key 'uuid'" errors. I have updated the MEF's <changeDate> element in the info.xml file but it appears not to be honored. I am using our ISO 19139 metadata record's <gmd:fileIdentifier> (a UUID) for the MEF <uuid>.
Can I update metadata records through a MEF upload or do I have to delete the existing records first?
If the later is the case, how can I delete a record through a service (I am using Python ETL scripts)?
Ciao, Wolfgang
--
_______________________________
Wolfgang Grunberg
Arizona Geological Survey
wgrunberg@anonymised.com
520-770-3500
The Planet: dedicated and managed hosting, cloud storage, colocation
Stay online with enterprise data centers and the best network in the business
Choose flexible plans and management services without long-term contracts
Personal 24x7 support from experience hosting pros just a phone call away. http://p.sf.net/sfu/theplanet-com
_______________________________________________
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
------------------------------------------------------------------------------
The Planet: dedicated and managed hosting, cloud storage, colocation
Stay online with enterprise data centers and the best network in the business
Choose flexible plans and management services without long-term contracts
Personal 24x7 support from experience hosting pros just a phone call away. http://p.sf.net/sfu/theplanet-com
_______________________________________________
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
I am a beginner to GN, working on importing metadata records in the MEF
format. The mef.import allows a mefFile as param to invoke the service. I
was using a sample MEF file in the GN directory but it gave me an error when
I passed this to IE: