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 com.sun.syndication.feed.WireFeed;
21 import org.jdom.Element;
22
23 import java.util.Set;
24
25 /***
26 * Injects module metadata into a XML node (JDOM element).
27 * <p>
28 * ModuleGenerator instances must thread safe.
29 * <p>
30 * TODO: explain how developers can plugin their own implementations.
31 * <p>
32 * @author Alejandro Abdelnur
33 *
34 */
35 public interface ModuleGenerator {
36
37 /***
38 * Returns the namespace URI this generator handles.
39 * <p>
40 * @return the namespace URI.
41 *
42 */
43 public String getNamespaceUri();
44
45 /***
46 * Returns a set with all the URIs (JDOM Namespace elements) this module generator uses.
47 * <p/>
48 * It is used by the the feed generators to add their namespace definition in
49 * the root element of the generated document (forward-missing of Java 5.0 Generics).
50 * <p/>
51 *
52 * @return a set with all the URIs (JDOM Namespace elements) this module generator uses.
53 */
54 public Set getNamespaces();
55
56 /***
57 * Generates and injects module metadata into an XML node (JDOM element).
58 * <p>
59 * @param module the module to inject into the XML node (JDOM element).
60 * @param element the XML node into which module meta-data will be injected.
61 */
62 public void generate(Module module,Element element);
63 }