control
Class Control

java.lang.Object
  extended by java.lang.Thread
      extended by control.Control
All Implemented Interfaces:
java.lang.Runnable

public class Control
extends java.lang.Thread

The control class handling the application logic. This class is responsible for handling the temporal text mining process and initializes the rest of the application.

Author:
Kjell-Inge Skogstad and Trond Řivind Eriksen

Nested Class Summary
 
Nested classes/interfaces inherited from class java.lang.Thread
java.lang.Thread.State, java.lang.Thread.UncaughtExceptionHandler
 
Field Summary
 
Fields inherited from class java.lang.Thread
MAX_PRIORITY, MIN_PRIORITY, NORM_PRIORITY
 
Constructor Summary
Control(boolean gui)
          Constructor that initializes the gui.
 
Method Summary
 java.lang.String getDocReport(int index)
          Returns the report of a specific document given by its index.
static void main(java.lang.String[] args)
          Main method initializing a new control instance.
 void openDataSet(java.lang.String location)
          Method for setting the data set to be used in the application.
 void run()
          Run method containing the process logic.
 void runProcess()
          Method used to start the temporal text mining process in a separate thread.
 void saveDataSet(java.lang.String location)
          Method for saving a data set.
 void saveReport(java.lang.String location, java.lang.String report)
          Method for saving a report.
 void setDataset(java.lang.String url)
           
 
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
 

Constructor Detail

Control

public Control(boolean gui)
Constructor that initializes the gui.

Method Detail

setDataset

public void setDataset(java.lang.String url)

openDataSet

public void openDataSet(java.lang.String location)
Method for setting the data set to be used in the application. This method uses a reference to the source of the dataset (file) and use a file handler to retrieve the dataset.

Parameters:
location - The location of the dataset file

saveDataSet

public void saveDataSet(java.lang.String location)
Method for saving a data set. The location sets the file to which the data set shall be saved.

Parameters:
location - The location

saveReport

public void saveReport(java.lang.String location,
                       java.lang.String report)
Method for saving a report. The location sets the file to which the report shall be saved.

Parameters:
location - The location
report - The report

getDocReport

public java.lang.String getDocReport(int index)
Returns the report of a specific document given by its index.

Parameters:
index - The index
Returns:
The report

runProcess

public void runProcess()
Method used to start the temporal text mining process in a separate thread.


run

public void run()
Run method containing the process logic. This method is to be started by the runProcess() method.

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

main

public static void main(java.lang.String[] args)
Main method initializing a new control instance.

Parameters:
args - Arguments