110 likes | 530 Views
“SRU/W – Interfaces to your Repository –What is it?” CONZUL Symposium Kristian Thornley Web Applications Developer: eLearning & Web Support Unit CPIT, May 2007 SRU/W ??? Search and Retrieve via URL or Web Service Warning Some More Acronyms… SRU via URL implemented as a RESTful Service
E N D
“SRU/W – Interfaces to your Repository –What is it?”CONZUL SymposiumKristian ThornleyWeb Applications Developer: eLearning & Web Support UnitCPIT, May 2007
SRU/W ??? • Search and Retrieve via URL or Web Service • Warning Some More Acronyms… • SRU via URL implemented as a RESTful Service • No protocol envelope = lower overhead • Human(ish) readable (e.g…) • Easier to transform via XSLT • SRW via Web Service implemented as a SOAP Service • (More) Machine readable (e.g…) • Complex data structures defined/enforced by XSD • Easier to parse via Programming Language
History • Specification developed and maintained at the Library of Congress • Derived from Z39.50 • Platform Independent
SRU/W vs. OAI-PMH • Each has their own role • SRW/U • Searching rather than harvesting • Complex queries via CQL • End-user Application Interface • OAI-PMH • Runs in the background • OAI-PMH specification/selection limited to sets and date ranges • Creates synergy when coupled
Researcher Example SRU/W over OAI-PMH Institution C Institution B Institution A A ? B B C A C D D
Researcher Example SRU/W over OAI-PMH Institution C Institution B Institution A B C A D HTMLPage OAI-PMH OAI-PMH SRU/W dc:creator = “Bloggs, J”
SRW/U Operations • explain request • Like OAI-PMH Identify • Wraps a ZeeRex Message describing the Database • searchRetrieve request • The guts of the protocol • scan request (not implemented.. yet) • Summarises possible search terms and expected hits returned if executed
Features of the searchRetrieve Request • query (required) • Main component encapsulated CQL (Common Query Language) more on this later… • Must be URL encoded in SRU • version (required) • Current 1.1 • maximumRecords, startRecord • Pagination support • recordPacking • String or XML • recordSchema • How should the results be presented (DC,QDC,MODS…) • stylesheet • Post-request XSL Transformation (e.g…) (only available in SRU)
CQL • Another Acronym… • Requests vary from simple • dc:title = test • To complex • ((dc:title = “test”) OR (dc:identifier contains “test”) NOT dc:creator = “test” • Allows mix and match • mods:titleInfo = “test” OR dc:title = “test” • Varied levels of conformance • Levels 0 – 2 (current level is 1) • Level 2 includes: • Proximity, context sets, xquery, sort etc…
OK how do we use it… • Use “Classic” Web site interface • http://harvester.oarinz.ac.nz/index.php/oarinzsearch/html • Implement pre-built client • http://harvester.oarinz.ac.nz/index.php/about • Develop your own • Lots of languages have libraries that make it easy e.g. C#, Java, PHP, Python, Perl
Some Examples • http://harvester.oarinz.ac.nz/plugins/generic/pkpsruclient/flash/queryBuilder1.2.swf • MS Office integration