com.raritantechnologies.searchApp
Class FlatFileMemorySourceFactory

java.lang.Object
  extended bycom.raritantechnologies.searchApp.XMLSearchSourceFactory
      extended bycom.raritantechnologies.searchApp.FlatFileMemorySourceFactory
All Implemented Interfaces:
InMemoryInitializer, IXMLSearchSourceFactory

public class FlatFileMemorySourceFactory
extends XMLSearchSourceFactory
implements InMemoryInitializer

Creates an InMemorySearchSource from a set of flat files.

XML Configuration Template:
  <SourceType name="AMemorySource" type="InMemorySearchSource" 
                 displayName="Some search source"
                 sourceFactoryClass="com.raritantechnologies.searchApp.FlatFileMemorySourceFactory" 
                 queryProcessor="com.raritantechnologies.searchApp.InMemorySearchSource"
                 sourceName="[the Source that will be made into a memory source]"
                 delimiter="|"
                 blankQueryReturnsAll="true" >

    <Columns>
      <Column ID="theSearchFieldID" />
      <Column ID="another FieldID" />
      <Column ID="_SKIP_" />
      <Column ID="a third FieldID" />
    </Columns>

    <Files>
      <File name="the full path to this file" />
    </Files>

    <!-- ============================================================================ -->
    <!-- One or more FieldFormatter elements define Result formatting that needs to   -->
    <!-- be applied to the file data before adding to the InMemorySearchSource.       -->
    <!-- ============================================================================ -->
    <FieldFormatter class="[ class of com.raritantechnologies.searchApp.IFieldFormatter" >
   
    </FieldFormatter>

  </SourceType>
  

Developed by Raritan Technologies .

Author:
Ted Sullivan

Constructor Summary
FlatFileMemorySourceFactory()
           
 
Method Summary
 SearchSource[] createSearchSources(org.w3c.dom.Element sourceElem, ISearchFieldMapFactory factory)
           
 void initialize(InMemorySearchSource memSS, java.lang.String sourceName)
           
 
Methods inherited from class com.raritantechnologies.searchApp.XMLSearchSourceFactory
changeBasePath, initializeFieldFormatters, initializeSource, initializeStaticFields
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

FlatFileMemorySourceFactory

public FlatFileMemorySourceFactory()
Method Detail

createSearchSources

public SearchSource[] createSearchSources(org.w3c.dom.Element sourceElem,
                                          ISearchFieldMapFactory factory)
Specified by:
createSearchSources in interface IXMLSearchSourceFactory
Specified by:
createSearchSources in class XMLSearchSourceFactory

initialize

public void initialize(InMemorySearchSource memSS,
                       java.lang.String sourceName)
Specified by:
initialize in interface InMemoryInitializer