Hi Steve,

make sure you got a dump or your db first.

Add the identifier doi to your metadataregistry.
Add the keys to the message catalogue.

The metadata_value_id is just the next in the sequence you get it with 
nextval('metadatavalue_seq').

In order to add some metadata to items you got to

insert into metadatavalue (metadata_value_id, item_id, 
metadata_field_id, text_value, text_lang) select 
nextval('metadatavalue_seq'), item_id, METADATAFIELDID, 'TEXT_VALUE', 
'LANGAGUE' from item where YOUR CONDITION;

assuming you want to add
"This resource has be peer reviewed"
to all items in the
Collection with collection_id 1
and the
metadata_field_id of dc.description is 26
the command would be

insert into metadatavalue (metadata_value_id, item_id, 
metadata_field_id, text_value, text_lang) select 
nextval('metadatavalue_seq'), item_id, 26, 'This resource has be peer 
reviewed', 'en' from item where owning_collection=1;


Hope that helps

Claudia


Steve Thomas schrieb:
> Hi.
> 
> We have a need to add a new metadata field (a unique identifier) to many 
> records 
> in our DSpace (1.4.2) database. Basically, we will have a list of 
> DOI-identifier 
> pairs, and for each item matching the DOI, we'll want to add a new identifier 
> field with the identifier value.
> 
> Can anyone offer me a clue as to how I do this? I.e. what SQL code do I need 
> to 
> create a new metadata field for an item?
> 
> I can see that I need to INSERT into METADATAVALUE, but .. where do I get 
> METADATA_VALUE_ID?
> 
> 
> Cheers,
> Steve
> 
> -- 
> 
> Stephen Thomas,
> Senior Systems Analyst,
> University of Adelaide Library
> UNIVERSITY OF ADELAIDE SA 5005 AUSTRALIA
> Phone: +61 8 830 35190
> Fax: +61 8 830 34369
> Email: [EMAIL PROTECTED]
> URL: http://www.adelaide.edu.au/directory/stephen.thomas
> CRICOS Provider Number 00123M
> 
> P please consider the environment before printing.
> 
> This email message is intended only for the addressee(s) and contains 
> information that may be confidential and/or copyright. If you are not the 
> intended recipient please notify the sender by reply email and immediately 
> delete this email. Use, disclosure or reproduction of this email by anyone 
> other 
> than the intended recipient(s) is strictly prohibited. No representation is 
> made 
> that this email or any attachments are free of viruses. Virus scanning is 
> recommended and is the responsibility of the recipient.
> 
> 
> 
> ------------------------------------------------------------------------
> 
> -------------------------------------------------------------------------
> This SF.Net email is sponsored by the Moblin Your Move Developer's challenge
> Build the coolest Linux based applications with Moblin SDK & win great prizes
> Grand prize is a trip for two to an Open Source event anywhere in the world
> http://moblin-contest.org/redirect.php?banner_id=100&url=/
> 
> 
> ------------------------------------------------------------------------
> 
> _______________________________________________
> DSpace-tech mailing list
> DSpace-tech@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/dspace-tech

-------------------------------------------------------------------------
This SF.Net email is sponsored by the Moblin Your Move Developer's challenge
Build the coolest Linux based applications with Moblin SDK & win great prizes
Grand prize is a trip for two to an Open Source event anywhere in the world
http://moblin-contest.org/redirect.php?banner_id=100&url=/
_______________________________________________
DSpace-tech mailing list
DSpace-tech@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/dspace-tech

Reply via email to