com.raritantechnologies.verity.query
Class SimpleQueryFormatter

java.lang.Object
  extended bycom.raritantechnologies.verity.query.SimpleQueryFormatter
All Implemented Interfaces:
IConfigurable, IQueryFormatter

public class SimpleQueryFormatter
extends java.lang.Object
implements IQueryFormatter, IConfigurable

Simplifies VQL queries for user-friendly display.

XML Configuration Template:
  <QueryFormatter class="com.raritantechnologies.verity.query.SimpleQueryFormatter" >

    <ReplaceChars>
      <!-- One or more Char elements: -->
      <Char oldChar="[ character to replace ]" newChar="[ replacement character ]" />
      <Char oldChar="[ another character ]"    newChar="[ another replacement ]" />
    </ReplaceChars>

  </QueryFormatter>
 

Developed by Raritan Technologies .

Author:
Kepler Gelotte

Constructor Summary
SimpleQueryFormatter()
           
 
Method Summary
 void appendCounts(boolean addCounts)
           
 java.lang.String formatQuery(RaritanPageContext pageContext)
          Format a query from the current input context:
 java.lang.String formatQuery(java.lang.String sessionID, OrderedMap queryParams)
           
 java.lang.String formatQuery(java.lang.String sessionID, QueryResultBean qrb)
          Returns a string for the form parameters submitted in queryParams that is in the correct format.
 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
 

Constructor Detail

SimpleQueryFormatter

public SimpleQueryFormatter()
Method Detail

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 IQueryFormatter

appendCounts

public void appendCounts(boolean addCounts)
Specified by:
appendCounts in interface IQueryFormatter

formatQuery

public java.lang.String formatQuery(java.lang.String sessionID,
                                    OrderedMap queryParams)
Specified by:
formatQuery in interface IQueryFormatter

formatQuery

public java.lang.String formatQuery(RaritanPageContext pageContext)
Description copied from interface: IQueryFormatter
Format a query from the current input context:

Specified by:
formatQuery in interface IQueryFormatter

formatQuery

public java.lang.String formatQuery(java.lang.String sessionID,
                                    QueryResultBean qrb)
Description copied from interface: IQueryFormatter
Returns a string for the form parameters submitted in queryParams that is in the correct format.

Specified by:
formatQuery in interface IQueryFormatter