com.raritantechnologies.opensearch
Class OpenSearchServletHandler

java.lang.Object
  extended bycom.raritantechnologies.quickstart.userInterface.SearchServletHandler
      extended bycom.raritantechnologies.opensearch.OpenSearchServletHandler
All Implemented Interfaces:
IActionHandler, IConfigurable, IServletHandler

public class OpenSearchServletHandler
extends SearchServletHandler

Extension of SearchServletHandler that manages an OpenSearch service. This enables any Raritan SearchSource - or set of Federated search sources, to be searched through the OpenSearch standard.

The OpenSearch Description URL is http://[host name running the servlet]/[servlet name]?contentType=OpenSearchDescription

The OpenSearchServletHandler uses the standard SearchServletHandler mechanisms for executing the query and returning results. To enable selection of a specific response format given a contentType specification in the request, a DynamicDisplayFormRenderer is used.

XML Configuration Template:
   <SystemObject type="ServletHandler" 
                    name="[ name of this ServletHandler - needs to match param-value in web.xml ]" 
                    configurableClass="com.raritantechnologies.opensearch.OpenSearchServletHandler"
                    sourceType="[ type of source ]"
                    sourceCategory="[ source category - maps to category in application SourceMap xml ]"
                    pageSizeParam="[ http request parameter that contains page size request ]"
                    startRecParam="[ http request parameter that contains start record request ]"
                    displayFormName="[ name of display form - links to an IDisplayFormRenderer ]" >

      <!-- OpenSearch Description XML - sent in response to protocol query -->
      <OpenSearchDescription>
      <![CDATA[

      <]]>
      </OpenSearchDescription>

      <!-- Optional mapping of a request parameter to a return contentType -->
      <ContentTypeMap requestParam="[ name of http request parameter that controls the contentType returned ]"
                         defaultContentType="[ default type to return if request parameter is missing ]" >
        <Type requestValue="[ value of request parameter ]" contentType="[ content type (e.g. 'text/xml' ]" />
      </ContentTypeMap>
   </SystemObject>
  

Developed by Raritan Technologies Inc..

Author:
Ted Sullivan

Constructor Summary
OpenSearchServletHandler()
           
 
Method Summary
 void initialize(org.w3c.dom.Element elem)
          Initializes the object from an XML tag or element.
 void service(DynamicHttpServletRequest pReq, HttpServletResponse pRes)
           
 
Methods inherited from class com.raritantechnologies.quickstart.userInterface.SearchServletHandler
handleAction, init
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

OpenSearchServletHandler

public OpenSearchServletHandler()
Method Detail

service

public void service(DynamicHttpServletRequest pReq,
                    HttpServletResponse pRes)
             throws ServletException,
                    java.io.IOException
Specified by:
service in interface IServletHandler
Overrides:
service in class SearchServletHandler
Throws:
ServletException
java.io.IOException

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
Overrides:
initialize in class SearchServletHandler