edu.stanford.smi.protegex.owl.ui.search.finder
Class DefaultFind
java.lang.Object
javax.swing.table.AbstractTableModel
edu.stanford.smi.protegex.owl.ui.search.finder.DefaultFind
- All Implemented Interfaces:
- Find, ListModel, Serializable, TableModel
- Direct Known Subclasses:
- DefaultClassFind, DefaultIndividualFind, DefaultPropertyFind
- public class DefaultFind
- extends AbstractTableModel
- implements Find
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
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 |
MAX_MATCHES
private static final int MAX_MATCHES
- See Also:
- Constant Field Values
owlModel
protected OWLModel owlModel
results
protected Map results
orderedKeys
protected List orderedKeys
string
protected String string
listeners
private List listeners
DefaultFind
public DefaultFind(OWLModel owlModel)
startSearch
public void startSearch(String s)
- Description copied from interface:
Find
- This method should start the search.
- Specified by:
startSearch
in interface Find
- Parameters:
s
- the string to search for
getSearchProperties
protected List getSearchProperties()
- by default automatically search the name and the current browser slot
as well as the search synonym slots (if set)
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
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
searchOnSlot
protected Map searchOnSlot(edu.stanford.smi.protege.model.Slot searchProp,
String searchStr,
String lang)
isValidFrameToSearch
protected boolean isValidFrameToSearch(edu.stanford.smi.protege.model.Frame f)
- Only look at classes, properties and individuals
- Parameters:
f
- a frame
- Returns:
- true if the given frame should be included in the results
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
getValueAt
public Object getValueAt(int rowIndex,
int columnIndex)
- Specified by:
getValueAt
in interface TableModel
fireDataChanged
private void fireDataChanged()