Hi Marco,

Interesting - that looks like a bug with the DSpace implementation
(ORIGINAL bundle duplication).  I have some time scheduled to work on this
implementation over the next month to six weeks, so will look for this and
try to put in a fix.  Also, I'll look into whether the content type can be
put into the bitstream format field.

You are, meanwhile, free to implement your own ingesters, so if you want an
ingester which understands about LICENCE and CCLICENCE you can write one.

Cheers,

Richard

On 26 March 2012 16:13, Marco Fabiani <marco.fabi...@eecs.qmul.ac.uk> wrote:

>
> Hi Richard,
>
> (apologies for the long message)
>
> I finally managed to POST bitstreams to an item that I previously created
> with an ATOM entry, using the Edit media IRI. Thanks for the help!
>
> However, there are a couple of things that don't work quite right:
> - when I create the entry with metadata only, the bundle ORIGINAL is
> create, and it is empty. When I POST a new file, a new ORIGINAL bundle is
> created, and the file copied into it, and this is repeated for every file I
> POST. Normally, all the bitstreams should go into the same ORIGINAL folder
> (the first one, which remains empty). This causes some problems in the
> visualisation of the item.
> - the MIME type and description of the file don't appear in the bitstream
> information, can they be sent somehow? For the MIME type, in fact, when I
> POST the file, I always have to specify "application/zip" in the headers
> for it to work (and not the real MIME type), I suppose because the
> bitstream in compressed when it is sent.
> - is there a way to POST to a license file the LICENSE or CCLICENSE
> bundles? I guess this would solve the ORIGINAL folder as well?
>
> I realise that all these problems might be solved by using a METSDSpaceSIP
> package instead, but I couldn't manage to ingest one, I keep getting Error
> 415: Unacceptable content.
>
> Here are the headers I am posting (to the Collection IRI):
>
> 'Content-Length': '33777', 'Content-Disposition': 'attachment;
> filename=example.zip', 'In-Progress': 'true', 'Content-MD5':
> '2b25f82ba67284461d4a481d7a06dd28', 'Packaging': '
> http://purl.org/net/sword/package/METSDSpaceSIP', 'Content-Type':
> 'application/zip'
>
> and the error message from the server:
>
> <?xml version="1.0" encoding="ISO-8859-1"?>
> <sword:error href="http://purl.org/net/sword/error/ErrorContent";
> xmlns:sword="http://purl.org/net/sword/terms/";><atom:title xmlns:atom="
> http://www.w3.org/2005/Atom"/><atom:updated xmlns:atom="
> http://www.w3.org/2005/Atom";>2012-03-26T14:43:03Z</atom:updated><atom:generator
> uri="http://www.dspace.org/ns/sword/2.0/"; version="2.0" xmlns:atom="
> http://www.w3.org/2005/Atom";>rdm.c...@gmail.com</atom:generator><sword:treatment>Processing
> failed</sword:treatment><atom:summary xmlns:atom="
> http://www.w3.org/2005/Atom";>Unacceptable content type in deposit
> request:
> application/zip</atom:summary><sword:verboseDescription>org.swordapp.server.SwordError:
> Unacceptable content type in deposit request: application/zip
>        at
> org.dspace.sword2.DSpaceSwordAPI.isAcceptable(DSpaceSwordAPI.java:228)
>        at
> org.dspace.sword2.CollectionDepositManagerDSpace.createNewFromBinary(CollectionDepositManagerDSpace.java:218)
>        at
> org.dspace.sword2.CollectionDepositManagerDSpace.createNew(CollectionDepositManagerDSpace.java:112)
>        at org.swordapp.server.CollectionAPI.post(CollectionAPI.java:158)
>        at
> org.swordapp.server.servlets.CollectionServletDefault.doPost(CollectionServletDefault.java:48)
>         at javax.servlet.http.HttpServlet.service(HttpServlet.java:637)
>        at javax.servlet.http.HttpServlet.service(HttpServlet.java:717)
>        at
> org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:290)
>        at
> org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
>        at
> org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:233)
>        at
> org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:191)
>        at
> org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:127)
>        at
> org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:102)
>        at
> org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109)
>        at
> org.apache.catalina.valves.RequestDumperValve.invoke(RequestDumperValve.java:156)
>        at
> org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:291)
>        at
> org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:859)
>        at
> org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:602)
>        at
> org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:489)
>        at java.lang.Thread.run(Thread.java:662)
> </sword:verboseDescription></sword:error>
>
> Is it correct to POST the package to the Collection, or should I first
> create an entry  and then post the package to the IRI of the newly created
> entry?
>
> Thank you again for the help,
>
> best regards
>
> Marco
>
> --------------------------------------------------
> Marco Fabiani
> Postdoctoral Research Assistant
> Centre for Digital Music
> School of Electronic Engineering and Computer Science
> Queen Mary, University of London
> Mile End Road, London E1 4NS, UK
>
>
>


-- 

Richard Jones,

Founder, Cottage Labs
t: @richard_d_jones, @cottagelabs
w: http://cottagelabs.com
------------------------------------------------------------------------------
This SF email is sponsosred by:
Try Windows Azure free for 90 days Click Here 
http://p.sf.net/sfu/sfd2d-msazure
_______________________________________________
sword-app-tech mailing list
sword-app-tech@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/sword-app-tech

Reply via email to