Subversion Repositories SmartDukaan

Rev

Rev 2949 | Rev 3246 | Go to most recent revision | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 2949 Rev 3223
Line 217... Line 217...
217
						continue;
217
						continue;
218
				facetValueCountMap.put(subNode.getAttributes().getNamedItem("name").getNodeValue(), Integer.parseInt(subNode.getTextContent()));
218
				facetValueCountMap.put(subNode.getAttributes().getNamedItem("name").getNodeValue(), Integer.parseInt(subNode.getTextContent()));
219
			}
219
			}
220
			facetMap.put(facetName, facetValueCountMap);
220
			facetMap.put(facetName, facetValueCountMap);
221
			}
221
			}
222
		System.out.println(facetMap);
-
 
223
		
-
 
224
		this.numberOfResults  = this.getTotalResults();
222
		this.numberOfResults  = this.getTotalResults();
225
		
223
		
226
		facetMap = removeUnwantedFacets(facetMap, numberOfResults);
224
		facetMap = removeUnwantedFacets(facetMap, numberOfResults);
227
		System.out.println(facetMap);
-
 
228
		return facetMap;
225
		return facetMap;
229
		}
226
		}
230
	
227
	
231
	public List<String> getResultMap() {
228
	public List<String> getResultMap() {
232
		resultMap = new LinkedList<String>();
229
		resultMap = new LinkedList<String>();
Line 249... Line 246...
249
		for(int i=0; i<nodes.getLength(); i++) {
246
		for(int i=0; i<nodes.getLength(); i++) {
250
			Node node = nodes.item(i);
247
			Node node = nodes.item(i);
251
			String docID = node.getFirstChild().getTextContent();
248
			String docID = node.getFirstChild().getTextContent();
252
			resultMap.add(docID);	
249
			resultMap.add(docID);	
253
 		}
250
 		}
254
		System.out.println("resultMap is " + resultMap);
-
 
255
		return resultMap;
251
		return resultMap;
256
	}
252
	}
257
 
253
 
258
	public HashMap<String, Double> getPriceStatsMap() {
254
	public HashMap<String, Double> getPriceStatsMap() {
259
		HashMap<String, Double> priceStatsMap = new HashMap<String, Double>();
255
		HashMap<String, Double> priceStatsMap = new HashMap<String, Double>();
Line 280... Line 276...
280
			
276
			
281
			String parameter = node.getAttributes().getNamedItem("name").getNodeValue();
277
			String parameter = node.getAttributes().getNamedItem("name").getNodeValue();
282
			String value = node.getTextContent();
278
			String value = node.getTextContent();
283
			priceStatsMap.put(parameter, Double.parseDouble(value));	
279
			priceStatsMap.put(parameter, Double.parseDouble(value));	
284
 		}
280
 		}
285
		System.out.println("priceStatsMap is " + priceStatsMap);
-
 
286
		return priceStatsMap;
281
		return priceStatsMap;
287
	}
282
	}
288
 
283
 
289
	public HashMap<String,Integer> getRangeQueryResultMap() {
284
	public HashMap<String,Integer> getRangeQueryResultMap() {
290
		HashMap<String, Integer> rangeQueryResultMap = new HashMap<String,Integer>();
285
		HashMap<String, Integer> rangeQueryResultMap = new HashMap<String,Integer>();
Line 311... Line 306...
311
			String query = node.getAttributes().getNamedItem("name").getNodeValue();
306
			String query = node.getAttributes().getNamedItem("name").getNodeValue();
312
			String docCount = node.getTextContent();
307
			String docCount = node.getTextContent();
313
 
308
 
314
			rangeQueryResultMap.put(query,Integer.parseInt(docCount));	
309
			rangeQueryResultMap.put(query,Integer.parseInt(docCount));	
315
 		}
310
 		}
316
		System.out.println("rangeQueryResultMap is " + rangeQueryResultMap);
-
 
317
		return rangeQueryResultMap;
311
		return rangeQueryResultMap;
318
		
312
		
319
	}
313
	}
320
 
314
 
321
	/**
315
	/**