com.gisgraphy.domain.geoloc.service.geoloc
Class StreetSearchQuery
java.lang.Object
com.gisgraphy.domain.geoloc.service.AbstractGisQuery
com.gisgraphy.domain.geoloc.service.geoloc.GeolocQuery
com.gisgraphy.domain.geoloc.service.geoloc.StreetSearchQuery
public class StreetSearchQuery
- extends GeolocQuery
a query to be execute by the @link StreetSearchEngine
- Author:
- David Masclet
Constructor Summary |
StreetSearchQuery(javax.servlet.http.HttpServletRequest req)
Build a query from an httpRequest based
on the StreetServlet parameter names |
StreetSearchQuery(com.vividsolutions.jts.geom.Point point,
double radius,
Pagination pagination,
Output output,
StreetType streetType,
java.lang.Boolean oneWay,
java.lang.String name,
StreetSearchMode streetSearchMode)
|
StreetSearchQuery(com.vividsolutions.jts.geom.Point point,
double radius,
StreetType streetType)
|
StreetSearchQuery(com.vividsolutions.jts.geom.Point point,
StreetType streetType)
|
Methods inherited from class java.lang.Object |
clone, finalize, getClass, notify, notifyAll, wait, wait, wait |
NAME_MAX_LENGTH
public static final int NAME_MAX_LENGTH
- See Also:
- Constant Field Values
StreetSearchQuery
public StreetSearchQuery(javax.servlet.http.HttpServletRequest req)
- Build a query from an httpRequest based
on the
StreetServlet
parameter names
- Parameters:
req
- the httprequest to build the query
StreetSearchQuery
public StreetSearchQuery(com.vividsolutions.jts.geom.Point point,
double radius,
Pagination pagination,
Output output,
StreetType streetType,
java.lang.Boolean oneWay,
java.lang.String name,
StreetSearchMode streetSearchMode)
- Parameters:
point
- the text to query, if the query is a number zipcode will
be searchedradius
- The radius (distance)pagination
- The pagination specification, if null : use defaultoutput
- Output
The output specification , if null : use
defaultstreetType
- the type of street to search , if null : search for all street
type.oneWay
- the oneWay type criteria of the streetname
- the name the street must containsstreetSearchMode
- the streetsearchmode for the specified name
- Throws:
An
- IllegalArgumentException
if the point is null
StreetSearchQuery
public StreetSearchQuery(com.vividsolutions.jts.geom.Point point,
double radius,
StreetType streetType)
- Parameters:
point
- the point to search street aroundradius
- The radius (distance)streetType
- the type of street to search , if null : search for all street
type.
- Throws:
An
- IllegalArgumentException
if the point is null
StreetSearchQuery
public StreetSearchQuery(com.vividsolutions.jts.geom.Point point,
StreetType streetType)
- Parameters:
point
- the point to search street aroundstreetType
- the type of street to search , if null : search for all street
type.
getStreetType
public StreetType getStreetType()
- Returns:
- the type of street we'd like to query
withStreetType
public StreetSearchQuery withStreetType(StreetType streetType)
- Parameters:
streetType
- the StreetType of street we'd like to query
- Returns:
- The current query to chain methods
getName
public java.lang.String getName()
- Returns:
- the string the street must contains (aka : '%name%').
withName
public StreetSearchQuery withName(java.lang.String name)
- Parameters:
name
- the string that the street must contains (aka : '%name%').
not taken into account if empty string or null.
- Returns:
- The current query to chain methods
- Throws:
StreetSearchException
- if length is greater than @see NAME_MAX_LENGTH
withOneWay
public StreetSearchQuery withOneWay(java.lang.Boolean oneWay)
- Parameters:
oneWay
- The oneWay type criteria of the street
- Returns:
- The current query to chain methods
getMaxLimitResult
public int getMaxLimitResult()
- Overrides:
getMaxLimitResult
in class GeolocQuery
- Returns:
- the maximum number of results that the query should return
getOneWay
public java.lang.Boolean getOneWay()
- Returns:
- the oneWay criteria
getStreetSearchMode
public StreetSearchMode getStreetSearchMode()
- Returns:
- the street
StreetSearchMode
withStreetSearchMode
public StreetSearchQuery withStreetSearchMode(StreetSearchMode streetSearchMode)
- Parameters:
streetSearchMode
- the StreetSearchMode
- Returns:
- The current query to chain methods
toString
public java.lang.String toString()
- Overrides:
toString
in class GeolocQuery
hashCode
public int hashCode()
- Overrides:
hashCode
in class GeolocQuery
equals
public boolean equals(java.lang.Object obj)
- Overrides:
equals
in class GeolocQuery
Copyright © 2010. All Rights Reserved.