com.sun.syndication.io.impl

Class DCModuleGenerator

public class DCModuleGenerator extends Object implements ModuleGenerator

Feed Generator for DublinCore Module.

Author: Elaine Chien

Field Summary
static NamespaceDC_NS
static StringDC_URI
static SetNAMESPACES
static NamespaceRDF_NS
static StringRDF_URI
static NamespaceTAXO_NS
static StringTAXO_URI
Method Summary
voidgenerate(Module module, Element element)
Populate an element tree with elements for a module.
protected ElementgenerateSimpleElement(String name, String value)
Utility method to generate a single element containing a string.
protected ListgenerateSimpleElementList(String name, List value)
Utility method to generate a list of simple elements.
protected ElementgenerateSubjectElement(DCSubject subject)
Utility method to generate an element for a subject.
NamespacegetDCNamespace()
SetgetNamespaces()
Returns a set with all the URIs (JDOM Namespace elements) this module generator uses.
StringgetNamespaceUri()
NamespacegetRDFNamespace()
NamespacegetTaxonomyNamespace()

Field Detail

DC_NS

private static final Namespace DC_NS

DC_URI

private static final String DC_URI

NAMESPACES

private static final Set NAMESPACES

RDF_NS

private static final Namespace RDF_NS

RDF_URI

private static final String RDF_URI

TAXO_NS

private static final Namespace TAXO_NS

TAXO_URI

private static final String TAXO_URI

Method Detail

generate

public final void generate(Module module, Element element)
Populate an element tree with elements for a module.

Parameters: module the module to populate from. element the root element to attach child elements to.

generateSimpleElement

protected final Element generateSimpleElement(String name, 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 List generateSimpleElementList(String name, 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.

generateSubjectElement

protected final 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.

getDCNamespace

private final Namespace getDCNamespace()

getNamespaces

public final 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).

Returns: a set with all the URIs this module generator uses.

getNamespaceUri

public final String getNamespaceUri()

getRDFNamespace

private final Namespace getRDFNamespace()

getTaxonomyNamespace

private final Namespace getTaxonomyNamespace()
Copyright © Sun Microsystems. All Rights Reserved.