com.sun.syndication.io.impl

## Class DCModuleGenerator

- java.lang.Object
- - com.sun.syndication.io.impl.DCModuleGenerator

All Implemented Interfaces:
  ModuleGenerator

    public class DCModuleGenerator
    extends java.lang.Object
    implements ModuleGenerator

Feed Generator for DublinCore Module.

### Constructor Summary

Constructors
Constructor and Description
`DCModuleGenerator()`

### Method Summary

Methods
`void` `generate(Module module, org.jdom.Element element)` Populate an element tree with elements for a module.
`protected org.jdom.Element` `generateSimpleElement(java.lang.String name, java.lang.String value)` Utility method to generate a single element containing a string.
`protected java.util.List` `generateSimpleElementList(java.lang.String name, java.util.List value)` Utility method to generate a list of simple elements.
`protected org.jdom.Element` `generateSubjectElement(DCSubject subject)` Utility method to generate an element for a subject.
`java.util.Set` `getNamespaces()` Returns a set with all the URIs (JDOM Namespace elements) this module generator uses.
`java.lang.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

#### DCModuleGenerator

    public DCModuleGenerator()

### Method Detail

#### getNamespaceUri

    public final java.lang.String getNamespaceUri()

Description copied from interface: `ModuleGenerator`
Returns the namespace URI this generator handles.

Specified by:
  `getNamespaceUri` in interface `ModuleGenerator`
Returns:
  the namespace URI.

#### getNamespaces

    public final java.util.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 `ModuleGenerator`
Returns:
  a set with all the URIs this module generator uses.

#### generate

    public final void generate(Module module,
                org.jdom.Element element)

Populate an element tree with elements for a module.

Specified by:
  `generate` in interface `ModuleGenerator`
Parameters:
  `module` - the module to populate from.
  `element` - the root element to attach child elements to.

#### generateSubjectElement

    protected final org.jdom.Element generateSubjectElement(DCSubject subject)

Utility method to generate an element for a subject.

Parameters:
  `subject` - the subject to generate an element for.
Returns:
  the element for the subject.

#### generateSimpleElement

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

Utility method to generate a single element containing a string.

Parameters:
  `name` - the name of the elment to generate.
  `value` - the value of the text in the element.
Returns:
  the element generated.

#### generateSimpleElementList

    protected final java.util.List generateSimpleElementList(java.lang.String name,
                                           java.util.List value)

Utility method to generate a list of simple elements.

Parameters:
  `name` - the name of the element list to generate.
  `value` - the list of values for the elements.
Returns:
  a list of Elements created.