comparison artifacts/src/main/java/org/dive4elements/river/artifacts/datacage/templating/Builder.java @ 8856:5e38e2924c07 3.2.x

Fix code style.
author Tom Gottfried <tom@intevation.de>
date Thu, 18 Jan 2018 20:12:01 +0100
parents 7bc675e4e6e0
children 175f113ed939 0a5239a1e46e
comparison
equal deleted inserted replaced
8855:d7c005e12af0 8856:5e38e2924c07
216 && (ns = node.getNamespaceURI()) != null 216 && (ns = node.getNamespaceURI()) != null
217 && ns.equals(DC_NAMESPACE_URI)) { 217 && ns.equals(DC_NAMESPACE_URI)) {
218 218
219 String macroName = ((Element)node).getAttribute("name"); 219 String macroName = ((Element)node).getAttribute("name");
220 Node inMacroNode = 220 Node inMacroNode =
221 findSelectNode(getMacroChildren(macroName), selectName); 221 findSelectNode(
222 getMacroChildren(macroName), selectName);
222 if (inMacroNode != null) { 223 if (inMacroNode != null) {
223 return inMacroNode; 224 return inMacroNode;
224 } 225 }
225 } 226 }
226 227
258 log.debug("dc:container-context"); 259 log.debug("dc:container-context");
259 260
260 String container = expand(current.getAttribute("container")); 261 String container = expand(current.getAttribute("container"));
261 262
262 if (container.isEmpty()) { 263 if (container.isEmpty()) {
263 log.warn("dc:container-context: no 'container' attribute found"); 264 log.warn(
265 "dc:container-context: no 'container' attribute found");
264 return; 266 return;
265 } 267 }
266 268
267 NodeList subs = current.getChildNodes(); 269 NodeList subs = current.getChildNodes();
268 Node propertiesNode = findPropertiesNode(subs); 270 Node propertiesNode = findPropertiesNode(subs);
270 if (propertiesNode == null) { 272 if (propertiesNode == null) {
271 log.warn("dc:container-context: cannot find properties."); 273 log.warn("dc:container-context: cannot find properties.");
272 return; 274 return;
273 } 275 }
274 276
275 String [][] properties = extractProperties((Element)propertiesNode); 277 String [][] properties = extractProperties(
278 (Element)propertiesNode);
276 279
277 if (properties.length == 0) { 280 if (properties.length == 0) {
278 log.warn("dc:properties: No properties defined."); 281 log.warn("dc:properties: No properties defined.");
279 } 282 }
280 283
286 Object c = result[0]; 289 Object c = result[0];
287 if (c instanceof Object []) { 290 if (c instanceof Object []) {
288 c = Arrays.asList((Object [])c); 291 c = Arrays.asList((Object [])c);
289 } 292 }
290 if (!(c instanceof Collection)) { 293 if (!(c instanceof Collection)) {
291 log.warn("dc:container-context: container is not a collection."); 294 log.warn(
295 "dc:container-context: container is not a collection.");
292 return; 296 return;
293 } 297 }
294 298
295 Collection<?> collection = (Collection<?>)c; 299 Collection<?> collection = (Collection<?>)c;
296 300

http://dive4elements.wald.intevation.org