Mercurial > dive4elements > gnv-client
comparison gnv-artifacts/src/main/java/de/intevation/gnv/artifacts/GNVProductArtifactFactory.java @ 815:22c18083225e
Removed compiler warnings while JavaDoc generation.
gnv-artifacts/trunk@900 c6561f87-3c4e-4783-a992-168aeb5c3f6f
author | Ingo Weinzierl <ingo.weinzierl@intevation.de> |
---|---|
date | Mon, 12 Apr 2010 06:59:33 +0000 |
parents | 0dc115cbef0d |
children | 05bf8534a35a |
comparison
equal
deleted
inserted
replaced
814:9d427dd2a96a | 815:22c18083225e |
---|---|
33 * | 33 * |
34 * @author <a href="mailto:ingo.weinzierl@intevation.de">Ingo Weinzierl</a> | 34 * @author <a href="mailto:ingo.weinzierl@intevation.de">Ingo Weinzierl</a> |
35 */ | 35 */ |
36 public class GNVProductArtifactFactory extends DefaultArtifactFactory { | 36 public class GNVProductArtifactFactory extends DefaultArtifactFactory { |
37 | 37 |
38 /** | |
39 * | |
40 */ | |
41 public static final String XPATH_REPLACE_NAME = "IDENTIFIER"; | 38 public static final String XPATH_REPLACE_NAME = "IDENTIFIER"; |
42 | 39 |
43 /** | |
44 * | |
45 */ | |
46 public static final String XPATH_PRODUCT_ARTIFACT = | 40 public static final String XPATH_PRODUCT_ARTIFACT = |
47 "artifact-database/artifacts/artifact[@name='"+XPATH_REPLACE_NAME+"']"; | 41 "artifact-database/artifacts/artifact[@name='"+XPATH_REPLACE_NAME+"']"; |
48 | 42 |
49 /** | |
50 * | |
51 */ | |
52 public static final String XPATH_PRODUCT = "products/product"; | 43 public static final String XPATH_PRODUCT = "products/product"; |
53 | 44 |
54 /** | |
55 * | |
56 */ | |
57 public static final String XPATH_PRODUCT_NAME = "@name"; | 45 public static final String XPATH_PRODUCT_NAME = "@name"; |
58 | 46 |
59 /** | |
60 * | |
61 */ | |
62 public static final String XPATH_PRODUCT_FACTORY = "artifact-factory"; | 47 public static final String XPATH_PRODUCT_FACTORY = "artifact-factory"; |
63 | 48 |
64 /** | |
65 * | |
66 */ | |
67 public static final String XPATH_PRODUCT_PARAMETER = "parameters/parameter"; | 49 public static final String XPATH_PRODUCT_PARAMETER = "parameters/parameter"; |
68 | 50 |
69 private Logger logger = Logger.getLogger(GNVProductArtifactFactory.class); | 51 private Logger logger = Logger.getLogger(GNVProductArtifactFactory.class); |
70 | 52 |
71 private Map productFactories; | 53 private Map productFactories; |
103 } | 85 } |
104 | 86 |
105 return artifact; | 87 return artifact; |
106 } | 88 } |
107 | 89 |
108 /** | 90 |
109 * | |
110 * @param document | |
111 * @param factoryNode | |
112 */ | |
113 @Override | 91 @Override |
114 public void setup(Document document, Node factoryNode) { | 92 public void setup(Document document, Node factoryNode) { |
115 super.setup(document, factoryNode); | 93 super.setup(document, factoryNode); |
116 | 94 |
117 String xpath = XPATH_PRODUCT_ARTIFACT.replace(XPATH_REPLACE_NAME, name); | 95 String xpath = XPATH_PRODUCT_ARTIFACT.replace(XPATH_REPLACE_NAME, name); |
135 parseProductFactories(document, productNodes); | 113 parseProductFactories(document, productNodes); |
136 } | 114 } |
137 } | 115 } |
138 | 116 |
139 | 117 |
140 /** | |
141 * | |
142 * @param name | |
143 * @return | |
144 */ | |
145 public ArtifactFactory getArtifactFactoryByName(String name) { | 118 public ArtifactFactory getArtifactFactoryByName(String name) { |
146 return (ArtifactFactory) productFactories.get(name); | 119 return (ArtifactFactory) productFactories.get(name); |
147 } | 120 } |
148 | 121 |
149 | 122 |
150 /** | |
151 * | |
152 * @param document | |
153 * @param products | |
154 */ | |
155 protected void parseProductFactories(Document document, NodeList products) { | 123 protected void parseProductFactories(Document document, NodeList products) { |
156 int items = products.getLength(); | 124 int items = products.getLength(); |
157 | 125 |
158 for(int i = 0; i < items; i++) { | 126 for(int i = 0; i < items; i++) { |
159 | 127 |
193 } | 161 } |
194 | 162 |
195 | 163 |
196 /** | 164 /** |
197 * Initialize all products supported by the current fis. | 165 * Initialize all products supported by the current fis. |
198 * @param productNode | |
199 */ | 166 */ |
200 protected void initializeProducts(Node productNode) { | 167 protected void initializeProducts(Node productNode) { |
201 String productName = (String) XMLUtils.xpath( | 168 String productName = (String) XMLUtils.xpath( |
202 productNode, "@name", XPathConstants.STRING); | 169 productNode, "@name", XPathConstants.STRING); |
203 | 170 |