public class DCModuleParser extends java.lang.Object implements ModuleParser
Modifier and Type | Field and Description |
---|---|
private static org.jdom2.Namespace |
DC_NS |
private static org.jdom2.Namespace |
RDF_NS |
private static java.lang.String |
RDF_URI |
private static org.jdom2.Namespace |
TAXO_NS |
private static java.lang.String |
TAXO_URI |
Constructor and Description |
---|
DCModuleParser() |
Modifier and Type | Method and Description |
---|---|
private org.jdom2.Namespace |
getDCNamespace() |
java.lang.String |
getNamespaceUri()
Returns the namespace URI this parser handles.
|
private org.jdom2.Namespace |
getRDFNamespace() |
protected java.lang.String |
getTaxonomy(org.jdom2.Element desc)
Utility method to parse a taxonomy from an element.
|
private org.jdom2.Namespace |
getTaxonomyNamespace() |
Module |
parse(org.jdom2.Element dcRoot,
java.util.Locale locale)
Parse an element tree and return the module found in it.
|
protected java.util.List<java.lang.String> |
parseElementList(java.util.List<org.jdom2.Element> elements)
Utility method to parse a list of strings out of a list of elements.
|
protected java.util.List<java.util.Date> |
parseElementListDate(java.util.List<org.jdom2.Element> elements,
java.util.Locale locale)
Utility method to parse a list of dates out of a list of elements.
|
protected java.util.List<DCSubject> |
parseSubjects(java.util.List<org.jdom2.Element> eList)
Utility method to parse a list of subjects out of a list of elements.
|
private static final java.lang.String RDF_URI
private static final java.lang.String TAXO_URI
private static final org.jdom2.Namespace DC_NS
private static final org.jdom2.Namespace RDF_NS
private static final org.jdom2.Namespace TAXO_NS
public final java.lang.String getNamespaceUri()
ModuleParser
getNamespaceUri
in interface ModuleParser
private final org.jdom2.Namespace getDCNamespace()
private final org.jdom2.Namespace getRDFNamespace()
private final org.jdom2.Namespace getTaxonomyNamespace()
public Module parse(org.jdom2.Element dcRoot, java.util.Locale locale)
parse
in interface ModuleParser
dcRoot
- the root element containing the module elements.locale
- for date/time parsingprotected final java.lang.String getTaxonomy(org.jdom2.Element desc)
desc
- the taxonomy description element.protected final java.util.List<DCSubject> parseSubjects(java.util.List<org.jdom2.Element> eList)
eList
- the element list to parse.protected final java.util.List<java.lang.String> parseElementList(java.util.List<org.jdom2.Element> elements)
elements
- the list of elements to parse.protected final java.util.List<java.util.Date> parseElementListDate(java.util.List<org.jdom2.Element> elements, java.util.Locale locale)
elements
- the list of elements to parse.