com.raritantechnologies.verity.parametric.PIBuild
Class ParametricIndexOutputProcessor

java.lang.Object
  extended bycom.raritantechnologies.verity.parametric.PIBuild.ParametricIndexOutputProcessor
All Implemented Interfaces:
IGatewayOutputProcessor

public class ParametricIndexOutputProcessor
extends java.lang.Object
implements IGatewayOutputProcessor

Implementation of GatewayOutputProcessor that generates Parametric Index. Converts IResult fields to parametric "buckets". Generates data files and command files that can be used by the Verity MKPI utility.

XML Configuration Template:
 <GatewayOutputProcessor name="PIBuildProc" 
    class="com.raritantechnologies.verity.parametric.PIBuild.ParametricIndexOutputProcessor"
    destinationPath="some/path/to/the/pi/files"
    indexPath="path where XML will be indexed by Verity"
    collectionPath="the/path/to/the/collection"
    commandFile="BASE_PATH/BakePI.bat" >

  <PIDef>
    <VdkField name="VdkVgwKey" xmlField="Root.Collection.Doc.VdkVgwKey"/>
    <BucketSetDef name="URL" xmlField="Root.Collection.Doc.URL" type="String" defaultValue="NA" ></BucketSetDef>
    <BucketSetDef name="DocumentTitle" xmlField="Root.Collection.Doc.DocumentTitle" type="String" defaultValue="NA" ></BucketSetDef>
    <BucketSetDef name="Category" xmlField="Root.Collection.Doc.Category" type="Taxonomy" separator="/" defaultValue="NA" ></BucketSetDef> 
  </PIDef>

   <PIResultMap rootTag="Collection" docTag="Doc" >
     <Bucket tagname="VdkVgwKey" fieldID="ID" unique="true" />
     <Bucket tagname="DocumentTitle" fieldID="TI" />
     <Bucket tagname="Category"      fieldID="CAT" multiple="true" startsWith="somepathroot" startAfter="true" />
     <Bucket tagname="NestedData"    fieldID="nested" multiple="true" nested="true" />
   </PIResultMap>

   <ParametricIndexName>BASE_PATH/SomePI</ParametricIndexName>

   <!-- Directly indexes PI via a K2Index Server -->
   <ODKOutputProcessor >

 </GatewayOutputProcessor>
 

Generates the following XML:

 <Collection>
  <Doc>
    <VdkVgwKey><![CDATA[--Value of ID field--]]></VdkVgwKey>
    <DocumentTitle><![CDATA[-- Value of TI field --]]></DocumentTitle>
    <Category><![CDATA[-- first value of CAT field --]]></Category>
    <Category><![CDATA[-- second value of CAT field --]]></Category>
    <Category><![CDATA[-- third value of CAT field --]]></Category>
  </Doc>
 </Collection>
 

Developed by Raritan Technologies .

Author:
Ted Sullivan

Constructor Summary
ParametricIndexOutputProcessor()
           
 
Method Summary
 void dataComplete()
          Data feed is complete.
 java.lang.String getConfigurationXML()
           
 void initialize(org.w3c.dom.Element outputProcElem, ISearchFieldMap sfMap)
          Initializes mapping from IResult fields to parametric buckets.
 void initialize(java.util.Map initParams)
          Used for dynamic initialization (connection, collection name, file name, etc.)
 java.lang.String processData(IResultSet data)
          returns name of XML File created/appended.
 void setPIDef(java.lang.String piDefXML)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ParametricIndexOutputProcessor

public ParametricIndexOutputProcessor()
Method Detail

processData

public java.lang.String processData(IResultSet data)
Description copied from interface: IGatewayOutputProcessor
returns name of XML File created/appended.

Specified by:
processData in interface IGatewayOutputProcessor

dataComplete

public void dataComplete()
Description copied from interface: IGatewayOutputProcessor
Data feed is complete.

Specified by:
dataComplete in interface IGatewayOutputProcessor

initialize

public void initialize(java.util.Map initParams)
Description copied from interface: IGatewayOutputProcessor
Used for dynamic initialization (connection, collection name, file name, etc.)

Specified by:
initialize in interface IGatewayOutputProcessor

initialize

public void initialize(org.w3c.dom.Element outputProcElem,
                       ISearchFieldMap sfMap)
Initializes mapping from IResult fields to parametric buckets.

Specified by:
initialize in interface IGatewayOutputProcessor

setPIDef

public void setPIDef(java.lang.String piDefXML)

getConfigurationXML

public java.lang.String getConfigurationXML()
Specified by:
getConfigurationXML in interface IGatewayOutputProcessor