[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[EP-tech] {Disarmed} Problem by depositing in EPrints repository with JAVA SWORD Client v2



Hi,

since at least one month I am trying to use the Java SWORD Client (for
SWORDv2) in order to deposit files in an EPrints repository. The deposit
part works correct and I get the following entry as an answer from server:

<?xml version="1.0" encoding="utf-8" ?>
<entry xmlns="http://www.w3.org/2005/Atom";  
xmlns:sword="http://purl.org/net/sword/";>
<link rel="self"
href="http://altar.tu-darmstadt.de/cgi/export/eprint/26/Atom/altar-eprint-26.xml";  
/>
<link rel="edit" href="http://altar.tu-darmstadt.de/id/eprint/26";  />
<link rel="edit-media"
href="http://altar.tu-darmstadt.de/id/eprint/26/contents";  />
<link rel="contents"
href="http://altar.tu-darmstadt.de/id/eprint/26/contents";  />
<link rel="alternate" href="http://altar.tu-darmstadt.de/id/eprint/26";  />
<published />
<updated>2012-06-06T07:11:51Z</updated>
<id>http://altar.tu-darmstadt.de/id/eprint/26</id>
<category term="article" label="Article"
scheme="http://altar.tu-darmstadt.de/data/eprint/type";  />
<category term="buffer" label="Under Review"
scheme="http://eprints.org/ep2/data/2.0/eprint/eprint_status";  />
<link rel="http://purl.org/net/sword/terms/statement";  
href="http://altar.tu-darmstadt.de/id/eprint/26";  />
<sword:state
href="http://eprints.org/ep2/data/2.0/eprint/eprint_status/buffer";  />
<sword:stateDescription>This item is in review. It will not appear in
the repository until it has been approved by an
editor.</sword:stateDescription>
<sword:originalDeposit href="http://altar.tu-darmstadt.de/id/eprint/26";>
<sword:depositedOn />
<sword:depositedBy>admin</sword:depositedBy>
</sword:originalDeposit>
<title type="xhtml">On Testing the Atom Protocol...</title>
<summary type="xhtml">This is where the abstract of this record would
appear. This is only demonstration data.</summary>
<author>
<name>Y. Lericolais</name>
<email />
</author>
</entry>

The problem is that this entry cannot be parsed internally from the
org.apache.abdera classes and at the end it asks agaian the server
for the entry but it looks for it under false location i.e.
<link rel="edit" href="http://altar.tu-darmstadt.de/id/eprint/26";  />
and at the end I get the following exception:

java.lang.ClassCastException:
org.apache.abdera.parser.stax.FOMExtensibleElement cannot be cast to
org.apache.abdera.model.Entry
      at
org.swordapp.client.SWORDClient.getDepositReceipt(SWORDClient.java:1231)
      at
org.swordapp.client.SWORDClient.getDepositReceipt(SWORDClient.java:1151)
      at org.swordapp.client.SWORDClient.deposit(SWORDClient.java:375)
      at org.swordapp.client.SWORDClient.deposit(SWORDClient.java:265)
      at
org.swordapp.ExportToEPrintsViaSWORDv2.main(ExportToEPrintsViaSWORDv2.java:187)

I tried with the Java SWORD Client (for SWORDv1) and I got no problems
but there as far as I know is used completely different implementation for
parsing the <entry> tags.

I tried to post a message in the SWORD mailings list but till now came no
answer. Has anyone tried to use the provided from SWORD JAVA Client?
Any suggestions? I hope that someone can give me a hint what can I do to
get this thing working.

Thanks in advance,
Zaharina

-- Dipl.-Math. Zaharina Stoynova Universit?ts- und Landesbibliothek 
Darmstadt Abteilung Elektronische Informationsdienste Schlo?, 64283 
Darmstadt Tel: +49 6151 16-58773 Fax: +49 6151 16-5897 
------------------------------------------------------------------------------ 
Live Security Virtual Conference Exclusive live event will cover all the 
ways today's security and threat landscape has changed and how IT 
managers can respond. Discussions will include endpoint security, mobile 
security and the latest in malware threats. 
http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/ 
_______________________________________________ sword-app-tech mailing 
list sword-app-tech at lists.sourceforge.net 
https://lists.sourceforge.net/lists/listinfo/sword-app-tech

-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://mailman.ecs.soton.ac.uk/pipermail/eprints-tech/attachments/20120614/b50e4280/attachment-0001.html