com.raritantechnologies.utils.tagging
Class XMLTagSource
java.lang.Object
com.raritantechnologies.utils.tagging.XMLTagSource
- All Implemented Interfaces:
- IConfigurable, IHyperlinkTagSource
- public class XMLTagSource
- extends java.lang.Object
- implements IHyperlinkTagSource
Implementation of IHyperlinkTagSource that gets tagging information from XML using an
IXMLDataSource and an
XMLResultProcessor.
XML Configuration Template:
<TagSource class="com.raritantechnologies.utils.tagging.XMLTagSource"
action="[URL of hyperlink action]"
tagTermFields="[ name of XML result field(s) to extract tag(s) from (if more than one use comma separator) ]" >
<!-- XMLSource collects XML documents from some repository (file, DB, RSS, FTP etc..) -->
<XMLSource class="[ class of com.raritantechnologies.xml.dataCollection.IXMLDataSource] ]" >
</XMLSource>
<!-- XMLResultProcessor that will convert XML records into tagging data -->
<XMLResultProcessor >
</XMLResultProcessor>
<!-- Defines the list of parameters that will be extracted from the tagging XML result -->
<!-- and added to the final tagged http request. -->
<RequestParams>
<Param ID="[field id in IResult]" name="[request param name]" />
<Param ID="[ another result field]" name="[another request param]" />
</RequestParams>
<-- Defines a set of optional fixed parameters that will be added to the final tagged http request -->
<FixedParams>
<Param name="[request param name]" value="[fixed value]" />
<Param name="[another param name]" value="[another value]" />
</FixedParams>
<!-- optional TermExtractor that will extract terms from search results -->
<TermExtractor class="[ class of com.raritantechnologies.utils.tagging.ITermExtractor ]" >
<!-- configuration parameters of TermExtractor -->
</TermExtractor>
<!-- optional ResultSetFilter to eliminated unwanted tag values -->
<ResultSetFilter class="[ class of com.raritantechnologies.searchApp.IResultSetFilter ]" >
</ResultSetFilter>
</TagSource>
Developed by
Raritan Technologies Inc..
- Author:
- Ted Sullivan
|
Method Summary |
java.util.HashMap |
getTagWords()
returns a HashMap of first tag word --> URLWordsTagger |
void |
initialize(org.w3c.dom.Element elem)
Initialize TagWriter from an XML configuation element. |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
XMLTagSource
public XMLTagSource()
initialize
public void initialize(org.w3c.dom.Element elem)
- Description copied from interface:
IHyperlinkTagSource
- Initialize TagWriter from an XML configuation element.
- Specified by:
initialize in interface IHyperlinkTagSource
getTagWords
public java.util.HashMap getTagWords()
- Description copied from interface:
IHyperlinkTagSource
- returns a HashMap of first tag word --> URLWordsTagger
- Specified by:
getTagWords in interface IHyperlinkTagSource