OPA-0.2 (now with json-wrapped all-formats bundle)
[Updated 2008-02-27, while (drinking late at night) at code4lib 2008, after realizing that these links don't work because unAPI v1 included a change from "uri" as the parameter name to "id". So I'm changing the links to make them work!]
Attached is OPA-0.2. The big new feature is an implicit "wrap" format for all providers, which sucks down all available object formats at once and wraps them all into a JSON structure that looks like the one I described a few days ago.
To make it easier to try out, I've installed OPA at http://opa.onebiglibrary.net/. Pass it a URI and formats to see it in action for yourself.
For Pubmed records:
- ?id=info:pmid/12345678
- ?id=info:pmid/12345678&format=pubmed
- ?id=info:pmid/12345678&format=text
- ?id=info:pmid/12345678&format=asn1
- ?id=info:pmid/12345678&format=wrap
For books:
- ?id=urn:isbn:0596002815
- ?id=urn:isbn:0596002815&format=dc
- ?id=urn:isbn:0596002815&format=mods
- ?id=urn:isbn:0596002815&format=amazon
- ?id=urn:isbn:0596002815&format=wrap
For CiteSeer articles:
- ?id=oai:CiteSeerPSU:1234
- ?id=oai:CiteSeerPSU:1234&format=oai_dc
- ?id=oai:CiteSeerPSU:1234&format=oai_citeseer
- ?id=oai:CiteSeerPSU:1234&format=wrap
For flickr photos (notice that format=wrap will base64.encode() the data and leave the base64=True flag set; also there's a delay built into the flickr calls to ensure the API responds and doesn't get angry, so please be patient :):
- ?id=http://flickr.com/photos/dchud/100544935/
- ?id=http://flickr.com/photos/dchud/100544935/&format=dc
- ?id=http://flickr.com/photos/dchud/100544935/&format=mods
- ?id=http://flickr.com/photos/dchud/100544935/&format=jpeg_Original
- ?id=http://flickr.com/photos/dchud/100544935/&format=wrap
If you want to see why the json-wrapping is useful, copy the text output of any of those format=wrap calls into a string in your favorite language and eval it into proper data using a json parser. It's a little nesty, but under the item and then under the item's resources ('res') you'll see all the data, right there, iterable and renderable. The whole blob could be easily up-cast into a MPEG21 DIDL or METS bundle, or you could serve images or other binary data right out of it by base64.decode()ing the data value.
Trackback URL for this post:
| Attachment | Size |
|---|---|
| opa-0.2.tar.gz | 31.03 KB |
Peter van Huisstede (not verified) on March 09th 2006
I currently am designing a so-called "voorportaal" (something in front of DSpace) in order to accomodate a really working University repository. Similar lines of development as you are sketching. We use a subversion fileserver, was thinking of YAML metadata, blobs.
dchud on March 09th 2006
Please send an update when you've got something to share!
Thanks, -dchud
Post new comment