Top Description Fields Constructors Methods
com.rometools.rome.io.impl

public Class DCModuleGenerator

extends Object
implements ModuleGenerator
Class Inheritance
All Implemented Interfaces
com.rometools.rome.io.ModuleGenerator
Imports
java.util.ArrayList, .Collections, .Date, .HashSet, .List, .Locale, .Set, org.jdom2.Attribute, .Element, .Namespace, com.rometools.rome.feed.module.DCModule, .DCSubject, .Module, com.rometools.rome.io.ModuleGenerator

Feed Generator for DublinCore Module.

Field Summary

Modifier and TypeField and Description
private static final Namespace
private static final String
private static final Set<Namespace>
private static final Namespace
private static final String
private static final Namespace
private static final String

Constructor Summary

AccessConstructor and Description
public

Method Summary

Modifier and TypeMethod and Description
public final void
generate(final Module
the module to populate from.
module
,
final Element
the root element to attach child elements to.
element
)

Implements com.rometools.rome.io.ModuleGenerator.generate.

Populate an element tree with elements for a module.
protected final Element

Returns:

the element generated.
generateSimpleElement
(final String
the name of the elment to generate.
name
,
final String
the value of the text in the element.
value
)

Utility method to generate a single element containing a string.

protected final List<Element>

Returns:

a list of Elements created.
generateSimpleElementList
(final String
the name of the element list to generate.
name
,
final List<String>
the list of values for the elements.
values
)

Utility method to generate a list of simple elements.

protected final Element

Returns:

the element for the subject.
generateSubjectElement
(final DCSubject
the subject to generate an element for.
subject
)

Utility method to generate an element for a subject.

private final Namespace
public final Set<Namespace>

Returns:

a set with all the URIs this module generator uses.
getNamespaces
()

Implements com.rometools.rome.io.ModuleGenerator.getNamespaces.

Returns a set with all the URIs (JDOM Namespace elements) this module generator uses.
public final String
getNamespaceUri()

Implements com.rometools.rome.io.ModuleGenerator.getNamespaceUri.

Returns the namespace URI this generator handles.
private final Namespace
private final Namespace
Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAlltoStringwaitwaitwait

Field Detail

DC_NSback to summary
private static final Namespace DC_NS
DC_URIback to summary
private static final String DC_URI
NAMESPACESback to summary
private static final Set<Namespace> NAMESPACES
RDF_NSback to summary
private static final Namespace RDF_NS
RDF_URIback to summary
private static final String RDF_URI
TAXO_NSback to summary
private static final Namespace TAXO_NS
TAXO_URIback to summary
private static final String TAXO_URI

Constructor Detail

DCModuleGeneratorback to summary
public DCModuleGenerator()

Method Detail

generateback to summary
public final void generate(final Module module, final Element element)

Implements com.rometools.rome.io.ModuleGenerator.generate.

Populate an element tree with elements for a module.

Parameters
module:Module

the module to populate from.

element:Element

the root element to attach child elements to.

Annotations
@Override
generateSimpleElementback to summary
protected final Element generateSimpleElement(final String name, final String value)

Utility method to generate a single element containing a string.

Parameters
name:String

the name of the elment to generate.

value:String

the value of the text in the element.

Returns:Element

the element generated.

generateSimpleElementListback to summary
protected final List<Element> generateSimpleElementList(final String name, final List<String> values)

Utility method to generate a list of simple elements.

Parameters
name:String

the name of the element list to generate.

values:List<String>

the list of values for the elements.

Returns:List<Element>

a list of Elements created.

generateSubjectElementback to summary
protected final Element generateSubjectElement(final DCSubject subject)

Utility method to generate an element for a subject.

Parameters
subject:DCSubject

the subject to generate an element for.

Returns:Element

the element for the subject.

getDCNamespaceback to summary
private final Namespace getDCNamespace()
getNamespacesback to summary
public final Set<Namespace> getNamespaces()

Implements com.rometools.rome.io.ModuleGenerator.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).

Returns:Set<Namespace>

a set with all the URIs this module generator uses.

Annotations
@Override
getNamespaceUriback to summary
public final String getNamespaceUri()

Implements com.rometools.rome.io.ModuleGenerator.getNamespaceUri.

Doc from com.rometools.rome.io.ModuleGenerator.getNamespaceUri.

Returns the namespace URI this generator handles.

Returns:String

the namespace URI.

Annotations
@Override
getRDFNamespaceback to summary
private final Namespace getRDFNamespace()
getTaxonomyNamespaceback to summary
private final Namespace getTaxonomyNamespace()