...
Uncomment the code in this classclass ( /* code */ ).
Changes in ole project
Class ImportBibController
Uncomment the following code.
Code Block |
---|
/* if(searchParams.getSearchConditions().get(0).getSearchField().getFieldValue()=="" || searchParams.getSearchConditions().get(0).getSearchField().getFieldValue()==null){ GlobalVariables.getMessageMap().putError(KRADConstants.GLOBAL_ERRORS, OLEConstants.DESCRIBE_ENTER_SEARCH_TEXT);try { results = importBibForm.setBibMarcRecordList(null); importBibForm.setBibUuidsList(null); importBibForm.setImportBibSearch(null); searchParams.getSearchResultFields().clear(); return getUIFModelAndView(importBibForm); } */ /* DataSourceConfig dataSourceConfig = new DataSourceConfig(); BusinessObjectService businessObjectService = KRADServiceLocator.getBusinessObjectService(); Map parentCriteria = new HashMap(); parentCriteria.put("id", source); ExternalDataSourceConfig externalDataSourceConfig = new ExternalDataSourceConfig(); externalDataSourceConfig = businessObjectService.findByPrimaryKey(ExternalDataSourceConfig.class, parentCriteria); dataSourceConfig.setDomainName(externalDataSourceConfig.getDomainName()); dataSourceConfig.setPortNum(externalDataSourceConfig.getPortNum())externalDataSource.searchForBibs(searchParams, dataSourceConfig); } catch dataSourceConfig.setDatabaseName(externalDataSourceConfig.getDatabaseName()); dataSourceConfig.setLoginId(externalDataSourceConfig.getLoginId()); dataSourceConfig.setPassword(externalDataSourceConfig.getPassword()); dataSourceConfig.setAuthKey(externalDataSourceConfig.getAuthKey()); //String databaseName = externalDataSourceConfig.getDatabaseName(); String loginIdDbName = externalDataSourceConfig.getLoginId(); if(loginIdDbName!=null && loginIdDbName.equalsIgnoreCase("")) (Exception e){ GlobalVariables.getMessageMap().putError(KRADConstants.GLOBAL_ERRORS,OLEConstants.DATA_BASE_NOT_VALID); importBibForm.setImportBibSearch(null); return getUIFModelAndView(importBibForm); } String[] parts = loginIdDbName.split("/"); String logInId = parts[0]; String dataBase = parts[1]; List<String> dataBaseList = new ArrayList<String>(); dataBaseList.add(dataBase); if(dataBaseList!=null && dataBaseList.get(0).equalsIgnoreCase("")) { GlobalVariables.getMessageMap().putError(KRADConstants.GLOBAL_ERRORS,OLEConstants.DATA_BASE_NOT_VALID)LOG.error("Error occurred while fetching the records :ImportBibController"+e); return getUIFModelAndView(importBibForm); } ExternalDataSource externalDataSource = ExternalDataSourceFactory.getInstance().getExternalDataSource(dataSourceConfig); results = externalDataSource.searchForBibs(searchParams,dataSourceConfig); */ /* GlobalVariables.getMessageMap().putError(KRADConstants.GLOBAL_ERRORS, OLEConstants.DATA_BASEIMPORT_NOT_SELECTEDERROR); importBibForm.setImportBibSearch(null); } return getUIFModelAndView(importBibForm); */ |
File ImportBibSearchPage.xml
...
Create an external data source. E.g. Domain name=(
1)
lx2.loc.gov | |
lx2.loc.gov | |
lx2.loc.gov | |
210 | |
2)
...
Abertay Dundee University-voyager | |
Abertay Dundee University | |
catalogue.abertay.ac.uk |
...
10790 | |
kuali/voyager | |
Note : Domain Name, Port Number ,Database Name are mandatory . Format for Login Id/Database Name =Kuali//voyageris kuali/voyager . If we are not mentioning with '/' it will consider as Database Name .
For more info about external data sources, please refer to http://www.loc.gov/z3950/lcserver.html , http://staff.library.mun.ca/staff/toolbox/z3950hosts.htm
...