Class ModuleGenerator

    • Constructor Detail

      • ModuleGenerator

        public ModuleGenerator()
    • Method Detail

      • getNamespaceUri

        public String getNamespaceUri()
        Returns the namespace URI this generator handles.

        Specified by:
        getNamespaceUri in interface ModuleGenerator
        Returns:
        the namespace URI.
      • getNamespaces

        public Set<org.jdom2.Namespace> getNamespaces()
        Returns a set with all the URIs (JDOM Namespace elements) this module generator uses.

        It is used by the the feed generators to add their namespace definition in the root element of the generated document (forward-missing of Java 5.0 Generics).

        Specified by:
        getNamespaces in interface ModuleGenerator
        Returns:
        a set with all the URIs (JDOM Namespace elements) this module generator uses.
      • generate

        public void generate​(Module module,
                             org.jdom2.Element element)
        Generates and injectts module metadata in a XML node (JDOM element).

        Specified by:
        generate in interface ModuleGenerator
        Parameters:
        module - the module to inject into the XML node (JDOM element).
        element - the XML node to inject the module metadata to.
      • addNotNullAttribute

        protected void addNotNullAttribute​(org.jdom2.Element target,
                                           String name,
                                           Object value)
      • addNotNullElement

        protected org.jdom2.Element addNotNullElement​(org.jdom2.Element target,
                                                      String name,
                                                      Object value)
      • generateSimpleElement

        protected org.jdom2.Element generateSimpleElement​(String name,
                                                          String value)