edu.berkeley.cs.db.yfilter.icdedemo
Class ICDEDemo

java.lang.Object
  |
  +--java.lang.Thread
        |
        +--edu.berkeley.cs.db.yfilter.icdedemo.ICDEDemo
All Implemented Interfaces:
java.lang.Runnable

public class ICDEDemo
extends java.lang.Thread


Field Summary
 double m_dSlash
           
 char m_levelDist
           
 int m_maxDepth
           
 int m_maxLevel
           
 int m_maxRepeats
           
 double m_nestedPath
           
 double m_predProb
           
 double m_wildcard
           
static java.lang.String m_yfilter_home
           
 
Fields inherited from class java.lang.Thread
MAX_PRIORITY, MIN_PRIORITY, NORM_PRIORITY
 
Constructor Summary
ICDEDemo(java.lang.String dtdAbsolutePath)
           
ICDEDemo(java.lang.String dtdAbsolutePath, Framework frame)
           
 
Method Summary
 void addQueriesToFilter()
          Adds all queries in the query buffer to Xfilter
 void addQueryToBuffer(java.lang.String queryString)
          Adds one query string to buffer and also stores it on file.
 void batchMode()
           
 void changeDirectory(java.lang.String dir)
           
 void changeQueryBufferSize(int size)
           
 void changeXMLBufferSize(int size)
           
 void cycle()
           
 void dequeueQuery()
          Removes the last element in the query buffer
 XMLTree dequeueXML()
          Dequeue the last document in the queue
 void dynamicQueries(long ms)
           
 void enqueueQueries(java.lang.String filename)
          Enqueues queries from a file into the query listener
 void enqueueXML(java.lang.String strFileNameOrDir)
          Enqueues an XML document or documents to the document queue
 void enqueueXML(XMLTree xmltree)
           
 void fillXMLBuffer()
           
 void generateQueries(long amount)
           
 java.lang.String generateXML()
           
 java.lang.String getCurrentQueries()
           
 java.lang.String getCurrentXML()
           
 EXfilter getEXfilter()
          Returns an instance of the EXfilter
 java.lang.String getFilteringArray()
           
 java.util.Vector getFilteringtime()
           
 java.util.ArrayList getMatchedQueries()
           
 java.util.ArrayList getMatchingElements(int id)
           
 java.lang.String getQuery(int queryID)
           
 int getQueryBufferSize()
           
 double getQueryRate()
           
 java.lang.String getStringOfMatchingElements(int id)
           
 java.util.Vector getThroughput()
           
 java.lang.String getThroughputArray()
           
 int getXMLBufferSize()
           
 boolean isBatchMode()
           
 boolean isDynamicUpdateEnabled()
           
static void main(java.lang.String[] args)
           
 void oneXMLdoc()
           
 void pause()
           
 java.util.Vector processDocuments()
          Process all documents in the document buffer
 java.util.ArrayList processXMLTree(XMLTree xmltree)
          Processes an XML Tree and returns the matched results.
 void processXMLTreeAndReport(XMLTree xmltree)
           
 void run()
           
 void runAgain()
           
 void setBatchMode(boolean b)
          Toggles the batch processing mode
 void setDynamicUpdateEnabled(boolean b)
           
 void setQueryRate(double rate)
          Sets the query rate
 void step()
           
 void stepEnd(java.lang.String elementName)
           
 void storeData(long time, int noElements)
           
 void update()
           
 
Methods inherited from class java.lang.Thread
activeCount, checkAccess, countStackFrames, currentThread, destroy, dumpStack, enumerate, getContextClassLoader, getName, getPriority, getThreadGroup, holdsLock, interrupt, interrupted, isAlive, isDaemon, isInterrupted, join, join, join, resume, setContextClassLoader, setDaemon, setName, setPriority, sleep, sleep, start, stop, stop, suspend, toString, yield
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

m_yfilter_home

public static java.lang.String m_yfilter_home

m_maxDepth

public int m_maxDepth

m_wildcard

public double m_wildcard

m_dSlash

public double m_dSlash

m_predProb

public double m_predProb

m_levelDist

public char m_levelDist

m_nestedPath

public double m_nestedPath

m_maxLevel

public int m_maxLevel

m_maxRepeats

public int m_maxRepeats
Constructor Detail

ICDEDemo

public ICDEDemo(java.lang.String dtdAbsolutePath,
                Framework frame)

ICDEDemo

public ICDEDemo(java.lang.String dtdAbsolutePath)
Method Detail

getEXfilter

public EXfilter getEXfilter()
Returns an instance of the EXfilter

Returns:

pause

public void pause()

runAgain

public void runAgain()

cycle

public void cycle()

step

public void step()

stepEnd

public void stepEnd(java.lang.String elementName)

generateQueries

public void generateQueries(long amount)

addQueryToBuffer

public void addQueryToBuffer(java.lang.String queryString)
Adds one query string to buffer and also stores it on file.

Parameters:
queryString -

dequeueQuery

public void dequeueQuery()
Removes the last element in the query buffer


getQuery

public java.lang.String getQuery(int queryID)

getMatchedQueries

public java.util.ArrayList getMatchedQueries()

getMatchingElements

public java.util.ArrayList getMatchingElements(int id)
                                        throws java.lang.Exception
java.lang.Exception

getStringOfMatchingElements

public java.lang.String getStringOfMatchingElements(int id)
                                             throws java.lang.Exception
java.lang.Exception

enqueueQueries

public void enqueueQueries(java.lang.String filename)
Enqueues queries from a file into the query listener

Parameters:
filename - the file containing the queries

dynamicQueries

public void dynamicQueries(long ms)

isBatchMode

public boolean isBatchMode()

setBatchMode

public void setBatchMode(boolean b)
Toggles the batch processing mode

Parameters:
b -

isDynamicUpdateEnabled

public boolean isDynamicUpdateEnabled()

setDynamicUpdateEnabled

public void setDynamicUpdateEnabled(boolean b)

setQueryRate

public void setQueryRate(double rate)
Sets the query rate

Parameters:
rate -

getQueryRate

public double getQueryRate()

getQueryBufferSize

public int getQueryBufferSize()

getXMLBufferSize

public int getXMLBufferSize()

changeQueryBufferSize

public void changeQueryBufferSize(int size)

changeXMLBufferSize

public void changeXMLBufferSize(int size)

addQueriesToFilter

public void addQueriesToFilter()
Adds all queries in the query buffer to Xfilter


enqueueXML

public void enqueueXML(java.lang.String strFileNameOrDir)
Enqueues an XML document or documents to the document queue


fillXMLBuffer

public void fillXMLBuffer()

changeDirectory

public void changeDirectory(java.lang.String dir)

batchMode

public void batchMode()

processDocuments

public java.util.Vector processDocuments()
Process all documents in the document buffer

Returns:
Vector contains an ArrayList of matched queries, one per document

generateXML

public java.lang.String generateXML()

storeData

public void storeData(long time,
                      int noElements)

getFilteringtime

public java.util.Vector getFilteringtime()

getThroughput

public java.util.Vector getThroughput()

getFilteringArray

public java.lang.String getFilteringArray()

getThroughputArray

public java.lang.String getThroughputArray()

processXMLTree

public java.util.ArrayList processXMLTree(XMLTree xmltree)
Processes an XML Tree and returns the matched results.

Parameters:
xmltree - contains parsed XML document
Returns:
ArrayList contains matched query id's.

processXMLTreeAndReport

public void processXMLTreeAndReport(XMLTree xmltree)

oneXMLdoc

public void oneXMLdoc()

getCurrentXML

public java.lang.String getCurrentXML()

getCurrentQueries

public java.lang.String getCurrentQueries()

enqueueXML

public void enqueueXML(XMLTree xmltree)

dequeueXML

public XMLTree dequeueXML()
Dequeue the last document in the queue

Returns:
XMLTree the document de-queued

update

public void update()

run

public void run()
Specified by:
run in interface java.lang.Runnable
Overrides:
run in class java.lang.Thread

main

public static void main(java.lang.String[] args)