Re: [greenstone-users] copying metadata / internal nodes

From Katherine Don
DateWed, 22 Jun 2005 13:54:55 +1200
Subject Re: [greenstone-users] copying metadata / internal nodes
In-Reply-To (200506190020-j5J0KwjF009239-dbmail-mx1-orcon-net-nz)
Hi Daniel

>
> (1) When using the GLI, I drag in my documents, and assign them
> metadata. If I then update an original document and drag it through to
> the GLI, is there any way of copying metadata from one document to another?
>

If the document has the same file name, you can drag the new version in,
and it will replace the old one. All the metadata will stay attached to
the new version. If it has a different name, there is currently no way
to do it in GLI. This is something that is on our todo list.

For now, you can manually transfer the metadata by editing the
metadata.xml files.
Drag the new document into the collection. I assume that it will go into
the same folder as the onee that it replaces, otherwise you will need to
drag the old version into the same folder as the new one. Do not delete
the old document yet. Close the collection.

Go to the collection on the file system, and edit the metadata.xml file
in the folder where the two documents are:
gsdl/collect/<colname>/import/<any subfolders>/metadata.xml

There will be a fileset containing the metadata for the old document, like

<FileSet>
<FileName>baby.jpg</FileName>
<Description>
<Metadata mode="accumulate" name="dc.Title">Baby
Picture</Metadata>
....
</Description>
</FileSet>

Change the filename to be the name of the new file. Now all the metadata
belongs to the new file.

You can delete the old file now, here or in GLI.
When you re-open the collection in GLI, the metadata will be with the
new document.

Regards,
Katherine Don