Make the following changes in OLE to enable searching of external datasources with Z39.50 protocol
Setting up external dependencies for jz3950 library for connecting to Z39.50 datasources.
Get source code from https://jz3950.svn.sourceforge.net/svnroot/jz3950/trunk and build the jar file.
Dependency Resolution
While building if you encounter any dependency resolution issues, it would be most likely due to the fact that Kuali developers have a local maven settings.xml file that forces dependencies to be resolved from our internal Nexus repository. If you have it, uncomment the mirrors/servers section in the settings.xml and then re-run the build. It should get all the necessary plugins and dependent jar files down. Don't forget to un-comment the portions in the settings.xml after a successful build as it will be needed for regular Kuali development.- Create maven dependency for the above created jar file using below command;
mvn install:install-file -DgroupId=net.sf.jz3950 -DartifactId=jz3950 -Dversion=1.0-SNAPSHOT -Dfile=<path_to_your_jar_file> -Dpackaging=jar -DgeneratePom=true
Changes in ole-docstore-search project
File pom.xml
Uncomment the following lines.
<!-- <dependency> <groupId>net.sf.jz3950</groupId> <artifactId>jz3950</artifactId> <version>1.0-SNAPSHOT</version> </dependency> <dependency> <groupId>org.jzkit</groupId> <artifactId>a2j</artifactId> <version>2.0.4</version> </dependency> -->
Class Z3950DataSource
Uncomment the code in this class.
Changes in ole project
Class ImportBibController
Uncomment the following code.
/* 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); 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()); 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("")) { 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); return getUIFModelAndView(importBibForm); } ExternalDataSource externalDataSource = ExternalDataSourceFactory.getInstance().getExternalDataSource(dataSourceConfig); results = externalDataSource.searchForBibs(searchParams,dataSourceConfig); */ /* GlobalVariables.getMessageMap().putError(KRADConstants.GLOBAL_ERRORS, OLEConstants.DATA_BASE_NOT_SELECTED); importBibForm.setImportBibSearch(null); return getUIFModelAndView(importBibForm); */
File ImportBibSearchPage.xml
Uncomment the commented line in the following snippet.
<!--<ref bean="ExternalSourceSearch-Buttons"/>--> <!--<ref bean="ExternalSourceResults-Section"/>--> <!--<ref bean="externalNext-Button"/>-->
Creating an external data source:
Open OLE home page (http://dev.ole.kuali.org/portal.do or http://tst.ole.kuali.org/portal.do)
Navigate to Admin tab
Click “External Data Source” link in “Global Configuration Settings” section.
Create an external data source. E.g. Domain name=catalogue.abertay.ac.uk , port=10790, Description=Abertay Dundee University , LogIn Id/Database Name=Kuali//voyager
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
Importing records from external source:
Navigate to Describe tab in OLE home page.
Click “Import Bib” link.
Select tab “Import from External Data Source”.
Select the source which you are created.
Enter the search criteria and click “Search” button.