Library code

I’m uploading snapshots of my own internal utility classes, you can use them under the LGPL.

Highlights include:

  • Static helper methods for boilerplate XML operations.
  • Straightforward implementations of NamespaceManagers for use with XPath operations – including one which scans the target document for namespace/prefix bindings.
  • A simple way to assign categories to items and extract simple frequency count stats (and a TableModel for the data)
  • Swing dialog implementations for displaying error messages and OK cancel prompts.
  • an isNullOrEmpty(String str) method as featured in .NET.

There is a binary JAR and a source JAR. I’m using the following dependency definition:

      <dependency>
          <groupId>com.cantorva</groupId>
          <artifactId>libraries</artifactId>
          <version>0.0.1-SNAPSHOT</version>
      </dependency>

WordPress mangled the filenames slightly during upload, but the following command sequence addresses that and installs to your local repository:

mkdir cantorvaLibs
cd cantorvaLibs/
curl http://cantorva.com/blog/wp-content/uploads/2009/03/libraries-001-snapshot.jar > libraries-0.0.1-SNAPSHOT.jar
mvn install:install-file -Dfile=libraries-0.0.1-SNAPSHOT.jar -DgroupId=com.cantorva -DartifactId=libraries -Dversion=0.0.1-SNAPSHOT -Dpackaging=jar
rm libraries-0.0.1-SNAPSHOT.jar
cd ..
rmdir cantorvaLibs/

2 comments to Library code

  • I’m *QUITE* sure that when I decompile cantorvaLibs libraries jar I’m going to discover that the wheel has been reinvented many times over.

    Simon I suggest you take a look at the standard Calendar API and if that isn’t sufficient then read up on Apache Commons Lang.

  • Simon

    Quite possibly, its really just a collection of stuff that got written and refactored into a library, so re-using it was an effort saver for me.

    No need to decompile or whatever, very happy to provide up-to-date code. Just ask.

Leave a Reply

 

 

 

You can use these HTML tags

<a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>