Changeset 2275
- Timestamp:
- 2001-04-03T22:29:45+12:00 (23 years ago)
- Location:
- trunk/java-client/org/nzdl/gsdl/SimpleGraphicalClient
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/java-client/org/nzdl/gsdl/SimpleGraphicalClient/QueryHistoryItem.java
r2251 r2275 33 33 private String collectionName; 34 34 private long numOfHits; 35 private String queryType; // boolean or ranked 36 private boolean stemmed; 37 private boolean caseMatched; 35 38 36 39 // time … … 38 41 // etc 39 42 40 public QueryHistoryItem(Query newQuery, Date newDate, String newCollectionName, String newUser, long newNumOfHits ) {43 public QueryHistoryItem(Query newQuery, Date newDate, String newCollectionName, String newUser, long newNumOfHits, String newQueryType, boolean newStemmed, boolean newCaseMatched) { 41 44 query = newQuery; 42 45 date = newDate; … … 44 47 collectionName = newCollectionName; 45 48 numOfHits = newNumOfHits; 49 queryType = newQueryType; 50 stemmed = newStemmed; 51 caseMatched = newCaseMatched; 46 52 } 47 53 … … 66 72 } 67 73 74 public String getQueryType() { 75 return queryType; 76 } 77 78 public boolean getStemmed() { 79 return stemmed; 80 } 81 82 public boolean getCaseMatched() { 83 return caseMatched; 84 } 85 68 86 public String toString () { 69 87 return( user + " " + date + " " + collectionName +" terms"); -
trunk/java-client/org/nzdl/gsdl/SimpleGraphicalClient/QueryHistoryModel.java
r2256 r2275 35 35 private String TERMS = "Terms"; 36 36 private String HITS = "Hits"; 37 private String QUERYTYPE = "Type"; 38 private String STEMMED = "Stemmed?"; 39 private String CASEMATCHED = "Case match?"; 37 40 38 41 … … 44 47 columnTitles.add( COLLECTION); 45 48 columnTitles.add( TERMS); 49 columnTitles.add(QUERYTYPE); 50 columnTitles.add(STEMMED); 51 columnTitles.add(CASEMATCHED); 46 52 columnTitles.add( HITS); 47 53 } … … 76 82 if (column == columnTitles.indexOf(TERMS)) return new Query(historyItem.getQuery().toString()); 77 83 if (column == columnTitles.indexOf(HITS)) return new Long(historyItem.getNumOfHits()); 84 if (column == columnTitles.indexOf(QUERYTYPE)) return new String(historyItem.getQueryType()); 85 if (column == columnTitles.indexOf(STEMMED)) return new Boolean(historyItem.getStemmed()); 86 if (column == columnTitles.indexOf(CASEMATCHED)) return new Boolean( historyItem.getCaseMatched()); 78 87 79 88 // something has gone wrong if we get here! -
trunk/java-client/org/nzdl/gsdl/SimpleGraphicalClient/SearchPanel.java
r2274 r2275 147 147 queryType = NzdlPreferences.getInstance().getString(NzdlConstants.QUERYTYPE); 148 148 } 149 System.err.println(queryType);150 149 // check integrity of queryType 151 if (!((queryType.equals(NzdlConstants.RANKED_STRING)) | (queryType.equals(NzdlConstants.BOOLEAN_STRING)))) 150 if (!((queryType.equals(NzdlConstants.RANKED_STRING)) | (queryType.equals(NzdlConstants.BOOLEAN_STRING)))) { 152 151 // preferences may have been corrupted! 153 152 queryType = NzdlConstants.DEFAULT_QUERY_TYPE; 153 } 154 154 boolean stemming = NzdlConstants.DEFAULT_STEMMING; 155 155 if (NzdlPreferences.getInstance().isBoolean(NzdlConstants.STEMMING)) … … 311 311 312 312 313 csModel.getQueryHistoryModel().add( new QueryHistoryItem(new Query(queryString), new Date(), collectionName, "user",docIDs.size() ));313 csModel.getQueryHistoryModel().add( new QueryHistoryItem(new Query(queryString), new Date(), collectionName, "user",docIDs.size(),buttonGroup.getSelection().getActionCommand(),stemCheckBox.isSelected(), caseFoldCheckBox.isSelected() )); 314 314 315 315 titleMap.clear();
Note:
See TracChangeset
for help on using the changeset viewer.