com.endeca.mobile.services.query.impl
Class GeoLookupPreProcessor

java.lang.Object
  extended by com.endeca.mobile.services.query.impl.GeoLookupPreProcessor
All Implemented Interfaces:
QueryProcessor

public class GeoLookupPreProcessor
extends java.lang.Object
implements QueryProcessor

This processor removes the kilometers_to_ and miles_to_ properties that the MDEX returns when a geo filter or geo sort is applied, and adds 2 new properties that are the name of the geo filter property with ".distance_mi" or ".distance_km" appended (i.e. for the sort Ns=store.geocode(42.3621088,-71.0810343), the property on the record would be store.geocode.distance_mi)


Nested Class Summary
 
Nested classes/interfaces inherited from interface com.endeca.b2creference.services.query.QueryProcessor
QueryProcessor.PostProcessStatus
 
Constructor Summary
GeoLookupPreProcessor()
           
 
Method Summary
 org.springframework.core.io.Resource getCacheFileResource()
           
 java.lang.String getGeocodeProp()
           
 double getGeoFilterRadiusKm()
           
 java.lang.String getLocationParameter()
           
 QueryProcessor.PostProcessStatus postProcessResults(javax.servlet.http.HttpServletRequest request, com.endeca.content.ene.ENEContentQuery query, PageResult pageResult, com.endeca.soleng.urlformatter.UrlState urlState)
           
 void preProcessQuery(javax.servlet.http.HttpServletRequest request, com.endeca.content.ene.ENEContentQuery contentQuery)
           
 void setCacheFileResource(org.springframework.core.io.Resource cacheFileResource)
           
 void setGeocodeProp(java.lang.String geocodeProp)
           
 void setGeoFilterRadiusKm(double geoFilterRadiusKm)
           
 void setLocationParameter(java.lang.String locationParameter)
           
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

GeoLookupPreProcessor

public GeoLookupPreProcessor()
Method Detail

postProcessResults

public QueryProcessor.PostProcessStatus postProcessResults(javax.servlet.http.HttpServletRequest request,
                                                           com.endeca.content.ene.ENEContentQuery query,
                                                           PageResult pageResult,
                                                           com.endeca.soleng.urlformatter.UrlState urlState)
Specified by:
postProcessResults in interface QueryProcessor

preProcessQuery

public void preProcessQuery(javax.servlet.http.HttpServletRequest request,
                            com.endeca.content.ene.ENEContentQuery contentQuery)
Specified by:
preProcessQuery in interface QueryProcessor

getGeoFilterRadiusKm

public double getGeoFilterRadiusKm()

setGeoFilterRadiusKm

public void setGeoFilterRadiusKm(double geoFilterRadiusKm)

getLocationParameter

public java.lang.String getLocationParameter()

setLocationParameter

public void setLocationParameter(java.lang.String locationParameter)

getGeocodeProp

public java.lang.String getGeocodeProp()

setGeocodeProp

public void setGeocodeProp(java.lang.String geocodeProp)

getCacheFileResource

public org.springframework.core.io.Resource getCacheFileResource()

setCacheFileResource

public void setCacheFileResource(org.springframework.core.io.Resource cacheFileResource)