caplib - A Java library for the
Common Alerting Protocol (CAP)

Current version: caplib_1-1_04
Last updated: 9 April 2006
Download: caplib_1-1_04.zip - (248 kB)
caplib_1-1_04.tar.gz - (143 kB)
Online docs: here
Change history: here

caplib provides a simple API for generating, parsing and converting Common Alerting Protocol (CAP) XML messages of versions 1.1 and 1.0.

caplib works like this: Individual classes represent the Alert, Info, Area, and Resource blocks of the CAP message format. The Alert class knows how to parse a CAP message, in either CAP 1.0 or CAP 1.1 format, from XML into an equivalent structure of in-memory objects, the various elements of which can be read (and updated) using ordinary accessor methods. The Alert class also knows how to output itself and its subsidiary objects as XML in either CAP 1.0 or 1.1 format. (So among other things, caplib can be used as a handy CAP 1.0 / CAP 1.1 converter.) And of course Alert has a constructor, so it can instantiate a new CAP message structure and output the appropriate XML.

caplib does not provide CAP transport services. CAP messages can be exchanged in many different ways, including SOAP, RSS/Atom, XMPP (Jabber), multicast file transfer, email, pigeon, and engraved clay shard.

caplib is Open Source software on the following terms:

caplib is another of those pro-bono projects, so support and updates may be sporadic, erratic and/or phlegmatic. Nonetheless please send your comments, corrections and suggestions to acb@incident.com.