com.raritantechnologies.searchApp.database
Class DatabaseXMLDataSource

java.lang.Object
  extended bycom.raritantechnologies.searchApp.database.DatabaseXMLDataSource
All Implemented Interfaces:
IConfigurable, IXMLDataSource

public class DatabaseXMLDataSource
extends java.lang.Object
implements IXMLDataSource

Implements IXMLDataSource by retrieving XML strings from a relational Database.

XML Configuration Template:
   <XMLDataSource class="com.raritantechnologies.searchApp.database.DatabaseXMLDataSource"
                     connectionManager="[ name of ConnectionManager instance ]"
                     xmlField="[ field in table that has XML text ]" >

     <!-- One or more SQLSelect tags containing SQL statement needed to obtain XML data -->
     <SQLSelect>[ sql statement used to select the XML text rows ]

   </XMLDataSource>
 

Developed by Raritan Technologies .

Author:
Ted Sullivan

Constructor Summary
DatabaseXMLDataSource()
           
 
Method Summary
 org.w3c.dom.Document getNextResult()
          returns next available document
 boolean hasMoreResults()
          returns true if more results available, false otherwise
 void init(RaritanPageContext rpc)
          Initialize the source.
 void initialize(org.w3c.dom.Element elem)
          Initializes the object from an XML tag or element.
 void shutdown()
          close all connections, or other application resources.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

DatabaseXMLDataSource

public DatabaseXMLDataSource()
Method Detail

init

public void init(RaritanPageContext rpc)
Description copied from interface: IXMLDataSource
Initialize the source. Points to the first available XML Result

Specified by:
init in interface IXMLDataSource

hasMoreResults

public boolean hasMoreResults()
returns true if more results available, false otherwise

Specified by:
hasMoreResults in interface IXMLDataSource

getNextResult

public org.w3c.dom.Document getNextResult()
returns next available document

Specified by:
getNextResult in interface IXMLDataSource

shutdown

public void shutdown()
close all connections, or other application resources.

Specified by:
shutdown in interface IXMLDataSource

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