|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectcom.raritantechnologies.searchApp.dataCollection.QueryProcessorGateway
ICollectionGateway implementation which uses an IQueryProcessor
to generate results for indexing or other processing.
Uses a set of IQueryList objects to generate queries
for the query processor.
The IResultSets returned from the IQueryProcessor are post-processed using an
XMLResultProcessor to map the metadata to the schema required by indexers or other
IGatewayOutputProcessors in the data collection / processing
pipeline.
<CollectionGateway name="QProc_1"
class="com.raritantechnologies.searchApp.dataCollection.QueryProcessorGateway"
pageSize="[ size of result sets to be processed ]"
maximumDocsPerSource="[ maximum number of documents to get from each source ]"
debug="[ true | false (default) | code]">
<QueryList>
<Query>
<Field ID="[a search field]" value="[value to search]" />
<Field ID="[another field]" value="[value to search]" />
</Query>
<Query>
<Field ID="[second query first field]" value="[ some value ]" />
</Query>
</QueryList>
<!-- =================================================================== -->
<!-- Alternatively - can derive the query list from another SearchSource -->
<!-- This enables the queries to be determined dynamically (i.e. look up -->
<!-- a set of user queries for alerting given a userID -->
<!-- =================================================================== -->
<QuerySource name="[ name of RTI SearchSource ]"
outputQueryFields="[ name of field(s) in query source result that have query=value parameters]" >
<!-- Describes how to create a query to the QuerySource -->
<!-- to get the list of queries for the result Data source -->
<QueryList>
<Field ID="[ search field in QuerySource ]" value="[ value to search ]" />
<!-- etc... -->
</QueryList>
<!-- Describes how query source results are mapped to a DataSource query -->
<QueryMap>
<Field ID="[ output field in Query ]" mapTo="[ name of field in Data Source ]" />
</QueryMap>
</QuerySource>
<!-- The Result data source from which information will be extracted. -->
<Sources>
<Source name="[Search Source name]"
XMLResultProcessor="[ name of optional system object XMLResultProcessor ]">
<!-- Example (Optional) XMLResultProcessor used to transform raw search result -->
<XMLResultProcessor>
<RecordTag>Record</RecordTag>
<!-- Define callback operations for the ProgrammableSAXFilter -->
<!-- "shortcut versions -assume standard classes in com.raritantechnologies.xml.sax -->
<Field ID="VdkVgwKey" callbackType="CData" >
<ParamName>VdkVgwKey</ParamName>
<Comparator class="TagComparator" >
<TagName>CIK</TagName>
</Comparator>
</Field>
<Field ID="Name" callbackType="Attribute" >
<ParamName>Name</ParamName>
<AttributeName>attrInXML</AttributeName>
<Comparator class="TagComparator" >
<TagName>Name</TagName>
</Comparator>
</Field>
<!-- Fully qualified class names versions - use if custom callbacks are used (for example) -->
<Field ID="CIK" callback="com.raritantechnologies.xml.sax.filter.callbacks.CDataCallbackOperation" >
<ParamName>CIK</ParamName>
<Comparator class="com.raritantechnologies.xml.sax.filter.comparators.TagComparator" >
<TagName>CIK</TagName>
</Comparator>
</Field>
<Field ID="SIC" callback="com.raritantechnologies.xml.sax.filter.callbacks.AttributeCallbackOperation" >
<AttributeName>StandardCode</AttributeName>
<ParamName>SIC</ParamName>
<Comparator class="com.raritantechnologies.xml.sax.filter.comparators.TagComparator" >
<TagName>SIC</TagName>
</Comparator>
</Field>
</XMLResultProcessor>
</Source>
</Sources>
</CollectionGateway>
| Constructor Summary | |
QueryProcessorGateway()
|
|
QueryProcessorGateway(ISearchFieldMap sfMap,
java.lang.String ssName,
IQueryList queryList)
|
|
| Method Summary | |
java.lang.String |
getConfigurationXML()
|
void |
initialize(org.w3c.dom.Element gatewayElem,
ISearchFieldMap sfMap)
Initialize the ICollectionGateway from a Configuration XML element. |
boolean |
isPaused()
|
void |
mapQuerySourceResultField(java.lang.String querySourceResultField,
java.lang.String dataSourceSearchField)
|
void |
pause()
|
void |
resume()
|
void |
run()
|
void |
run(ILoginInfo userInfo)
Need to have loginInfo for sources which require login/pw access. |
void |
setDataAvailable(IResultSet rs,
int currentQuery,
SearchSource ss)
|
void |
setDataComplete()
|
void |
setDEBUG(java.lang.String debugSt)
|
void |
setGatewayListener(IGatewayListener listener)
Sets the IGatewayListener interface. |
void |
setInputParameters(OrderedMap inputParams)
set input parameters... |
void |
setQueryList(IQueryList theQueryList)
|
void |
setQuerySource(SearchSource querySource)
|
void |
setQuerySourceLogin(ILoginInfo querySourceLogin)
|
void |
setQuerySourceName(java.lang.String querySourceName)
|
void |
setQuerySourcePageSize(int querySourcePSize)
|
void |
setQuerySourceQuery(OrderedMap querySourceQuery)
Sets the query used to get a set of queries from the QuerySource: |
void |
setQuerySourceResultFields(java.lang.String[] querySourceResultFields)
|
void |
setSearchSource(SearchSource theSearchSource)
|
void |
setSourceLogin(ILoginInfo theSourceLogin)
|
void |
setUseQuerySource(boolean useQuerySource)
|
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
public QueryProcessorGateway()
public QueryProcessorGateway(ISearchFieldMap sfMap,
java.lang.String ssName,
IQueryList queryList)
| Method Detail |
public void setInputParameters(OrderedMap inputParams)
ICollectionGateway
setInputParameters in interface ICollectionGatewaypublic void run()
run in interface ICollectionGatewaypublic void run(ILoginInfo userInfo)
ICollectionGateway
run in interface ICollectionGatewaypublic void setGatewayListener(IGatewayListener listener)
ICollectionGateway
setGatewayListener in interface ICollectionGateway
public void setDataAvailable(IResultSet rs,
int currentQuery,
SearchSource ss)
public void setDataComplete()
public void pause()
pause in interface ICollectionGatewaypublic void resume()
resume in interface ICollectionGatewaypublic boolean isPaused()
isPaused in interface ICollectionGateway
public void initialize(org.w3c.dom.Element gatewayElem,
ISearchFieldMap sfMap)
ICollectionGateway
initialize in interface ICollectionGatewaypublic void setQuerySourceName(java.lang.String querySourceName)
public void setQuerySource(SearchSource querySource)
public void setQuerySourceQuery(OrderedMap querySourceQuery)
public void setQuerySourceResultFields(java.lang.String[] querySourceResultFields)
public void mapQuerySourceResultField(java.lang.String querySourceResultField,
java.lang.String dataSourceSearchField)
public void setUseQuerySource(boolean useQuerySource)
public void setQuerySourceLogin(ILoginInfo querySourceLogin)
public void setQuerySourcePageSize(int querySourcePSize)
public void setSearchSource(SearchSource theSearchSource)
public void setQueryList(IQueryList theQueryList)
public void setSourceLogin(ILoginInfo theSourceLogin)
public java.lang.String getConfigurationXML()
getConfigurationXML in interface ICollectionGatewaypublic void setDEBUG(java.lang.String debugSt)
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||