comparison artifacts/src/main/java/org/dive4elements/river/exports/OutputHelper.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 994995baa32b
children 0a5239a1e46e
comparison
equal deleted inserted replaced
8855:d7c005e12af0 8856:5e38e2924c07
55 public OutputHelper(String identifier, D4EArtifact masterArtifact) { 55 public OutputHelper(String identifier, D4EArtifact masterArtifact) {
56 this.identifier = identifier; 56 this.identifier = identifier;
57 this.masterArtifact = masterArtifact; 57 this.masterArtifact = masterArtifact;
58 } 58 }
59 59
60 private static List<ContextInjector> getContextInjectors(CallContext context, String out) { 60 private static List<ContextInjector> getContextInjectors(
61 CallContext context,
62 String out
63 ) {
61 RiverContext flysContext = context instanceof RiverContext 64 RiverContext flysContext = context instanceof RiverContext
62 ? (RiverContext)context 65 ? (RiverContext)context
63 : (RiverContext)context.globalContext(); 66 : (RiverContext)context.globalContext();
64 67
65 GeneratorLookup generators = 68 GeneratorLookup generators =
187 CallMeta meta = context.getMeta(); 190 CallMeta meta = context.getMeta();
188 191
189 Document attr = db.getCollectionItemAttribute(identifier, uuid, meta); 192 Document attr = db.getCollectionItemAttribute(identifier, uuid, meta);
190 193
191 if (attr == null) { 194 if (attr == null) {
192 attr = initItemAttribute(uuid, facet, pattern, index, outName, context); 195 attr = initItemAttribute(
196 uuid, facet, pattern, index, outName, context);
193 197
194 if (attr == null) { 198 if (attr == null) {
195 return null; 199 return null;
196 } 200 }
197 } 201 }
225 XPathConstants.NODE, 229 XPathConstants.NODE,
226 ArtifactNamespaceContext.INSTANCE, 230 ArtifactNamespaceContext.INSTANCE,
227 vars); 231 vars);
228 232
229 if (theme == null) { 233 if (theme == null) {
230 log.warn("Could not find the theme in attribute of: " + facet + " " + uuid); 234 log.warn("Could not find the theme in attribute of: "
235 + facet + " " + uuid);
231 236
232 Theme t = getThemeForFacet( 237 Theme t = getThemeForFacet(
233 uuid, facet, pattern, index, outName, context); 238 uuid, facet, pattern, index, outName, context);
234 239
235 if (t == null) { 240 if (t == null) {
362 367
363 String uuid = theme.getArtifact(); 368 String uuid = theme.getArtifact();
364 Artifact artifact = getArtifact(uuid, context); 369 Artifact artifact = getArtifact(uuid, context);
365 D4EArtifact flys = (D4EArtifact) artifact; 370 D4EArtifact flys = (D4EArtifact) artifact;
366 Facet face = flys.getNativeFacet(theme, outname); 371 Facet face = flys.getNativeFacet(theme, outname);
367 log.debug("Looking for Native Facet for theme: " + theme + " and out: " + 372 log.debug("Looking for Native Facet for theme: "
368 outname + " in artifact: " + uuid + 373 + theme + " and out: "
369 face == null ? " Found. " : " Not Found. "); 374 + outname + " in artifact: " + uuid
375 + face == null ? " Found. " : " Not Found. ");
370 if (face == null) { 376 if (face == null) {
371 log.warn("Theme " + theme.getName() + " for " + outname + " has no facets!. Removing theme."); 377 log.warn("Theme " + theme.getName()
378 + " for " + outname
379 + " has no facets!. Removing theme.");
372 themeList.remove(i); 380 themeList.remove(i);
373 i--; 381 i--;
374 continue; 382 continue;
375 } 383 }
376 384
435 443
436 if (debug) { 444 if (debug) {
437 log.debug("OutputHelper.initItemAttribute"); 445 log.debug("OutputHelper.initItemAttribute");
438 } 446 }
439 447
440 Theme t = getThemeForFacet(uuid, facet, pattern, index, outName, context); 448 Theme t = getThemeForFacet(
449 uuid, facet, pattern, index, outName, context);
441 450
442 if (t == null) { 451 if (t == null) {
443 log.info("Could not find theme for facet. Cancel initialization."); 452 log.info("Could not find theme for facet. Cancel initialization.");
444 return null; 453 return null;
445 } 454 }

http://dive4elements.wald.intevation.org