Changeset 15658 for other-projects
- Timestamp:
- 2008-05-22T19:10:12+12:00 (16 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
other-projects/trunk/gs3-webservices-democlient/src/GS3Fedora/org/greenstone/fedora/services/FedoraConnection.java
r15222 r15658 1398 1398 // just *contain* the letter, but actually start with it: 1399 1399 String resultTitle = results[i].getTitle(0); 1400 if(resultTitle.toLowerCase().startsWith(letter.toLowerCase())) { 1400 if(resultTitle.equalsIgnoreCase(GREENSTONE_+collName+_COLLECTION)) { 1401 continue; // try next one 1402 } else if(resultTitle.toLowerCase().startsWith(letter.toLowerCase())) { 1403 // skip the collection itself 1401 1404 v.add(results[i].getPid()); 1402 1405 //LOG.debug(resultTitle); … … 1469 1472 boolean accepted = false; // accept the resultTitle found 1470 1473 1474 // skip the collection object itself, since it's not a document 1475 if(resultTitle.equalsIgnoreCase(GREENSTONE_+collName+_COLLECTION)) { 1476 accepted = false; 1477 } 1471 1478 // if titleContents is a single word and we are checking 1472 // whether resultTitle contains titleContents: 1473 if(indexOfFirstSpace == -1) { // titleContents is a single word 1479 // whether resultTitle contains titleContents: 1480 else if(indexOfFirstSpace == -1) { // titleContents is a single word 1481 1474 1482 if(!startsWith) // titles that *contain* the word titleContents 1475 1483 accepted = true; //accept all titles found … … 1479 1487 accepted = true; 1480 1488 1481 } else { // otherwise, titleContents is a phrase of >1 word, need 1489 } 1490 else { // otherwise, titleContents is a phrase of >1 word, need 1482 1491 // to check that the result title contains the entire phrase 1483 1492 if(startsWith && resultTitle.toLowerCase().startsWith( … … 1488 1497 accepted = true; 1489 1498 } 1499 1490 1500 // if the resultTitle fit the criteria, store its pid 1491 1501 if(accepted) { … … 1558 1568 // (i.e. all collections). 1559 1569 FieldSearchResult objects = null; 1570 final String[] retrieveFields = {"pid", "title"}; 1560 1571 try { 1561 1572 objects = AutoFinder.findObjects( 1562 APIA, new String[]{"pid", "title"}, maxresults, query);1573 APIA, retrieveFields, maxresults, query); 1563 1574 // collection = APIA.findObjects(new String[]{"pid", "title"}, 1564 1575 // new NonNegativeInteger(Integer.toString(maxresults)), query);
Note:
See TracChangeset
for help on using the changeset viewer.