com.micello.mapapi.standard
Class SearchManager

java.lang.Object
  extended by com.micello.mapapi.standard.SearchManager
All Implemented Interfaces:
AnnotationListener

public class SearchManager
extends java.lang.Object
implements AnnotationListener

This class is implements search functionality on the Micello maps. It takes a SearchProvider to provide search tags and lookup search results as a list of ListEntry objects. The search manager packages the results for display on the map and in the directory list.


Nested Class Summary
static interface SearchManager.SearchTagListener
          This is the callback to get search tags for the search text entry.
 
Field Summary
static java.lang.String SEARCH_LAYER_NAME
          This is the layer name for the saerch layers.
 
Constructor Summary
SearchManager()
          Constructor
 
Method Summary
 void clearSearch()
          Thie methods clears the current search.
 void connect(MicelloManager micelloManager)
          This method connects the SearchManager to the map associated with the given MicelloManager.
 void disconnect(MicelloManager micelloManager)
          This method disconnects the SearchManager from the map associated with the given MicelloManager.
 void doSearch(java.lang.String searchString)
          This method triggers a search.
 java.util.List<ListEntry> getSearchResults()
          This method returns a list of search results.
 java.lang.String getSearchString()
          This method returns the current search query.
 void getSearchTags(SearchManager.SearchTagListener listener)
          This method retrieves the current search tags.
 boolean isSearchActive()
          This method returns true if a search is active.
 void onHideAnnotation(AnnotationLayer annotationLayer)
          This method is called when an annotation layer is set to hidden from shown.
 void onShowAnnotation(AnnotationLayer annotationLayer)
          This method is called when a annotation layer is set to shown from hidden.
 void setSearchProvider(SearchProvider searchProvider)
          This method sets the search provider.
 void setSearchResults(java.lang.String searchString, java.util.List<ListEntry> searchResults)
          This method should be used by the search provider to pass results to the search manager.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

SEARCH_LAYER_NAME

public static final java.lang.String SEARCH_LAYER_NAME
This is the layer name for the saerch layers.

See Also:
Constant Field Values
Constructor Detail

SearchManager

public SearchManager()
Constructor

Method Detail

connect

public void connect(MicelloManager micelloManager)
This method connects the SearchManager to the map associated with the given MicelloManager.

Parameters:
micelloManager - The MicelloManager associated with the map.

disconnect

public void disconnect(MicelloManager micelloManager)
This method disconnects the SearchManager from the map associated with the given MicelloManager.

Parameters:
micelloManager - The MicelloManager associated with the map.

setSearchProvider

public void setSearchProvider(SearchProvider searchProvider)
This method sets the search provider.


getSearchTags

public void getSearchTags(SearchManager.SearchTagListener listener)
This method retrieves the current search tags. The results are returned asynchronously to the SearchTagListener passed.


doSearch

public void doSearch(java.lang.String searchString)
This method triggers a search.


isSearchActive

public boolean isSearchActive()
This method returns true if a search is active.


clearSearch

public void clearSearch()
Thie methods clears the current search.


getSearchString

public java.lang.String getSearchString()
This method returns the current search query.


getSearchResults

public java.util.List<ListEntry> getSearchResults()
This method returns a list of search results.


onShowAnnotation

public void onShowAnnotation(AnnotationLayer annotationLayer)
This method is called when a annotation layer is set to shown from hidden.

Specified by:
onShowAnnotation in interface AnnotationListener

onHideAnnotation

public void onHideAnnotation(AnnotationLayer annotationLayer)
This method is called when an annotation layer is set to hidden from shown.

Specified by:
onHideAnnotation in interface AnnotationListener

setSearchResults

public void setSearchResults(java.lang.String searchString,
                             java.util.List<ListEntry> searchResults)
This method should be used by the search provider to pass results to the search manager.