This is a module for ROME that supports both the "CC" RSS1 module and the RSS 2 (and Atom) module in a unified manner.

It does this by superimposing the "rome:creativecommon" namespace over both of them for the purposes of the module, and synchronizes them into a unified structure. For RSS2 it attempts to correlate the license into a code-capable fashion. If the license link goes to one of the standard licenses at creativecommons.org, it will populate the permissions based on it's know set (See License.Behaviour).

The module has 2 fields on it. One is "allLicenses". This is simply an array of all licenses in a feed. The second one "licenses" contains licenses that apply to a specific element (feed or entry). Licenses then contain "permits" and "requires" behaviours. If a license is used that the system can't determine anything about, these will be null. Zero-lenght means "known and empty."

At this time, because of a ROME limitation, writing RSS1 feeds is not possible. However, if you read an RSS1 feed, you can convert it to an RSS2 feed properly.

Sample Usage:

            CreativeCommons commons = new CreativeCommonsImpl();
            commons.setLicense( new License[]{ License.NONCOMMERCIAL } );
            // Note, you do not have to setAllLicenses right now. When the RSS1 functionality is
            // added, this will be required at the Feed level only.
            ArrayList modules = new ArrayList()
            modules.add( commons );
            syndEntry.setModules( commons );

            //Alternately, to get the module:
            CreativeCommons commons = (CreativeCommons) syndFeed.getModule( CreativeCommons.URI );