Esri Geoportal Server
1.2.9

com.esri.gpt.control.georss
Class JsonSearchEngine

java.lang.Object
  extended by com.esri.gpt.control.georss.JsonSearchEngine
Direct Known Subclasses:
DcatJsonSearchEngine

public abstract class JsonSearchEngine
extends Object

JSON search engine.

Uses json.engine.className parameter from gpt.xml to create instance. Creates default instance if parameter is empty.

Two parameters: json.meta.lucene and json.meta.catalog from gpt.xml configuration file determines whether certain family of output parameters is allowed to be print to the output or not. Default: true.

See Also:
ExtJsonFeedWriter

Constructor Summary
JsonSearchEngine()
           
 
Method Summary
static JsonSearchEngine createInstance()
          Creates instance of the search engine.
protected  IFeedRecords doSearch(HttpServletRequest request, HttpServletResponse response, RequestContext context, RestQuery query)
          Performs search operation.
protected static String getConfigParam(String paramName)
          Gets gpt.xml configuration parameter.
protected  boolean isCatalogMetaAllowed()
          Checks if catalog data is allowed.
protected  boolean isLuceneMetaAllowed()
          Checks if Lucene data is allowed.
protected  void loadCatalog(RequestContext context, IFeedRecords records)
          Loads catalog meta.
protected  void loadStdFieldMeta(List<IFeedRecords.FieldMeta> fields)
          Loads standard field meta info.
abstract  IFeedRecords search(HttpServletRequest request, HttpServletResponse response, RequestContext context, RestQuery query)
          Performs search operation.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

JsonSearchEngine

public JsonSearchEngine()
Method Detail

createInstance

public static JsonSearchEngine createInstance()
Creates instance of the search engine.

Returns:
instance of JsonSearchEngine

search

public abstract IFeedRecords search(HttpServletRequest request,
                                    HttpServletResponse response,
                                    RequestContext context,
                                    RestQuery query)
                             throws Exception
Performs search operation.

Parameters:
request - HTTP servlet request
response - HTTP servlet response
context - request context
query - query
Returns:
records
Throws:
Exception - if searching fails

loadStdFieldMeta

protected void loadStdFieldMeta(List<IFeedRecords.FieldMeta> fields)
Loads standard field meta info.

Parameters:
fields - list of fields

doSearch

protected IFeedRecords doSearch(HttpServletRequest request,
                                HttpServletResponse response,
                                RequestContext context,
                                RestQuery query)
                         throws Exception
Performs search operation.

Parameters:
request - HTTP servlet request
response - HTTP servlet response
context - request context
query - query
Returns:
records
Throws:
Exception - if searching fails

loadCatalog

protected void loadCatalog(RequestContext context,
                           IFeedRecords records)
                    throws SQLException
Loads catalog meta.

Parameters:
context - request context
records - records
Throws:
SQLException - if accessing catalog database fails

getConfigParam

protected static String getConfigParam(String paramName)
Gets gpt.xml configuration parameter.

Parameters:
paramName - parameter name
Returns:
parameter value

isLuceneMetaAllowed

protected boolean isLuceneMetaAllowed()
Checks if Lucene data is allowed. Reads "json.meta.lucene" configuration parameter.

Returns:
true if data is allowed

isCatalogMetaAllowed

protected boolean isCatalogMetaAllowed()
Checks if catalog data is allowed. Reads "json.meta.catalog" configuration parameter.

Returns:
true if data is allowed

Esri Geoportal Server
1.2.9

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