org.rometools.feed.module.sle.io
Class ModuleGenerator

java.lang.Object
  extended by org.rometools.feed.module.sle.io.ModuleGenerator
All Implemented Interfaces:
com.sun.syndication.io.ModuleGenerator

public class ModuleGenerator
extends Object
implements com.sun.syndication.io.ModuleGenerator

Author:
Robert "kebernet" Cooper

Constructor Summary
ModuleGenerator()
          Creates a new instance of ModuleGenerator
 
Method Summary
protected  void addNotNullAttribute(org.jdom.Element target, String name, Object value)
           
protected  org.jdom.Element addNotNullElement(org.jdom.Element target, String name, Object value)
           
 void generate(com.sun.syndication.feed.module.Module module, org.jdom.Element element)
          Generates and injectts module metadata in a XML node (JDOM element).
protected  org.jdom.Element generateSimpleElement(String name, String value)
           
 Set getNamespaces()
          Returns a set with all the URIs (JDOM Namespace elements) this module generator uses.
 String getNamespaceUri()
          Returns the namespace URI this generator handles.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ModuleGenerator

public ModuleGenerator()
Creates a new instance of ModuleGenerator

Method Detail

getNamespaceUri

public String getNamespaceUri()
Returns the namespace URI this generator handles.

Specified by:
getNamespaceUri in interface com.sun.syndication.io.ModuleGenerator
Returns:
the namespace URI.

getNamespaces

public Set getNamespaces()
Returns a set with all the URIs (JDOM Namespace elements) this module generator uses.

It is used by the the feed generators to add their namespace definition in the root element of the generated document (forward-missing of Java 5.0 Generics).

Specified by:
getNamespaces in interface com.sun.syndication.io.ModuleGenerator
Returns:
a set with all the URIs (JDOM Namespace elements) this module generator uses.

generate

public void generate(com.sun.syndication.feed.module.Module module,
                     org.jdom.Element element)
Generates and injectts module metadata in a XML node (JDOM element).

Specified by:
generate in interface com.sun.syndication.io.ModuleGenerator
Parameters:
module - the module to inject into the XML node (JDOM element).
element - the XML node to inject the module metadata to.

addNotNullAttribute

protected void addNotNullAttribute(org.jdom.Element target,
                                   String name,
                                   Object value)

addNotNullElement

protected org.jdom.Element addNotNullElement(org.jdom.Element target,
                                             String name,
                                             Object value)

generateSimpleElement

protected org.jdom.Element generateSimpleElement(String name,
                                                 String value)


Copyright © 2013 ROME Project. All Rights Reserved.