com.raritantechnologies.searchApp.query
Class XMLQueryResultSetWriter
java.lang.Object
com.raritantechnologies.searchApp.query.XMLQueryResultSetWriter
- All Implemented Interfaces:
- IConfigurable, IQueryResultSetWriter
- public class XMLQueryResultSetWriter
- extends java.lang.Object
- implements IQueryResultSetWriter
Saves queries and result statistics to persistent storage as an XML File.
XML Configuration Template:
<QueryResultSetWriter class="com.raritantechnologies.searchApp.query.XMLQueryResultSetWriter"
filePath="[ path to directory to store XML files ]"
fileNameParam="[ optional name of adhoc parameter that contains query result name ]"
queryResultTag="[ (optional) alternate name for QueryResult Tag ]"
queryParamsTag="[ (optional) alternate name for QueryParams Tag ]"
queryFieldTag="[ (optional) alternate name for Param Tag ]" >
<!-- Optional QueryParser that will transform query parameters before writing -->
<QueryParser class="[ class of com.raritantechnologies.searchApp.IQueryParser ]" >
</QueryParser>
<!-- Optional list of query fields to save from input -->
<SavedFields>
</SavedFields>
</QueryResultSetWriter>
XML Format of saved Queries:
<QueryResultSet applicationName="appName" >
<QueryResult name="queryname" user="userName"
searchSources="[ search source name ]" >
<QueryParams>
<Param>
<Name>[ name of field ]</Name>
<Value>[ value of field ]</Value>
</Param>
<Param>
<Name>[ name of field ]</Name>
<Value>[ value of field ]</Value>
</Param>
</QueryParams>
<AdhocParams>
<Param>
<Name>[ name of field ]</Name>
<Value>[ value of field ]</Value>
</Param>
<Param>
<Name>[ name of field ]</Name>
<Value>[ value of field ]</Value>
</Param>
</AdhocParams>
<ResultSet>
</ResultSet>
</QueryResult>
</QueryResultSet>
Developed by
Raritan Technologies .
- Author:
- Ted Sullivan
| Fields inherited from interface com.raritantechnologies.searchApp.query.IQueryResultSetWriter |
ADHOC, APPLICATION_NAME, DATE, IGNORE_COLUMN, PAGE_SIZE, QUERY_ID, QUERY_NAME, RESP_TIME, ROLE_NAME, SESSION_ID, SOURCE_NAMES, START_REC, TOTAL_DOCS, USER_NAME |
|
Method Summary |
void |
deleteQuery(RaritanPageContext pContext,
java.lang.Integer queryID)
|
void |
deleteQuery(RaritanPageContext pContext,
java.util.Map Params)
|
java.lang.Integer |
getNextID()
|
java.lang.String[] |
getSavedFields()
|
void |
initialize(org.w3c.dom.Element elem)
Initializes the object from an XML tag or element. |
void |
modifyQuery(RaritanPageContext pContext,
QueryResultBean queryResultBean)
|
void |
modifyQuery(RaritanPageContext pageContext,
java.lang.String queryName,
java.util.HashMap params)
|
void |
modifyQuery(RaritanPageContext pageContext,
java.lang.String queryName,
java.lang.String paramName,
java.lang.String paramValue,
boolean isAdhocParam)
|
void |
saveQueries(RaritanPageContext pContext,
QueryResultBeanSet querySet)
|
void |
saveQuery(RaritanPageContext pageContext,
QueryResultBean query)
|
void |
setQueryParser(IQueryParser queryParser)
Set the queryParser to be used to transform the query before it is written
to the persistent source. |
void |
setSavedFields(java.lang.String[] savedFields)
|
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
XMLQueryResultSetWriter
public XMLQueryResultSetWriter()
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 IQueryResultSetWriter
setQueryParser
public void setQueryParser(IQueryParser queryParser)
- Description copied from interface:
IQueryResultSetWriter
- Set the queryParser to be used to transform the query before it is written
to the persistent source.
- Specified by:
setQueryParser in interface IQueryResultSetWriter
getNextID
public java.lang.Integer getNextID()
- Specified by:
getNextID in interface IQueryResultSetWriter
getSavedFields
public java.lang.String[] getSavedFields()
- Specified by:
getSavedFields in interface IQueryResultSetWriter
setSavedFields
public void setSavedFields(java.lang.String[] savedFields)
- Specified by:
setSavedFields in interface IQueryResultSetWriter
saveQuery
public void saveQuery(RaritanPageContext pageContext,
QueryResultBean query)
- Specified by:
saveQuery in interface IQueryResultSetWriter
deleteQuery
public void deleteQuery(RaritanPageContext pContext,
java.lang.Integer queryID)
- Specified by:
deleteQuery in interface IQueryResultSetWriter
deleteQuery
public void deleteQuery(RaritanPageContext pContext,
java.util.Map Params)
- Specified by:
deleteQuery in interface IQueryResultSetWriter
modifyQuery
public void modifyQuery(RaritanPageContext pContext,
QueryResultBean queryResultBean)
- Specified by:
modifyQuery in interface IQueryResultSetWriter
modifyQuery
public void modifyQuery(RaritanPageContext pageContext,
java.lang.String queryName,
java.lang.String paramName,
java.lang.String paramValue,
boolean isAdhocParam)
- Specified by:
modifyQuery in interface IQueryResultSetWriter
modifyQuery
public void modifyQuery(RaritanPageContext pageContext,
java.lang.String queryName,
java.util.HashMap params)
- Specified by:
modifyQuery in interface IQueryResultSetWriter
saveQueries
public void saveQueries(RaritanPageContext pContext,
QueryResultBeanSet querySet)
- Specified by:
saveQueries in interface IQueryResultSetWriter