Java Doc for DataSource.java in  » Report » datavision-1.1.0 » jimm » datavision » source » Java Source Code / Java DocumentationJava Source Code and Java Documentation

Java Source Code / Java Documentation
1. 6.0 JDK Core
2. 6.0 JDK Modules
3. 6.0 JDK Modules com.sun
4. 6.0 JDK Modules com.sun.java
5. 6.0 JDK Modules sun
6. 6.0 JDK Platform
7. Ajax
8. Apache Harmony Java SE
9. Aspect oriented
10. Authentication Authorization
11. Blogger System
12. Build
13. Byte Code
14. Cache
15. Chart
16. Chat
17. Code Analyzer
18. Collaboration
19. Content Management System
20. Database Client
21. Database DBMS
22. Database JDBC Connection Pool
23. Database ORM
24. Development
25. EJB Server geronimo
26. EJB Server GlassFish
27. EJB Server JBoss 4.2.1
28. EJB Server resin 3.1.5
29. ERP CRM Financial
30. ESB
31. Forum
32. GIS
33. Graphic Library
34. Groupware
35. HTML Parser
36. IDE
37. IDE Eclipse
38. IDE Netbeans
39. Installer
40. Internationalization Localization
41. Inversion of Control
42. Issue Tracking
43. J2EE
44. JBoss
45. JMS
46. JMX
47. Library
48. Mail Clients
49. Net
50. Parser
51. PDF
52. Portal
53. Profiler
54. Project Management
55. Report
56. RSS RDF
57. Rule Engine
58. Science
59. Scripting
60. Search Engine
61. Security
62. Sevlet Container
63. Source Control
64. Swing Library
65. Template Engine
66. Test Coverage
67. Testing
68. UML
69. Web Crawler
70. Web Framework
71. Web Mail
72. Web Server
73. Web Services
74. Web Services apache cxf 2.0.1
75. Web Services AXIS2
76. Wiki Engine
77. Workflow Engines
78. XML
79. XML UI
Java
Java Tutorial
Java Open Source
Jar File Download
Java Articles
Java Products
Java by API
Photoshop Tutorials
Maya Tutorials
Flash Tutorials
3ds-Max Tutorials
Illustrator Tutorials
GIMP Tutorials
C# / C Sharp
C# / CSharp Tutorial
C# / CSharp Open Source
ASP.Net
ASP.NET Tutorial
JavaScript DHTML
JavaScript Tutorial
JavaScript Reference
HTML / CSS
HTML CSS Reference
C / ANSI-C
C Tutorial
C++
C++ Tutorial
Ruby
PHP
Python
Python Tutorial
Python Open Source
SQL Server / T-SQL
SQL Server / T-SQL Tutorial
Oracle PL / SQL
Oracle PL/SQL Tutorial
PostgreSQL
SQL / MySQL
MySQL Tutorial
VB.Net
VB.Net Tutorial
Flash / Flex / ActionScript
VBA / Excel / Access / Word
XML
XML Tutorial
Microsoft Office PowerPoint 2007 Tutorial
Microsoft Office Excel 2007 Tutorial
Microsoft Office Word 2007 Tutorial
Java Source Code / Java Documentation » Report » datavision 1.1.0 » jimm.datavision.source 
Source Cross Reference  Class Diagram Java Document (Java Doc) 


java.lang.Object
   jimm.datavision.source.DataSource

All known Subclasses:   jimm.datavision.source.ncsql.NCDatabase,  jimm.datavision.test.mock.source.MockDataSource,  jimm.datavision.source.charsep.CharSepSource,  jimm.datavision.source.sql.Database,
DataSource
abstract public class DataSource implements Writeable(Code)
An abstract data source.
author:
   Jim Menard, jimm@io.com
See Also:   Column
See Also:   Table
See Also:   Query


Field Summary
protected  StringmetadataURL
    
protected  Queryquery
    
protected  Reportreport
    

Constructor Summary
public  DataSource(Report r, Query q)
    

Method Summary
public  voidaddColumn(Column col)
     Called from ReportReader.column to add a column to a data source.
public  booleanalreadyUsedSourceFile()
     Returns true if this data source uses a file to retrieve data and and has already done so.
abstract public  booleanareRecordsSelectable()
     Used to enable/disable the "Select Records" menu item.
abstract public  booleanareRecordsSortable()
     Used to enable/disable the "Sort By" menu item.
abstract public  booleancanGroupRecords()
     Used to enable/disable the "Group By" menu item.
abstract public  booleancanJoinTables()
     Used to enable/disable the "Table Linker" menu item.
public  booleancanRunReports()
     Used to enable/disable the "Run" and "Export" menu items.
abstract public  Iteratorcolumns()
     Returns an iterator over all columns.
public  IteratorcolumnsInTablesUsedInReport()
     Returns an iterator over all the columns in only the tables used by the report, or over all columns if this data source does not have tables.
public  booleancontainsReferenceTo(Parameter p)
     Returns true if the specified parameter exists within this data source's query.
abstract protected  voiddoWriteXML(XMLWriter out)
    
abstract public  DataCursorexecute()
    
abstract public  ColumnfindColumn(Object id)
     Given an id, returns the column that has that id.
public  QuerygetQuery()
    
public  ReportgetReport()
    
public  intindexOfSelectable(Selectable sel)
     Returns the index of the specified selectable.
abstract public  booleanisConnectionEditable()
     Used to enable/disable the "Connection" menu item.
abstract public  booleanisSQLGenerated()
     Used to enable/disable the "SQL Query Text" menu item.
public  booleanneedsSourceFile()
     Returns true if this data source uses a file to retrieve data and does not yet have one.
public  voidreadMetadataFrom(String urlString)
     Reads metadata from a URL.
public  voidreloadColumns()
     Called from Report.reloadColumns/code>, this method gives the data source a chance to tell its ancillary objects (such as the query) to reload column objects.

This is necessary, for example, after a SQL database data source has reloaded all of its table and column information.

public  voidremoveSort(Selectable s)
    
public  voidreuseSourceFile()
     Tells this data source to re-use (perhaps re-open) the current data source file.
public  voidsetSourceFile(String filePath)
     Accepts the path to a data source file.
abstract public  Iteratortables()
     Returns an iterator over all tables, or null if the data source does not have tables (for example, a character-separated file data source).
abstract public  IteratortablesUsedInReport()
     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).
public  booleanusesSourceFile()
     Returns true if this data source uses a file to retrieve data.
public  voidwriteXML(XMLWriter out)
     Writes this data source and its query as an XML tag.

Field Detail
metadataURL
protected String metadataURL(Code)



query
protected Query query(Code)



report
protected Report report(Code)




Constructor Detail
DataSource
public DataSource(Report r, Query q)(Code)




Method Detail
addColumn
public void addColumn(Column col)(Code)
Called from ReportReader.column to add a column to a data source.

The default implementation does nothing.
Parameters:
  col - a column




alreadyUsedSourceFile
public boolean alreadyUsedSourceFile()(Code)
Returns true if this data source uses a file to retrieve data and and has already done so. The default implementation returns false. true if this data source uses a file to retrievedata



areRecordsSelectable
abstract public boolean areRecordsSelectable()(Code)
Used to enable/disable the "Select Records" menu item. true if the "Select Records" menu itemshould be enabled.



areRecordsSortable
abstract public boolean areRecordsSortable()(Code)
Used to enable/disable the "Sort By" menu item. true if the "Sort By" menu itemshould be enabled.



canGroupRecords
abstract public boolean canGroupRecords()(Code)
Used to enable/disable the "Group By" menu item. true if the "Group By" menu itemshould be enabled.



canJoinTables
abstract public boolean canJoinTables()(Code)
Used to enable/disable the "Table Linker" menu item. true if the "Table Linker" menu itemshould be enabled.



canRunReports
public boolean canRunReports()(Code)
Used to enable/disable the "Run" and "Export" menu items. Most data sources will enable these, of course. true if the "Run" and "Export"menu items should be enabled.



columns
abstract public Iterator columns()(Code)
Returns an iterator over all columns. an iterator over all columns



columnsInTablesUsedInReport
public Iterator columnsInTablesUsedInReport()(Code)
Returns an iterator over all the columns in only the tables used by the report, or over all columns if this data source does not have tables. an iterator over all columns in only tables used by thereport, or over all columns if this data source does not have tables



containsReferenceTo
public boolean containsReferenceTo(Parameter p)(Code)
Returns true if the specified parameter exists within this data source's query.
Parameters:
  p - a parameter true if the specified parameter exists withinthe query
See Also:   Query.containsReferenceTo



doWriteXML
abstract protected void doWriteXML(XMLWriter out)(Code)



execute
abstract public DataCursor execute() throws Exception(Code)



findColumn
abstract public Column findColumn(Object id)(Code)
Given an id, returns the column that has that id. If no column with the specified id exists, returns null. a column, or null if no column with the specifiedid exists



getQuery
public Query getQuery()(Code)



getReport
public Report getReport()(Code)



indexOfSelectable
public int indexOfSelectable(Selectable sel)(Code)
Returns the index of the specified selectable.
Parameters:
  sel - a selectable



isConnectionEditable
abstract public boolean isConnectionEditable()(Code)
Used to enable/disable the "Connection" menu item. true if the "Connection" menu itemshould be enabled.



isSQLGenerated
abstract public boolean isSQLGenerated()(Code)
Used to enable/disable the "SQL Query Text" menu item. true if the "SQL Query Text" menu itemshould be enabled.



needsSourceFile
public boolean needsSourceFile()(Code)
Returns true if this data source uses a file to retrieve data and does not yet have one. The default implementation returns false. true if this data source uses a file to retrievedata and doesn't yet have one



readMetadataFrom
public void readMetadataFrom(String urlString) throws Exception(Code)
Reads metadata from a URL. We save the URL string so we can write it back out when we write to XML.
Parameters:
  urlString - where to get the metadata
See Also:   MetadataReader



reloadColumns
public void reloadColumns()(Code)
Called from Report.reloadColumns/code>, this method gives the data source a chance to tell its ancillary objects (such as the query) to reload column objects.

This is necessary, for example, after a SQL database data source has reloaded all of its table and column information. The old column objects no longer exist. New ones (with the same ids, we assume) have taken their place.




removeSort
public void removeSort(Selectable s)(Code)



reuseSourceFile
public void reuseSourceFile() throws FileNotFoundException(Code)
Tells this data source to re-use (perhaps re-open) the current data source file. The default implementation does nothing.



setSourceFile
public void setSourceFile(String filePath) throws FileNotFoundException(Code)
Accepts the path to a data source file. The default implementation does nothing.
Parameters:
  filePath - the full path to a file



tables
abstract public Iterator tables()(Code)
Returns an iterator over all tables, or null if the data source does not have tables (for example, a character-separated file data source). a possibly null iterator over all tables



tablesUsedInReport
abstract public Iterator tablesUsedInReport()(Code)
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). a possibly null iterator over all tables usedin the report



usesSourceFile
public boolean usesSourceFile()(Code)
Returns true if this data source uses a file to retrieve data. The default implementation returns false. true if this data source uses a file to retrievedata



writeXML
public void writeXML(XMLWriter out)(Code)
Writes this data source and its query as an XML tag.
Parameters:
  out - a writer that knows how to write XML



Methods inherited from java.lang.Object
native protected Object clone() throws CloneNotSupportedException(Code)(Java Doc)
public boolean equals(Object obj)(Code)(Java Doc)
protected void finalize() throws Throwable(Code)(Java Doc)
final native public Class getClass()(Code)(Java Doc)
native public int hashCode()(Code)(Java Doc)
final native public void notify()(Code)(Java Doc)
final native public void notifyAll()(Code)(Java Doc)
public String toString()(Code)(Java Doc)
final native public void wait(long timeout) throws InterruptedException(Code)(Java Doc)
final public void wait(long timeout, int nanos) throws InterruptedException(Code)(Java Doc)
final public void wait() throws InterruptedException(Code)(Java Doc)

www.java2java.com | Contact Us
Copyright 2009 - 12 Demo Source and Support. All rights reserved.
All other trademarks are property of their respective owners.