com.gisgraphy.domain.geoloc.service.geoloc
Class GeolocQuery

java.lang.Object
  extended by com.gisgraphy.domain.geoloc.service.AbstractGisQuery
      extended by com.gisgraphy.domain.geoloc.service.geoloc.GeolocQuery
Direct Known Subclasses:
StreetSearchQuery

public class GeolocQuery
extends AbstractGisQuery

A GeolocQuery Query

Author:
David Masclet
See Also:
Pagination, Output

Field Summary
static double DEFAULT_RADIUS
          Default radius in meters
 
Fields inherited from class com.gisgraphy.domain.geoloc.service.AbstractGisQuery
output, pagination
 
Constructor Summary
GeolocQuery(javax.servlet.http.HttpServletRequest req)
           
GeolocQuery(com.vividsolutions.jts.geom.Point point)
          Constructor with default Pagination, Output, radius and placetype
GeolocQuery(com.vividsolutions.jts.geom.Point point, double radius)
          Constructor with default Pagination, Output, and placetype (see GisgraphyConfig.defaultGeolocSearchPlaceTypeClass
GeolocQuery(com.vividsolutions.jts.geom.Point point, double radius, Pagination pagination, Output output, java.lang.Class<? extends GisFeature> placeType)
           
 
Method Summary
 boolean equals(java.lang.Object obj)
           
 java.lang.Double getLatitude()
           
 java.lang.Double getLongitude()
           
 int getMaxLimitResult()
           
 java.lang.Class<? extends GisFeature> getPlaceType()
           
 com.vividsolutions.jts.geom.Point getPoint()
           
 double getRadius()
           
 boolean hasDistanceField()
           
 int hashCode()
           
 boolean isOutputIndented()
           
 java.lang.String toString()
           
 GeolocQuery withDistanceField(boolean distanceField)
           
 GeolocQuery withPlaceType(java.lang.Class<? extends GisFeature> placeType)
           
 
Methods inherited from class com.gisgraphy.domain.geoloc.service.AbstractGisQuery
getFirstPaginationIndex, getLastPaginationIndex, getMaxNumberOfResults, getOutput, getOutputFormat, getOutputLanguage, getOutputStyle, getPagination, withOutput, withPagination
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 

Field Detail

DEFAULT_RADIUS

public static final double DEFAULT_RADIUS
Default radius in meters

See Also:
Constant Field Values
Constructor Detail

GeolocQuery

public GeolocQuery(javax.servlet.http.HttpServletRequest req)
Parameters:
req - an HttpServletRequest to construct a GeolocQuery

GeolocQuery

public GeolocQuery(com.vividsolutions.jts.geom.Point point,
                   double radius,
                   Pagination pagination,
                   Output output,
                   java.lang.Class<? extends GisFeature> placeType)
Parameters:
point - the point to query around
radius - The radius (distance) in meters
pagination - The pagination specification, if null : use default
output - Output The output specification , if null : use default
placeType - the type of gis to search , if null : search for all place type.
Throws:
An - IllegalArgumentException if the point is null

GeolocQuery

public GeolocQuery(com.vividsolutions.jts.geom.Point point,
                   double radius)
Constructor with default Pagination, Output, and placetype (see GisgraphyConfig.defaultGeolocSearchPlaceTypeClass

Parameters:
point - The point from which we want to find GIS Object
radius - The radius (distance) in meters

GeolocQuery

public GeolocQuery(com.vividsolutions.jts.geom.Point point)
Constructor with default Pagination, Output, radius and placetype

Parameters:
point - The point from which we want to find GIS Object
See Also:
DEFAULT_RADIUS
Method Detail

hashCode

public int hashCode()
Overrides:
hashCode in class AbstractGisQuery

equals

public boolean equals(java.lang.Object obj)
Overrides:
equals in class AbstractGisQuery

getLatitude

public java.lang.Double getLatitude()
Returns:
The latitude (north-south) .
See Also:
getLongitude()

getLongitude

public java.lang.Double getLongitude()
Returns:
Returns the longitude (east-West).
See Also:
getLongitude()

getPoint

public com.vividsolutions.jts.geom.Point getPoint()
Returns:
The point from which we want to find GIS Object

getRadius

public double getRadius()
Returns:
The radius

isOutputIndented

public boolean isOutputIndented()
Returns:
Wether the output will be indented
See Also:
Output.isIndented()

toString

public java.lang.String toString()
Overrides:
toString in class AbstractGisQuery

getPlaceType

public java.lang.Class<? extends GisFeature> getPlaceType()
Returns:
the placeType : it limits the search to an object of a specific class

withPlaceType

public GeolocQuery withPlaceType(java.lang.Class<? extends GisFeature> placeType)
Parameters:
placeType - The placeType to set, if null, search for all placetype
Returns:
The current query to chain methods

getMaxLimitResult

public int getMaxLimitResult()
Overrides:
getMaxLimitResult in class AbstractGisQuery
Returns:
the maximum number of results that the query should return

hasDistanceField

public boolean hasDistanceField()
Returns:
true if the distance should be calculate or not

withDistanceField

public GeolocQuery withDistanceField(boolean distanceField)
Parameters:
distanceField - If the distance should be include or not
Returns:
Whether the distance field should be output


Copyright © 2010. All Rights Reserved.