DOAPamine is set of Java 5 Annotations that can be used to insert DOAP data into Java classes. Also included is an Ant task to reflect on the annotations and produce DOAP in RDF/XML.

The very, very, very beta release can be downloaded here. The sourcecode is licensed under a BSD style license, and is included in the jar file. There is no documentation other than this page. If DOAPamine generates any interest, I'll put together a proper distribution.

If you find this useful, have questions or want to suggest improvements, email me at brian dot manley at gmail dot com.

DOAPamine HOWTO

Using the annotations is quite easy. This example shows a simple class, which uses all the DOAP annotations provided. The annotations are available an runtime so that we can reflect through them when needed.

Once you've added the DOAPamine annotations to some Java class, you can use the DOAPTask Ant task to reflect on the annotations and generate DOAP in RDF/XML format. Only two parameters are needed: class which should be the fully qualified name of the class that contains the annotations and output which is the name of the file to write to.

Note that the doapamine.jar file must be in your CLASSPATH in order for Ant to find it.

And this is the output. Notice that annotation values with no value ("" or {}) are not emitted.