public class WeatherModuleGenerator extends java.lang.Object implements ModuleGenerator
Modifier and Type | Field and Description |
---|---|
private static java.text.SimpleDateFormat |
LONG_DATE |
private static org.jdom2.Namespace |
NS |
private static java.text.SimpleDateFormat |
SHORT_DATE |
private static java.text.SimpleDateFormat |
TIME_ONLY |
Constructor and Description |
---|
WeatherModuleGenerator() |
Modifier and Type | Method and Description |
---|---|
void |
generate(Module module,
org.jdom2.Element element)
Generates and injects module metadata into an XML node (JDOM element).
|
protected org.jdom2.Element |
generateSimpleElement(java.lang.String name,
java.lang.String value) |
java.util.Set<org.jdom2.Namespace> |
getNamespaces()
Returns a set with all the URIs (JDOM Namespace elements) this module generator uses.
|
java.lang.String |
getNamespaceUri()
Returns the namespace URI this generator handles.
|
private static final org.jdom2.Namespace NS
private static final java.text.SimpleDateFormat TIME_ONLY
private static final java.text.SimpleDateFormat LONG_DATE
private static final java.text.SimpleDateFormat SHORT_DATE
public void generate(Module module, org.jdom2.Element element)
ModuleGenerator
generate
in interface ModuleGenerator
module
- the module to inject into the XML node (JDOM element).element
- the XML node into which module meta-data will be injected.protected org.jdom2.Element generateSimpleElement(java.lang.String name, java.lang.String value)
public java.util.Set<org.jdom2.Namespace> getNamespaces()
ModuleGenerator
getNamespaces
in interface ModuleGenerator
public java.lang.String getNamespaceUri()
ModuleGenerator
getNamespaceUri
in interface ModuleGenerator