public class DCModuleGenerator extends Object implements ModuleGenerator
Constructor and Description |
---|
DCModuleGenerator() |
Modifier and Type | Method and Description |
---|---|
void |
generate(Module module,
org.jdom2.Element element)
Populate an element tree with elements for a module.
|
protected org.jdom2.Element |
generateSimpleElement(String name,
String value)
Utility method to generate a single element containing a string.
|
protected List<org.jdom2.Element> |
generateSimpleElementList(String name,
List<String> values)
Utility method to generate a list of simple elements.
|
protected org.jdom2.Element |
generateSubjectElement(DCSubject subject)
Utility method to generate an element for a subject.
|
Set<org.jdom2.Namespace> |
getNamespaces()
Returns a set with all the URIs (JDOM Namespace elements) this module generator uses.
|
String |
getNamespaceUri()
Returns the namespace URI this generator handles.
|
public final String getNamespaceUri()
ModuleGenerator
getNamespaceUri
in interface ModuleGenerator
public final Set<org.jdom2.Namespace> getNamespaces()
getNamespaces
in interface ModuleGenerator
public final void generate(Module module, org.jdom2.Element element)
generate
in interface ModuleGenerator
module
- the module to populate from.element
- the root element to attach child elements to.protected final org.jdom2.Element generateSubjectElement(DCSubject subject)
subject
- the subject to generate an element for.protected final org.jdom2.Element generateSimpleElement(String name, String value)
name
- the name of the elment to generate.value
- the value of the text in the element.protected final List<org.jdom2.Element> generateSimpleElementList(String name, List<String> values)
name
- the name of the element list to generate.values
- the list of values for the elements.Copyright © 2016. All rights reserved.