Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Getting the dc:identifier #1

Open
pes130 opened this issue Nov 16, 2012 · 1 comment
Open

Getting the dc:identifier #1

pes130 opened this issue Nov 16, 2012 · 1 comment

Comments

@pes130
Copy link

pes130 commented Nov 16, 2012

Hello Richard,

First of all, congratulations for this useful library.

I've succesully checked in items with your sword java client. But I have a questions:

How can I recover de dc:identifier field (dublin core). I mean, I need the following:
<record>
<header>
<identifier>oai:localhost:123456789/21</identifier>
...
</header>
<metadata>
<oai_dc:dc xmlns:oai_dc=".....">
<dc:title>Picnic at Hanging Rock</dc:title>
...
<dc:description>Misteriosa historia ¿basada en hechos reales?</dc:description>
...
<dc:identifier>http://hdl.handle.net/123456789/21&lt;/dc:identifier>
...
</oai_dc:dc>
</metadata>
</record>

I know it's dublin core field, but I need exactly that http://hdl.handle.net/123456789/21, or at least the 21.

Looking at the atom feed output obtained with:
Content content = client.getContent(resp.getLocation(),
"application/atom+xml;type=feed", null, auth);

content.getFeed().writeTo(System.out);

After inserting the item, the most similar i found is:
...
<entry>
<id>http://localhost:8080/xmlui/bitstream/123456789/21/2/testPDF.pdf&lt;/id>
<title type="text">Original Deposit http://localhost:8080/xmlui/bitstream/123456789/21/2/testPDF.pdf&lt;/title>
...
</entry>
<entry>
<id>http://localhost:8080/xmlui/bitstream/123456789/21/3/sword-2012-11-13T20:49:59.original.xml&lt;/id>
<title type="text">Original Deposit http://localhost:8080/xmlui/bitstream/123456789/21/3/sword-2012-11-13T20:49:59.original.xml&lt;/title>
...
<content type="application/octet-stream" src="http://localhost:8080/xmlui/bitstream/123456789/21/3/sword-2012-11-13T20:49:59.original.xml" />
...
</entry>
...

Is there a way to obtain it more directly?

Thanks in advance!

Pablo

@richard-jones
Copy link
Contributor

Hi Pablo,

Sorry for the long delay in responding ... only just saw your new issue.

Your first example looks like an OAI-PMH feed, and I'm not quite sure I understand the relationship.

If you are after the handle from DSpace, the best thing is to look to see if it exposes something like atom:link@rel="alternate", which is most likely to contain the handle. Remember also that an item in DSpace won't get a handle until it gets archived, so if it remains in the workspace, or is held in the workflow, you won't be able to get this information.

Hope that helps!

Cheers,

Richard

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants