com.raritantechnologies.searchApp.dataCollection
Class FlatFileOutputProcessor

java.lang.Object
  extended bycom.raritantechnologies.searchApp.dataCollection.FlatFileOutputProcessor
All Implemented Interfaces:
ICollectionIndexer, IConfigurable, IGatewayOutputProcessor, IResultSetProcessor

public class FlatFileOutputProcessor
extends java.lang.Object
implements IGatewayOutputProcessor, ICollectionIndexer, IResultSetProcessor

Stores IResult fields in a flat file - for example for import into a spreadsheet.

XML Configuration Template:
   <OutputProcessor class="com.raritantechnologies.searchApp.dataCollection.FlatFileOutputProcessor" 
                       fileName="[ file name for output flat file ]"
                       append="true|false(default)"
                       writeHeaderLine="[ true|false(default) ]"
                       fieldDelimiter="[ charater separator for fields: default='|' ]"
                       multiValueDelimiter="[ character separator for multiple values default=';' ]" >

      <!-- One or more field IDs in the result that will be put into flat file columns -->
      <Column ID="[result field ID]" />
      <Column ID="[another field ID]" />

      <!-- etc. . . -->

   </OutputProcessor>
 

Developed by Raritan Technologies .

Author:
Ted Sullivan

Field Summary
 
Fields inherited from interface com.raritantechnologies.searchApp.dataCollection.ICollectionIndexer
ADD, CREATE, DELETE, UPDATE
 
Constructor Summary
FlatFileOutputProcessor()
           
 
Method Summary
 void dataComplete()
          Data feed is complete.
 java.lang.String getConfigurationXML()
           
 java.lang.String getFileName()
           
 void initialize(org.w3c.dom.Element outputProcElem)
          Initialize the from XML Element.
 void initialize(org.w3c.dom.Element outputProcElem, ISearchFieldMap sfMap)
          Initialize the GatewayOutputProcessor from XML Configuration Element.
 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 processResultSet(java.lang.String sessionID, IResultSet data)
          processes the IResultSet (somehow)
 void setFileName(java.lang.String fileName)
           
 void setIndexMode(java.lang.String indexMode)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

FlatFileOutputProcessor

public FlatFileOutputProcessor()
Method Detail

setIndexMode

public void setIndexMode(java.lang.String indexMode)
Specified by:
setIndexMode in interface ICollectionIndexer

processResultSet

public void processResultSet(java.lang.String sessionID,
                             IResultSet data)
Description copied from interface: IResultSetProcessor
processes the IResultSet (somehow)

Specified by:
processResultSet in interface IResultSetProcessor

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(org.w3c.dom.Element outputProcElem,
                       ISearchFieldMap sfMap)
Description copied from interface: IGatewayOutputProcessor
Initialize the GatewayOutputProcessor from XML Configuration Element.

Specified by:
initialize in interface IGatewayOutputProcessor

initialize

public void initialize(org.w3c.dom.Element outputProcElem)
Description copied from interface: IResultSetProcessor
Initialize the from XML Element.

Specified by:
initialize in interface IResultSetProcessor

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

getConfigurationXML

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

setFileName

public void setFileName(java.lang.String fileName)

getFileName

public java.lang.String getFileName()