Update fixed info and timestamp on batch edit

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

Update fixed info and timestamp on batch edit

Juan Luis Rodríguez Ponce
Hi list,

when batch editing records the parameters passed to updateMetadata function make it not to run update-fixed-info and also to not update the gmd:dateStamp element [1]:

boolean validate = false;
boolean ufo = false;
boolean index = true;

dataMan.updateMetadata(
serviceContext, record.getId() + "", metadata,
validate, ufo, index,
"eng", // Not used when validate is false
changeDate, false);


Is there any reason for not running update-fixed-info here and for not updating the last modified date inside the document?

[1] https://github.com/geonetwork/core-geonetwork/blob/master/services/src/main/java/org/fao/geonet/api/records/editing/BatchEditsApi.java#L204-L213

--
Vriendelijke groeten / Kind regards,

Juan Luis Rodríguez.


Veenderweg 13
6721 WD Bennekom
The Netherlands
T: <a href="tel:+31318416664" style="color:rgb(17,85,204);font-family:Helvetica,Arial,sans-serif" target="_blank">+31 (0)318 416664

  

Please consider the environment before printing this email.


_______________________________________________
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: Update fixed info and timestamp on batch edit

Francois Prunayre
Hi Juan,

Not sure for UFO but sometime users don't want to update the dateStamp - eg. when fixing typo.
So we can add a parameter for this ? 

For the dateStamp, I would put a default to false as you can use the API to update it if you really want. But if you prefer true, that's fine too. (Similar discussion here https://github.com/geonetwork/core-geonetwork/pull/3747)

For UFO, it really makes sense to run it when changing CharacterString and multilingual records, gml elements so maybe can always be applied ? or at least by default true ?

Francois


Le mer. 17 avr. 2019 à 10:38, Juan Luis Rodríguez Ponce <[hidden email]> a écrit :
Hi list,

when batch editing records the parameters passed to updateMetadata function make it not to run update-fixed-info and also to not update the gmd:dateStamp element [1]:

boolean validate = false;
boolean ufo = false;
boolean index = true;

dataMan.updateMetadata(
serviceContext, record.getId() + "", metadata,
validate, ufo, index,
"eng", // Not used when validate is false
changeDate, false);


Is there any reason for not running update-fixed-info here and for not updating the last modified date inside the document?

[1] https://github.com/geonetwork/core-geonetwork/blob/master/services/src/main/java/org/fao/geonet/api/records/editing/BatchEditsApi.java#L204-L213

--
Vriendelijke groeten / Kind regards,

Juan Luis Rodríguez.


Veenderweg 13
6721 WD Bennekom
The Netherlands
T: <a href="tel:+31318416664" style="color:rgb(17,85,204);font-family:Helvetica,Arial,sans-serif" target="_blank">+31 (0)318 416664

  

Please consider the environment before printing this email.


_______________________________________________
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: Update fixed info and timestamp on batch edit

Juan Luis Rodríguez Ponce
Hi Francois,

On Wed, Apr 17, 2019 at 12:02 PM Francois Prunayre <[hidden email]> wrote:
Hi Juan,

Not sure for UFO but sometime users don't want to update the dateStamp - eg. when fixing typo.
So we can add a parameter for this ? 

For the dateStamp, I would put a default to false as you can use the API to update it if you really want. But if you prefer true, that's fine too. (Similar discussion here https://github.com/geonetwork/core-geonetwork/pull/3747)

For UFO, it really makes sense to run it when changing CharacterString and multilingual records, gml elements so maybe can always be applied ? or at least by default true ?

The thing is that update timestamp requires updateFixedInfo to be true since is that XSLT the one that changes the gmd:dateStamp.
if (ufo) {
...

metadataXml = updateFixedInfo(schema, Optional.of(intId), uuid, metadataXml, parentUuid,
(updateDateStamp ? UpdateDatestamp.YES : UpdateDatestamp.NO), context);
}


I could set the ufo to be always true and update the datetamp based on a parameter received by the API.
 
--
Vriendelijke groeten / Kind regards,

Juan Luis Rodríguez.


Veenderweg 13
6721 WD Bennekom
The Netherlands
T: <a href="tel:+31318416664" style="color:rgb(17,85,204);font-family:Helvetica,Arial,sans-serif" target="_blank">+31 (0)318 416664

  

Please consider the environment before printing this email.


_______________________________________________
GeoNetwork-devel mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/geonetwork-devel
GeoNetwork OpenSource is maintained at http://sourceforge.net/projects/geonetwork