Package com.rometools.rome.io.impl
Class DCModuleParser
- java.lang.Object
-
- com.rometools.rome.io.impl.DCModuleParser
-
- All Implemented Interfaces:
ModuleParser
public class DCModuleParser extends Object implements ModuleParser
Parser for the Dublin Core module.
-
-
Constructor Summary
Constructors Constructor Description DCModuleParser()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description StringgetNamespaceUri()Returns the namespace URI this parser handles.protected StringgetTaxonomy(org.jdom2.Element desc)Utility method to parse a taxonomy from an element.Moduleparse(org.jdom2.Element dcRoot, Locale locale)Parse an element tree and return the module found in it.protected List<String>parseElementList(List<org.jdom2.Element> elements)Utility method to parse a list of strings out of a list of elements.protected List<Date>parseElementListDate(List<org.jdom2.Element> elements, Locale locale)Utility method to parse a list of dates out of a list of elements.protected List<DCSubject>parseSubjects(List<org.jdom2.Element> eList)Utility method to parse a list of subjects out of a list of elements.
-
-
-
Method Detail
-
getNamespaceUri
public final String getNamespaceUri()
Description copied from interface:ModuleParserReturns the namespace URI this parser handles.- Specified by:
getNamespaceUriin interfaceModuleParser- Returns:
- the namespace URI.
-
parse
public Module parse(org.jdom2.Element dcRoot, Locale locale)
Parse an element tree and return the module found in it.- Specified by:
parsein interfaceModuleParser- Parameters:
dcRoot- the root element containing the module elements.locale- for date/time parsing- Returns:
- the module parsed from the element tree, null if none.
-
getTaxonomy
protected final String getTaxonomy(org.jdom2.Element desc)
Utility method to parse a taxonomy from an element.- Parameters:
desc- the taxonomy description element.- Returns:
- the string contained in the resource of the element.
-
parseSubjects
protected final List<DCSubject> parseSubjects(List<org.jdom2.Element> eList)
Utility method to parse a list of subjects out of a list of elements.- Parameters:
eList- the element list to parse.- Returns:
- a list of subjects parsed from the elements.
-
parseElementList
protected final List<String> parseElementList(List<org.jdom2.Element> elements)
Utility method to parse a list of strings out of a list of elements.- Parameters:
elements- the list of elements to parse.- Returns:
- the list of strings
-
-