com.gisgraphy.domain.geoloc.service.geoloc
Class StreetSearchEngine

java.lang.Object
  extended by com.gisgraphy.domain.geoloc.service.geoloc.StreetSearchEngine
All Implemented Interfaces:
IStreetSearchEngine, IQueryProcessor<StreetSearchQuery>

public class StreetSearchEngine
extends java.lang.Object
implements IStreetSearchEngine

Default (threadsafe) implementation of IStreetSearchEngine.

Author:
David Masclet

Field Summary
protected static org.slf4j.Logger logger
          The logger
 
Constructor Summary
StreetSearchEngine()
           
 
Method Summary
 void executeAndSerialize(StreetSearchQuery query, java.io.OutputStream outputStream)
          Execute the query and serialize the results in an OutputStream.
 StreetSearchResultsDto executeQuery(StreetSearchQuery query)
          Execute the query and returns a StreetSearchResultsDto
 java.lang.String executeQueryToString(StreetSearchQuery query)
          Execute the query and returns the results as String.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

logger

protected static final org.slf4j.Logger logger
The logger

Constructor Detail

StreetSearchEngine

public StreetSearchEngine()
Method Detail

executeQuery

public StreetSearchResultsDto executeQuery(StreetSearchQuery query)
                                    throws ServiceException
Description copied from interface: IStreetSearchEngine
Execute the query and returns a StreetSearchResultsDto

Specified by:
executeQuery in interface IStreetSearchEngine
Parameters:
query - The StreetSearchQuery to execute
Returns:
The StreetSearchResultsDto Objects.
Throws:
ServiceException - If an error occurred

executeAndSerialize

public void executeAndSerialize(StreetSearchQuery query,
                                java.io.OutputStream outputStream)
                         throws ServiceException
Description copied from interface: IQueryProcessor
Execute the query and serialize the results in an OutputStream. It is thread safe and can be used in a servlet container (e.g : serialize on an HttpResource's OutputStream

Specified by:
executeAndSerialize in interface IQueryProcessor<StreetSearchQuery>
Parameters:
query - the query to execute
outputStream - the outputstream we want to serialize in
Throws:
ServiceException - If an error occurred

executeQueryToString

public java.lang.String executeQueryToString(StreetSearchQuery query)
                                      throws ServiceException
Description copied from interface: IQueryProcessor
Execute the query and returns the results as String. It is thread safe

Specified by:
executeQueryToString in interface IQueryProcessor<StreetSearchQuery>
Parameters:
query - the query to execute
Throws:
ServiceException - If an error occurred


Copyright © 2010. All Rights Reserved.