| CARVIEW |
|
databuffer
|
| Summary | A library for working with tabular (row/col) data structures. |
|---|---|
| Categories | None |
| License | Lesser General Public License (LGPL) |
| Owner(s) | david_hall, pdoubleya |
Overview
The DataBuffer library allows you to work with tabular-oriented (row/column) data by providing an editable data model which tracks changes on a per-cell and per-row basis, and which can be loaded from or saved to different data endpoints, such as relational databases or flat files. A natural target for DataBuffer is to act as a model for interacting with a relational database; however, it is not directly dependent on JDBC for data, as the load/persist mechanism is fairly pluggable. In contrast to the RowSet class, it doesn't include references to JDBC classes, interfaces or exceptions except through a data provider interface. The DataBuffer library allows for basic in-memory references between tables of data, allowing for parent/child navigation between data tables. DataBuffer has support for expression-based calculated columns and values through integration with the JGA "Functors" library.
DataBuffer is a sub-project of SwingLabs.
Important note: all SwingLabs core projects require Java 5 (JDK 1.5, "Tiger"). Some external developers have had success building and using the code with Retroweaver. We are open to having backports of the projects to JDK 1.4 as a branch on our CVS tree; we don't have ourselves the resources to commit to this - if you have the time and interest, please contact us on the SwingLabs discussion forum.
History
DataBuffer is a split of the "DataSet" package from the JDNC/SwingLabs Databinding project; DataSet was originally developed by Richard Bair, and subsequently extended by other SwingLabs contributors. As Databinding is being phased out in favor of the upcoming JSR on beans binding for Java, we felt the need to pull out DataBuffer as it is useful even without a binding solution in place. The codebase was extracted from the most recent DataSet branch of Databinding in early August, 2006. The current codebase has no version number and has not reached 1.0 status. However, there is a test harness in place, and many demos were written during the development of DataSet to flesh out the APIs.
Note that although the package was originally called "DataSet", it has no relation to either the .Net API of the same name, nor to the upcoming DataSet class in Java 6 ("Mustang").
Status
In its current state, the code is ready to be tested and prototyped. As part of the move to a new project, we'll be pulling together a list of to-dos to get the code ready for a 1.0 release. Likely most of the APIs for the first release will be close to what you see right now.
Limitations
Currently, we have pretty extensive tests for all the in-memory part of the library, but don't have unit tests for interacting with databases or other data providers. That's planned, and we need your help--mainly to set up a test base to verify that we generate the correct SQL dialect for individual databases. What this means is that if you want to use DataBuffer to act as a front-end model for a relational database, there might be problems with the SQL we generate for the particular RDBMS you're using--we found that recently with a RDBMS that didn't like how we quoted strings.
License
The DataBuffer library is licensed under the LGPL. If you become a contributor, it's also governed by the Joint Copyright Assignment (JCA) to Sun, which allows Sun to include all or parts of the library in their own products (including the JDK) at some later date. Contribution is governed by the SwingLabs contribution guidelines, which basically say you have to accept the license in use (LGPL) and send in a signed copy of the JCA before we can accept your code; see here for more details.We can accept small pieces of code (say, up to a dozen lines) which you submit, without the procedure just mentioned, but we don't encourage it.
There are many other libraries out there for working with SQL databases, or providing APIs to tabular datasources, or for parsing flat files, etc. We're glad to work with them, but we can't include any of their source code, even if it's also under an LGPL-compatible license, unless the copyright owner has accepted and submitted a signed JCA. However, we can include the libraries for other FOSS projects if we respect the terms of their license. If you see some other projects that look useful, please drop a line and let us know about it.
How to...
... get the most current code?
Check out from our CVS. Coming soon: automated builds via CruiseControl.
... build it?
You'll need Ant. An Ant build.xml file is included in our source control. Ant tasks are listed below, but you'll be interested in the compile target.
... run tests?
We use jUnit 3.8+ to test. The Ant task to run all tests is simply test.
... get the most current developer documentation?
Check out the SwingLabs Wiki page.
... ask questions and get answers? Do you have a mailing list?
Post to the shared SwingLabs discussion forum and listen to changes. Alternatively, subcribe to the shared mailinglist which has a bi-directional gateway to the forum.
... contribute?
Read about how to join the SwingLabs movement, and help us build the future of Swing!
Ant Tasks
Once you have the code, and want to build, from a command prompt, you can get the current list of Ant targets usingant -p.
The targets are
| clean | Clean build products. |
| compile | Compile project. |
| debug | Debug project in IDE. |
| default | Build and test whole project. |
| jar | Build JAR. |
| javadoc | Build Javadoc. |
| run | Run a main class. |
| test | Run unit tests. |
| test-single | Run single unit test. |
| Powered by CollabNet | Feedback |
FAQ |
Press |
Developer tools
© 1995 - 2007 CollabNet. CollabNet is a registered trademark of CollabNet, Inc. |
