Changeset 15437 for other-projects/trunk/gs3-webservices-democlient/src/GS3Fedora/org/greenstone/fedora/services/GSearchConnection.java
- Timestamp:
- 2008-05-14T13:27:08+12:00 (16 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
other-projects/trunk/gs3-webservices-democlient/src/GS3Fedora/org/greenstone/fedora/services/GSearchConnection.java
r15222 r15437 60 60 protected static String NAMESPACE_URI = "http://server.fedoragsearch.defxws.dk"; 61 61 protected static String SERVICE_NAME = "OperationsService"; 62 protected static final String INDEX_NAME = "FedoraIndex";63 62 64 63 /** The names of the methods we use of Fedora Generic Search's web services … … 78 77 /** separator used internally to separate values of a search field */ 79 78 protected static final String SPACE = " "; 79 80 /** The name of the Index wherein FedoraGSearch has indexed all the GS3 docs. 81 * This final member is public here so that others may read the indexName 82 * that this GSearchConnection works with. */ 83 public final String indexName; 80 84 81 85 /** The Service object used to connect to the FedoraGSearch web services */ … … 89 93 protected final DocumentBuilder builder; 90 94 95 96 91 97 /** Constructor that takes a String representing the url of the WSDL 92 98 * file for FedoraGSearch's web services, and tries to establish a 93 99 * connection to those web services. 94 100 * @param wsdlFileLocation is a String representing the url of the WSDL file 101 * @param indexName is the name of the index that Fedora Generic Search 102 * should work with (the index wherein the indexed GS3 documents have been 103 * placed). 95 104 */ 96 public GSearchConnection(String wsdlFileLocation )105 public GSearchConnection(String wsdlFileLocation, String indexName) 97 106 throws MalformedURLException, ServiceException, 98 107 ParserConfigurationException 99 108 { 109 this.indexName = indexName; 110 100 111 URL wsdlURL = new URL(wsdlFileLocation); 101 112 service = new Service(wsdlURL, new QName(NAMESPACE_URI, SERVICE_NAME)); … … 218 229 return gFindObjects(fullSearchTerm, sort, 219 230 hitPageStart, hitPageSize, snippetsMax, 220 fieldMaxLength, INDEX_NAME, resultPageXslt);231 fieldMaxLength, indexName, resultPageXslt); 221 232 } 222 233 … … 364 375 return gFindObjects(fieldedSearchTerms, sort, 365 376 hitPageStart, hitPageSize, snippetsMax, 366 fieldMaxLength, INDEX_NAME, resultPageXslt);377 fieldMaxLength, indexName, resultPageXslt); 367 378 } 368 379 … … 460 471 try { 461 472 GSearchConnection searcher = new GSearchConnection( 462 "http://localhost:8080/fedoragsearch/services/FgsOperations?wsdl" );473 "http://localhost:8080/fedoragsearch/services/FgsOperations?wsdl", "FedoraIndex"); 463 474 464 475
Note:
See TracChangeset
for help on using the changeset viewer.