1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17 package com.sun.syndication.io;
18
19 import com.sun.syndication.feed.module.Module;
20 import org.jdom.Element;
21
22 import java.util.Set;
23
24 /***
25 * Injects module metadata into a XML node (JDOM element).
26 * <p>
27 * ModuleGenerator instances must thread safe.
28 * <p>
29 * TODO: explain how developers can plugin their own implementations.
30 * <p>
31 * @author Alejandro Abdelnur
32 *
33 */
34 public interface ModuleGenerator {
35
36 /***
37 * Returns the namespace URI this generator handles.
38 * <p>
39 * @return the namespace URI.
40 *
41 */
42 public String getNamespaceUri();
43
44 /***
45 * Returns a set with all the URIs (JDOM Namespace elements) this module generator uses.
46 * <p/>
47 * It is used by the the feed generators to add their namespace definition in
48 * the root element of the generated document (forward-missing of Java 5.0 Generics).
49 * <p/>
50 *
51 * @return a set with all the URIs (JDOM Namespace elements) this module generator uses.
52 */
53 public Set getNamespaces();
54
55 /***
56 * Generates and injectts module metadata in a XML node (JDOM element).
57 * <p>
58 * @param module the module to inject into the XML node (JDOM element).
59 * @param element the XML node to inject the module metadata to.
60 *
61 */
62 public void generate(Module module,Element element);
63
64 }