Thursday, September 29, 2011

Flickr Image Integration

Major updates have been underway in Numishare development over the last few months, as exhibited by the recent flurry of blog posts.  One of the more recent advances has been in integrating the flickr API into the Numishare administrative back end, enabling users to attach images from that web service to coin metadata records.  The process is fairly straightforward.  The user:

  1. Signs up for flickr and requests an API key
  2. Inputs the API key into the Numishare settings page and updates the settings
  3. Opens a coin record and inserts an obverse or reverse image
  4. Pastes a URL of a flickr image into the input box and clicks the "Attach" button
When the user clicks this button, an API lookup is called to receive URLs to available image sizes, and each URL is stored in METS elements embedded into the NUDS XML document.



When the coin is saved and published to the search index (Solr), the thumbnail and medium-sized images are stored so that they can be accessed from the search results page (and, obviously, from the coin record itself).

When clicking on the medium-sized images, the user is directed to the flickr URL for that object, per their terms of service.



Leveraging flickr's service for image storage and retrieval has numerous benefits, especially when a collector or institution may have a large body of image files, but not enough web space on the server on which Numishare is installed or if there is a wish to make just the images accessible through other media.  Flickr is a great alternative Numishare's default image uploading mechanism, Remotemagick, an XML-RPC service which is a front-end to imagemagick that interacts with Orbeon for uploading and resizing images.

Thursday, September 8, 2011

Leveraging nomisma to Deliver Controlled Vocabulary Services

With the launch of the nomisma.org Atom feed just a few days ago, I went to work on developing an XForms component which leverages the service to deliver controlled vocabulary terms for ancient mints within the administrative backend of Numishare. Numishare's interface for creating and editing coins already included a connector to geonames.org's APIs for querying modern place names, which I have detailed on the EADitor blog.

The nomisma service operates in similar fashion. A user selects a "nomisma" radio button (versus the other options to query geonames or local controlled vocabulary stored in the Solr index), inputs a search term into a text box, clicks the search button which executes an xforms:submission to query the Atom feed (which populates an xforms:instance), and selects the appropriate option from the select list box, which is formed by each atom:entry returned by the query. An example is pictured below:


The nomisma URI is stored as an attribute in the mint element in the NUDS-XML record so that, upon indexing the record into the search index, a lookup is performed on the RDFa of the nomisma id to extract geographic coordinates, enabling mapping out of the box of ancient mints (in addition to modern mints that are supplied through the geonames service). As noted earlier, findspots are also mappable.


Additionally, if the nomisma RDFa includes a reference to the associated Pleiades place, the Pleiades URI is also stored in the search index, enabling querying of Numishare by that URI.

Code for XForms XBL component

Tuesday, September 6, 2011

Nomisma.org launches Atom feed

Last week I began development on an Atom feed for the numismatic concepts described on nomisma.org. The feed will be updated nightly with the latest changes to the concepts, so you can be sure to keep abreast of new mints, denominations, hoards, etc.! Like the Atom and KML services on MANTIS, the feed is derived from Solr search results, and is thus queryable with the Lucene syntax. Most importantly, this feed will form the basis for numismatic controlled vocabulary in the backend of Numishare and will ultimately facilitate internationalization of coin collections that use the software by indexing coins based on unique identifiers for typological attributes (e.g., denomination, material) that are independent of the language in which the institution's collection is described.

There is a limited number of fields, so I will list them below.

id: unique identifier of the record
typeof: category of record. values currently include-- hoard, typology_entry, mint, skos:Concept, authority, romanemperor, collection, material, numismaticTerm, term, and denomination
prefLabel: preferred label of record
altLabel: alternate label of record, likely to include other languages
definition: small blurb describing the object
pos: GML-compliant geographic coordinates
burial_start: integer referring to terminus post quem (of a hoard)
burial_end: integer referring to terminus ante quem (of a hoard)
fulltext: text anywhere in record

Examples
http://nomisma.org/feed/?q=typeof:mint+attica - Mints in Attica
http://nomisma.org/feed/?q=burial_start:\-240 - terminus post quem of 240 B.C.

The feed contains links to the next and last pages so that it is possible to easily page through it. The page number is appended after feed/ in the URL, like so:

http://nomisma.org/feed/2/?q=*:*

Many of the entries in the feed also include geographic coordinates, and thus Google Maps is capable of rendering it in map form.

I will follow this post up with another about the feed's interaction with the XForms backend in Numishare, and how this will contribute to name authority.