com.raritantechnologies.utils.tree
Class TemplateTreeXMLGenerator
java.lang.Object
com.raritantechnologies.utils.tree.TemplateTreeXMLGenerator
- All Implemented Interfaces:
- IConfigurable, ITreeXMLGenerator
- public class TemplateTreeXMLGenerator
- extends java.lang.Object
- implements ITreeXMLGenerator
Uses an XML Template to output Tree data.
XML Configuration Template:
<TreeXMLGenerator class="com.raritantechnologies.utils.tree.TemplateTreeXMLGenerator" >
<TreeFilter class="[ class of com.raritantechnologies.utils.tree.ITreeFilter" >
</TreeFilter>
<TreeHeader><![CDATA[ Tree XML Header ]]></TreeHeader>
<!-- Alternatively can put tree header in a separate file: -->
<TreeHeader fileName="[ tree header file ]" />
<TreeFooter><![CDATA[ Tree XML Footer ]]></TreeFooter>
<!-- Node template contains XML with {[ATTRIBUTE: attribute name ]} placeholders -->
<NodeTemplate>
<![CDATA[
]]>
</NodeTemplate>
<!-- One or more Attribute Templates contained in NodeTemplate -->
<!-- uses {VALUE} placeholder for the attribute value -->
<AttributeTemplate attribute="[ name of attribute ]" >
</AttributeTemplate>
<!-- marked by {RESULT_SET_TEMPLATE} placeholder in NodeTemplate -->
<ResultSetTemplate>
<![CDATA[
<]]>
</ResultSetTemplate>
<!-- marked by {RESULT_TEMPLATE:name} placeholder in ResultSetTemplate -->
<ResultTemplate name="[ name of result template ]" >
<!-- Result Matcher -->
<ResultMatcher class="[ class of com.raritantechnologies.searchApp.IResultMatcher ]" >
</ResultMatcher>
<Template>
</Template>
</ResultTemplate>
</TreeXMLGenerator>
Developed by
Raritan Technologies Inc..
- Author:
- Ted Sullivan
|
Field Summary |
static java.lang.String |
PARENT_ID
|
|
Method Summary |
java.lang.String |
getXML(TreeRoot tree)
returns an XML string that represents data in a TreeRoot object. |
void |
initialize(org.w3c.dom.Element elem)
Initializes the object from an XML tag or element. |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
PARENT_ID
public static final java.lang.String PARENT_ID
- See Also:
- Constant Field Values
TemplateTreeXMLGenerator
public TemplateTreeXMLGenerator()
getXML
public java.lang.String getXML(TreeRoot tree)
- Description copied from interface:
ITreeXMLGenerator
- returns an XML string that represents data in a TreeRoot object.
- Specified by:
getXML in interface ITreeXMLGenerator
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