com.raritantechnologies.searchApp
Class XMLMemorySearchSourceFactory
java.lang.Object
com.raritantechnologies.searchApp.XMLSearchSourceFactory
com.raritantechnologies.searchApp.XMLMemorySearchSourceFactory
- All Implemented Interfaces:
- IXMLSearchSourceFactory
- public class XMLMemorySearchSourceFactory
- extends XMLSearchSourceFactory
Creates an InMemorySearchSource from an XML source.
Creates a set of IResults by reading XML elements from a set of XML files. The XML elements
are identified by an XPath expression in the XML configuration.
For each Result, a set of paramName=paramValue pairs is created from
all attributes and child tags of the source element.
XML Configuration Template:
<SourceType name="AMemorySource" type="InMemorySearchSource"
displayName="Some search source"
sourceFactoryClass="com.raritantechnologies.searchApp.XMLMemorySearchSourceFactory"
queryProcessor="com.raritantechnologies.searchApp.InMemorySearchSource" >
<recordPath>/ResultSet/Result</recordPath>
<Fields>
<Field ID="[name of field]" xPath="/where/it/is" />
<Field ID="[another field]" xPath="/where/this/one/is" />
<Field ID="[field to filter]" xPath="/another/xPath" >
<!-- String filter used to filter values before adding to InMemorySearchSource -->
<LoadFilter class="[ class of com.raritantechnologies.utils.filter.IStringFilter ]" >
<!-- Configuration properties of this type of StringFilter -->
</LoadFilter>
<!-- String filter used to filter query values when searching InMemorySearchSource -->
<SearchFilter class="[ class of com.raritantechnologies.utils.filter.IStringFilter ]" >
<!-- Configuration properties of this type of StringFilter -->
</SearchFilter>
</Field>
<!-- etc. . . -->
</Fields>
<SecurityModel>
<search>Public</search>
<fullText>Public</fullText>
</SecurityModel>
<sourceURL>[URL to an XML File]</sourceURL>
<sourceURL>[URL to another XML File]</sourceURL>
</SourceType>
Developed by
Raritan Technologies .
- Author:
- Ted Sullivan, Glenn Robitaille
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
XMLMemorySearchSourceFactory
public XMLMemorySearchSourceFactory()
createSearchSources
public SearchSource[] createSearchSources(org.w3c.dom.Element sourceElem,
ISearchFieldMapFactory factory)
- Specified by:
createSearchSources in interface IXMLSearchSourceFactory- Specified by:
createSearchSources in class XMLSearchSourceFactory