Class DCModuleGenerator

    • Constructor Detail

      • DCModuleGenerator

        public DCModuleGenerator()
    • Method Detail

      • getNamespaces

        public final 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 this module generator uses.
      • generate

        public final void generate​(Module module,
                                   org.jdom2.Element element)
        Populate an element tree with elements for a module.

        Specified by:
        generate in interface ModuleGenerator
        Parameters:
        module - the module to populate from.
        element - the root element to attach child elements to.
      • generateSubjectElement

        protected final org.jdom2.Element generateSubjectElement​(DCSubject subject)
        Utility method to generate an element for a subject.

        Parameters:
        subject - the subject to generate an element for.
        Returns:
        the element for the subject.
      • generateSimpleElement

        protected final org.jdom2.Element generateSimpleElement​(String name,
                                                                String value)
        Utility method to generate a single element containing a string.

        Parameters:
        name - the name of the elment to generate.
        value - the value of the text in the element.
        Returns:
        the element generated.
      • generateSimpleElementList

        protected final List<org.jdom2.Element> generateSimpleElementList​(String name,
                                                                          List<String> values)
        Utility method to generate a list of simple elements.

        Parameters:
        name - the name of the element list to generate.
        values - the list of values for the elements.
        Returns:
        a list of Elements created.