com.raritantechnologies.rql.topic
Class XMLTopicRenderer
java.lang.Object
com.raritantechnologies.rql.topic.XMLTopicRenderer
- All Implemented Interfaces:
- IConfigurable, ITopicRenderer
- public class XMLTopicRenderer
- extends java.lang.Object
- implements ITopicRenderer
Renders a Topic in an XML format.
Example XML Format:
<Topic name="[ topic name ]"
ID="[ unique ID ]"
operator="[ topic Operator: AND | OR | NEAR etc. ]"
field="[ name of data field to which topic operation is to be applied ]" >
<Text><![CDATA[ the text of the node (if any) ]]></Text>
<!-- 0 or more Modifiers - operator type-dependent data that is used to evaluate the operator -->
<Modifiers>
</Modifiers>
<!-- 0 or more child Topic nodes -->
<Topic>
<!-- As above ... -->
</Topic>
</Topic>
|
Method Summary |
void |
initialize(org.w3c.dom.Element elem)
Initializes the object from an XML tag or element. |
java.lang.String |
renderTopic(Topic topic)
|
java.lang.String |
renderTopic(Topic root,
java.util.Set subTopics,
boolean skipSubTopics)
|
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
XMLTopicRenderer
public XMLTopicRenderer()
renderTopic
public java.lang.String renderTopic(Topic topic)
- Specified by:
renderTopic in interface ITopicRenderer
renderTopic
public java.lang.String renderTopic(Topic root,
java.util.Set subTopics,
boolean skipSubTopics)
- Specified by:
renderTopic in interface ITopicRenderer
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