com.raritantechnologies.searchApp
Class XMLSearchSourceFactory

java.lang.Object
  extended bycom.raritantechnologies.searchApp.XMLSearchSourceFactory
All Implemented Interfaces:
IXMLSearchSourceFactory
Direct Known Subclasses:
AutonomySearchSourceFactory, DieselpointSearchSourceFactory, DQLSearchSourceFactory, EndecaSearchSourceFactory, ERoomSearchSourceFactory, ExaleadSearchSourceFactory, FastSearchSourceFactory, FastSearchSourceFactory, FlatFileMemorySourceFactory, HTMLSearchSourceFactory, HTTPRestSearchSourceFactory, JCRSearchSourceFactory, LDAPSearchSourceFactory, LookupSearchSourceFactory, LuceneSearchSourceFactory, MarkLogicSearchSourceFactory, OmniFindSearchSourceFactory, QueryProcessorFilterFactory, QueryProcessorMemorySourceFactory, RdfOwlSearchSourceFactory, SearchHistorySourceFactory, SevSearchSourceFactory, SOAPSearchSourceFactory, SOLRSearchSourceFactory, SQLSearchSourceFactory, UltraseekSearchSourceFactory, VeritySearchSourceFactory, VWebServicesSearchSourceFactory, XMLMemorySearchSourceFactory, Z3950SearchSourceFactory

public abstract class XMLSearchSourceFactory
extends java.lang.Object
implements IXMLSearchSourceFactory

Abstract base implementation of IXMLSearchSourceFactory.

Performs basic initializations of the SearchSource object created by a subclass.

Implementations of this class are instantiated by the XMLSearchFieldMapFactory which reads the Application Configuration XML and its SourceType tags. The correct instance of an IXmlSearchSourceFactory is determined from the "sourceFactoryClass" attribute.

  <SourceType name="[Source Name - unique within this source type]"
                 type="[Source Type]" 
                 displayName="[Source Name shown to users]"
                 sourceFactoryClass="[fully qualified class name of implementer of this interface]" 
                 queryProcessor="[fully qualified class name of implementer of source IQueryProcessor]" >

   <SourceInfo class="[ class of com.raritantechnologies.searchApp.ISearchSourceInfo ]" >

   </SourceInfo>

   <StaticFields>
     <StaticField fieldID="[the abstract field ID]"
                   value="the static value coming from this source" >
     </StaticField>
   </StaticFields>

   <FieldFormatters>
     <Formatter fieldID="[the abstract field ID]"
                   formatterClass="the IFieldFormatter class" >
     <!-- Formatter specific fields -->
     </Formatter>
   </FieldFormatters>

   <SecurityModel>
     <search>[public|restricted]</search>
     <fullText>[public|restricted]</fullText>
     <loginName>[(optional) login name for this source]</loginName>
   </SecurityModel>

   <!-- User-specific Search Fields -->
   <UserFields>
     <UserField fieldID="[ name of search field ]" userField="[ user field: 'name' | user attribute ]" />
   </UserField>

   <SortMap>
     <!-- optional secondary sort map -->
   </SortMap>

   <!-- SourceType - specific information -->

  </SourceType>

 

Developed by Raritan Technologies .

Author:
Ted Sullivan

Constructor Summary
XMLSearchSourceFactory()
           
 
Method Summary
static java.lang.String changeBasePath(java.lang.String pathString)
           
abstract  SearchSource[] createSearchSources(org.w3c.dom.Element sourceElem, ISearchFieldMapFactory factory)
           
static void initializeFieldFormatters(org.w3c.dom.Element sourceElem, SearchSource sSource)
           
 void initializeSource(org.w3c.dom.Element sourceElem, SearchSource sSource)
          Implements initializeSource.
static void initializeStaticFields(org.w3c.dom.Element sourceElem, SearchSource sSource)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

XMLSearchSourceFactory

public XMLSearchSourceFactory()
Method Detail

createSearchSources

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

initializeSource

public void initializeSource(org.w3c.dom.Element sourceElem,
                             SearchSource sSource)

Implements initializeSource. Subclasses that need more granularity or have a more sophisticated SecurityModel can override this method.

Note: these initializations occur AFTER the SearchSource subclass has been initialized.
Adds global SearchSource characteristics:

Specified by:
initializeSource in interface IXMLSearchSourceFactory

initializeFieldFormatters

public static void initializeFieldFormatters(org.w3c.dom.Element sourceElem,
                                             SearchSource sSource)

initializeStaticFields

public static void initializeStaticFields(org.w3c.dom.Element sourceElem,
                                          SearchSource sSource)

changeBasePath

public static java.lang.String changeBasePath(java.lang.String pathString)