Protégé-OWL 3.3.1

edu.stanford.smi.protegex.owl.ui.search.finder
Class ResultsViewModelFind

java.lang.Object
  extended by javax.swing.table.AbstractTableModel
      extended by edu.stanford.smi.protegex.owl.ui.search.finder.ResultsViewModelFind
All Implemented Interfaces:
Find, Serializable, ListModel, TableModel
Direct Known Subclasses:
DefaultClassFind, DefaultIndividualFind, DefaultPropertyFind, HiddenClassFind

public class ResultsViewModelFind
extends AbstractTableModel
implements Find, ListModel

Checks the name, current browser slot and any synonym slots allocated

Author:
Nick Drummond, Medical Informatics Group, University of Manchester 03-Oct-2005
See Also:
Serialized Form

Field Summary
protected  List orderedKeys
           
 
Fields inherited from class javax.swing.table.AbstractTableModel
listenerList
 
Fields inherited from interface edu.stanford.smi.protegex.owl.ui.search.finder.Find
CONTAINS, ENDS_WITH, EXACTLY_MATCHES, searchTypeString, STARTS_WITH
 
Constructor Summary
ResultsViewModelFind(OWLModel owlModel, int type)
           
 
Method Summary
 void addListDataListener(ListDataListener l)
           
 void addResultListener(SearchListener l)
           
 void cancelSearch()
           
 int getColumnCount()
           
 String getColumnName(int column)
           
 String getDescription()
           
 Object getElementAt(int index)
           
 String getLastSearch()
           
 OWLModel getModel()
           
 int getNumSearchProperties()
           
 int getResultCount()
           
 Set getResultResources()
           
 Map getResults()
          This method can be called to get the current results
 int getRowCount()
           
 int getSearchType()
           
 int getSize()
           
 String getSummaryText()
           
 Object getValueAt(int rowIndex, int columnIndex)
           
protected  boolean isValidFrameToSearch(edu.stanford.smi.protege.model.Frame f)
           
 void removeListDataListener(ListDataListener l)
           
 boolean removeResultListener(SearchListener l)
           
 void startSearch(String s)
          Delegates to internal find
 void startSearch(String s, int searchType)
          This method should start the search.
 
Methods inherited from class javax.swing.table.AbstractTableModel
addTableModelListener, findColumn, fireTableCellUpdated, fireTableChanged, fireTableDataChanged, fireTableRowsDeleted, fireTableRowsInserted, fireTableRowsUpdated, fireTableStructureChanged, getColumnClass, 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

orderedKeys

protected List orderedKeys
Constructor Detail

ResultsViewModelFind

public ResultsViewModelFind(OWLModel owlModel,
                            int type)
Method Detail

getSize

public int getSize()
Specified by:
getSize in interface ListModel

getElementAt

public Object getElementAt(int index)
Specified by:
getElementAt in interface ListModel

addListDataListener

public void addListDataListener(ListDataListener l)
Specified by:
addListDataListener in interface ListModel

removeListDataListener

public void removeListDataListener(ListDataListener l)
Specified by:
removeListDataListener in interface ListModel

getRowCount

public int getRowCount()
Specified by:
getRowCount 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
Overrides:
getColumnName in class AbstractTableModel

getValueAt

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

startSearch

public void startSearch(String s)
Delegates to internal find

Specified by:
startSearch in interface Find
Parameters:
s -

startSearch

public void startSearch(String s,
                        int searchType)
Description copied from interface: Find
This method should start the search.

Specified by:
startSearch in interface Find
Parameters:
s - the string to search for

cancelSearch

public void cancelSearch()
Specified by:
cancelSearch in interface Find

getResults

public Map getResults()
Description copied from interface: Find
This method can be called to get the current results

Specified by:
getResults in interface Find
Returns:
a map of Resources as keys with SearchResultItem objects as values

getResultResources

public Set getResultResources()
Specified by:
getResultResources in interface Find

getResultCount

public int getResultCount()
Specified by:
getResultCount in interface Find

getLastSearch

public String getLastSearch()
Specified by:
getLastSearch in interface Find

getSummaryText

public String getSummaryText()
Specified by:
getSummaryText in interface Find

getDescription

public String getDescription()
Specified by:
getDescription in interface Find

getModel

public OWLModel getModel()
Specified by:
getModel in interface Find

getNumSearchProperties

public int getNumSearchProperties()
Specified by:
getNumSearchProperties in interface Find

getSearchType

public int getSearchType()
Specified by:
getSearchType in interface Find

addResultListener

public void addResultListener(SearchListener l)
Specified by:
addResultListener in interface Find

removeResultListener

public boolean removeResultListener(SearchListener l)
Specified by:
removeResultListener in interface Find

isValidFrameToSearch

protected boolean isValidFrameToSearch(edu.stanford.smi.protege.model.Frame f)

Protégé-OWL 3.3.1

Submit a bug report or feature request
Copyright (c) 1998-2007 Stanford University.