|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectcom.raritantechnologies.verity.collection.QueryProcessorXMLGateway
Builds XML records from a search source or sources. Uses a set of queries to generate results which are then formatted into XML records. Can create XML with multiple levels, possibly from multiple search sources.
XML Configuration Template:
<CollectionGateway name="QProc_1" class="com.raritantechnologies.verity.collection.QueryProcessorXMLGateway"
useCDataWrapper="true|false(default)"
maxDocs="[ maximum number of documents to process ]"
pageSize="[ size of result sets ]" >
<QueryList>
<Query>KY=hypertension|foo=bar</Query>
</QueryList>
<RecordSchema rootElement="Records" >
<Element tagname="Record" sourceName="filteredMedline" >
<!-- '+' character = concatenate field values -->
<Element tagname="VdkVgwKey" fieldID="ISSUE+PAGES" />
<Element tagname="Title" fieldID="title" />
<!-- uses field value as name of tag -->
<Element tagField="Score" prepend="" append="_score" spaceChar="_" />
<!-- Nested element: -->
<Element tagname="Nested" sourceName="somethingElse" queryParams="KY=$KY|AU=$AU"
groupBy="[ result field to group nested elements by ]" >
<Element tagname="Author" fieldID="AU" />
</Element>
<!-- This result field is an XML field: added as nested XML to output -->
<Element tagname="docXML" fieldID="docXML" isXMLField="true" />
<!-- ============= -->
<!-- Full Text URL -->
<!-- ============= -->
<Element tagname="FullText" isFullTextField="true" >
<!-- This uses a Result Field ID as the URL value -->
<URLType type="direct" >
<URLParam fieldID="URL" />
</URLType>
<!-- This type looks up a URL from another source -->
<URLType="lookup" >
<URLParam sourceName="LocationLookup"
queryParams="item_id=$item_id"
urlField="location" />
<Params>
<Param fieldID="sourceType" matchValues="source=ExternalURL"
sourceName="SourceTypeLookup"
queryParams="item_id=$item_id"
resultFields="source" matchOnly="true" />
</Params>
</URLType>
<!-- This type builds a URL from a base url and a set of parameters -->
<URLType type="documentum" >
<Params>
<!-- Matching field types -->
<Param fieldID="[some field]" matchOnly="true" /> <!-- matches on existence of field -->
<Param fieldID="[match field]" matchValue="[matchValue]" />
<Param fieldID="[match field]" matchValues="[resultFieldA=valA|resultFieldB=|valB]"
sourceName="[A nested search source]"
queryParams="someparam=$fieldID|otherParam=$otherFieldID"
resultFields="resultFieldA|resultFieldB" matchOnly="false" /> <-- Also output this one -->
<Param fieldID="[abstract field ID]" urlField="[name in url]" />
<Param fieldID="object_id" sourceName="[A nested search source]"
queryParams="someparam=$fieldID|otherParam=$otherFieldID"
resultFields="resultFieldA|resultFieldB" />
</Params>
<FixedParam name="contentType" value="DCTM" />
<Servlet href="http://someHost/someServlet.jsp" />
</URLType>
</Element>
</Element>
</RecordSchema>
<!-- informs the XMLResult on how to respond to getValue( ) or getValues( ) -->
<XMLResultMap>
<!-- One or more fields -->
<Param fieldID="[ result field ID ]" xPath="[ xPath within initial XML ]" multiple="[true|false(default) ]" />
<!-- One or more nested results -->
<NestedResult fieldID="[ name nested Result field ]" xPath="[ path to nested tag ]" />
</XMLResultMap>
</CollectionGateway>
| Constructor Summary | |
QueryProcessorXMLGateway()
|
|
| 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 |
pause()
|
void |
resume()
|
void |
run()
|
void |
run(ILoginInfo userInfo)
Need to have loginInfo for sources which require login/pw access. |
void |
setGatewayListener(IGatewayListener listener)
Sets the IGatewayListener interface. |
void |
setInputParameters(OrderedMap inputParams)
set input parameters... |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
public QueryProcessorXMLGateway()
| 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 initialize(org.w3c.dom.Element gatewayElem,
ISearchFieldMap sfMap)
ICollectionGateway
initialize in interface ICollectionGatewaypublic void pause()
pause in interface ICollectionGatewaypublic void resume()
resume in interface ICollectionGatewaypublic boolean isPaused()
isPaused in interface ICollectionGatewaypublic java.lang.String getConfigurationXML()
getConfigurationXML in interface ICollectionGateway
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||