annotate artifacts/src/main/java/org/dive4elements/river/artifacts/context/RiverContext.java @ 7099:24f153ad1f40 generator-refactoring

Use pre-converted diagram attributes now.
author Sascha L. Teichmann <teichmann@intevation.de>
date Mon, 23 Sep 2013 12:28:22 +0200
parents 5c6fd2c010dd
children 8ab618dda850
rev   line source
5863
4897a58c8746 River artifacts: Added new copyright headers.
Sascha L. Teichmann <teichmann@intevation.de>
parents: 5838
diff changeset
1 /* Copyright (C) 2011, 2012, 2013 by Bundesanstalt für Gewässerkunde
4897a58c8746 River artifacts: Added new copyright headers.
Sascha L. Teichmann <teichmann@intevation.de>
parents: 5838
diff changeset
2 * Software engineering by Intevation GmbH
4897a58c8746 River artifacts: Added new copyright headers.
Sascha L. Teichmann <teichmann@intevation.de>
parents: 5838
diff changeset
3 *
5994
af13ceeba52a Removed trailing whitespace.
Sascha L. Teichmann <teichmann@intevation.de>
parents: 5866
diff changeset
4 * This file is Free Software under the GNU AGPL (>=v3)
5863
4897a58c8746 River artifacts: Added new copyright headers.
Sascha L. Teichmann <teichmann@intevation.de>
parents: 5838
diff changeset
5 * and comes with ABSOLUTELY NO WARRANTY! Check out the
5994
af13ceeba52a Removed trailing whitespace.
Sascha L. Teichmann <teichmann@intevation.de>
parents: 5866
diff changeset
6 * documentation coming with Dive4Elements River for details.
5863
4897a58c8746 River artifacts: Added new copyright headers.
Sascha L. Teichmann <teichmann@intevation.de>
parents: 5838
diff changeset
7 */
4897a58c8746 River artifacts: Added new copyright headers.
Sascha L. Teichmann <teichmann@intevation.de>
parents: 5838
diff changeset
8
5831
bd047b71ab37 Repaired internal references
Sascha L. Teichmann <teichmann@intevation.de>
parents: 3630
diff changeset
9 package org.dive4elements.river.artifacts.context;
106
5864c41219db Initializes a TransitionEngine storing all transitions for each artifact at the application start.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff changeset
10
3295
4fc442f1b4f6 Refactored FLYSArtifactCollection.
Raimund Renkert <raimund.renkert@intevation.de>
parents: 1970
diff changeset
11 import java.util.Map;
4fc442f1b4f6 Refactored FLYSArtifactCollection.
Raimund Renkert <raimund.renkert@intevation.de>
parents: 1970
diff changeset
12
106
5864c41219db Initializes a TransitionEngine storing all transitions for each artifact at the application start.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff changeset
13 import org.apache.log4j.Logger;
5864c41219db Initializes a TransitionEngine storing all transitions for each artifact at the application start.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff changeset
14
5864c41219db Initializes a TransitionEngine storing all transitions for each artifact at the application start.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff changeset
15 import org.w3c.dom.Document;
5864c41219db Initializes a TransitionEngine storing all transitions for each artifact at the application start.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff changeset
16
5831
bd047b71ab37 Repaired internal references
Sascha L. Teichmann <teichmann@intevation.de>
parents: 3630
diff changeset
17 import org.dive4elements.artifactdatabase.DefaultArtifactContext;
bd047b71ab37 Repaired internal references
Sascha L. Teichmann <teichmann@intevation.de>
parents: 3630
diff changeset
18 import org.dive4elements.artifacts.CallContext;
bd047b71ab37 Repaired internal references
Sascha L. Teichmann <teichmann@intevation.de>
parents: 3630
diff changeset
19 import org.dive4elements.river.exports.OutGenerator;
7037
5c6fd2c010dd Add setup(Element config) method to Generator interface to be initialized from configuration.
Sascha L. Teichmann <teichmann@intevation.de>
parents: 5994
diff changeset
20 import org.dive4elements.river.utils.Pair;
106
5864c41219db Initializes a TransitionEngine storing all transitions for each artifact at the application start.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff changeset
21
5864c41219db Initializes a TransitionEngine storing all transitions for each artifact at the application start.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff changeset
22
5864c41219db Initializes a TransitionEngine storing all transitions for each artifact at the application start.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff changeset
23 /**
5864c41219db Initializes a TransitionEngine storing all transitions for each artifact at the application start.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff changeset
24 * This class is used to store application wide information in a global context.
5864c41219db Initializes a TransitionEngine storing all transitions for each artifact at the application start.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff changeset
25 *
5864c41219db Initializes a TransitionEngine storing all transitions for each artifact at the application start.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff changeset
26 * @author <a href="mailto:ingo.weinzierl@intevation.de">Ingo Weinzierl</a>
5864c41219db Initializes a TransitionEngine storing all transitions for each artifact at the application start.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff changeset
27 */
5866
9a6741ccf6d4 FLYS artifacts: Renamed FLYSContext(Factory) to RiverContext(Factory).
Sascha L. Teichmann <teichmann@intevation.de>
parents: 5863
diff changeset
28 public class RiverContext extends DefaultArtifactContext {
106
5864c41219db Initializes a TransitionEngine storing all transitions for each artifact at the application start.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff changeset
29
1821
e55f1a851923 Added ARTIFACT key to FLYSContextm, documentation.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents: 958
diff changeset
30 /** The logger used in this class. */
5866
9a6741ccf6d4 FLYS artifacts: Renamed FLYSContext(Factory) to RiverContext(Factory).
Sascha L. Teichmann <teichmann@intevation.de>
parents: 5863
diff changeset
31 private static Logger logger = Logger.getLogger(RiverContext.class);
106
5864c41219db Initializes a TransitionEngine storing all transitions for each artifact at the application start.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff changeset
32
1821
e55f1a851923 Added ARTIFACT key to FLYSContextm, documentation.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents: 958
diff changeset
33 /** The key that is used to store the StateEngine in the context. */
e55f1a851923 Added ARTIFACT key to FLYSContextm, documentation.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents: 958
diff changeset
34 public static final String ARTIFACT_KEY =
e55f1a851923 Added ARTIFACT key to FLYSContextm, documentation.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents: 958
diff changeset
35 "artifact";
e55f1a851923 Added ARTIFACT key to FLYSContextm, documentation.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents: 958
diff changeset
36
e55f1a851923 Added ARTIFACT key to FLYSContextm, documentation.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents: 958
diff changeset
37 /** The key that is used to store the TransitionEngine in the context. */
106
5864c41219db Initializes a TransitionEngine storing all transitions for each artifact at the application start.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff changeset
38 public static final String TRANSITION_ENGINE_KEY =
5864c41219db Initializes a TransitionEngine storing all transitions for each artifact at the application start.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff changeset
39 "artifact.transition.engine";
5864c41219db Initializes a TransitionEngine storing all transitions for each artifact at the application start.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff changeset
40
1821
e55f1a851923 Added ARTIFACT key to FLYSContextm, documentation.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents: 958
diff changeset
41 /** The key that is used to store the StateEngine in the context. */
107
a228b39494a9 Improved the bootstrap process - the states are initialized.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents: 106
diff changeset
42 public static final String STATE_ENGINE_KEY =
a228b39494a9 Improved the bootstrap process - the states are initialized.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents: 106
diff changeset
43 "artifact.state.engine";
a228b39494a9 Improved the bootstrap process - the states are initialized.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents: 106
diff changeset
44
295
53c155bfde07 Added code to parse the configured OutGenerators in the global configuration and to save a map of such in the FLYSContext.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents: 107
diff changeset
45 /** The key that is used to store the Map of OutGenerator classes in the
1821
e55f1a851923 Added ARTIFACT key to FLYSContextm, documentation.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents: 958
diff changeset
46 * context. */
295
53c155bfde07 Added code to parse the configured OutGenerators in the global configuration and to save a map of such in the FLYSContext.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents: 107
diff changeset
47 public static final String OUTGENERATORS_KEY =
53c155bfde07 Added code to parse the configured OutGenerators in the global configuration and to save a map of such in the FLYSContext.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents: 107
diff changeset
48 "flys.export.outgenerators";
53c155bfde07 Added code to parse the configured OutGenerators in the global configuration and to save a map of such in the FLYSContext.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents: 107
diff changeset
49
1821
e55f1a851923 Added ARTIFACT key to FLYSContextm, documentation.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents: 958
diff changeset
50 /** The key that is used to store the map of themes in the context. */
341
eca7892bf8ff Added a first small theme configuration and code to read it.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents: 295
diff changeset
51 public static final String THEMES =
eca7892bf8ff Added a first small theme configuration and code to read it.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents: 295
diff changeset
52 "flys.themes.map";
eca7892bf8ff Added a first small theme configuration and code to read it.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents: 295
diff changeset
53
1821
e55f1a851923 Added ARTIFACT key to FLYSContextm, documentation.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents: 958
diff changeset
54 /** The key that is used to store a map of theme mappings in the context. */
345
88a669785863 Initialized the facet2theme mappings configured in themes.xml and added a function to the ThemeFactory that retrieves a theme from FLYSContext based on its name.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents: 341
diff changeset
55 public static final String THEME_MAPPING =
88a669785863 Initialized the facet2theme mappings configured in themes.xml and added a function to the ThemeFactory that retrieves a theme from FLYSContext based on its name.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents: 341
diff changeset
56 "flys.themes.mapping.map";
88a669785863 Initialized the facet2theme mappings configured in themes.xml and added a function to the ThemeFactory that retrieves a theme from FLYSContext based on its name.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents: 341
diff changeset
57
1821
e55f1a851923 Added ARTIFACT key to FLYSContextm, documentation.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents: 958
diff changeset
58 /** The key that is used to store a map of WMS urls for each river. */
958
ae198bef4ba0 Added configurations for river WMSe (currently for Saar, Mosel, Elbe).
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents: 345
diff changeset
59 public static final String RIVER_WMS =
ae198bef4ba0 Added configurations for river WMSe (currently for Saar, Mosel, Elbe).
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents: 345
diff changeset
60 "flys.floodmap.river.wms";
ae198bef4ba0 Added configurations for river WMSe (currently for Saar, Mosel, Elbe).
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents: 345
diff changeset
61
1970
368040e5c400 Improved the Scheduler to be able to cancel running WSPLGEN jobs.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents: 1821
diff changeset
62 /** The key that is used to store an instance of Scheduler in the context.*/
368040e5c400 Improved the Scheduler to be able to cancel running WSPLGEN jobs.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents: 1821
diff changeset
63 public static final String SCHEDULER =
368040e5c400 Improved the Scheduler to be able to cancel running WSPLGEN jobs.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents: 1821
diff changeset
64 "flys.wsplgen.scheduler";
368040e5c400 Improved the Scheduler to be able to cancel running WSPLGEN jobs.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents: 1821
diff changeset
65
3630
28be160b5870 Add a module service. It's now possible to configure the modules which are
Bjoern Ricks <bjoern.ricks@intevation.de>
parents: 3295
diff changeset
66 /** Key to store the configured modules in the context. */
28be160b5870 Add a module service. It's now possible to configure the modules which are
Bjoern Ricks <bjoern.ricks@intevation.de>
parents: 3295
diff changeset
67 public static final String MODULES = "flys.modules";
28be160b5870 Add a module service. It's now possible to configure the modules which are
Bjoern Ricks <bjoern.ricks@intevation.de>
parents: 3295
diff changeset
68
106
5864c41219db Initializes a TransitionEngine storing all transitions for each artifact at the application start.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff changeset
69
5864c41219db Initializes a TransitionEngine storing all transitions for each artifact at the application start.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff changeset
70 /**
5864c41219db Initializes a TransitionEngine storing all transitions for each artifact at the application start.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff changeset
71 * The default constructor.
5864c41219db Initializes a TransitionEngine storing all transitions for each artifact at the application start.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff changeset
72 */
5866
9a6741ccf6d4 FLYS artifacts: Renamed FLYSContext(Factory) to RiverContext(Factory).
Sascha L. Teichmann <teichmann@intevation.de>
parents: 5863
diff changeset
73 public RiverContext() {
106
5864c41219db Initializes a TransitionEngine storing all transitions for each artifact at the application start.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff changeset
74 super();
5864c41219db Initializes a TransitionEngine storing all transitions for each artifact at the application start.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff changeset
75 }
5864c41219db Initializes a TransitionEngine storing all transitions for each artifact at the application start.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff changeset
76
5864c41219db Initializes a TransitionEngine storing all transitions for each artifact at the application start.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff changeset
77
5864c41219db Initializes a TransitionEngine storing all transitions for each artifact at the application start.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff changeset
78 /**
5864c41219db Initializes a TransitionEngine storing all transitions for each artifact at the application start.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff changeset
79 * A constructor with a config document.
5864c41219db Initializes a TransitionEngine storing all transitions for each artifact at the application start.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff changeset
80 */
5866
9a6741ccf6d4 FLYS artifacts: Renamed FLYSContext(Factory) to RiverContext(Factory).
Sascha L. Teichmann <teichmann@intevation.de>
parents: 5863
diff changeset
81 public RiverContext(Document config) {
106
5864c41219db Initializes a TransitionEngine storing all transitions for each artifact at the application start.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff changeset
82 super(config);
5864c41219db Initializes a TransitionEngine storing all transitions for each artifact at the application start.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff changeset
83 }
3295
4fc442f1b4f6 Refactored FLYSArtifactCollection.
Raimund Renkert <raimund.renkert@intevation.de>
parents: 1970
diff changeset
84
4fc442f1b4f6 Refactored FLYSArtifactCollection.
Raimund Renkert <raimund.renkert@intevation.de>
parents: 1970
diff changeset
85 /**
4fc442f1b4f6 Refactored FLYSArtifactCollection.
Raimund Renkert <raimund.renkert@intevation.de>
parents: 1970
diff changeset
86 * Returns the OutGenerator for a specified <i>type</i>.
4fc442f1b4f6 Refactored FLYSArtifactCollection.
Raimund Renkert <raimund.renkert@intevation.de>
parents: 1970
diff changeset
87 *
4fc442f1b4f6 Refactored FLYSArtifactCollection.
Raimund Renkert <raimund.renkert@intevation.de>
parents: 1970
diff changeset
88 * @param name The name of the output type.
4fc442f1b4f6 Refactored FLYSArtifactCollection.
Raimund Renkert <raimund.renkert@intevation.de>
parents: 1970
diff changeset
89 * @param type Defines the type of the desired OutGenerator.
4fc442f1b4f6 Refactored FLYSArtifactCollection.
Raimund Renkert <raimund.renkert@intevation.de>
parents: 1970
diff changeset
90 *
4fc442f1b4f6 Refactored FLYSArtifactCollection.
Raimund Renkert <raimund.renkert@intevation.de>
parents: 1970
diff changeset
91 * @return Instance of an OutGenerator for specified <i>type</i>.
4fc442f1b4f6 Refactored FLYSArtifactCollection.
Raimund Renkert <raimund.renkert@intevation.de>
parents: 1970
diff changeset
92 */
4fc442f1b4f6 Refactored FLYSArtifactCollection.
Raimund Renkert <raimund.renkert@intevation.de>
parents: 1970
diff changeset
93 public static OutGenerator getOutGenerator(
4fc442f1b4f6 Refactored FLYSArtifactCollection.
Raimund Renkert <raimund.renkert@intevation.de>
parents: 1970
diff changeset
94 CallContext context,
4fc442f1b4f6 Refactored FLYSArtifactCollection.
Raimund Renkert <raimund.renkert@intevation.de>
parents: 1970
diff changeset
95 String name,
4fc442f1b4f6 Refactored FLYSArtifactCollection.
Raimund Renkert <raimund.renkert@intevation.de>
parents: 1970
diff changeset
96 String type)
4fc442f1b4f6 Refactored FLYSArtifactCollection.
Raimund Renkert <raimund.renkert@intevation.de>
parents: 1970
diff changeset
97 {
4fc442f1b4f6 Refactored FLYSArtifactCollection.
Raimund Renkert <raimund.renkert@intevation.de>
parents: 1970
diff changeset
98
5866
9a6741ccf6d4 FLYS artifacts: Renamed FLYSContext(Factory) to RiverContext(Factory).
Sascha L. Teichmann <teichmann@intevation.de>
parents: 5863
diff changeset
99 RiverContext flysContext = context instanceof RiverContext
9a6741ccf6d4 FLYS artifacts: Renamed FLYSContext(Factory) to RiverContext(Factory).
Sascha L. Teichmann <teichmann@intevation.de>
parents: 5863
diff changeset
100 ? (RiverContext) context
9a6741ccf6d4 FLYS artifacts: Renamed FLYSContext(Factory) to RiverContext(Factory).
Sascha L. Teichmann <teichmann@intevation.de>
parents: 5863
diff changeset
101 : (RiverContext) context.globalContext();
3295
4fc442f1b4f6 Refactored FLYSArtifactCollection.
Raimund Renkert <raimund.renkert@intevation.de>
parents: 1970
diff changeset
102
7099
24f153ad1f40 Use pre-converted diagram attributes now.
Sascha L. Teichmann <teichmann@intevation.de>
parents: 7037
diff changeset
103 Map<String, Pair<Class<OutGenerator>, Object>> generators =
24f153ad1f40 Use pre-converted diagram attributes now.
Sascha L. Teichmann <teichmann@intevation.de>
parents: 7037
diff changeset
104 (Map<String, Pair<Class<OutGenerator>, Object>>)flysContext
7037
5c6fd2c010dd Add setup(Element config) method to Generator interface to be initialized from configuration.
Sascha L. Teichmann <teichmann@intevation.de>
parents: 5994
diff changeset
105 .get(RiverContext.OUTGENERATORS_KEY);
3295
4fc442f1b4f6 Refactored FLYSArtifactCollection.
Raimund Renkert <raimund.renkert@intevation.de>
parents: 1970
diff changeset
106
4fc442f1b4f6 Refactored FLYSArtifactCollection.
Raimund Renkert <raimund.renkert@intevation.de>
parents: 1970
diff changeset
107 if (generators == null) {
4fc442f1b4f6 Refactored FLYSArtifactCollection.
Raimund Renkert <raimund.renkert@intevation.de>
parents: 1970
diff changeset
108 return null;
4fc442f1b4f6 Refactored FLYSArtifactCollection.
Raimund Renkert <raimund.renkert@intevation.de>
parents: 1970
diff changeset
109 }
4fc442f1b4f6 Refactored FLYSArtifactCollection.
Raimund Renkert <raimund.renkert@intevation.de>
parents: 1970
diff changeset
110
7099
24f153ad1f40 Use pre-converted diagram attributes now.
Sascha L. Teichmann <teichmann@intevation.de>
parents: 7037
diff changeset
111 Pair<Class<OutGenerator>, Object> pair = generators.get(name);
7037
5c6fd2c010dd Add setup(Element config) method to Generator interface to be initialized from configuration.
Sascha L. Teichmann <teichmann@intevation.de>
parents: 5994
diff changeset
112
5c6fd2c010dd Add setup(Element config) method to Generator interface to be initialized from configuration.
Sascha L. Teichmann <teichmann@intevation.de>
parents: 5994
diff changeset
113 if (pair == null) {
5c6fd2c010dd Add setup(Element config) method to Generator interface to be initialized from configuration.
Sascha L. Teichmann <teichmann@intevation.de>
parents: 5994
diff changeset
114 logger.warn("No generator class found for " + name);
5c6fd2c010dd Add setup(Element config) method to Generator interface to be initialized from configuration.
Sascha L. Teichmann <teichmann@intevation.de>
parents: 5994
diff changeset
115 return null;
5c6fd2c010dd Add setup(Element config) method to Generator interface to be initialized from configuration.
Sascha L. Teichmann <teichmann@intevation.de>
parents: 5994
diff changeset
116 }
3295
4fc442f1b4f6 Refactored FLYSArtifactCollection.
Raimund Renkert <raimund.renkert@intevation.de>
parents: 1970
diff changeset
117
4fc442f1b4f6 Refactored FLYSArtifactCollection.
Raimund Renkert <raimund.renkert@intevation.de>
parents: 1970
diff changeset
118 try {
7037
5c6fd2c010dd Add setup(Element config) method to Generator interface to be initialized from configuration.
Sascha L. Teichmann <teichmann@intevation.de>
parents: 5994
diff changeset
119 Class<OutGenerator> clazz = pair.getA();
5c6fd2c010dd Add setup(Element config) method to Generator interface to be initialized from configuration.
Sascha L. Teichmann <teichmann@intevation.de>
parents: 5994
diff changeset
120 OutGenerator generator = clazz.newInstance();
5c6fd2c010dd Add setup(Element config) method to Generator interface to be initialized from configuration.
Sascha L. Teichmann <teichmann@intevation.de>
parents: 5994
diff changeset
121 generator.setup(pair.getB());
5c6fd2c010dd Add setup(Element config) method to Generator interface to be initialized from configuration.
Sascha L. Teichmann <teichmann@intevation.de>
parents: 5994
diff changeset
122 return generator;
3295
4fc442f1b4f6 Refactored FLYSArtifactCollection.
Raimund Renkert <raimund.renkert@intevation.de>
parents: 1970
diff changeset
123 }
4fc442f1b4f6 Refactored FLYSArtifactCollection.
Raimund Renkert <raimund.renkert@intevation.de>
parents: 1970
diff changeset
124 catch (InstantiationException ie) {
4fc442f1b4f6 Refactored FLYSArtifactCollection.
Raimund Renkert <raimund.renkert@intevation.de>
parents: 1970
diff changeset
125 logger.error(ie, ie);
4fc442f1b4f6 Refactored FLYSArtifactCollection.
Raimund Renkert <raimund.renkert@intevation.de>
parents: 1970
diff changeset
126 }
4fc442f1b4f6 Refactored FLYSArtifactCollection.
Raimund Renkert <raimund.renkert@intevation.de>
parents: 1970
diff changeset
127 catch (IllegalAccessException iae) {
4fc442f1b4f6 Refactored FLYSArtifactCollection.
Raimund Renkert <raimund.renkert@intevation.de>
parents: 1970
diff changeset
128 logger.error(iae, iae);
4fc442f1b4f6 Refactored FLYSArtifactCollection.
Raimund Renkert <raimund.renkert@intevation.de>
parents: 1970
diff changeset
129 }
4fc442f1b4f6 Refactored FLYSArtifactCollection.
Raimund Renkert <raimund.renkert@intevation.de>
parents: 1970
diff changeset
130
4fc442f1b4f6 Refactored FLYSArtifactCollection.
Raimund Renkert <raimund.renkert@intevation.de>
parents: 1970
diff changeset
131 return null;
4fc442f1b4f6 Refactored FLYSArtifactCollection.
Raimund Renkert <raimund.renkert@intevation.de>
parents: 1970
diff changeset
132 }
106
5864c41219db Initializes a TransitionEngine storing all transitions for each artifact at the application start.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff changeset
133 }
5864c41219db Initializes a TransitionEngine storing all transitions for each artifact at the application start.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff changeset
134 // vim:set ts=4 sw=4 si et sta sts=4 fenc=utf8 :

http://dive4elements.wald.intevation.org