comparison artifacts/src/main/java/org/dive4elements/river/artifacts/context/RiverContextFactory.java @ 6933:468d9ebda4ce

Datacage: Add dc:all-state-successors() to enable predicates like dc:contains(dc:all-state-successors($artifact-name, $current-state-id), 'state.winfo.calculation_mode') which recursively collects all successor state ids an check for containment.
author Sascha L. Teichmann <teichmann@intevation.de>
date Tue, 27 Aug 2013 19:14:12 +0200
parents af13ceeba52a
children 5c6fd2c010dd
comparison
equal deleted inserted replaced
6932:b78d110135ec 6933:468d9ebda4ce
91 91
92 private static final String XPATH_ZOOM_SCALES = "/artifact-database/options/zoom-scales/zoom-scale"; 92 private static final String XPATH_ZOOM_SCALES = "/artifact-database/options/zoom-scales/zoom-scale";
93 93
94 private static final String XPATH_DGM_PATH = "/artifact-database/options/dgm-path/text()"; 94 private static final String XPATH_DGM_PATH = "/artifact-database/options/dgm-path/text()";
95 95
96 private static GlobalContext GLOBAL_CONTEXT_INSTANCE;
97
96 98
97 /** 99 /**
98 * Creates a new D4EArtifactContext object and initialize all 100 * Creates a new D4EArtifactContext object and initialize all
99 * components required by the application. 101 * components required by the application.
100 * 102 *
113 configureFloodmapWMS(config, context); 115 configureFloodmapWMS(config, context);
114 configureModules(config, context); 116 configureModules(config, context);
115 configureZoomScales(config, context); 117 configureZoomScales(config, context);
116 configureDGMPath(config, context); 118 configureDGMPath(config, context);
117 119
120 synchronized (RiverContextFactory.class) {
121 GLOBAL_CONTEXT_INSTANCE = context;
122 }
123
118 return context; 124 return context;
125 }
126
127 public static synchronized GlobalContext getGlobalContext() {
128 return GLOBAL_CONTEXT_INSTANCE;
119 } 129 }
120 130
121 131
122 private void configureDGMPath(Document config, RiverContext context) { 132 private void configureDGMPath(Document config, RiverContext context) {
123 String dgmPath = (String) XMLUtils.xpath( 133 String dgmPath = (String) XMLUtils.xpath(

http://dive4elements.wald.intevation.org