Changeset 21573 for other-projects/gs3-webservices-java-client/trunk
- Timestamp:
- 2010-01-21T18:19:27+13:00 (14 years ago)
- Location:
- other-projects/gs3-webservices-java-client/trunk/src/GS3Fedora/org/greenstone/fedora/services
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
other-projects/gs3-webservices-java-client/trunk/src/GS3Fedora/org/greenstone/fedora/services/FedoraGS3Connection.java
r15733 r21573 186 186 * - name of the index into which the GS3 documents have been indexed 187 187 * and which FedoraGenericSearch should use to perform searches. If none is 188 * given in the properties file, then the index name defaults "FedoraIndex".188 * given in the properties file, then the index name defaults to "FedoraIndex". 189 189 * @param properties is the Properties Map loaded from a properties file 190 190 * (if there was any) which specifies such things as host and port of the … … 469 469 String docPID = getDocPIDFromDocID(id); 470 470 if(sectionID.equals("") || sectionID.equals("1")) { 471 // metadata of toplevel document is requested471 // metadata of toplevel document is requested 472 472 ex = this.getEX(docPID); // slightly faster than doing 473 473 //getSectionEXMetadata(docID, "1") … … 662 662 }catch(Exception e) { 663 663 ex = new FedoraGS3RunException(e); 664 //ex.setSpecifics("EX metadata datastream PID: |" + docIDs[i] + "|"); // for debugging PID 664 665 ex.setSpecifics("EX metadata datastream"); 665 666 } -
other-projects/gs3-webservices-java-client/trunk/src/GS3Fedora/org/greenstone/fedora/services/GSearchConnection.java
r15437 r21573 179 179 */ 180 180 protected String gFindObjects(String searchFieldedTerms, String sort, 181 int hitPageStart, int hitPageSize, int snippetsMax, 182 int fieldMaxLength,String indexName, String resultPageXslt) throws Exception181 int hitPageStart, int hitPageSize, int snippetsMax, 182 /*int fieldMaxLength,*/ String indexName, String resultPageXslt) throws Exception 183 183 { 184 184 // "Prefills as much info from the WSDL as it can. Right now it's SOAPAction, … … 191 191 call.setOperationName(G_FIND_OBJECTS); 192 192 193 // Max num of chars in field vals returned. Since return values exceeding 194 // maxlength will be truncated, ensure length suffices for long PIDs returned. 195 // The only element of the response XML we'll be using is the PID of the document 196 // in which the searchTerm occurred. 197 final int fieldMaxLength = 100; // NOT TRUE: max length in words of field values 198 // returned. E.g. snippet sizes will be reduced to fieldMaxLength words too. 199 200 // This is the method call for Fedora 2's GSearch 201 //String valueFound =(String)call.invoke( new Object[] { 202 // searchFieldedTerms, sort, hitPageStart, hitPageSize, snippetsMax, 203 // fieldMaxLength, indexName, resultPageXslt} ); 204 205 // The method call for GSearch 2.2 of Fedora 3 takes the args in a different order: 193 206 String valueFound =(String)call.invoke( new Object[] { 194 searchFieldedTerms, sort, hitPageStart, hitPageSize, snippetsMax, 195 fieldMaxLength, indexName, resultPageXslt} ); 196 207 searchFieldedTerms, hitPageStart, hitPageSize, snippetsMax, 208 fieldMaxLength, indexName, sort, resultPageXslt} ); 209 210 // for debugging 211 //javax.swing.JOptionPane.showMessageDialog(null, "GSearchConnection.gFindObjects:" + valueFound); 212 197 213 return valueFound; 198 214 } … … 215 231 { 216 232 final String sort = ""; // returns results from highest to lowest rank 217 final int fieldMaxLength = 50; // maximum length in words of field values218 // returned. E.g. snippet sizes will be reduced to fieldMaxLength219 // words too. It doesn't matter what we set this too, the only220 // element of the response XML we'll be using is the PID of the221 // document in which the searchTerm occurred.222 233 final String resultPageXslt = ""; 223 234 … … 229 240 return gFindObjects(fullSearchTerm, sort, 230 241 hitPageStart, hitPageSize, snippetsMax, 231 fieldMaxLength,indexName, resultPageXslt);242 indexName, resultPageXslt); 232 243 } 233 244 … … 369 380 370 381 final String sort = ""; // returns results from highest to lowest rank 371 final int fieldMaxLength = 50; // maximum length in words of field values372 // returned. E.g. snippet sizes will be reduced to fieldMaxLength373 // words too374 382 final String resultPageXslt = ""; 375 383 return gFindObjects(fieldedSearchTerms, sort, 376 384 hitPageStart, hitPageSize, snippetsMax, 377 fieldMaxLength,indexName, resultPageXslt);385 indexName, resultPageXslt); 378 386 } 379 387
Note:
See TracChangeset
for help on using the changeset viewer.