Thursday
Mar142013

OAI-PMH URIs in DSpace

It seems every time I need to query the DSpace OAI-PMH (Open Archives Initiative Protocol for Metadata Harvesting) interface, I begin with a Google search because I have forgotten the syntax. This post is mainly documentation for myself, but I am making it public so that other folks with memories short as mine will have a go-to reference.

The following URIs work for the IDEALS repository at the University of Illinois Urbana. The PHM verbs etc should work everywhere.

OAI-PMH Verbs

Identify

The first step is to make sure the base URI is correct and there is, indeed, an OAI-PHM service running. Note: capitalization is important.

https://ideals.illinois.edu/dspace-oai/request?verb=Identify

All other requests will use the same base URI.

ListSets

The ListSets verb is particularly useful for figuring out set syntax. In the DSpace world, a community or collection may qualify as a set.

https://ideals.illinois.edu/dspace-oai/request?verb=ListSets

The response lists all the sets and their titles. The thing to note here is the setSpec syntax (e.g., hdl_2142_2280). This set corresponds to the DSpace community or collection with the handle (e.g.) 2142/2280.

Response:

…  
<request verb="ListSets">https://ideals.illinois.edu/dspace-oai/request</request>  
<ListSets>  
    <set>  
        <setSpec>hdl_2142_5167</setSpec>  
        <setName>1940: Illinois Agricultural Statistics</setName>  
    </set>  
    <set>  
        <setSpec>hdl_2142_5168</setSpec>  
        <setName>1945: Illinois Agricultural Statistics</setName>  
    </set>  
…

ListMetadataFormats

Before retrieving any records, there is one more thing to check. What metadata formats do the repository support?

https://ideals.illinois.edu/dspace-oai/request?verb=ListMetadataFormats

Response:

…  
<request verb="ListMetadataFormats">https://ideals.illinois.edu/dspace-oai/request</request>
<ListMetadataFormats>
    <metadataFormat>
        <metadataPrefix>oai_dc</metadataPrefix>
        <schema>http://www.openarchives.org/OAI/2.0/oai_dc.xsd</schema>
        <metadataNamespace>http://www.openarchives.org/OAI/2.0/oai_dc/</metadataNamespace>
    </metadataFormat>
    <metadataFormat>
        <metadataPrefix>rdf</metadataPrefix>
        <schema>http://www.openarchives.org/OAI/2.0/rdf.xsd</schema>
        <metadataNamespace>http://www.openarchives.org/OAI/2.0/rdf/</metadataNamespace>
    </metadataFormat>
    <metadataFormat>
        <metadataPrefix>mets</metadataPrefix>
        <schema>http://www.loc.gov/standards/mets/mets.xsd</schema>
        <metadataNamespace>http://www.loc.gov/METS/</metadataNamespace>
    </metadataFormat> 
…

The metadata formats supported by IDEALS are OAI-Dublin Core, RDF and METS, which use the metadata prefixes oai_dc, rdf and mets.

ListRecords

The URI for obtaining a list all the records associated with a community or collection in DSpace requires the ListRecords verb, the set identifier (or setSpec) and the metadataPrefix. The handle for the University of Illinois Dissertations and Theses collection is 2142/5131. Its corresponding set identifier is hdl_2142_5131.

List all the records (DSpace items) in the University of Illinois Dissertations and Theses collection, with metadata in Dublin Core.

https://ideals.illinois.edu/dspace-oai/request?verb=ListRecords&metadataPrefix=oai_dc&set=hdl_2142_5131

Response:

…  
<request set="hdl_2142_5131" metadataPrefix="oai_dc" verb="ListRecords">https://ideals.illinois.edu/dspace-oai/request</request>
<ListRecords>
    <record>
        <header>
            <identifier>oai:www.ideals.illinois.edu:2142/3468</identifier>
            <datestamp>2009-09-12T21:13:26Z</datestamp>
            <setSpec>hdl_2142_9</setSpec>
            <setSpec>hdl_2142_5131</setSpec>
            <setSpec>hdl_2142_13736</setSpec>
        </header>
        <metadata>
            <oai_dc:dc xmlns:oai_dc="http://www.openarchives.org/OAI/2.0/oai_dc/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://www.openarchives.org/OAI/2.0/oai_dc/ http://www.openarchives.org/OAI/2.0/oai_dc.xsd">
                <dc:contributor>Cole, Jennifer S.</dc:contributor>
                <dc:contributor>Sproat, Richard W.</dc:contributor>
                <dc:creator>Koo, Hahn</dc:creator>
                <dc:date>2007-12-11T01:07:40Z</dc:date>
                <dc:date>2007-12-11T01:07:40Z</dc:date>
                <dc:date>2007-12</dc:date>
                <dc:identifier>http://hdl.handle.net/2142/3468</dc:identifier>
                <dc:language>en</dc:language>
                <dc:subject>Linguistics</dc:subject>
                <dc:title>
                Change in the adult phonological processing system by learning non-adjacent phonotactic constraints from brief experience: An experimental and computational study
                </dc:title>
                <dc:type>text</dc:type>
                <dc:type>dissertation/thesis</dc:type>
                <dc:description>unpublished</dc:description>
                <dc:description>not peer reviewed</dc:description>
                <dc:contributor>Sproat, Richard W.</dc:contributor>
                <dc:contributor>Dell, Gary S.</dc:contributor>
                <dc:contributor>Fisher, Cynthia L.</dc:contributor>
            </oai_dc:dc>
        </metadata>
    </record>
…

GetRecord

Note the identifier element in the response above (//record/header/identifier). Use this identifier to view the single record.

The URI is similar to ListRecords in that it requires a metadataPrefix. The other required parameter is identifier. This time, display the record with METS metadata (w/MODS embedded).

https://ideals.illinois.edu/dspace-oai/request?verb=GetRecord&metadataPrefix=mets&identifier=oai:www.ideals.illinois.edu:2142/3468

Happy harvesting!

Friday
Aug312012

Careers 2.0

Friday
Aug312012

Install Java on Ubuntu  

Ubuntu/Java Logo

The Ubuntu repositories provide users with OpenJDK, which is usually good enough—and getting better all the time! But for development environments, it is oftentimes better to run the proprietary version from Oracle. Some kind folks have made some easy deb installers. Here's how to get set up:

Java 7

Oracle-jdk7:

sudo apt-get purge openjdk-7-jre icedtea-7-plugin  
sudo add-apt-repository ppa:webupd8team/java  
sudo apt-get update  
sudo apt-get install oracle-jdk7-installer

Java 6

Sun-java6-jdk:

sudo apt-add-repository ppa:flexiondotorg/java  
sudo apt-get update  
sudo apt-get install sun-java6-jdk sun-java6-plugin

You might need this first:

sudo apt-get install python-software-properties
Tuesday
Jul242012

Mostly Cougars

Tomorrow is the big day when Apple will release version 10.8 of its operating system—this one code name Mountain Lion. Wikipedia has a nice chart, which shows the progression of OS X versions and their big cat code names.

Here's a summary list:

Version Codename
Mac OS X 10.0 Cheetah
Mac OS X 10.1 Puma
Mac OS X 10.2 Jaguar
Mac OS X 10.3 Panther
Mac OS X 10.4 Tiger
Mac OS X 10.5 Leopard
Mac OS X 10.6 Snow Leopard
Mac OS X 10.7 Lion
OS X 10.8 Mountain Lion

Now, looking over this list, the realization came to me that Puma, Panther, and Mountain Lion are all names for the same cat: the cougar (Puma concolor). Interesting. I also find it interesting that there are four primary types of "big cat"—tiger, lion, jaguar, and leopard—which four make up the genus Panthera. But panthers (aka cougars) are of genus Puma). How strange.

Anyway, tomorrow is the drop date for OS X 10.8 Mountain Lion. Now would be a good time to back up your Mac.

Monday
Jul162012

Edinburgh Castle

Here I am at the castle. I took a lot of pictures with my SLR, which I'll post to Flickr soon.

Monday
Jul162012

TARDIS

TARDIS spotted on the streets of Edinburgh.

Monday
Jul162012

Goodbye Edinburgh

My trip to Scotland ends here, at the Fraser Suites. Great location, but I liked the folks at Edinburgh City better. Matter of fact, I liked nearly everything better at the ECH: the food, the staff, the wifi...

Wednesday
Jul112012

Conference Dinner at the National Museum of Scotland

Menu

Cured organic salmon with pickled cucumber

Corn fed chicken supreme with spinach and red peppers wrapped in aubergine served with a confit of garlic and boulangere potatoes

Lemon tart with mascarpone red fruits and mascarpone parfait

Coffee, tea and tablet

Tuesday
Jul102012

New Library IT Blog

The most dangerous men in LIS

Mike Tang, Robert Manaster, Jason Heldreth, Josh Bishoff, Tom Habing, Bill Ingram
Jon Gorman, Howard Ding, Robert Slater 

via

Monday
Jul092012

Conference Day One

Day one of what looks to be a great conference. The weather today is—I suppose—typically Scottish. It's rainy and cool; a welcome change from the Dust Bowl conditions back home.

Today is the DSpace developers meeting, an open discussion among DSpace commiters, the DACT, and anyone else involved with the software. Agenda. Afterward we'll meet the Fedora folks at the Pear Tree House.

Sunday
Jul082012

Edinburgh City Hotel

Home, for the next five days.

Sunday
Jul082012

This is why I love England

Even the napkins are charming. Also, the cabbie is listening enthusiastically to the tennis match on the radio. Go Murray!!

Friday
Jul062012

Squarespace iPhone app

Bill Ingram

Now that I've moved my blog to Squarespace it's easy to post on the road with their iPhone app. Very cool.

Sunday
May272012

Textmate-like fuzzy finder in RubyMine

I just discovered, after months of RubyMine use, that the GoTo functions work like fuzzyfinder in Textmate. There are a lot of useful shortcuts under the GoTo menu; the ones I am finding most useful are Ctrl+Shft+N for finding and opening a file, Ctrl+N for a class, and Alt+Shft+N for jumping to a corresponding Rails object. For instance, if I am in the People controller, I can jump to the Person model, People views, etc, bringing me that much closer to fulfilling my dream of never having to leave the keyboard when developing.

Sunday
May272012

Google+

Yesterday was my birthday, and -- what do you know? -- I got an invitation to join Google+. Pretty exciting! I was one of the first of my friends to get on, so I had the opportunity to invite a lot of my buddies and colleagues. My inbox stayed full today with notices from Google that another one of my contacts had joined the network, and would I like to add her to one of my circles. Circles, by the way, are what sets Google+ apart from other services in this space. As a friend pointed out today, Google+ is kind of like a combination of Twitter and Facebook. You don't friend people like in Facebook; you follow them like on Twitter. Come to think of it, all day people have been comparing Google+ to Facebook, but it's actually a lot more like Twitter than one would think at first glance.

Another feature I really like, related to circles, is the stream. Streams are like the Facebook news feed, except they only contain posts and updates from members of a particular circle. I love that I can separate my feeds that way. When I started putting people into circles, it was based on their role in my life: colleagues, friends, family, &c, &c. But now I am reorganizing my circles based on what kind of streams they will produce. For example, some contacts only posts jokes, funny videos, and whatnot, so I've created a new circle called funny for them. For those who generally share information about computers, I've created a group called computers. See where I'm going with this?

I just started this evening with sparks. Sparks are lists of topics I am interested in, and streams associated with that topic. I'm not really sure what their importance is yet, but I have a few just in case it's useful to.

So that's my first impression of Google+. If you want to connect, visit my profile and add me to a circle. Cheers.