1 minute read.Look Ma, No Plugins!
var f = function (OpenHandleJson) {
  var h = new OpenHandle(OpenHandleJson);
  var hv = h.getHandleValues();
  for (var i = 0; i < hv.length; i++) {     var v = new HandleValue(hv[i]);     if (v.hasType(‘URL’)) {       print(v.getData());     }     else if (v.hasType(‘HS_ADMIN’)) {       var a = new AdminRecord(v.getData());       print(a.getAdminPermissionString())     }   } }
"And that, gentlemen, is how we do that." - Apollo 13 |
Following on from my earlier Client Handle Demo post, this entry is just to mention the availability of a port of (part of) the Handle client library (in Java) to JavaScript: openhandle-0.1.1.js which is being maintained on the OpenHandle site. The JavaScript module contains methods for three classes: OpenHandle, HandleValue and AdminRecord.
What does all that mean? It means that Handles and their constituent values and value fields can be accessed directly within **any Web browser (using an OpenHandle service) which allows a dynamic Handle client to be generated and presented within a user context. No plugins required. The port mirrors the class methods in the standard Java client library for Handle.
As a demo of this JavaScript module in action, see this Inspector app for a card index view of Handle (and by implication DOI) records.
Further reading
- Mar 17, 2015 – January 2015 DOI Outage: Followup Report
- Jan 21, 2015 – Problems with dx.doi.org on January 20th 2015- what we know.
- Oct 14, 2008 – Yer Basic One-Liner
- Oct 8, 2008 – OpenHandle JavaScript API
- Oct 1, 2008 – Handle Clients #1, #2, #3
- Oct 1, 2008 – The Last Mile
- Jul 1, 2008 – Client Handle Demo
- May 29, 2008 – Dark Side of the DOI