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

public Class DCModuleParser

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

Parser for the Dublin Core module.

Field Summary

Modifier and TypeField and Description
private static final 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
private final Namespace
public final String
getNamespaceUri()

Implements com.rometools.rome.io.ModuleParser.getNamespaceUri.

Returns the namespace URI this parser handles.
private final Namespace
protected final String

Returns:

the string contained in the resource of the element.
getTaxonomy
(final Element
the taxonomy description element.
desc
)

Utility method to parse a taxonomy from an element.

private final Namespace
public Module

Returns:

the module parsed from the element tree, null if none.
parse
(final Element
the root element containing the module elements.
dcRoot
,
final Locale
for date/time parsing
locale
)

Implements com.rometools.rome.io.ModuleParser.parse.

Parse an element tree and return the module found in it.
protected final List<String>

Returns:

the list of strings
parseElementList
(final List<Element>
the list of elements to parse.
elements
)

Utility method to parse a list of strings out of a list of elements.

protected final List<Date>

Returns:

the list of dates.
parseElementListDate
(final List<Element>
the list of elements to parse.
elements
,
final Locale locale)

Utility method to parse a list of dates out of a list of elements.

protected final List<DCSubject>

Returns:

a list of subjects parsed from the elements.
parseSubjects
(final List<Element>
the element list to parse.
eList
)

Utility method to parse a list of subjects out of a list of elements.

Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAlltoStringwaitwaitwait

Field Detail

DC_NSback to summary
private static final Namespace DC_NS
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

DCModuleParserback to summary
public DCModuleParser()

Method Detail

getDCNamespaceback to summary
private final Namespace getDCNamespace()
getNamespaceUriback to summary
public final String getNamespaceUri()

Implements com.rometools.rome.io.ModuleParser.getNamespaceUri.

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

Returns the namespace URI this parser handles.

Returns:String

the namespace URI.

Annotations
@Override
getRDFNamespaceback to summary
private final Namespace getRDFNamespace()
getTaxonomyback to summary
protected final String getTaxonomy(final Element desc)

Utility method to parse a taxonomy from an element.

Parameters
desc:Element

the taxonomy description element.

Returns:String

the string contained in the resource of the element.

getTaxonomyNamespaceback to summary
private final Namespace getTaxonomyNamespace()
parseback to summary
public Module parse(final Element dcRoot, final Locale locale)

Implements com.rometools.rome.io.ModuleParser.parse.

Parse an element tree and return the module found in it.

Parameters
dcRoot:Element

the root element containing the module elements.

locale:Locale

for date/time parsing

Returns:Module

the module parsed from the element tree, null if none.

Annotations
@Override
parseElementListback to summary
protected final List<String> parseElementList(final List<Element> elements)

Utility method to parse a list of strings out of a list of elements.

Parameters
elements:List<Element>

the list of elements to parse.

Returns:List<String>

the list of strings

parseElementListDateback to summary
protected final List<Date> parseElementListDate(final List<Element> elements, final Locale locale)

Utility method to parse a list of dates out of a list of elements.

Parameters
elements:List<Element>

the list of elements to parse.

Returns:List<Date>

the list of dates.

parseSubjectsback to summary
protected final List<DCSubject> parseSubjects(final List<Element> eList)

Utility method to parse a list of subjects out of a list of elements.

Parameters
eList:List<Element>

the element list to parse.

Returns:List<DCSubject>

a list of subjects parsed from the elements.