gui.panel
Class ProcessModel

java.lang.Object
  extended by gui.panel.ProcessModel
All Implemented Interfaces:
javax.swing.table.TableModel

public class ProcessModel
extends java.lang.Object
implements javax.swing.table.TableModel

Class implementing a model of the process. This class is used by the process panel to generate a temporal text mining process.

Author:
Kjell-Inge Skogstad and Trond Řivind Eriksen

Constructor Summary
ProcessModel()
          Constructor that initializes cocnfiguration of operations and creates new lists to hold process information.
 
Method Summary
 void addOperation(int index)
          Method to add an operation to the process.
 void addTableModelListener(javax.swing.event.TableModelListener arg0)
          Method for adding a table model listener.
 java.lang.Class getColumnClass(int c)
          Method returning the class type of a column.
 int getColumnCount()
          Method returning the number of columns.
 java.lang.String getColumnName(int arg0)
          Method returning name of column.
 OperationConfig getOpConfig()
           
 Operation getOperation(int index)
          Method returning a specific operation given by its index.
 java.util.ArrayList getPossibleOperations()
          Method for retrieving the description of the possible operations.
 java.util.ArrayList getProcess()
          Method for getting the chosen process.
 int getRowCount()
          Method returning the number of rows.
 java.lang.Object getValueAt(int row, int column)
          Method returning the value of a cell.
 boolean isCellEditable(int row, int column)
          Method returning wether the cell is editable or not.
 void removeOperation(int index)
          Method for removing an operation from the process given by its index.
 void removeTableModelListener(javax.swing.event.TableModelListener arg0)
          Method for removing a table model listener.
 void setValueAt(java.lang.Object value, int row, int column)
          Method setting the value of a cell.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ProcessModel

public ProcessModel()
Constructor that initializes cocnfiguration of operations and creates new lists to hold process information.

Method Detail

getOpConfig

public OperationConfig getOpConfig()

addOperation

public void addOperation(int index)
Method to add an operation to the process. The index shows the order of the operations.

Parameters:
index - The operation index

getOperation

public Operation getOperation(int index)
Method returning a specific operation given by its index.

Parameters:
index - The index
Returns:
The operation

removeOperation

public void removeOperation(int index)
Method for removing an operation from the process given by its index.

Parameters:
index - The operation index

getPossibleOperations

public java.util.ArrayList getPossibleOperations()
Method for retrieving the description of the possible operations. This method is used by the process panel to find alternative operations.

Returns:
List of possible operations

getProcess

public java.util.ArrayList getProcess()
Method for getting the chosen process. This process is given as an arraylist of operations.

Returns:
The process

getRowCount

public int getRowCount()
Method returning the number of rows.

Specified by:
getRowCount in interface javax.swing.table.TableModel

getColumnCount

public int getColumnCount()
Method returning the number of columns.

Specified by:
getColumnCount in interface javax.swing.table.TableModel

getColumnName

public java.lang.String getColumnName(int arg0)
Method returning name of column.

Specified by:
getColumnName in interface javax.swing.table.TableModel

getColumnClass

public java.lang.Class getColumnClass(int c)
Method returning the class type of a column.

Specified by:
getColumnClass in interface javax.swing.table.TableModel

isCellEditable

public boolean isCellEditable(int row,
                              int column)
Method returning wether the cell is editable or not.

Specified by:
isCellEditable in interface javax.swing.table.TableModel

getValueAt

public java.lang.Object getValueAt(int row,
                                   int column)
Method returning the value of a cell.

Specified by:
getValueAt in interface javax.swing.table.TableModel

setValueAt

public void setValueAt(java.lang.Object value,
                       int row,
                       int column)
Method setting the value of a cell.

Specified by:
setValueAt in interface javax.swing.table.TableModel

addTableModelListener

public void addTableModelListener(javax.swing.event.TableModelListener arg0)
Method for adding a table model listener. Not used.

Specified by:
addTableModelListener in interface javax.swing.table.TableModel

removeTableModelListener

public void removeTableModelListener(javax.swing.event.TableModelListener arg0)
Method for removing a table model listener. Not used.

Specified by:
removeTableModelListener in interface javax.swing.table.TableModel