Hi Bram,
Your suggested syntax (repeating -a for each field) did work. I made a note on
https://wiki.duraspace.org/display/DSDOC3x/Updating+Items+via+Simple+Archive+Format
so the documentation can be updated.
Thanks for your help,
David
From: bluy...@gmail.com [mailto:bluy...@gmail.com] On Behalf Of Bram Luyten
Sent: Thursday, June 27, 2013 1:36 PM
To: Isaak, David C
Cc: dspace-tech@lists.sourceforge.net
Subject: Re: [Dspace-tech] Error when using itemupdate to add multiple metadata
fields
Hi David,
just part of the answer bit it may set you on the right track:
the reason why ; breaks your command is because it will tell the CLI to
interprete "dc.contributor.y" as a separate command to be executed after the
previous part. So I guess that will never work.
what happens if you try:
[dspace]/bin/dspace itemupdate -e j...@user.com<mailto:j...@user.com> -s
[path/to/archive] -a dc.contributor.x. -a dc.contributor.y -a dc.contributor.z
instead of
[dspace]/bin/dspace itemupdate -e j...@user.com<mailto:j...@user.com> -s
[path/to/archive] -a dc.contributor.x.;dc.contributor.y;dc.contributor.z
The docs you are referring to are here:
https://wiki.duraspace.org/display/DSDOC3x/Updating+Items+via+Simple+Archive+Format
right?
I'm not really sure why the note is there about the semicolon.
hope this helps,
Bram
--
[logo]
Bram Luyten @mire
2888 Loker Avenue East, Suite 315, Carlsbad, CA. 92010
Esperantolaan 4, Heverlee 3001, Belgium
www.atmire.com<http://atmire.com/website/?q=services&utm_source=emailfooter&utm_medium=email&utm_campaign=braml>
On Thu, Jun 27, 2013 at 5:40 PM, Isaak, David C
<david.c.is...@kpchr.org<mailto:david.c.is...@kpchr.org>> wrote:
Hello,
[I am running DSpace 3.1.]
I am attempting to use the itemupdate command to add metadata to three fields
at the same time. The command I am using is:
[dspace]/bin/dspace itemupdate -e j...@user.com<mailto:j...@user.com> -s
[path/to/archive] -a dc.contributor.x.;dc.contributor.y;dc.contributor.z
When I run this in test mode, all the metadata fields load correctly, but the
action (org.dspace.app.itemupdate.AddMetadataAction) is only performed on the
first metadata field. At the end of the test run, I see the error:
-bash: dc.contributor.y: command not found
-bash: dc.contributor.z: command not found
I am confident that my SAF packages are correct because itemupdate works
correctly when I run the command individually for each metadata field. Is there
a problem with the syntax of my command? Am I misunderstanding the manual? Here
is the relevant portion of the manual:
-a or --addmetadata [metadata element]
Repeatable for multiple elements. The metadata element should be in the form
dc.x or dc.x.y. The mandatory argument indicates the metadata fields in the
dublin_core.xml file to be added unless already present (multiple fields should
be separated by a semicolon ';'). However, duplicate fields will not be added
to the item metadata without warning or error.
Any thoughts would be appreciated.
Thank you,
David
---------
David Isaak
Digital Projects Librarian
Kaiser Permanente
Center for Health Research
3800 N. Interstate Ave.
Portland, OR 97227
(503) 335-2437
---------
kpchr.org<http://kpchr.org>
------------------------------------------------------------------------------
This SF.net email is sponsored by Windows:
Build for Windows Store.
http://p.sf.net/sfu/windows-dev2dev
_______________________________________________
DSpace-tech mailing list
DSpace-tech@lists.sourceforge.net<mailto:DSpace-tech@lists.sourceforge.net>
https://lists.sourceforge.net/lists/listinfo/dspace-tech
List Etiquette: https://wiki.duraspace.org/display/DSPACE/Mailing+List+Etiquette
------------------------------------------------------------------------------
This SF.net email is sponsored by Windows:
Build for Windows Store.
http://p.sf.net/sfu/windows-dev2dev
_______________________________________________
DSpace-tech mailing list
DSpace-tech@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/dspace-tech
List Etiquette: https://wiki.duraspace.org/display/DSPACE/Mailing+List+Etiquette