com.raritantechnologies.concept.classifier.verity
Class TopicDocumentMatcherFactory

java.lang.Object
  extended bycom.raritantechnologies.concept.classifier.verity.TopicDocumentMatcherFactory
All Implemented Interfaces:
IConfigurable, IDocumentMatcherFactory

public class TopicDocumentMatcherFactory
extends java.lang.Object
implements IDocumentMatcherFactory

Builds a set of IDocumentMatchers from a TopicSet.

XML Configuration Template:
  <DocumentMatcherFactory class="com.raritantechnologies.concept.classifier.rql.topicDocumentMatcherFactory"
                             categoryAttribute="[ name of result field that gets Category field ]"
                             categoryPathAttribute="[ name of result field that gets Category path ]"
                             categoryIDAttribute="[ name of result field that gets Category ID ]"
                             matcherNameAttribute="[ NAME(default) | PATH | ID ]"
                             matcherDefinitionAttribute="[ (optional) if set: adds all matcher synonyms (its 'definition') to this output field ]"
                             phraseMatchMode="[PHRASE(default)|ANY|ALL|ACCRUE[minMatchers,multiWeight]  - determines multi-term matching policy " 
                             debug="[ true | false (default) | code ; Optional debug flag, code and true both turn code debugging on]"
                             useStemming="[ true | false(default) ]"
                             caseSensitive="[ true | false(default) ]" >

    <!-- Option 1: Use a com.raritantechnologies.rql.topic.VerityTaxonomyTreeBuilder -->
    <VerityTaxonomyTreeBuilder topicIDField="[ field with Topic ID ]"
                   queryField="[ field that rendered query will be added to ]" >

     <!-- ITreeBuilder source for initial taxonomy tree -->
     <TaxonomyTreeBuilder class="[ class of ITreeBuilder ]" >
        <!-- configuration parameters for TreeBuilder -->
     </TaxonomyTreeBuilder>

     <!-- ITopicSetBuilder creates a TopicSet object -->
     <TopicSetBuilder class="[ class of ITopicSetBuilder ]" >
        <!-- configuration parameters for TopicSetBuilder -->
     </TopicSetBuilder>

     <!-- ITopicRenderer converts Verity Topic to query string -->
     <TopicRenderer class="[ class of ITopicRenderer ]" >
        <!-- configuration parameters for TopicRenderer -->
     </TopicRenderer>

   </VerityTaxonomyTreeBuilder>

    <!-- Or just a ITopicSetBuilder -->
    <TopicSetBuilder class="[ class of ITopicSetBuilder ]" >

    </TopicSetBuilder>


    <TopicFilter class="[ class of ITopicFilter ]" >

    </TopicFilter>

    <!-- Optional Name filter for matchers -->
    <MatcherNameFilter class="[ class of com.raritantechnologies.utils.filter.IStringFilter ]" >

    </MatcherNameFilter>

    <!-- List of Topic Attributes that should be added as Matcher Attributes -->
    <TopicAttributes>
      <Attribute topicAttribute="[ name of topic Attribute ]" matcherAttribute="[ name of Matcher Attribute ]" />
    </TopicAttributes>

    <!-- Field-specific Phrase Match Modes -->
    <PhraseMatchModes>
      <Field ID="field ID" matchMode="[ ALL|ANY|PHRASE ]" multiTermDelimiter="[ optional delimiter(s) for multiple values (default=',;') ]" />
      <!-- etc... -->
    </PhraseMatchModes>

  </DocumentMatcherFactory>
 

Developed by Raritan Technologies .

Author:
Ted Sullivan

Constructor Summary
TopicDocumentMatcherFactory()
           
 
Method Summary
 IDocumentMatcher[] createDocumentMatchers(RaritanPageContext pageContext)
          Create an array of IDocumentMatcher instances.
static IDocumentMatcher createMatcher(java.lang.String name, Topic topic, boolean caseSensitive)
           
static IDocumentMatcher createMatcher(java.lang.String name, Topic topic, boolean caseSensitive, boolean useStemming, java.util.Map topicAttributeMap, java.lang.String phraseMatchMode, java.util.Map phraseModeMap)
           
static IDocumentMatcher createMatcher(java.lang.String name, Topic topic, boolean caseSensitive, java.util.Map topicAttributeMap)
           
 void initialize(org.w3c.dom.Element elem)
          Initializes the object from an XML tag or element.
 void setDEBUG(java.lang.String debugSt)
           
 void setTopicSetBuilder(ITopicSetBuilder topicSetBuilder)
           
 void setVerityTaxTreeBuilder(VerityTaxonomyTreeBuilder verityTaxTreeBuilder)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

TopicDocumentMatcherFactory

public TopicDocumentMatcherFactory()
Method Detail

createDocumentMatchers

public IDocumentMatcher[] createDocumentMatchers(RaritanPageContext pageContext)
Description copied from interface: IDocumentMatcherFactory
Create an array of IDocumentMatcher instances.

Specified by:
createDocumentMatchers in interface IDocumentMatcherFactory

createMatcher

public static IDocumentMatcher createMatcher(java.lang.String name,
                                             Topic topic,
                                             boolean caseSensitive)

createMatcher

public static IDocumentMatcher createMatcher(java.lang.String name,
                                             Topic topic,
                                             boolean caseSensitive,
                                             java.util.Map topicAttributeMap)

createMatcher

public static IDocumentMatcher createMatcher(java.lang.String name,
                                             Topic topic,
                                             boolean caseSensitive,
                                             boolean useStemming,
                                             java.util.Map topicAttributeMap,
                                             java.lang.String phraseMatchMode,
                                             java.util.Map phraseModeMap)

initialize

public void initialize(org.w3c.dom.Element elem)
Description copied from interface: IConfigurable
Initializes the object from an XML tag or element. This method is called by the Framework as part of the application initializtion. see ConfigurationManager, XMLConfigurationManager, XMLSearchFieldMapFactory, XMLSearchSourceFactory. Configurable objects that are owned or contained by other configurable objects will be initialized in by the parent object.

Specified by:
initialize in interface IConfigurable

setTopicSetBuilder

public void setTopicSetBuilder(ITopicSetBuilder topicSetBuilder)

setVerityTaxTreeBuilder

public void setVerityTaxTreeBuilder(VerityTaxonomyTreeBuilder verityTaxTreeBuilder)

setDEBUG

public void setDEBUG(java.lang.String debugSt)