DOT4J

I’ve recently been quite interested in Graph languages, not for Graph Databases, but for representing information, in code that is essentially “things” and “relationships”. For example, one perspective on Organizations is that they are simply representable as people, systems and the information that flows between them. Those three building blocks are, in theory, enough to describe anything from a small business to a government, if you have an appropriate way to describe all the information, ensure the connections make sense, and report on it. If you further layer on the idea of systems of systems, you have the ability to describe different levels of government, business units, departments and so on. Public and private flows of information allow models that accurately represent the fact that no organization is fully meshed: the systems only expose certain information.

The reporting on it is quite interesting, and led to be becoming interested in DOT as a way to describe reports resulting from queries. I didn’t find a small, embeddable Java library that enabled me to read and write DOT files, so I ended up writing DOT4J.

The writing of DOT files, is trivial. The reading however, ended up requiring a lexer-parser since DOT is, essentially a programming language of its own. The grammar came from ANTLR, of course.

DOT4J is here. The Github page has the Maven co-ordinates for published binaries.

Similar Posts

  • Apache Commons Math

    Commons Math is an Apache library which includes a variety of mathematical tools, including 1st and 2nd-order ODE solvers.  In order to familiarize myself with the ODE solvers, I wrote a simple program to solve an RC charging circuit. The circuit has these parameters: R (ohms), the resistance of the resistor C (farads), the capacitance…

  • Building a simple RIAK ORM

    I’ve been interested in RIAK for a while, and ORM’s are nothing short of fascinating. I decided to try writing an ORM for Riak, and the results are here: https://github.com/teverett/cbean My ORM is not an ORM of course, because RIAK is not relational. However it is ORM-like; I can store POJO’s and retrieve them. The…

  • Reading Paradox Files

    Back in the day, Paradox was a pretty amazing database.  I recently had a reason to read some Paradox files for a friend, who had a client with a Paradox database.  They needed their data out of the database to insert into something more modern. Googling for the file format of a Paradox DB didn’t…

  • phpGrammar

    I’ve recently becoming interested in porting legacy PHP sites to JSPs.   It seemed to me that one of the hardest parts of this problem was parsing the PHP code.  Once a parse tree was created, the next step would be to emit equivalent JSP code. I went looking for an ANTL4 grammar for PHP,…

Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.