Esri Geoportal Server
1.0

com.esri.gpt.catalog.lucene
Class ParserAdaptorInfo

java.lang.Object
  extended by com.esri.gpt.catalog.lucene.ParserAdaptorInfo

public class ParserAdaptorInfo
extends Object

Parser adaptor info.

Stores all the information neccesary to create instance of the parser adaptor. Parser adaptor is a mechanizm to delegate query parsing to another mechanizm.

Adaptor is never accessible directly. Instead, an instance of IParserProxy is created and used to submit query through the adaptor to the external mechanizm.

Adaptor class has to have one mandatory method String parse(String queryTerm), and may have optional method void init(Properties attributes).

Typically, adaptors are defined in Lucene configuration node, which may look like on the example below:


  <lucene
     indexLocation="c:/gpt9/lucene-index/catalog1"
     analyzerClassName="org.apache.lucene.analysis.standard.StandardAnalyzer">
     <adaptor name="ontology" className="com.esri.gpt.catalog.lucene.StandardParserAdaptor">
        <attribute key="baseUrl" value="http://localhost:8080/OntologyService/query?term="/>
     </adaptor>
  </lucene>
 


Constructor Summary
ParserAdaptorInfo()
           
 
Method Summary
 IParserProxy createParserProxy()
          Creates instance of parser proxy corresponding to the definition.
 StringAttributeMap getAttributes()
          Gets attributes.
 String getClassName()
          Gets class name.
 String getName()
          Gets adaptor name.
 void setAttributes(StringAttributeMap attributes)
          Sets attributes.
 void setClassName(String className)
          Sets class name.
 void setName(String name)
          Sets adaptor name.
 String toString()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

ParserAdaptorInfo

public ParserAdaptorInfo()
Method Detail

getName

public String getName()
Gets adaptor name.

Returns:
adaptor name

setName

public void setName(String name)
Sets adaptor name.

Parameters:
name - adaptor name

getClassName

public String getClassName()
Gets class name.

Returns:
class name

setClassName

public void setClassName(String className)
Sets class name.

Parameters:
className - adaptor class name

getAttributes

public StringAttributeMap getAttributes()
Gets attributes.

Returns:
attributes

setAttributes

public void setAttributes(StringAttributeMap attributes)
Sets attributes.

Parameters:
attributes - attributes

toString

public String toString()
Overrides:
toString in class Object

createParserProxy

public IParserProxy createParserProxy()
Creates instance of parser proxy corresponding to the definition.

Returns:
parser proxy or null if unable to create parser proxy

Esri Geoportal Server
1.0

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