Esri Geoportal Server
1.0

Package com.esri.gpt.catalog.search

Package contains classes pertaining to performing a search on the selected search interface.

See:
          Description

Interface Summary
IMapViewer The Interface IMapViewer.
ISearchFilter The Interface ISearchFilter.defines filters that will be used by the Search Criteria.
ISearchFilterAuthURI The Interface ISearchFilterAuthURI.
ISearchFilterContentTypes The Interface ISearchFilterContentTypes.
ISearchFilterKeyword The Interface ISearchFilterKeyword.
ISearchFilterPagination The Interface ISearchFilterPagination.
ISearchFilterSort The Interface ISearchFilterSort.
ISearchFilterSpatialObj The Interface ISearchFilterSpatialObj.
ISearchFilterTemporal The Interface ISearchFilterTemporal.
ISearchFilterThemes The Interface ISearchFilterThemes.
ISearchFilterURI The Interface ISearchURI.
ISearchSaveRepository The Interface ISearchHibernation.
 

Class Summary
ASearchEngine Defines operations to be carried out by the search end point.
GetRecordsGenerator Generates a CSW GetRecords request from a discovery query.
GptRepository The Class GptRepository.
MapViewerConfigs The Class MapViewerConfigs.
MapViewerFactory Instantiates mapviewer instances and searches for an instance that supports the url/servicetype.
MapViewerFlex The Class MapViewerFlex.
OpenSearchProperties Maintains property information supporting OpenSearch response elements.
ResourceIdentifier Identifies resource and content types.
ResourceLink Represents a bind-able link associated with a document or resource.
ResourceLinkBuilder Builds the collection of bind-able links associated with a document or resource.
ResourceLinks Represents a collection of bind-able links associated with a document or resource.
RestUrlBuilder Builds the query parameters for a rest query URL.
SavedSearchCriteria The Class SearchSaveBean.
SavedSearchCriterias The Class SavedSearchCriterias.
SearchConfig The Class SearchConfig.
SearchCriteria The class SearchCriteria.
SearchEngineCSW The class SearchEngineCSW.
SearchEngineExternalCsw The Class SearchEngineExternalCsw.
SearchEngineFactory A factory for creating Search Data Access Objects.
SearchEngineLocal CSW based search engine that executes against the local GPT catalog.
SearchEngineRest The class SearchEngineCSW.
SearchFilterConnection The Class SearchFilterConnection.
SearchFilterContentTypes The Class SearchFilterContentTypes.
SearchFilterHarvestSites The Class SearchFilterHarvestSites.
SearchFilterHarvestSpatial The Class SearchFilterHarvestSpatial.
SearchFilterKeyword Class representing keyword filter in search.
SearchFilterPagination The Class SearchFilterPagination.
SearchFiltersList The Class SearchFiltersList.
SearchFilterSort The Class SearchFilterSort.
SearchFilterSpatial The Class SearchFilterSpatial.
SearchFilterTemporal The Class SearchFilterTemporal.
SearchFilterThemeTypes The Class SearchFilterTheme.
SearchGptXslProfile The Class SearchGptProfile.
SearchGptXslProfiles The Class SearchGptProfiles.
SearchParameterMap The Class SearchParameterMap.
SearchPointOptions The Class SearchPointOptions.
SearchPointOptionsIo The Class SearchPointOptionsIo.
SearchRequestDefinition The Class SearchRequestDefinition.
SearchResult The Class SearchResult.
SearchResultRecord The Class SearchResultRecord.
SearchResultRecords The Class SearchResultRecords.
SearchSaveBean The Class SearchSaveBean.
SearchSaveRpstryFactory The Class SearchSaveRepository.
XsltResourceIdentifier Identifies resource and content type
 

Enum Summary
ISearchFilterKeyword.KeySearchTextOptions The keys of the search text options.
ISearchFilterSpatialObj.OptionsBounds Options of what bounds to use for search.
ResourceLinkBuilder.ServiceType Service types.
SearchCriteria.OptionSaveLocation Where to save the search criteria to.
SearchEngineCSW.AimsContentTypes ArcIMS content types
SearchEngineCSW.Scheme The Enum Scheme.
SearchEngineCSW.SEARCH_OPERATION The Enum SEARCH_OPERATION.
SearchFilterConnection.OptionConnect The Enum OptionConnect.
SearchFilterSort.OptionsSort The Enum OptionsSort.
SearchFilterSpatial.SaveParams The Enum SaveParams.
SearchFilterTemporal.SelectedTimePeriod The Enum SelectedTimePeriod.
 

Exception Summary
SearchException General exception class used by package.
SearchPointOptionsException The Class SearchPointOptionsException.
 

Package com.esri.gpt.catalog.search Description

Package contains classes pertaining to performing a search on the selected search interface.

Adding a Custom Search Filter to the Search Criteria

An example of how to do this can be found in the GPT help documentation called "Add Custom Search Criteria". The following describes how to add a new Search Filter. It's not the only way. The following describes how to achieve this with or without the source code.

Create a new search filter object that either inherits from ISearchFilter, or from one of the SearchFilter* classes. If JSF is being used, the custom filter class can be made into a managed bean so that its properties can be set on the Search JSP page.

The new custom filter should then be added to the searchCriteria.

Search Criteria searchCriteria = new SearchCriteria(); CustomFilter filter = new CustomFilter(); searchCriteria.getMisselleniousFilters().add(filter);

If you are using JSF and you can do the above by adding the custom filter managed bean into the Search Criteria's misselleniousFilters list in the WEB-INF/gpt-faces-config.xml.

During Search, your filter will be translated into an xml representation togather with all the other filters. The xsd for this representation can be fould at WEB-INF/class/gpt/search/gptNativeSearch.xsd. This xml is then transformed into a CSW request using the gpt2csw_OGCCore.xslt. Your last step will therefore be to customize the xslt so that your custom search filter parameters can affect the query.

WARNING: Its important to have all your custom filter classes in the miscellaneous filter list have unique classnames (Object.class.getCanonicalName). If a search criteria is saved, the uniqueness in the names of the classes in the miscellaneous filter list will be important in recreating the new saved search criteria. NOTE: In order for your search filter to work, you may have to

Adding a Custom Search Engine

Search Engine objects are objects that take in a search criteria object and return an object with search results. Currently there are various CSW search engines implemented. Newly introduced in version 10 is the SearchEngineRest which does not use a CSW kind of workflow. If you would like to implement your custom search engine, you have to :-


Search Engine Initialization for Search


NOTE: The Search Factory is fail safe, if a search engine is not found, then the default search engine will be used for a search. If this is the case, the behaviour is logged on the server but the user does not see any error.

Adding a Custom Map Viewer

Inherit from IMapViewer (Read IMapViewer javadoc for more info). Add the class and configurations to gpt.xml mapViewer/instance. There is an example in gpt.xml


Esri Geoportal Server
1.0

Copyright 2011 Environmental Systems Research Institute. All rights reserved. Use is subject to license terms.