[GeoNetwork-users] generate GeoNetwork UUID in bash

dear list,

I am developing a file system robot in bash in order to automatically
update geonetwork DB

I tried and generate uuid with uuidgen tool, but all new records in DB
are not shown by GN, till when a different UUID is set by GN itself
(v. 2.4)

I suppose UUID by uuidgen is not compliant with GN UUID; so, how can I
generate GN-compliant UUID using bash?

many thanks

Enrico Gallo

hi,

could you explain in more exact detail what you tried to do?

If you update some part of the metadata in GeoNetwork's DB, you must
afterward re-index the Lucene index. Also, the uuid is stored in the DB in
the table "metadata", column "uuid" for one, and it still is also there in
the complete metadata in table "metadata", column "data".

The UUIDs generated by GeoNetwork are normal UUIDs, but GeoNetwork also
works perfect with invalid UUIDs like {with-accolades-around-them} that
certain commercial software packages produce.

In fact there is no check at all on the format of UUIDs -- as long as they
are unique to each metadata, it should be fine.

So to resolve your problem please provide more information ...

kind regards
Heikki Doeleman

On Fri, May 7, 2010 at 12:01 AM, Enrico Gallo <enrico.gallo@anonymised.com>wrote:

dear list,

I am developing a file system robot in bash in order to automatically
update geonetwork DB

I tried and generate uuid with uuidgen tool, but all new records in DB
are not shown by GN, till when a different UUID is set by GN itself
(v. 2.4)

I suppose UUID by uuidgen is not compliant with GN UUID; so, how can I
generate GN-compliant UUID using bash?

many thanks

Enrico Gallo

------------------------------------------------------------------------------

_______________________________________________
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

hi list

2010/5/7 heikki <tropicano@anonymised.com>:

hi,

could you explain in more exact detail what you tried to do?

I am parsing file system (folders, file names, size, last modify date,
owner, group, privileges, etc etc) and writing coherent records in gn
db , modifying xml in column data and other records using SQL INSERT,
UPDATE and DELETE

when a new resource needs to be added, I create a new uuid and I
commit new information using SQL

If you update some part of the metadata in GeoNetwork's DB, you must
afterward re-index the Lucene index.

so, probably here's my problem...
but I have no idea how to re-index Lucene using bash...
restarting some service could be useful?

Also, the uuid is stored in the DB in

the table "metadata", column "uuid" for one, and it still is also there in
the complete metadata in table "metadata", column "data".

The UUIDs generated by GeoNetwork are normal UUIDs, but GeoNetwork also
works perfect with invalid UUIDs like {with-accolades-around-them} that
certain commercial software packages produce.

In fact there is no check at all on the format of UUIDs -- as long as they
are unique to each metadata, it should be fine.

So to resolve your problem please provide more information ...

kind regards
Heikki Doeleman

On Fri, May 7, 2010 at 12:01 AM, Enrico Gallo <enrico.gallo@anonymised.com>
wrote:

dear list,

I am developing a file system robot in bash in order to automatically
update geonetwork DB

I tried and generate uuid with uuidgen tool, but all new records in DB
are not shown by GN, till when a different UUID is set by GN itself
(v. 2.4)

I suppose UUID by uuidgen is not compliant with GN UUID; so, how can I
generate GN-compliant UUID using bash?

many thanks

Enrico Gallo

------------------------------------------------------------------------------

_______________________________________________
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

2010/5/8 Enrico Gallo <enrico.gallo@anonymised.com>:

hi list

2010/5/7 heikki <tropicano@anonymised.com>:

If you update some part of the metadata in GeoNetwork's DB, you must
afterward re-index the Lucene index.

so, probably here's my problem...
but I have no idea how to re-index Lucene using bash...
restarting some service could be useful?

solved restarting Tomcat; I don't know if a better solution exists ..

many thanks

regards

Enrico Gallo

the index is rebuilt when GeoNetwork starts, so if you're on Tomcat, just
re-starting the GeoNetwork application suffices.

Otherwise, you can also do it when logged in to GeoNetwork as Administrator,
and click "Rebuild Index".

Or get the following URL:

http://<your-server-and-port>/geonetwork/srv/nl/metadata.admin.index.rebuild

I guess you could automate that last one quite easily in a shell script if
you wish, though you'd need to be authenticated (do the XML login first).

Kind regards
heikki doeleman

On Sat, May 8, 2010 at 11:22 PM, Enrico Gallo <enrico.gallo@anonymised.com>wrote:

2010/5/8 Enrico Gallo <enrico.gallo@anonymised.com>:
> hi list
>
> 2010/5/7 heikki <tropicano@anonymised.com>:
>
>

>>
>> If you update some part of the metadata in GeoNetwork's DB, you must
>> afterward re-index the Lucene index.
>
> so, probably here's my problem...
> but I have no idea how to re-index Lucene using bash...
> restarting some service could be useful?
>

solved restarting Tomcat; I don't know if a better solution exists ..

many thanks

regards

Enrico Gallo

------------------------------------------------------------------------------

_______________________________________________
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