Hi Pedro,
Recently I migrated thousands of objects to DSpace, but I made a separate
zip file for every one. The zip file contains the files (bitstreams) and
the mets file. The zip files are ingested programmatically:
// get parent object
parentObj = HandleManager
.resolveToObject(context, itemParentHandle);
// create a single item
itemObj = metsIngester.ingest(
context,
parentObj,
zippedItemPath.toFile(),
pkgParams,
null
);
I don't know is this an option for you?
About your first email:
When I look at the mets.xml file of an item with Edit this Item / Item
Bitstreams / View - I see that it is exactly as ingested. Perhaps in your
case something got distorted during the export.
In my case the struct map in the mets.xml describes the structure of the
book. Somethig like
<structMap ID="strid_01" LABEL="structure" TYPE="LOGICAL">
<div DMDID="dmdid_01" ID="strid_01_top" LABEL="Donau-Bulgarien und der
Balkan : Bd. 1 : [2. neu bearb. Aufl. 1879-1880]">
<div LABEL="[Buchdeckel und erste Seiten]">
<div LABEL="[Buchdeckel vorne]"><fptr FILEID="fid_20001"/></div>
<div LABEL="[Buchdeckel vorne Innenseite]"><fptr FILEID="fid_20002"/></div>
. . .
Best regards
Evgeni
On Monday, May 30, 2016 at 6:09:57 PM UTC+3, Pedro Amorim wrote:
>
> Hello Evgeni,
>>
>
> I am also having the same problem.
> I'll share the post I made in dspace-community for introduction:
>
> https://groups.google.com/forum/#!searchin/dspace-community/Questions$20regarding$20METS$2FAIP$20ingestion$20in$20DSpace/dspace-community/1OrWeDfnD20/ECZWJv9oBgAJ
>
> 1)
> If I import the collection using -t METS, the following error message
> happens:
> java.lang.ClassCastException: org.dspace.content.Community cannot be cast
> to org.dspace.content.Collection
>
> 2)
> If I import the collection using -t AIP (after changing the PROFILE, etc),
> the following happens:
> "METS document is missing the required structMap[@LABEL='Parent'] element."
>
> NOTE: I did not export from an existing DSpace. I'm importing METS items
> for the first time in DSpace.
> What I *think* is happening is, for the -t METS, DSpace won't recognize
> the mets package as a collection, instead it will interpret it as an Item,
> as such, when interpreting the parent in the structMap of the collection
> being imported (a community), it'll interpret it as a collection, instead
> of a community. Hence the message.
> After that I tried with -t AIP and have the message in 2). What I *think*
> happens in this case is it's complaining because the structMap in the ITEMS
> (not the COLLECTION package being imported) is non-existent. But why would
> it exist? I'm importing the COLLECTION package that already defines each
> ITEM package contained in it. Additionally, even if I wanted to inject some
> structMap for each ITEM (just to bypass this) how would I? I don't know the
> handle of the parent collection because I'm submitting it for the first
> time.
>
> I hope this wasn't too confusing.
> Any help would be greatly appreciated.
>
> Thank you,
>
> Pedro Amorim
>
>
>
>
>
>
>
--
You received this message because you are subscribed to the Google Groups
"DSpace Technical Support" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
To post to this group, send email to [email protected].
Visit this group at https://groups.google.com/group/dspace-tech.
For more options, visit https://groups.google.com/d/optout.