visual
Class Crawler

java.lang.Object
  extended by java.lang.Thread
      extended by visual.Crawler
All Implemented Interfaces:
java.lang.Runnable

public class Crawler
extends java.lang.Thread


Nested Class Summary
 
Nested classes/interfaces inherited from class java.lang.Thread
java.lang.Thread.State, java.lang.Thread.UncaughtExceptionHandler
 
Field Summary
 Engine3d engine3d
           
 
Fields inherited from class java.lang.Thread
MAX_PRIORITY, MIN_PRIORITY, NORM_PRIORITY
 
Constructor Summary
Crawler()
           
 
Method Summary
static ExperimentState getExperimentState()
          The 'state' object contains the experiment state for the current visualization.
static java.lang.String getFileName()
           
static long getFileSize()
           
static java.lang.Object getLock()
           
static ExtendedXMLStreamReader getReader()
          Every time that the position is changed by the user, either with by stopping or seeking the visualization process, a new xml stream reader is constructed.
 long getSpeed()
           
 void reset()
          Creates a new xmlParser and reparses the wiseml from the beginning.
 void run()
          The thread's main function.
 void seek(double seeked)
          Creates a new xmlParser and parses the wiseml file from a certain position in the file.
 void setSpeed(long speed)
          Change the visualization Speed.
 
Methods inherited from class java.lang.Thread
activeCount, checkAccess, countStackFrames, currentThread, destroy, dumpStack, enumerate, getAllStackTraces, getContextClassLoader, getDefaultUncaughtExceptionHandler, getId, getName, getPriority, getStackTrace, getState, getThreadGroup, getUncaughtExceptionHandler, holdsLock, interrupt, interrupted, isAlive, isDaemon, isInterrupted, join, join, join, resume, setContextClassLoader, setDaemon, setDefaultUncaughtExceptionHandler, setName, setPriority, setUncaughtExceptionHandler, 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

engine3d

public Engine3d engine3d
Constructor Detail

Crawler

public Crawler()
Method Detail

getExperimentState

public static ExperimentState getExperimentState()
The 'state' object contains the experiment state for the current visualization. It is updated in every parsed event.

Returns:
the experiment State that contains all the data for the current visualization.

getFileName

public static java.lang.String getFileName()
Returns:
the wiseml file path in a String format

getFileSize

public static long getFileSize()
Returns:
the size of the uncompressed wiseml file.

getLock

public static java.lang.Object getLock()
Returns:
the lock associated with the Crawler thread.

getReader

public static ExtendedXMLStreamReader getReader()
Every time that the position is changed by the user, either with by stopping or seeking the visualization process, a new xml stream reader is constructed. This method returns that xml stream reader.

Returns:
the XML Stream reader currently associated with the crawler.

getSpeed

public long getSpeed()
Returns:
the Per-Second Visualization Speed.

reset

public void reset()
Creates a new xmlParser and reparses the wiseml from the beginning. This method is called when a user stops the visualization.


run

public void run()
The thread's main function.

Specified by:
run in interface java.lang.Runnable
Overrides:
run in class java.lang.Thread

seek

public void seek(double seeked)
Creates a new xmlParser and parses the wiseml file from a certain position in the file. It is called when a users seeks by moving the slider.

Parameters:
seeked - the starting timestamp.

setSpeed

public void setSpeed(long speed)
Change the visualization Speed. The speed is translated to the per frame speed by division with fps.

Parameters:
speed - the new speed value.