MainJavadocExample
LookupSearchSource Demo

The LookupSearchSource is used to provide a query and/or result metadata expansion capability by enabling a multi-stage search that can combine any RTI SearchSource. This example will be used to enhance the TreeSearchSource demo. In that example, the initial search can find the name and path of nodes in the Framework Documentation tree (seen to the left). We would like to add to this links to the Example page and Javadoc page. These are commonly named nodes so that a direct search on these names would yield many irrelevant results.

We will use the LookupSearchSource to find the Javadoc node attached to the class's main node by appending "/Javadoc" to the path field of the initial result (using a ConcatenateFilter ) and re-executing the search, repeating the operation with another LookupSearchSource will give us the "Example" link.

To use the demo, type in the name of an RTI Framework class (e.g. 'LookupSearchSource' ).

Name:  
Description:  
Module Type:  

Name TreeNodeAttributeStringFilter
Path /Framework Modules/Tree Tools/Tree Filters/TreeFilter/Tree Node Filters/TreeNodeAttributeStringFilter
Javadoc
Example
Name Javadoc
Path /Framework Modules/User Profile Elements/Dynamic Rendering Elements/DynamicContentHandlerFilter/Javadoc
Name Java Source Code
Path /Framework Modules/User Interface Elements/Display Forms/Display Form Renderers/Result Renderers/Composite Result Renderers/NestedResultRenderer/Java Source Code
Name Java Source Code
Path /Framework Modules/String Filters/Composite String Filters/SelectingStringFilter/Java Source Code
Name Java Source Code
Path /Framework Modules/Scheduler/Job Processes/Basic Job Processes/XMLDispatchFilterListener/Java Source Code
Name FacetedResultSetProcessor
Path /Framework Modules/Data Collection Processing/Data Consumers/Basic Data Consumers/FacetedResultSetProcessor
Javadoc
Name ElementSelectors
Path /Framework Modules/XML Tools/SAXDeleteFilter/ElementSelectors
Name Java Source Code
Path /Framework Modules/Tree Tools/Tree HTML Renderers/BasicTreeRenderer/Java Source Code
Name Javadoc
Path /Framework Modules/Classification Tools/RTI Classification Framework/ClassifierTermExtractorTagger/Javadoc
Name Java Source Code
Path /Framework Modules/Result Formatters/Basic Result Formatters/CopyFieldFormatter/Java Source Code

XML Configuration for this demo:

  <!-- ========================================================================= -->
  <!--                      Tree Search Source                                   -->
  <!-- ========================================================================= -->
  <SourceType name="FrameworkTreeSource" type="TreeSearchSource"
              sourceFactoryClass="com.raritantechnologies.utils.tree.TreeSearchSource" 
              queryProcessor="com.raritantechnologies.utils.tree.TreeSearchSource" >

     <TreeBuilder class="com.raritantechnologies.utils.tree.SAXTreeBuilder"
                  fileName="BASE_PATH/WEB-INF/conf/RaritanFrameworkTree.xml"
                  treeName="Framework Modules" >

         <TreeNode nodeTag="ConfigurableType"
                   nameAttribute="name" >
         </TreeNode>

         <TreeNode nodeTag="Link"
                   nameAttribute="type" >
              <AttributeMap input="href" output="href" />
              <AttributeMap input="description" output="description" />
         </TreeNode>

     </TreeBuilder>

  </SourceType>


  <!-- ========================================================================= -->
  <!--    Performs a Lookup on the result path for the Example Link              -->
  <!--                                                                           -->
  <!--  Settings:                                                                -->
  <!--  addAllRequestParams="false" - forces lookup to use just the path param   -->
  <!--  addAllInputResults="true"   - output results comes from input source     -->
  <!--  excludeOutputHits="true"    -  "        "      "     "    "      "       -->
  <!--  nestedResultField="ExampleLink"    -  add example link as nested result  -->
  <!-- ========================================================================= -->

  <SourceType name="ExampleTreeSource" type="LookupSearchSource" 
              displayName="TreeSource Plus Javadoc"
	      sourceFactoryClass="com.raritantechnologies.searchApp.sourceMap.LookupSearchSourceFactory"
	      queryProcessor="com.raritantechnologies.searchApp.sourceMap.LookupQueryProcessor" 
              addAllRequestParams="false"
              nestedResultField="ExampleLink"
              addAllInputResults="true"
              excludeOutputHits="true" >
	
    <Fields>
      <AddToQuery ID="path" >
        <StringFilter class="com.raritantechnologies.utils.filter.ConcatenateFilter"
                      prependString="" appendString="/Example" />
      </AddToQuery>
      <AddToOutput ID="name" />
      <AddToOutput ID="path" />

    </Fields>
	
    <InputSource>FrameworkTreeSource</InputSource>
    <OutputSource>FrameworkTreeSource</OutputSource>
	
  </SourceType>

  <!-- ========================================================================= -->
  <!--    Performs a Lookup on the result path for the Javadoc Link (as above)   -->
  <!-- ========================================================================= -->
  <SourceType name="JavadocTreeSource" type="LookupSearchSource" 
              displayName="TreeSource Plus Javadoc"
	      sourceFactoryClass="com.raritantechnologies.searchApp.sourceMap.LookupSearchSourceFactory"
	      queryProcessor="com.raritantechnologies.searchApp.sourceMap.LookupQueryProcessor" 
              addAllRequestParams="false"
              nestedResultField="JavadocLink"
              addAllInputResults="true"
              excludeOutputHits="true" >
	
    <Fields>
      <AddToQuery ID="path" >
        <StringFilter class="com.raritantechnologies.utils.filter.ConcatenateFilter"
                      prependString="" appendString="/Javadoc" />
      </AddToQuery>
      <AddToOutput ID="name" />
      <AddToOutput ID="path" />

    </Fields>
	
    <InputSource>ExampleTreeSource</InputSource>
    <OutputSource>FrameworkTreeSource</OutputSource>
	
  </SourceType>