.
Other child elements are determined by query and are returned as
elements with a "name" attribute and the value as the content.
- See Also:
- Serialized Form
Field Summary |
static javax.swing.ImageIcon |
blankIcon
the icon for blank, nothing there |
protected static int |
CREATEDATEINDEX
Store the index of createdate in resultsVector |
protected static int |
DOCIDINDEX
Store the index of docid in resultsVector |
protected static int |
DOCNAMEINDEX
Store the index of doc name in resultsVector |
protected static int |
DOCTYPEINDEX
Store the index of doc type in resultsVector |
protected static int |
ISLOCALINDEX
Store the index of islocal in resultsVector |
protected static int |
ISMETACATINDEX
Store the index of ismetacat in resultsVector |
protected static int |
KEYWORDSINDEX
Store the index of keywords in resultsVector |
static javax.swing.ImageIcon |
localIcon
The icon for representing local storage. |
static javax.swing.ImageIcon |
metacatIcon
The icon for representing metacat storage. |
static javax.swing.ImageIcon |
packageDataIcon
The icon for representing pakcage and data file |
static javax.swing.ImageIcon |
packageIcon
The icon for representing package |
protected static int |
PACKAGEICONINDEX
Store the index of package icon in resultsVector |
protected java.util.Vector |
resultsVector
Store each row of the result set as a row in a Vector |
protected static int |
SURNAMEINDEX
Store the index of surname in resultsVector |
protected static int |
TITLEINDEX
Store the index of titl in resultsVector |
protected static int |
TRIPLEINDEX
Store the index of triple in resultsVector |
protected static int |
UPDATEDATEINDEX
Store the index of update in resultsVector |
Fields inherited from class javax.swing.table.AbstractTableModel |
listenerList |
Constructor Summary |
ResultSet(Query query,
java.lang.String source,
java.io.InputStream resultsXMLStream,
Morpho morpho)
Construct a ResultSet instance given a query object and a
InputStream that represents an XML encoding of the results. |
ResultSet(Query query,
java.lang.String source,
java.util.Vector vec,
Morpho morpho)
Construct a ResultSet instance from a vector of vectors;
for use with LocalQuery |
Method Summary |
void |
characters(char[] ch,
int start,
int length)
SAX handler callback that is called for character content of an
element when parsing an XML document. |
void |
endDocument()
Unused SAX handler |
void |
endElement(java.lang.String uri,
java.lang.String localName,
java.lang.String qName)
SAX handler callback that is called upon the end of an
element when parsing an XML document. |
void |
endPrefixMapping(java.lang.String prefix)
Unused SAX handler |
java.lang.Class |
getColumnClass(int c)
Return the Class for each column so that they can be
rendered correctly. |
int |
getColumnCount()
Return the number of columns in this result set |
java.lang.String |
getColumnName(int col)
Determine the name of a column by its index |
Morpho |
getFramework()
Get a reference to the Morpho application framework |
Query |
getQuery()
Get the query that was used to construct these results |
java.util.Vector |
getResultsVector()
get the resultsVector |
int |
getRowCount()
Return the number of records in this result set |
int |
getRowHeight()
Return the correct row height for table rows |
java.lang.Object |
getValueAt(int row,
int col)
Determine the value of a column by its row and column index |
void |
ignorableWhitespace(char[] cbuf,
int start,
int len)
Unused SAX handler |
protected int |
lookupResultsVectorIndex(int headerIndex)
Lookup an array to find resultsVector index for header index
header index resultVector index
0 PACKAGEICONEX(0)
1 TITLEINDEX(1)
2 DOCIDINDEX(6)
3 SURNAMEINDEX(2)
4 KEYWORKDINDEX(3)
5 UPDATEDATEINDEX(5)
6 ISLOCALINDEX(9)
7 ISMETACATINDEX(10) |
void |
merge(ResultSet r2)
Merge a ResultSet onto this one using the docid as the join column |
void |
openResultRecord(int row)
Open a given row index of the result set using a delegated handler class |
protected void |
openResultRecord(java.util.Vector rowVector)
Open a given row of the result set using a delegated handler class |
void |
processingInstruction(java.lang.String target,
java.lang.String data)
Unused SAX handler |
void |
setDocumentLocator(org.xml.sax.Locator locator)
Unused SAX handler |
void |
setQuery(Query query)
Set the query that was used to construct these results
(for use by LocalQuery) |
void |
setResultsVector(java.util.Vector rv)
set the resultsVector |
void |
skippedEntity(java.lang.String name)
Unused SAX handler |
void |
sortTableByColumn(int col,
java.lang.String order)
Method implements from SortTableModel. |
void |
startDocument()
SAX handler callback that is called when an XML document
is initially parsed. |
void |
startElement(java.lang.String uri,
java.lang.String localName,
java.lang.String qName,
org.xml.sax.Attributes atts)
SAX handler callback that is called upon the start of an
element when parsing an XML document. |
void |
startPrefixMapping(java.lang.String prefix,
java.lang.String uri)
Unused SAX handler |
Methods inherited from class javax.swing.table.AbstractTableModel |
addTableModelListener, findColumn, fireTableCellUpdated, fireTableChanged, fireTableDataChanged, fireTableRowsDeleted, fireTableRowsInserted, fireTableRowsUpdated, fireTableStructureChanged, getListeners, isCellEditable, removeTableModelListener, setValueAt |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Methods inherited from interface javax.swing.table.TableModel |
addTableModelListener, isCellEditable, removeTableModelListener, setValueAt |
resultsVector
protected java.util.Vector resultsVector
- Store each row of the result set as a row in a Vector
localIcon
public static javax.swing.ImageIcon localIcon
- The icon for representing local storage.
metacatIcon
public static javax.swing.ImageIcon metacatIcon
- The icon for representing metacat storage.
blankIcon
public static javax.swing.ImageIcon blankIcon
- the icon for blank, nothing there
packageIcon
public static javax.swing.ImageIcon packageIcon
- The icon for representing package
packageDataIcon
public static javax.swing.ImageIcon packageDataIcon
- The icon for representing pakcage and data file
PACKAGEICONINDEX
protected static final int PACKAGEICONINDEX
- Store the index of package icon in resultsVector
TITLEINDEX
protected static final int TITLEINDEX
- Store the index of titl in resultsVector
SURNAMEINDEX
protected static final int SURNAMEINDEX
- Store the index of surname in resultsVector
KEYWORDSINDEX
protected static final int KEYWORDSINDEX
- Store the index of keywords in resultsVector
CREATEDATEINDEX
protected static final int CREATEDATEINDEX
- Store the index of createdate in resultsVector
UPDATEDATEINDEX
protected static final int UPDATEDATEINDEX
- Store the index of update in resultsVector
DOCIDINDEX
protected static final int DOCIDINDEX
- Store the index of docid in resultsVector
DOCNAMEINDEX
protected static final int DOCNAMEINDEX
- Store the index of doc name in resultsVector
DOCTYPEINDEX
protected static final int DOCTYPEINDEX
- Store the index of doc type in resultsVector
ISLOCALINDEX
protected static final int ISLOCALINDEX
- Store the index of islocal in resultsVector
ISMETACATINDEX
protected static final int ISMETACATINDEX
- Store the index of ismetacat in resultsVector
TRIPLEINDEX
protected static final int TRIPLEINDEX
- Store the index of triple in resultsVector
ResultSet
public ResultSet(Query query,
java.lang.String source,
java.util.Vector vec,
Morpho morpho)
- Construct a ResultSet instance from a vector of vectors;
for use with LocalQuery
ResultSet
public ResultSet(Query query,
java.lang.String source,
java.io.InputStream resultsXMLStream,
Morpho morpho)
- Construct a ResultSet instance given a query object and a
InputStream that represents an XML encoding of the results.
getResultsVector
public java.util.Vector getResultsVector()
- get the resultsVector
setResultsVector
public void setResultsVector(java.util.Vector rv)
- set the resultsVector
getColumnCount
public int getColumnCount()
- Return the number of columns in this result set
- Specified by:
getColumnCount
in interface javax.swing.table.TableModel
- Overrides:
getColumnCount
in class javax.swing.table.AbstractTableModel
getRowCount
public int getRowCount()
- Return the number of records in this result set
- Specified by:
getRowCount
in interface javax.swing.table.TableModel
- Overrides:
getRowCount
in class javax.swing.table.AbstractTableModel
getRowHeight
public int getRowHeight()
- Return the correct row height for table rows
getColumnName
public java.lang.String getColumnName(int col)
- Determine the name of a column by its index
- Specified by:
getColumnName
in interface javax.swing.table.TableModel
- Overrides:
getColumnName
in class javax.swing.table.AbstractTableModel
getValueAt
public java.lang.Object getValueAt(int row,
int col)
- Determine the value of a column by its row and column index
- Specified by:
getValueAt
in interface javax.swing.table.TableModel
- Overrides:
getValueAt
in class javax.swing.table.AbstractTableModel
lookupResultsVectorIndex
protected int lookupResultsVectorIndex(int headerIndex)
- Lookup an array to find resultsVector index for header index
header index resultVector index
0 PACKAGEICONEX(0)
1 TITLEINDEX(1)
2 DOCIDINDEX(6)
3 SURNAMEINDEX(2)
4 KEYWORKDINDEX(3)
5 UPDATEDATEINDEX(5)
6 ISLOCALINDEX(9)
7 ISMETACATINDEX(10)
getColumnClass
public java.lang.Class getColumnClass(int c)
- Return the Class for each column so that they can be
rendered correctly.
- Specified by:
getColumnClass
in interface javax.swing.table.TableModel
- Overrides:
getColumnClass
in class javax.swing.table.AbstractTableModel
startElement
public void startElement(java.lang.String uri,
java.lang.String localName,
java.lang.String qName,
org.xml.sax.Attributes atts)
throws org.xml.sax.SAXException
- SAX handler callback that is called upon the start of an
element when parsing an XML document.
- Specified by:
startElement
in interface org.xml.sax.ContentHandler
endElement
public void endElement(java.lang.String uri,
java.lang.String localName,
java.lang.String qName)
throws org.xml.sax.SAXException
- SAX handler callback that is called upon the end of an
element when parsing an XML document.
- Specified by:
endElement
in interface org.xml.sax.ContentHandler
characters
public void characters(char[] ch,
int start,
int length)
- SAX handler callback that is called for character content of an
element when parsing an XML document.
- Specified by:
characters
in interface org.xml.sax.ContentHandler
startDocument
public void startDocument()
throws org.xml.sax.SAXException
- SAX handler callback that is called when an XML document
is initially parsed.
- Specified by:
startDocument
in interface org.xml.sax.ContentHandler
endDocument
public void endDocument()
throws org.xml.sax.SAXException
- Unused SAX handler
- Specified by:
endDocument
in interface org.xml.sax.ContentHandler
ignorableWhitespace
public void ignorableWhitespace(char[] cbuf,
int start,
int len)
- Unused SAX handler
- Specified by:
ignorableWhitespace
in interface org.xml.sax.ContentHandler
skippedEntity
public void skippedEntity(java.lang.String name)
throws org.xml.sax.SAXException
- Unused SAX handler
- Specified by:
skippedEntity
in interface org.xml.sax.ContentHandler
processingInstruction
public void processingInstruction(java.lang.String target,
java.lang.String data)
throws org.xml.sax.SAXException
- Unused SAX handler
- Specified by:
processingInstruction
in interface org.xml.sax.ContentHandler
startPrefixMapping
public void startPrefixMapping(java.lang.String prefix,
java.lang.String uri)
throws org.xml.sax.SAXException
- Unused SAX handler
- Specified by:
startPrefixMapping
in interface org.xml.sax.ContentHandler
endPrefixMapping
public void endPrefixMapping(java.lang.String prefix)
throws org.xml.sax.SAXException
- Unused SAX handler
- Specified by:
endPrefixMapping
in interface org.xml.sax.ContentHandler
setDocumentLocator
public void setDocumentLocator(org.xml.sax.Locator locator)
- Unused SAX handler
- Specified by:
setDocumentLocator
in interface org.xml.sax.ContentHandler
getQuery
public Query getQuery()
- Get the query that was used to construct these results
setQuery
public void setQuery(Query query)
- Set the query that was used to construct these results
(for use by LocalQuery)
openResultRecord
public void openResultRecord(int row)
- Open a given row index of the result set using a delegated handler class
openResultRecord
protected void openResultRecord(java.util.Vector rowVector)
- Open a given row of the result set using a delegated handler class
merge
public void merge(ResultSet r2)
- Merge a ResultSet onto this one using the docid as the join column
getFramework
public Morpho getFramework()
- Get a reference to the Morpho application framework
sortTableByColumn
public void sortTableByColumn(int col,
java.lang.String order)
- Method implements from SortTableModel. To make sure a col can be sort
or not. We decide it always be sortable.
- Specified by:
sortTableByColumn
in interface ColumnSortableTableModel
- Parameters:
col,
- the index of column which need to be sortedorder,
- the sort order
Copyright © 2000 National Center for Ecological Analysis and Synthesis. All Rights Reserved.