About Milestones Me Mail Service Impressum Werner Diwischek
action4java logo




Different Things

IndexJTree.htm

These pages contains two project of mine, "J-Tree" and "actions4JAVA". I've developed these projects generating a lot of project code from two ERD like model tables last year.

J-Tree

J-Tree is a directory type structure for data. One can list the keys and content of each "directory". The API methods have the same names as their unix counterparts.

In analogy to other systems

  • Unix: /params/replace/key
  • Windows: \params\replace\key
  • Perl map->{'params'}->{'replace'}->{'key'}
  • By default one store a value by ":" separator as a directory separator. The separator can be changed with the Constructor new JTreeMap("delimiter"); To store a value one use the insert method.

  • JTreeMapString map.insert(directory,key,value)
  • To get the value again, one use the read method:

  • value = map.read(key)
  • To get a list of the "directory" content one just use

  • List <String> mapKeys =map.ls(directory)
  • Why to use it

    In project one find a lot of container classes with no logic beside getters and setters. All these different container classes could be replaced with one map to avoid "OverClassification". This mostly lead to a situation, where one "can't see the wood for the trees".

    Since one class can replace a lot of classes, this save a lot of coding and could be especially useful in prototyping.

    Download

    J-Tree consists in the core of one generic JTreeMap class. There is a small String implementation I use. Furthermore there are some Exceptions thrown. This version just need the apache logging for output.

  • Sources: j-tree-0.2-SNAPSHOT.zip
  • Compiled: j-tree-0.2-SNAPSHOT.jar
  • You can clone it from the git master with git clone https://W.Diwischek@code.google.com/p/j-tree/ .

    Versions

    I don't defined a separate versioning for JTreeMap since I heavily use it in the templating framework action4JAVA I named J-Tree before January 2013.

    Beside the template framework I think these two small classes can be useful just by itself in a java project.

    action4Java

    JTree is the base for the template solution http://www.action4java.org/.

    java duke with deers
    created by Action4Java and JtreeMap (24.3.2013 22:57)
    complexity is easy, simplicity not.