use of de.geeksfactory.opacclient.apis.BiBer1992 in project opacclient by opacapp.
the class OpacApiFactory method create.
/**
* Creates an {@link OpacApi} instance for accessing the given {@link Library}
*
* @param lib the {@link Library} you want to connect to
* @param sp the {@link StringProvider} to use
* @param hcf the {@link HttpClientFactory} to use
* @param lang the preferred language as a ISO-639-1 code, see {@link OpacApi#setLanguage(String)}
* @return a new {@link OpacApi} instance
*/
public static OpacApi create(Library lib, StringProvider sp, HttpClientFactory hcf, String lang, ReportHandler reportHandler) {
OpacApi newApiInstance;
if (lib.getApi().equals("bibliotheca")) {
newApiInstance = new Bibliotheca();
} else if (lib.getApi().equals("sisis")) {
newApiInstance = new SISIS();
} else if (lib.getApi().equals("zones")) {
newApiInstance = new Zones();
} else if (lib.getApi().equals("biber1992")) {
newApiInstance = new BiBer1992();
} else if (lib.getApi().equals("pica")) {
switch(lib.getData().optString("account_system", "")) {
case "lbs":
newApiInstance = new PicaLBS();
break;
case "default":
newApiInstance = new PicaOld();
break;
default:
newApiInstance = new PicaOld();
break;
}
} else if (lib.getApi().equals("iopac")) {
newApiInstance = new IOpac();
} else if (lib.getApi().equals("adis")) {
newApiInstance = new Adis();
} else if (lib.getApi().equals("sru")) {
newApiInstance = new SRU();
} else if (lib.getApi().equals("primo")) {
newApiInstance = new Primo();
} else if (lib.getApi().equals("vufind")) {
newApiInstance = new VuFind();
} else if (lib.getApi().equals("webopac.net")) {
newApiInstance = new WebOpacNet();
} else if (lib.getApi().equals("web-opac.at") || lib.getApi().equals("littera")) {
newApiInstance = new Littera();
} else if (lib.getApi().equals("winbiap")) {
newApiInstance = new WinBiap();
} else if (lib.getApi().equals("heidi")) {
newApiInstance = new Heidi();
} else if (lib.getApi().equals("touchpoint")) {
newApiInstance = new TouchPoint();
} else if (lib.getApi().equals("open")) {
newApiInstance = new Open();
} else if (lib.getApi().equals("test")) {
newApiInstance = new TestApi();
} else {
return null;
}
newApiInstance.init(lib, hcf);
newApiInstance.setStringProvider(sp);
newApiInstance.setReportHandler(reportHandler);
if (lang != null)
newApiInstance.setLanguage(lang);
return newApiInstance;
}
Aggregations