|
||||||||||
PREV PACKAGE NEXT PACKAGE | FRAMES NO FRAMES |
See:
Description
Interface Summary | |
---|---|
CreativeCommons |
Class Summary | |
---|---|
CreativeCommonsImpl |
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 );
* This library is provided under dual licenses. * You may choose the terms of the Lesser General Public License or the Apache * License at your discretion. * * Copyright (C) 2005 Robert Cooper, Temple of the Screaming Penguin * * * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public * License as published by the Free Software Foundation; either * version 2.1 of the License, or (at your option) any later version. * * This library is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public * License along with this library; if not, write to the Free Software * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA * * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License.
|
||||||||||
PREV PACKAGE NEXT PACKAGE | FRAMES NO FRAMES |