edu.stanford.smi.protegex.owl.ui.subsumption
Class ChangedClassesTableModel

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

public class ChangedClassesTableModel
extends AbstractTableModel
implements edu.stanford.smi.protege.util.Disposable

A TableModel containing all classes that are either inconsistent or where the asserted subclasses differ from the computed subclasses.

Author:
Holger Knublauch
See Also:
Serialized Form

Field Summary
static int COL_CLS
           
static int COL_COUNT
           
static int COL_TEXT
           
private  List items
           
private  Hashtable itemsByCls
           
private  ModelListener modelListener
           
private  OWLModel owlModel
           
 
Fields inherited from class javax.swing.table.AbstractTableModel
listenerList
 
Constructor Summary
ChangedClassesTableModel(OWLModel owlModel)
           
 
Method Summary
private  void assertChange(ChangedClassItem item)
           
(package private)  void assertChange(OWLNamedClass cls)
           
private  void assertChanges(Collection items)
           
(package private)  void assertChanges(int[] rows)
           
 boolean contains(edu.stanford.smi.protege.model.Cls cls)
           
 void dispose()
           
private  void fillItems(Collection assertedSubClses, Collection computedSubClses, edu.stanford.smi.protege.model.Cls cls)
           
 String getChangeText(edu.stanford.smi.protege.model.Cls cls)
           
 edu.stanford.smi.protege.model.Cls getCls(int row)
           
 Class getColumnClass(int columnIndex)
           
 int getColumnCount()
           
 String getColumnName(int column)
           
private  ChangedClassItem getOrCreateItem(OWLNamedClass cls)
           
 int getRowCount()
           
 Object getValueAt(int rowIndex, int columnIndex)
           
 void refill()
           
private  void removeDuplicates(Collection a, Collection b)
           
 
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

COL_CLS

public static final int COL_CLS
See Also:
Constant Field Values

COL_TEXT

public static final int COL_TEXT
See Also:
Constant Field Values

COL_COUNT

public static final int COL_COUNT
See Also:
Constant Field Values

items

private List items

itemsByCls

private Hashtable itemsByCls

modelListener

private ModelListener modelListener

owlModel

private OWLModel owlModel
Constructor Detail

ChangedClassesTableModel

public ChangedClassesTableModel(OWLModel owlModel)
Method Detail

assertChange

void assertChange(OWLNamedClass cls)

assertChange

private void assertChange(ChangedClassItem item)

assertChanges

void assertChanges(int[] rows)

assertChanges

private void assertChanges(Collection items)

contains

public boolean contains(edu.stanford.smi.protege.model.Cls cls)

dispose

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

fillItems

private void fillItems(Collection assertedSubClses,
                       Collection computedSubClses,
                       edu.stanford.smi.protege.model.Cls cls)

getChangeText

public String getChangeText(edu.stanford.smi.protege.model.Cls cls)

getCls

public edu.stanford.smi.protege.model.Cls getCls(int row)

getColumnClass

public Class getColumnClass(int columnIndex)
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

getOrCreateItem

private ChangedClassItem getOrCreateItem(OWLNamedClass cls)

getRowCount

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

getValueAt

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

refill

public void refill()

removeDuplicates

private void removeDuplicates(Collection a,
                              Collection b)