com.raritantechnologies.federated.DQL
Class DQLSearchSourceFactory

java.lang.Object
  extended bycom.raritantechnologies.searchApp.XMLSearchSourceFactory
      extended bycom.raritantechnologies.federated.DQL.DQLSearchSourceFactory
All Implemented Interfaces:
IXMLSearchSourceFactory

public class DQLSearchSourceFactory
extends XMLSearchSourceFactory

Responsible for constructing DQLSearchSource objects from <SourceType> XML tags.

XML Configuration Template:
  <SourceType name="[ source name ]" type="DQLSearchSource" displayName="[ source display name ]"
                 sourceFactoryClass="com.raritantechnologies.federated.DQL.DQLSearchSourceFactory" 
                 queryProcessor="com.raritantechnologies.federated.DQL.DQLQueryProcessor" >

    <LoginProcess>
      UserName="[ user name ]"
      Password="[ clear text password ]"
      useSessionLogin="[true|false (default)]"
      <!-- Password can be in the clear or encrypted: -->
      PasswordEnc="[ encrypted password ]"/>

    <SearchProcess>
    </SearchProcess>

    <ResultMap>
      <ResultField fieldID="status" colName="description" append="true|false" />
      <ResultField fieldID="itemID" colName="item_id"/>
    </ResultMap>

  </SourceType>
 

Developed by Raritan Technologies Inc..

Author:
Glenn Robitaille

Constructor Summary
DQLSearchSourceFactory()
           
 
Method Summary
 SearchSource[] createSearchSources(org.w3c.dom.Element sourceElem, ISearchFieldMapFactory factory)
          Extract data from XMLConfig to create an DQLSearchSource objects.
 
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

DQLSearchSourceFactory

public DQLSearchSourceFactory()
Method Detail

createSearchSources

public SearchSource[] createSearchSources(org.w3c.dom.Element sourceElem,
                                          ISearchFieldMapFactory factory)

Extract data from XMLConfig to create an DQLSearchSource objects.

Needs to set the: LoginProcess Document template (if necessary)
loginProcessMap

SearchProcess Document of the DQLSearchSource.

Creates DQLSearchFields for each in the SearchProcess (Note needs to have an ID attribute that maps to FieldID).

sets the DQLSearchSource "setSourceField" property to XPath within the SearchProcess Template of the field Value.

DQLSearchField properties:

The Map is generated by the DQLSearchSourceFactory from the Config XML for an DQLSearchSource.

Specified by:
createSearchSources in interface IXMLSearchSourceFactory
Specified by:
createSearchSources in class XMLSearchSourceFactory