|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectjimm.datavision.source.DataSource
jimm.datavision.source.object.ObjectSource
public class ObjectSource
Provides the classes and interfaces that make up the a data source that uses an ArrayList of ArrayLists representing a table of data. See the ObjectSourceTest.java in the examples directory for usage example.
| Field Summary | |
|---|---|
protected java.util.ArrayList |
columns
|
| Fields inherited from class jimm.datavision.source.DataSource |
|---|
metadataURL, query, report |
| Constructor Summary | |
|---|---|
ObjectSource(Report report,
java.util.ArrayList inData)
Constructor. |
|
| Method Summary | |
|---|---|
void |
addColumn(Column col)
This override not only remembers the column but also hands it to the query for cacheing. |
boolean |
areRecordsSelectable()
Used to enable/disable the "Select Records" menu item. |
boolean |
areRecordsSortable()
Used to enable/disable the "Sort By" menu item. |
boolean |
canGroupRecords()
Used to enable/disable the "Group By" menu item. |
boolean |
canJoinTables()
Used to enable/disable the "Table Linker" menu item. |
java.util.Iterator |
columns()
Returns an iterator over all columns. |
protected void |
doWriteXML(XMLWriter out)
Writes this database and all its tables as an XML tag. |
DataCursor |
execute()
|
Column |
findColumn(java.lang.Object id)
Given an id (a column name), returns the column that has that id. |
java.util.ArrayList |
getData()
Return the ArrayList of data this data source contains. |
int |
indexOfSelectable(Selectable sel)
Returns the index of the specified selectable. |
boolean |
isConnectionEditable()
Used to enable/disable the "Connection" menu item. |
boolean |
isSQLGenerated()
Used to enable/disable the "SQL Query Text" menu item. |
java.util.Iterator |
tables()
Returns an iterator over all tables, or null if the
data source does not have tables (for example, a character-separated
file data source). |
java.util.Iterator |
tablesUsedInReport()
Returns an iterator over all tables actually used in the report, or null if the data source does not have tables (for example,
a character-separated file data source). |
boolean |
usesSourceFile()
Returns true if this data source uses a file to retrieve
data. |
| Methods inherited from class jimm.datavision.source.DataSource |
|---|
alreadyUsedSourceFile, canRunReports, columnsInTablesUsedInReport, containsReferenceTo, getQuery, getReport, getSourceFile, needsSourceFile, readMetadataFrom, reloadColumns, removeSort, reuseSourceFile, setSourceFile, writeXML |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
protected java.util.ArrayList columns
| Constructor Detail |
|---|
public ObjectSource(Report report,
java.util.ArrayList inData)
report - The Report object that uses this data source.inData - An ArrayList of ArrayLists that is the data this data source
is to use.| Method Detail |
|---|
public boolean canJoinTables()
DataSource
canJoinTables in class DataSourcetrue if the "Table Linker" menu item
should be enabled.public boolean isSQLGenerated()
DataSource
isSQLGenerated in class DataSourcetrue if the "SQL Query Text" menu item
should be enabled.public boolean isConnectionEditable()
DataSource
isConnectionEditable in class DataSourcetrue if the "Connection" menu item
should be enabled.public boolean areRecordsSelectable()
DataSource
areRecordsSelectable in class DataSourcetrue if the "Select Records" menu item
should be enabled.public boolean areRecordsSortable()
DataSource
areRecordsSortable in class DataSourcetrue if the "Sort By" menu item
should be enabled.public boolean canGroupRecords()
DataSource
canGroupRecords in class DataSourcetrue if the "Group By" menu item
should be enabled.public boolean usesSourceFile()
DataSourcetrue if this data source uses a file to retrieve
data. The default implementation returns false.
usesSourceFile in class DataSourcetrue if this data source uses a file to retrieve
datapublic void addColumn(Column col)
addColumn in class DataSourcecol - a columnpublic java.util.ArrayList getData()
public Column findColumn(java.lang.Object id)
null. Uses
Table.findColumn.
findColumn in class DataSourceid - a column id
null if no column with the specified
id existsTable.findColumn(java.lang.Object)public int indexOfSelectable(Selectable sel)
DataSource
indexOfSelectable in class DataSourcesel - a selectablepublic java.util.Iterator tables()
DataSourcenull if the
data source does not have tables (for example, a character-separated
file data source).
tables in class DataSourcenull iterator over all tablespublic java.util.Iterator tablesUsedInReport()
DataSourcenull if the data source does not have tables (for example,
a character-separated file data source).
tablesUsedInReport in class DataSourcenull iterator over all tables used
in the reportpublic java.util.Iterator columns()
DataSource
columns in class DataSourcepublic DataCursor execute()
execute in class DataSourceprotected void doWriteXML(XMLWriter out)
doWriteXML in class DataSourceout - a writer that knows how to write XML
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||