com.raritantechnologies.xml.xQuery
Class XQueryTopicRenderer
java.lang.Object
com.raritantechnologies.xml.xQuery.XQueryTopicRenderer
- All Implemented Interfaces:
- IConfigurable, ITopicRenderer
- Direct Known Subclasses:
- MarkLogicTopicRenderer
- public class XQueryTopicRenderer
- extends java.lang.Object
- implements ITopicRenderer
Renders a Topic as an XQuery FLWOR expression.
Topic fields are mapped to XPath expressions in the XML source.
Order by and Return portions of the FLWOR expression are provided in the configuration as
XML templates.
XML Configuration Template:
<TopicRenderer class="com.raritantechnologies.xml.xQuery.XQueryTopicRenderer"
defaultField="[ name of default topic field (if no IN operators are used ) ]" >
<!-- Maps a Topic fieldname ('zonespec') to an XML XPath expression -->
<FieldXPathMap>
<Field fieldID="[ name of topic field or zonespec ]" xPathExpr="[ value of XPath expression in XQuery For ]" />
</FieldXPathMap>
<OrderByExpression>
</OrderByExpression>
<ReturnExpression>
</ReturnExpression>
</TopicRenderer>
Developed by
Raritan Technologies Inc..
- Author:
- Ted Sullivan
|
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)
|
protected java.lang.String |
renderWhereClause(Topic topic,
java.util.Set subTopics,
boolean skipSubTopics,
java.lang.String parentField)
|
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
defaultField
protected java.lang.String defaultField
XQueryTopicRenderer
public XQueryTopicRenderer()
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
renderWhereClause
protected java.lang.String renderWhereClause(Topic topic,
java.util.Set subTopics,
boolean skipSubTopics,
java.lang.String parentField)
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