com.raritantechnologies.quickstart.taglibrary
Class XMLResultProcessorRenderer

java.lang.Object
  extended bycom.raritantechnologies.searchApp.taglibrary.BasicResultRenderer
      extended bycom.raritantechnologies.quickstart.taglibrary.XMLResultProcessorRenderer
All Implemented Interfaces:
IConfigurable, IPreferencesBeanInfo, IResultRenderer

public class XMLResultProcessorRenderer
extends BasicResultRenderer
implements IResultRenderer

Wrapper IResultRenderer that first creates an XMLResult from the initial IResult XML or one of its fields, applies SAX filtering via an XMLResultProcessor and then hands it off to the proxy renderer.

See Also the XSLResultRenderer which uses an XSL Transform to renderer the result XML.

XML Configuration Template:
  <ResultRenderer 
     rendererClass="com.raritantechnologies.searchApp.taglibrary.XMLResultProcessorRenderer" 
     name="rendererName"
     xmlFieldID="documentXML"
     inputFields="[comma separated list of field values to transfer to inner XML result ]"
     multipleResults="true|false(default)"
     nestedTagName="[ optional nested tag to get result(s) from ]" >

    <XMLProcessor>
      <!-- data needed by XMLProcessor -->
    </XMLProcessor>

   <!-- Optional FieldFormatters be used to post-process the fields extracted from the XML -->
   <FieldFormatter class="[ class of com.raritantechnologies.searchApp.IFieldFormatter ]" >

   </FieldFormatter>

    <ResultRenderer rendererClass ="[ some com.raritantechnologies.searchApp.taglibrary.IResultRenderer class ]"
         ... its stuff too...  >
         <!-- Child ResultRenderer stuff ... -->
    </ResultRenderer>

  </ResultRenderer>
 

Developed by Raritan Technologies Inc..

Author:
Ted Sullivan

Field Summary
 
Fields inherited from class com.raritantechnologies.searchApp.taglibrary.BasicResultRenderer
enabled, name, prefBeanName, prefCompareValue, prefEnableIfInChecklist, prefEnableIfInYesno
 
Fields inherited from interface com.raritantechnologies.searchApp.taglibrary.IResultRenderer
TEMPLATE
 
Constructor Summary
XMLResultProcessorRenderer()
           
 
Method Summary
protected  java.lang.String doRenderResult(IResult result, int firstResult, int lastResult, int resultNum, RaritanPageContext pageContext)
          Uses a ResultXMLProcessor to transform the result XML into another IResult which can then be processed by another IResultRenderer.
 java.lang.String getConfigurationXML()
           
 java.lang.String getConfigurationXML(java.lang.String configurationTemplate)
           
 void getConfigurationXML(java.io.Writer writer)
           
 IFieldFormatter[] getFieldFormatters()
           
 IResultRenderer getProxyRenderer()
           
 java.lang.String getResultXMLField()
           
 XMLResultProcessor getXMLResultProcessor()
           
 void initialize(org.w3c.dom.Element elem)
          IResultRenderers are XML configurable.
 void setFieldFormatters(IFieldFormatter[] fieldFormatters)
           
 void setProxyRenderer(IResultRenderer theRenderer)
           
 void setResultXMLField(java.lang.String resultXMLField)
           
 void setXMLResultProcessor(XMLResultProcessor xmlProcessor)
           
 
Methods inherited from class com.raritantechnologies.searchApp.taglibrary.BasicResultRenderer
getPrefBeanName, getPrefCompareValue, getPrefEnableIfInChecklist, getPrefEnableIfInYesno, getRenderer, isEnabled, renderResult, setEnable
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface com.raritantechnologies.searchApp.taglibrary.IResultRenderer
getRenderer, isEnabled, renderResult, setEnable
 

Constructor Detail

XMLResultProcessorRenderer

public XMLResultProcessorRenderer()
Method Detail

initialize

public void initialize(org.w3c.dom.Element elem)
Description copied from interface: IResultRenderer
IResultRenderers are XML configurable.

Specified by:
initialize in interface IResultRenderer
Overrides:
initialize in class BasicResultRenderer

doRenderResult

protected java.lang.String doRenderResult(IResult result,
                                          int firstResult,
                                          int lastResult,
                                          int resultNum,
                                          RaritanPageContext pageContext)
Uses a ResultXMLProcessor to transform the result XML into another IResult which can then be processed by another IResultRenderer.

Specified by:
doRenderResult in class BasicResultRenderer

setResultXMLField

public void setResultXMLField(java.lang.String resultXMLField)

getResultXMLField

public java.lang.String getResultXMLField()

setProxyRenderer

public void setProxyRenderer(IResultRenderer theRenderer)

getProxyRenderer

public IResultRenderer getProxyRenderer()

setFieldFormatters

public void setFieldFormatters(IFieldFormatter[] fieldFormatters)

getFieldFormatters

public IFieldFormatter[] getFieldFormatters()

setXMLResultProcessor

public void setXMLResultProcessor(XMLResultProcessor xmlProcessor)

getXMLResultProcessor

public XMLResultProcessor getXMLResultProcessor()

getConfigurationXML

public void getConfigurationXML(java.io.Writer writer)
                         throws java.io.IOException
Throws:
java.io.IOException

getConfigurationXML

public java.lang.String getConfigurationXML()
Specified by:
getConfigurationXML in interface IResultRenderer

getConfigurationXML

public java.lang.String getConfigurationXML(java.lang.String configurationTemplate)
Specified by:
getConfigurationXML in interface IResultRenderer