Overview | Package | Class | Use | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## com.gisgraphy.domain.geoloc.service.fulltextsearch
Class FulltextQuery

    java.lang.Object
      com.gisgraphy.domain.geoloc.service.AbstractGisQuery
          com.gisgraphy.domain.geoloc.service.fulltextsearch.FulltextQuery

    @Configurable
    @Component
    public class FulltextQuery

extends AbstractGisQuery

A fulltext Query

Author:
  David Masclet
See Also:
  `Pagination`, `Output`, `IFullTextSearchEngine`

Field Summary
`static int` | `QUERY_MAX_LENGTH`

Fields inherited from class com.gisgraphy.domain.geoloc.service.AbstractGisQuery
`output, pagination`

Constructor Summary
`FulltextQuery(javax.servlet.http.HttpServletRequest req)`
`FulltextQuery(java.lang.String query)`
`FulltextQuery(java.lang.String query, Pagination pagination, Output output, java.lang.Class<? extends GisFeature> placeType, java.lang.String countryCode)`

Method Summary
`java.lang.String` | `getCountryCode()`
`java.lang.Class<? extends GisFeature>` | `getPlaceType()`
`java.lang.String` | `getQuery()`
`boolean` | `isOutputIndented()`
`FulltextQuery` | `limitToCountryCode(java.lang.String countryCode)`
`org.apache.solr.common.params.ModifiableSolrParams` | `parameterize()`
`java.lang.String` | `toQueryString()`
`java.lang.String` | `toString()`
`FulltextQuery` | `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, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait`

Field Detail

### QUERY_MAX_LENGTH

    public static final int QUERY_MAX_LENGTH

See Also:
  Constant Field Values

Constructor Detail

### FulltextQuery

    public FulltextQuery(javax.servlet.http.HttpServletRequest req)

Parameters:
  `req` - an HttpServletRequest to construct a `FulltextQuery`

### FulltextQuery

    public FulltextQuery(java.lang.String query,
                         Pagination pagination,
                         Output output,
                         java.lang.Class<? extends GisFeature> placeType,
                         java.lang.String countryCode)

Parameters:
  `query` - The text to query, if the query is a number zipcode will be searched
  `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.
  `countryCode` - Limit the search to the specified countryCode. If null or wrong it would be ignored (no check is done)
Throws:
  `An` - `IllegalArgumentException` if the query is null or empty string

### FulltextQuery

    public FulltextQuery(java.lang.String query)

Parameters:
  `query` - The text to search
Throws:
  `An` - `IllegalArgumentException` if the query is null or an empty string

Method Detail

### getQuery

    public java.lang.String getQuery()

  Returns:
    The searched text for this FullTextQuery

### limitToCountryCode

    public FulltextQuery limitToCountryCode(java.lang.String countryCode)

  Parameters:
    `countryCode` - the countryCode to set. Limit the query to the specified countrycode, if the country code is null, it will be ignored. If null or invalid, it will be ignored (no check is done)

### getCountryCode

    public java.lang.String getCountryCode()

  Returns:
    the countryCode of the country that the query will be restricted to

### isOutputIndented

    public boolean isOutputIndented()

  Returns:
    Wether the output will be indented
  See Also:
    `Output.isIndented()`

### getPlaceType

    public java.lang.Class<? extends GisFeature> getPlaceType()

  Returns:
    the placeType : it limits the search to an object of a specifict class

### withPlaceType

    public FulltextQuery 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

### toString

    public java.lang.String toString()

  Overrides:
    `toString` in class `AbstractGisQuery`

### toQueryString

    public java.lang.String toQueryString()

  Returns:
    A query string for the specified parameter (starting with '?') the name of the parameters are defined in `Constants`

### parameterize

    public org.apache.solr.common.params.ModifiableSolrParams parameterize()

  Returns:
    A Representation of all the needed parameters

Overview | Package | Class | Use | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

Copyright © 2009. All Rights Reserved.