com.raritantechnologies.searchApp.query
Class QueryResultReaderTopicSetBuilder
java.lang.Object
com.raritantechnologies.searchApp.query.QueryResultReaderTopicSetBuilder
- All Implemented Interfaces:
- IConfigurable, ITopicSetBuilder
- public class QueryResultReaderTopicSetBuilder
- extends java.lang.Object
- implements ITopicSetBuilder
Builds a TopicSet from an persisted query read by an
IQueryResultSetReader.
XML Configuration Template:
<TopicSetBuilder class="com.raritantechnologies.searchApp.query.QueryResultSetReaderTopicSetBuilder" >
<QueryResultSetReader class="[ class of com.raritantechnologies.searchApp.query.IQueryResultSetReader ]" >
</QueryResultSetReader>
<!-- Transforms query parameters to query syntax -->
<QueryParser>
</QueryParser>
<!-- One QueryTopicMap to define the mapping of IResult fields to topic name field and term fields -->
<QueryTopicMap nameField="[ query field that gets topic name ]"
termOperator="[ AND | OR(default) ]" >
<!-- One or more term fields. -->
<TermField name="[ name of query Field ]" />
<!-- Alternatively - can use an ITopicParser to transform a result field value into a topic -->
<TopicParser class="[ class of com.raritantechnologies.rql.topic.ITopicParser"
queryField="[ name of result field that has the query to be parsed ]" >
</TopicParser>
<!-- Query fields that are added as Topic attributes (used for tagging purposes) -->
<TopicAttributes>
<Attribute resultField="[ name of query field ]" topicAttribute="[ name of topic attribute ]" />
</TopicAttributes>
</QueryTopicMap>
</TopicSetBuilder>
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
QueryResultReaderTopicSetBuilder
public QueryResultReaderTopicSetBuilder()
buildTopicSet
public TopicSet buildTopicSet(RaritanPageContext pageContext)
- Specified by:
buildTopicSet in interface ITopicSetBuilder
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