Case Studies

How to use ant tasks.

acorn3-extras-x.x.x.jar has some ant tasks which help to do continuous integration. In your build.xml, you can use them as followings.

<taskdef name="collect-libs" classname="" />
<collect-libs todir="dist/lib"/>

How to use ReleaseNotes frameworks.

Including in acorn3-commons. It provides unified Release Note writing method. First, you write your app's release note in an XML file as followings(If you want to know details, see the DTD).


<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE release-notes SYSTEM "">
<release-notes version="1.1">
  <releases major_version="1.0">
    <release minor_version="00" date="2011.03.22">
      <item>Initial revision.</item>
  <roadmap major_version="2.0" date="2011.11.11">

And then, create new class that extends AbstractReleaseNotes class. Override getResource method to determine release note's entity.

public class ReleaseNotes extends AbstractReleaseNotes {

  protected URL getResource() {
    return getClass().getResource("/res/release-notes.xml");

Now, You can access various version information via this release note.

  String v = new ReleaseNotes().getCurrentMajorVersion();
  System.out.println(v); // 1.0

How to use Csv class.

commons.Csv class helps you to save and load data as csv format file.
  String title[] = {"A","B","C","D","E","F"};
  int keys[] = {0,1,2};
  String row1[] = {"22","1234567890","2011/07/22","1","2","3"};
  String row2[] = {"22","1234567890","2011/07/24","4","5","6"};
  String row1u[] = {"22","1234567890","2011/07/22","7","8","9"};
  File f = new File("temp/csvtest.csv");
  Csv csv = new Csv(title,keys,f,Charset.forName("utf8"));


  csv.put(row1); // Insert.
  csv.put(row2); // Insert.
  csv.put(row1u); // Update.

  File f = new File("temp/csvtest.csv");
  Csv csv = new Csv(title,keys,f,Charset.forName("utf8"));
    int nRow = csv.getRowCount(); // 2
    int nColumn = csv.getColumnCount(); // 6
    String row[]; 
    row = csv.getTitle(); // A,B,C,D,E,F
    row = csv.get(new String[]{"22","1234567890","2011/07/22"}); // Equals to row1u.
    row = csv.get(new String[]{"xx","1234567890","2011/07/22"}); // null
  // If you don't make any changes, need not to close.
Managed by LumberMill, Inc.