edu.stanford.smi.protegex.owl.ui.testing
Class OWLTestResultsTableModel

java.lang.Object
  extended byjavax.swing.table.AbstractTableModel
      extended byedu.stanford.smi.protegex.owl.ui.testing.OWLTestResultsTableModel
All Implemented Interfaces:
edu.stanford.smi.protege.util.Disposable, OWLTestResultsTableModelColumns, Serializable, TableModel

public class OWLTestResultsTableModel
extends AbstractTableModel
implements edu.stanford.smi.protege.util.Disposable, OWLTestResultsTableModelColumns

A TableModel displaying the results of an OWLTest run. This has two columns - one for the anonymous class, and one for the named host class.

Author:
Holger Knublauch
See Also:
Serialized Form

Field Summary
static int COL_COUNT
           
static int COL_MESSAGE
           
static int COL_SOURCE
           
static int COL_TYPE
           
private  List items
           
private  ModelListener listener
           
private  OWLModel owlModel
           
 
Fields inherited from class javax.swing.table.AbstractTableModel
listenerList
 
Constructor Summary
OWLTestResultsTableModel(OWLModel owlModel, Collection items)
           
 
Method Summary
private  void deleteItemsWith(edu.stanford.smi.protege.model.Frame frame)
           
 void dispose()
           
 Class getColumnClass(int column)
           
 int getColumnCount()
           
 String getColumnName(int column)
           
 OWLTestResult getOWLTestResult(int row)
           
 int getRowCount()
           
(package private)  RDFResource getSource(int row)
           
 Object getValueAt(int rowIndex, int columnIndex)
           
 void removeRow(int row)
           
 String saveToFile(File file)
          Saves the entries of this TableModel to a text file.
 void setItems(Collection items)
           
 
Methods inherited from class javax.swing.table.AbstractTableModel
addTableModelListener, findColumn, fireTableCellUpdated, fireTableChanged, fireTableDataChanged, fireTableRowsDeleted, fireTableRowsInserted, fireTableRowsUpdated, fireTableStructureChanged, getListeners, getTableModelListeners, isCellEditable, removeTableModelListener, setValueAt
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

items

private List items

owlModel

private OWLModel owlModel

listener

private ModelListener listener

COL_TYPE

public static final int COL_TYPE
See Also:
Constant Field Values

COL_SOURCE

public static final int COL_SOURCE
See Also:
Constant Field Values

COL_MESSAGE

public static final int COL_MESSAGE
See Also:
Constant Field Values

COL_COUNT

public static final int COL_COUNT
See Also:
Constant Field Values
Constructor Detail

OWLTestResultsTableModel

public OWLTestResultsTableModel(OWLModel owlModel,
                                Collection items)
Method Detail

deleteItemsWith

private void deleteItemsWith(edu.stanford.smi.protege.model.Frame frame)

dispose

public void dispose()
Specified by:
dispose in interface edu.stanford.smi.protege.util.Disposable

getColumnClass

public Class getColumnClass(int column)
Specified by:
getColumnClass in interface TableModel

getColumnCount

public int getColumnCount()
Specified by:
getColumnCount in interface TableModel

getColumnName

public String getColumnName(int column)
Specified by:
getColumnName in interface TableModel

getSource

RDFResource getSource(int row)

getOWLTestResult

public OWLTestResult getOWLTestResult(int row)

getRowCount

public int getRowCount()
Specified by:
getRowCount in interface TableModel

getValueAt

public Object getValueAt(int rowIndex,
                         int columnIndex)
Specified by:
getValueAt in interface TableModel

removeRow

public void removeRow(int row)

saveToFile

public String saveToFile(File file)
Saves the entries of this TableModel to a text file.

Parameters:
file - the target File
Returns:
an error message or null if everything was fine

setItems

public void setItems(Collection items)