I'd have to agree. OAI-PMH is so simple that even as poor a programmer as I
am was able to write my own data provider from scratch. Actually, not
completely from scratch in one go. Basically I was able to tweak my
existing database-driven web site to accept incoming verbs and parameters
and respond appropriately. Since I already had paging implemented
resumption tokens were easy.
But writing an aggregator from scratch is even easier, since you only need
to support the functions you actually need -- not the entire six verbs as
you must on the data provider side. Just the fact that Kyle can provide
pretty much everything you need except the record parsing bit in a simple
email message is proof enough.
Roy
On Wed, Jan 15, 2014 at 5:24 PM, Kyle Banerjee <[log in to unmask]>wrote:
> No need for a module -- that would be using a chain saw to cut butter.
>
> To return to an earlier suggestion, this is precisely where just retrieving
> something via good ol' http is easiest. An OAI-PMH request is just a
> request that looks exactly like the output from a really simple HTML form.
> This means you can use the same syntax to get the data directly. For
> example, to get a single record, all you need to do is something like:
>
>
> http://drl.ohsu.edu/oai/oai.php?verb=GetRecord&identifier=oai:drl.ohsu.edu:hom%2F0&metadataPrefix=oai_dc(the
> request could be POSTed too, but why bother?)
>
> If you want all the metadata from all the records, just use use something
> like:
>
>
> http://drl.ohsu.edu/oai/oai.php?verb=ListRecords&set=hom&metadataPrefix=oai_dc
>
> You'll need to deal with resumption tokens, but they're brain dead to
> extract and use since they're just opaque strings that appear in
> <resumptionToken> tags e.g.:
>
>
> http://drl.ohsu.edu/oai/oai.php?verb=ListRecords&resumptionToken=hom:200:hom:0000-00-00:9999-99-99:oai_dc
>
> If you're just getting into perl, I'd recommend becoming familiar with LWP
> if you aren't already. Easy to use and very handy.
>
> kyle
>
>
> On Wed, Jan 15, 2014 at 3:59 PM, Eka Grguric <[log in to unmask]> wrote:
>
> > I got it working by reordering my code and initializing properly (and by
> > digging through a Perl textbook...).
> > Thank you all for your advice!
> >
> > Now I have a Net::OAI::Harvester specific question - so far I've been
> able
> > to retrieve titles and identifiers for all records but is there a way to
> > default to the entirety of a record? I essentially want to be able to see
> > all metadata associated with a given record in a given repository. I'm
> not
> > sure if this is beyond the scope of this particular harvester (which has
> so
> > far been awesome) but if so, how would I go about adding that
> > functionality? By adding a distinct module? If so, any advice as to
> which?
> >
> > Again, thanks for all the help.
> >
>
|