1 / 26

Two From the SFX Toolbox: A Plugin and an Target Parser

Two From the SFX Toolbox: A Plugin and an Target Parser . Rich Wenger, E-resource Systems Manager MIT Libraries. Agenda. Conditional display of Aleph print holdings on the SFX menu. Differential resolution of hdl.handle.net URLs. Part 1.

neva
Download Presentation

Two From the SFX Toolbox: A Plugin and an Target Parser

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. Two From the SFX Toolbox:A Plugin and an Target Parser Rich Wenger, E-resource Systems Manager MIT Libraries

  2. Agenda • Conditional display of Aleph print holdings on the SFX menu. • Differential resolution of hdl.handle.net URLs.

  3. Part 1. Conditional display of Aleph print holdings on the SFX menu.

  4. Context • We recently completed a redesign of our SFX menu. • Our Aleph records have print and electronic holdings on the same record: “piggybacking”. • A philosophical change to our handling of Aleph holdings on the SFX menu:“The American judicial system does not promise justice. It promises a chance at justice”-Paul Newman in The Verdict

  5. Components • A modified version of the ALEPH.pm plugin • A modified version of the parser for the Aleph target • A modified target displayer for Aleph holdings on the SFX menu • A modified version of getHolding_ALEPH.tmpl • Modifications to the Aleph target • A target threshold to avoid looping to/from Aleph

  6. Some Simplifying Assumptions • No title searches in AlephSetting in config/aleph_xserver_lookup.config • ISSN or ISBN only • Suppress “multiple records” message

  7. Plugin ALEPHMIT.pm • Based on the standard ALEPH.pm plugin • Retrieves the document number from the first call to the Aleph x-server and stores it in the context object • Filters e-holdings from the holdings returned from Aleph • Reformats the holdings array to consolidate Location and Collection onto one line.

  8. Holdings array

  9. Holdings array

  10. Target Parser ALEPHMIT.pm • Based on the standard ALEPH.pm target parser • Retrieves the document number from the context object and creates a URL pointing to a specific Full record in Aleph

  11. Target Displayer ALEPHMIT.pm • Based on the standard ALEPH.pm target displayer • Modifies the holdings array by inserting a blank line ( ) between each set of holdings.

  12. Holdings array

  13. Template getHolding_ALEPH.tmpl • Based on the standard getHolding_ALEPH.tmpl • Adds a third variable to the template to accommodate the added line in the holdings array. • Example

  14. Part 2. Differential resolution of handle URLs.

  15. The problem Some hdl.handle.net URLs resolve to targets that should be proxied e.g. Harvard Dataverse Network, and some resolve to targets that should NOT be proxiede.g our DSpace instances.

  16. Context • SFX must resolve handle URLs differently depending on the target of the resolved handle. • Proxying the handle server itself is too big a hammer, too far up stream. • We want a decision point when the handle is resolved.

  17. Components • A local target, 856_URL_LCL • A local target parser • An external script • A Display Logic rule

  18. Local target 856_URL_LCL • getFullTxt service • Global threshold: $obj->need('856_url') && $obj->need('856_url','=~','/hdl.handle.net/i') • Parser: HDL::handle • Parse param: ‘external_url=http://library.mit.edu/cgi-bin/handle_url.cgi?parm=‘

  19. Local target parser HDL::handle • Retrieves the 856_URL from the context object • Retrieves the URL for external script from the parse param. • Returns URL for the target in the form:http://<external script>?parm=http:hdl.handle.net/<..>

  20. External script handle_url.cgi • Get and decode the URL from the parm and isolate the handle domain e.g. http://hdl.handle.net/1721.1/78487 • If it is one of our DSpace domains, redirect to the handle server.

  21. External script handle_url.cgi… • Otherwise, send the handle to the handle server API: • http://hdl.handle.net/api/1902.1/21446 • Receive and decode the JSON response, and extract the target URL • Construct a URL for the proxy server and redirect: http://libproxy.mit.edu/login?url=http://thedata.harvard.edu/dvn/study?globalId=hdl:1902.1/21446

  22. Display Logic rule If available target 856_URL_LCL, any serviceDo not show 856_URL, any service.

  23. 856_URL_LCL Aleph OPAC Browser Intl. Country Risk Guide Z39.50 MARC record fetch http://sfx.edu/sfx_local/?title=ICRG&…. SFX 856_url:$uhttp://hdl.handle.net/1902.1/21446 handle_url.cgi

  24. handle_url.cgi Parm= http://hdl.handle.net/1902.1/21446 http://libproxy.mit.edu/login?url=http://thedata.harvard.edu http://hdl.handle.net/api/1902.1/21446 hdl.handle.net/api Proxy Server http://thedata.harvard.edu

  25. Improvements Move the external script logic into the target parser

  26. Finis Rich Wenger rwenger@mit.edu Phone 617-253-0035

More Related