1 package org.sourceforge.vlibrary.util; 2 3 import java.util.Map; 4 5 public interface SruSrwClientInterface { 6 7 /** 8 * Looks up using SRU/SRW defined endpoint an identifier (normally ISBN) 9 * and returns the first record returned by SRU/SRW as a HashMap of fields 10 * 11 * @param identifier Normally the isbn of the book to search, 12 * expressed in the "xxxxxxxxxx" format 13 * <br>ISBN can be in 10 or 13 digit format, no spaces or dashes </br> 14 * <br>If something else is passed instead of an (unique) ISBN, 15 * the first record (of potentially many) is always returned. </br> 16 * <br>This is a limitation due to the fact that the main 17 * SRU/SRW SP (LOC.GOV) does not seem to have implemented fully 18 * the dc (Dublin Core) context (missing especially the dc.identifier index). </br> 19 * <br>For example, a search for Web Services will return: 20 * recordMap={TITLE=Introduction to Semantic Web and Semantic Web services /, PUBLISHER=Boca Raton, FL : CRC Press,, AUTHOR=Yu, Liyang., DATE=2007., SUBJECTSLIST=[Semantic Web., Web services.]} </br> 21 * Note that any dentifier strings containing spaces must be escaped (ex: "%22Web%20Services%22"). 22 * @see <a href="http://www.loc.gov/standards/sru/"> SRU/SRW Specification for more details </a> 23 * 24 * @return Map containing the elements described above 25 * using the names: AUTHOR, TITLE, PUBLISHER, PUBLISHEDDATE, SUBJECTSLIST 26 * and String values, with the exception of SubjectsList whose value 27 * is a List of string subjects 28 * 29 * @throws Exception if either parameters are incorrect, the SRU/SRW enpoint 30 * cannot be called, if the returned XML cannot be parsed or 31 * if the record identified by identifier could not be found by provider 32 */ 33 public Map callSruSrwProvider( String identifier ) throws Exception; 34 35 }