© Cee-In-A-Circle Code

General
Introduction
Sourceforge
Miscellaneous
SourceForge.net Logo

Introduction

The code offered on this site was developed over time to either satisfy a need (in some cases) or a curiousity (in others). The projects/packages currently on offer are...

Options

The first project, and one that I make continual use of, is the 'options' package for handling the command line arguments of Java applications. There are already a few approaches freely available out there (for example, Jakarta's CLI, Dennis Sosnoski's JArgp and Andrew Townley's TE-Code).

It was the last of these that I had most exposure to, having worked with Andrew for a while, and I decided to try out some thoughts that I had come up with while using that library. The approach I have taken with Options project here has elements in common with the others, which is not surprising given the nature of the problem being addressed.

Tracer

Almost as an aside, I put together 'tracer', a light wrapper for Log4j, to mimic some tracing functionality that I found useful in the past. My first exposure to this style of tracing also came while working with Andrew Townley, and an implementation with a slightly different philosophy can be found as part of his TE-Code.

Properties

The 'properties' material here contains two classes which augment the standard Java properties mechanism. One is a light wrapper that performs simple type conversion, making client code a little cleaner. The other is the somewhat more complicated beastie, although the user should notice nothing in their code. The LayoutPreservingProperties class is a subclass which retains the layout and comments in a standard .properties file. This code was bequeathed to the Ant project, but is reproduced here out of a sense of paternal fondness.

DB Select

After too many hours spent wasting time getting whatever DB tool I had on hand to output to a file, I decided to solve the problem once in a portable way, and the 'db-select' tool is the result. It accepts a SQL select statement, executes it against a database, and outputs the results in either CSV, html or tab-delimited format. Not rocket science, but I've found it usefull surprisingly frequently.

DB Loader

Another recurring task that I needed some sort of tool for was to load data into a database, for unit test purposes. Although Ant provides a task to run SQL scripts, the use of SQL scripts to contain unit test data is a little messy. The 'db-loader' package contains an Ant task to load database content from CSV files, so the data can be edited with a spreadsheet, or similar app.

Utils

The 'utils' package just contains a jumble of very simple command line tools that I came up with to fill gaps in my tool set. There are tools for getting an Ascii picture of a directory structure (helpful for documentation), checking the classpath or system properties, testing regular expressions, comparing subtrees of the file system, and a few others. A mixed bag, but some of which I find surprisingly useful.

Acknowledgements

This product includes software developed by the Apache Software Foundation (http://www.apache.org/).

This product includes software developed by the JDOM Project (http://www.jdom.org/).