com.raritantechnologies.HTML
Class HTTPRestSearchSourceFactory

java.lang.Object
  extended bycom.raritantechnologies.searchApp.XMLSearchSourceFactory
      extended bycom.raritantechnologies.HTML.HTTPRestSearchSourceFactory
All Implemented Interfaces:
IXMLSearchSourceFactory

public class HTTPRestSearchSourceFactory
extends XMLSearchSourceFactory

SearchSource that accesses an HTTP REST API (XML over HTTP). Enables RTI Framework to do "Mashups".

Converts an OrderedMap query (and or information from the User ILoginInfo) into an HTTP request and transforms the returned XML to a Result or ResultSet. XML Configuration Template:

  <SourceType name="[ source name ]" type="HTTPRestSearchSource"
            sourceFactoryClass="com.raritantechnologies.HTML.HTTPRestSearchSourceFactory" 
            queryProcessor="com.raritantechnologies.HTML.HTTPRestSearchSource"  >

   <SecurityModel alternateLogin="[ name of alternate login ID in user info ]"
                     defaultUser="[ name of default user ]"
                     defaultPassword="[ name of default pw ]" >
     <search>[public|restricted]</search>
     <fullText>[public|restricted]</fullText>
     <loginName>[(optional) login name for this source]</loginName>
   </SecurityModel>

   <!-- Query Parser used to translate the query and/or user information to an HTTP request -->
   <QueryParser class="[ class of com.raritantechnologies.searchApp.IQueryParser ]" >

   </QueryParser>

   <!-- IXMLResultParser used to translate the returned XML into an IResultSet -->
   <XMLResultParser class="[ class of com.raritantechnologies.xml.IXMLResultParser ]" >

   </XMLResultParser>

  </SourceType>
 


Constructor Summary
HTTPRestSearchSourceFactory()
           
 
Method Summary
 SearchSource[] createSearchSources(org.w3c.dom.Element sourceElem, ISearchFieldMapFactory factory)
           
 void initializeSource(org.w3c.dom.Element sourceElem, SearchSource source)
          Implements initializeSource.
 
Methods inherited from class com.raritantechnologies.searchApp.XMLSearchSourceFactory
changeBasePath, initializeFieldFormatters, initializeStaticFields
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

HTTPRestSearchSourceFactory

public HTTPRestSearchSourceFactory()
Method Detail

createSearchSources

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

initializeSource

public void initializeSource(org.w3c.dom.Element sourceElem,
                             SearchSource source)
Description copied from class: XMLSearchSourceFactory

Implements initializeSource. Subclasses that need more granularity or have a more sophisticated SecurityModel can override this method.

Note: these initializations occur AFTER the SearchSource subclass has been initialized.
Adds global SearchSource characteristics:

Specified by:
initializeSource in interface IXMLSearchSourceFactory
Overrides:
initializeSource in class XMLSearchSourceFactory