wt.wrmf.logs
Class QueryProcessor

java.lang.Object
  extended bywt.wrmf.logs.QueryProcessor

public class QueryProcessor
extends Object

executes a query on a log and generates output with matching records. This is converted to html for viewing. xsl is used both to search the log and convert to html


Constructor Summary
QueryProcessor()
           
 
Method Summary
 void applyHTMLConversion(String xmlFilename, String xslFilename, String resultHTMLFilename)
          convert a log result file to HTML The resulting HTML is controlled by the xsl file.
(package private)  String createQueryXsl(String query, String logdir, String outputdir, QueryFileSet files)
           
 String executeQuery(String query, String log, String logdir, String outputdir, boolean latestonly, boolean translateToHTML)
          query - xsl condition to select records example: time>'2000/04/27 15:39:35' log - name of the log, example: replication logdir - directory where log files and xsl files are stored.
 String executeQueryHTML(String query, String log, String logdir, String outputdir, boolean latestonly)
          returns html filename for results see executeQuery for param details see applyHTMLConversion for HTML details Normally the result file may not contain all the HTML header and trailer tags like etc.
 String executeQueryXML(String query, String log, String logdir, String outputdir, boolean latestonly)
          returns xml filename for results see executeQuery for param details
static void main(String[] args)
           
protected  void writeResultHeaders(QueryFileSet files)
           
protected  void writeResultTrailers(QueryFileSet files)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

QueryProcessor

public QueryProcessor()
Method Detail

executeQueryHTML

public String executeQueryHTML(String query,
                               String log,
                               String logdir,
                               String outputdir,
                               boolean latestonly)
                        throws IOException
returns html filename for results see executeQuery for param details see applyHTMLConversion for HTML details Normally the result file may not contain all the HTML header and trailer tags like etc. This is useful for pasting the results into an appropriate template.

Throws:
IOException

executeQueryXML

public String executeQueryXML(String query,
                              String log,
                              String logdir,
                              String outputdir,
                              boolean latestonly)
                       throws IOException
returns xml filename for results see executeQuery for param details

Throws:
IOException

executeQuery

public String executeQuery(String query,
                           String log,
                           String logdir,
                           String outputdir,
                           boolean latestonly,
                           boolean translateToHTML)
                    throws IOException
query - xsl condition to select records example: time>'2000/04/27 15:39:35' log - name of the log, example: replication logdir - directory where log files and xsl files are stored. example: d:\ptc\windchill\logs outputdir - directory where query results will be stored

Throws:
IOException

applyHTMLConversion

public void applyHTMLConversion(String xmlFilename,
                                String xslFilename,
                                String resultHTMLFilename)
convert a log result file to HTML The resulting HTML is controlled by the xsl file.


createQueryXsl

String createQueryXsl(String query,
                      String logdir,
                      String outputdir,
                      QueryFileSet files)
                throws IOException
Throws:
IOException

writeResultHeaders

protected void writeResultHeaders(QueryFileSet files)
                           throws IOException
Throws:
IOException

writeResultTrailers

protected void writeResultTrailers(QueryFileSet files)
                            throws IOException
Throws:
IOException

main

public static void main(String[] args)