com.raritantechnologies.verity
Class DynamicVeritySearchSourceFactory

java.lang.Object
  extended bycom.raritantechnologies.searchApp.XMLSearchSourceFactory
      extended bycom.raritantechnologies.verity.VeritySearchSourceFactory
          extended bycom.raritantechnologies.verity.DynamicVeritySearchSourceFactory
All Implemented Interfaces:
IXMLSearchSourceFactory

public class DynamicVeritySearchSourceFactory
extends VeritySearchSourceFactory

Enables collection and field-level selection of records.

XML Configuration Template:
  <SourceType name="VerityWorker" type="Verity_XML"
            sourceFactoryClass="com.raritantechnologies.verity.DynamicVeritySearchSourceFactory" 
            queryProcessor="com.raritantechnologies.verity.VerityQueryProcessor"
            defaultCollections="[ comma separated list of collections to use with no selection ]"
            selectQueryField="[ field with collection or field selection ]" 
            selectableCollections="[ collections that can be individually selected ]" >

   <!-- Optional Search Source that will be used to look up collections -->
   <CollectionLookupSource name="[ name of SearchSource ]" 
                              collectionField="[ name of field in result set with collection name ]" 
                              delimiter="[ delimiter if field values have multiple values ]" >
      <!-- query (user parameter) mappings -->

   </CollectionLookupSource>

   <Fields>

    <Field ID="AU" >
      <collection_field name="AU">
        <type>Zone</type>
      </collection_field>
    </Field>

    <Field ID="TI">
      <collection_field name="TI">
        <type>Zone</type>
          <limit>NoFreeText
      </collection_field>
    </Field>

    <Field ID="PD">
      <collection_field name="PD">
        <type>Date</type>
      </collection_field>
    </Field>

  </Fields>

  <SearchSource Name="[Source Name]" defaultSortSpec="foo asc"  
         blankQueryReturns="all(default)|none"
         zoneSource="zone source name"
         zoneSourceField="field in zone  source for field ID/name"  (defaults to "zone")
         zoneTypeField="field  in zone source for field type" (defaults to  "type")
         zoneIDField="field in zone source for ID field" (defaults to same as zoneSourceField)
         zoneSearchField="field in zone source for SearchField field" (defaults to same as zoneSourceField)
         zoneCollectionTypeField="field in zone source for CollectionFieldType) defaults to same as zoneSourceType)
         zoneSourcePollInterval="minutes between polls" >

    <ZoneSourceQuery param="query param name" value="query param  value" />

    <-- Optional QueryCooker class -->
    <QueryCooker class="[queryCooker class]" >
       <!-- parameters needed by QueryCooker -->
    </QueryCooker>

    <-- Optional QueryParser class -->
    <QueryParser class="[queryParser class]" >
       <!-- parameters needed by QueryParser -->
    </QueryParser>

    <ServerHost>[K2 Server host domain or IP]</ServerHost>
    <ServerPort>9900</ServerPort>
    <Collections>
      <Collection alias="[Collection Alias known to K2 server]">
          <ServerThreads>2</ServerThreads>
      </Collection>

      <Collection alias="[ another collection Alias ]">
          <ServerThreads>2</ServerThreads>
      </Collection>

    </Collections>
  </SearchSource>

  <MaxDocCount class="ISetMaxDocCountClass..." >

  <DisplayFields>
    <DisplayField ID="a field" />
    <DisplayField ID="another" />
  </DisplayFields>
  </MaxDocCount>

 </SourceType>
 

Developed by Raritan Technologies .

Author:
Ted Sullivan

Constructor Summary
DynamicVeritySearchSourceFactory()
           
 
Method Summary
 SearchSource[] createSearchSources(org.w3c.dom.Element sourceElem, ISearchFieldMapFactory factory)
           
 
Methods inherited from class com.raritantechnologies.verity.VeritySearchSourceFactory
createVeritySearchSources, initQueryCooker, initQueryParser, initSearchSource, initSourceFields, initZoneSource, readInFields
 
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

DynamicVeritySearchSourceFactory

public DynamicVeritySearchSourceFactory()
Method Detail

createSearchSources

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