Mercurial > dive4elements > gnv-client
annotate gnv-artifacts/src/main/java/de/intevation/gnv/artifacts/GNVArtifactBase.java @ 116:820238357bab
Added Horizontal-Profile-Support for Meshes.
Modify the Workflow for Horizontal-Profile-InstantaneousPoint
gnv-artifacts/trunk@169 c6561f87-3c4e-4783-a992-168aeb5c3f6f
author | Tim Englich <tim.englich@intevation.de> |
---|---|
date | Fri, 02 Oct 2009 08:07:00 +0000 |
parents | 158e89c2263b |
children | ef157bd2fa92 |
rev | line source |
---|---|
52
4d6a82b96059
First Implementation of the GNV-Artifacts
Tim Englich <tim.englich@intevation.de>
parents:
diff
changeset
|
1 /** |
4d6a82b96059
First Implementation of the GNV-Artifacts
Tim Englich <tim.englich@intevation.de>
parents:
diff
changeset
|
2 * |
4d6a82b96059
First Implementation of the GNV-Artifacts
Tim Englich <tim.englich@intevation.de>
parents:
diff
changeset
|
3 */ |
4d6a82b96059
First Implementation of the GNV-Artifacts
Tim Englich <tim.englich@intevation.de>
parents:
diff
changeset
|
4 package de.intevation.gnv.artifacts; |
4d6a82b96059
First Implementation of the GNV-Artifacts
Tim Englich <tim.englich@intevation.de>
parents:
diff
changeset
|
5 |
73
504570de21fd
Refactoring Work depending on Infrastructurchanges in the Artifact-Module
Tim Englich <tim.englich@intevation.de>
parents:
71
diff
changeset
|
6 import java.io.IOException; |
504570de21fd
Refactoring Work depending on Infrastructurchanges in the Artifact-Module
Tim Englich <tim.englich@intevation.de>
parents:
71
diff
changeset
|
7 import java.io.OutputStream; |
56
737d8bf63701
Required Inputelements integrated in BAsicArtifact-Descibe-Outputv
Tim Englich <tim.englich@intevation.de>
parents:
54
diff
changeset
|
8 import java.util.Collection; |
52
4d6a82b96059
First Implementation of the GNV-Artifacts
Tim Englich <tim.englich@intevation.de>
parents:
diff
changeset
|
9 import java.util.HashMap; |
54
09b4bf848c7b
2009-09-08 Tim Englich <tim.englich@intevation.de>
Tim Englich <tim.englich@intevation.de>
parents:
52
diff
changeset
|
10 import java.util.Iterator; |
52
4d6a82b96059
First Implementation of the GNV-Artifacts
Tim Englich <tim.englich@intevation.de>
parents:
diff
changeset
|
11 import java.util.Map; |
4d6a82b96059
First Implementation of the GNV-Artifacts
Tim Englich <tim.englich@intevation.de>
parents:
diff
changeset
|
12 |
71
e4ecf3188bdf
Integrated FIS-Artifact
Tim Englich <tim.englich@intevation.de>
parents:
70
diff
changeset
|
13 import javax.xml.xpath.XPathConstants; |
e4ecf3188bdf
Integrated FIS-Artifact
Tim Englich <tim.englich@intevation.de>
parents:
70
diff
changeset
|
14 |
52
4d6a82b96059
First Implementation of the GNV-Artifacts
Tim Englich <tim.englich@intevation.de>
parents:
diff
changeset
|
15 import org.apache.log4j.Logger; |
4d6a82b96059
First Implementation of the GNV-Artifacts
Tim Englich <tim.englich@intevation.de>
parents:
diff
changeset
|
16 import org.w3c.dom.Document; |
54
09b4bf848c7b
2009-09-08 Tim Englich <tim.englich@intevation.de>
Tim Englich <tim.englich@intevation.de>
parents:
52
diff
changeset
|
17 import org.w3c.dom.Element; |
52
4d6a82b96059
First Implementation of the GNV-Artifacts
Tim Englich <tim.englich@intevation.de>
parents:
diff
changeset
|
18 import org.w3c.dom.Node; |
4d6a82b96059
First Implementation of the GNV-Artifacts
Tim Englich <tim.englich@intevation.de>
parents:
diff
changeset
|
19 import org.w3c.dom.NodeList; |
4d6a82b96059
First Implementation of the GNV-Artifacts
Tim Englich <tim.englich@intevation.de>
parents:
diff
changeset
|
20 |
4d6a82b96059
First Implementation of the GNV-Artifacts
Tim Englich <tim.englich@intevation.de>
parents:
diff
changeset
|
21 import de.intevation.artifactdatabase.Config; |
4d6a82b96059
First Implementation of the GNV-Artifacts
Tim Englich <tim.englich@intevation.de>
parents:
diff
changeset
|
22 import de.intevation.artifactdatabase.DefaultArtifact; |
71
e4ecf3188bdf
Integrated FIS-Artifact
Tim Englich <tim.englich@intevation.de>
parents:
70
diff
changeset
|
23 import de.intevation.artifactdatabase.XMLUtils; |
70
0035862b0295
Refactoringwork done because of changes in the artifact-module
Tim Englich <tim.englich@intevation.de>
parents:
68
diff
changeset
|
24 import de.intevation.artifacts.ArtifactFactory; |
0035862b0295
Refactoringwork done because of changes in the artifact-module
Tim Englich <tim.englich@intevation.de>
parents:
68
diff
changeset
|
25 import de.intevation.artifacts.ArtifactNamespaceContext; |
73
504570de21fd
Refactoring Work depending on Infrastructurchanges in the Artifact-Module
Tim Englich <tim.englich@intevation.de>
parents:
71
diff
changeset
|
26 import de.intevation.artifacts.CallContext; |
52
4d6a82b96059
First Implementation of the GNV-Artifacts
Tim Englich <tim.englich@intevation.de>
parents:
diff
changeset
|
27 import de.intevation.gnv.artifacts.context.GNVArtifactContext; |
57
f01592cd6419
Funktionalität Feed initial bereitgestellt.
Tim Englich <tim.englich@intevation.de>
parents:
56
diff
changeset
|
28 import de.intevation.gnv.transition.DefaultInputData; |
f01592cd6419
Funktionalität Feed initial bereitgestellt.
Tim Englich <tim.englich@intevation.de>
parents:
56
diff
changeset
|
29 import de.intevation.gnv.transition.InputData; |
56
737d8bf63701
Required Inputelements integrated in BAsicArtifact-Descibe-Outputv
Tim Englich <tim.englich@intevation.de>
parents:
54
diff
changeset
|
30 import de.intevation.gnv.transition.InputValue; |
64
5db77e0a8594
Integrated Output Methods and Interfacsstructure
Tim Englich <tim.englich@intevation.de>
parents:
61
diff
changeset
|
31 import de.intevation.gnv.transition.OutputMode; |
5db77e0a8594
Integrated Output Methods and Interfacsstructure
Tim Englich <tim.englich@intevation.de>
parents:
61
diff
changeset
|
32 import de.intevation.gnv.transition.OutputTransition; |
52
4d6a82b96059
First Implementation of the GNV-Artifacts
Tim Englich <tim.englich@intevation.de>
parents:
diff
changeset
|
33 import de.intevation.gnv.transition.Transition; |
4d6a82b96059
First Implementation of the GNV-Artifacts
Tim Englich <tim.englich@intevation.de>
parents:
diff
changeset
|
34 import de.intevation.gnv.transition.TransitionFactory; |
57
f01592cd6419
Funktionalität Feed initial bereitgestellt.
Tim Englich <tim.englich@intevation.de>
parents:
56
diff
changeset
|
35 import de.intevation.gnv.transition.exception.TransitionException; |
71
e4ecf3188bdf
Integrated FIS-Artifact
Tim Englich <tim.englich@intevation.de>
parents:
70
diff
changeset
|
36 import de.intevation.gnv.utils.ArtifactXMLUtilities; |
52
4d6a82b96059
First Implementation of the GNV-Artifacts
Tim Englich <tim.englich@intevation.de>
parents:
diff
changeset
|
37 |
4d6a82b96059
First Implementation of the GNV-Artifacts
Tim Englich <tim.englich@intevation.de>
parents:
diff
changeset
|
38 /** |
4d6a82b96059
First Implementation of the GNV-Artifacts
Tim Englich <tim.englich@intevation.de>
parents:
diff
changeset
|
39 * @author Tim Englich <tim.englich@intevation.de> |
4d6a82b96059
First Implementation of the GNV-Artifacts
Tim Englich <tim.englich@intevation.de>
parents:
diff
changeset
|
40 * |
4d6a82b96059
First Implementation of the GNV-Artifacts
Tim Englich <tim.englich@intevation.de>
parents:
diff
changeset
|
41 */ |
4d6a82b96059
First Implementation of the GNV-Artifacts
Tim Englich <tim.englich@intevation.de>
parents:
diff
changeset
|
42 public abstract class GNVArtifactBase extends DefaultArtifact { |
4d6a82b96059
First Implementation of the GNV-Artifacts
Tim Englich <tim.englich@intevation.de>
parents:
diff
changeset
|
43 /** |
4d6a82b96059
First Implementation of the GNV-Artifacts
Tim Englich <tim.englich@intevation.de>
parents:
diff
changeset
|
44 * the logger, used to log exceptions and additonaly information |
4d6a82b96059
First Implementation of the GNV-Artifacts
Tim Englich <tim.englich@intevation.de>
parents:
diff
changeset
|
45 */ |
4d6a82b96059
First Implementation of the GNV-Artifacts
Tim Englich <tim.englich@intevation.de>
parents:
diff
changeset
|
46 private static Logger log = Logger.getLogger(GNVArtifactBase.class); |
4d6a82b96059
First Implementation of the GNV-Artifacts
Tim Englich <tim.englich@intevation.de>
parents:
diff
changeset
|
47 /** |
4d6a82b96059
First Implementation of the GNV-Artifacts
Tim Englich <tim.englich@intevation.de>
parents:
diff
changeset
|
48 * The UID of this Class |
4d6a82b96059
First Implementation of the GNV-Artifacts
Tim Englich <tim.englich@intevation.de>
parents:
diff
changeset
|
49 */ |
4d6a82b96059
First Implementation of the GNV-Artifacts
Tim Englich <tim.englich@intevation.de>
parents:
diff
changeset
|
50 private static final long serialVersionUID = -8907096744400741458L; |
4d6a82b96059
First Implementation of the GNV-Artifacts
Tim Englich <tim.englich@intevation.de>
parents:
diff
changeset
|
51 |
54
09b4bf848c7b
2009-09-08 Tim Englich <tim.englich@intevation.de>
Tim Englich <tim.englich@intevation.de>
parents:
52
diff
changeset
|
52 /** |
09b4bf848c7b
2009-09-08 Tim Englich <tim.englich@intevation.de>
Tim Englich <tim.englich@intevation.de>
parents:
52
diff
changeset
|
53 * The Identifier for the Replacement of the Artifactname |
09b4bf848c7b
2009-09-08 Tim Englich <tim.englich@intevation.de>
Tim Englich <tim.englich@intevation.de>
parents:
52
diff
changeset
|
54 */ |
52
4d6a82b96059
First Implementation of the GNV-Artifacts
Tim Englich <tim.englich@intevation.de>
parents:
diff
changeset
|
55 public static final String XPATH_IDENTIFIER_REPLACE = "IDENTIFIER"; |
54
09b4bf848c7b
2009-09-08 Tim Englich <tim.englich@intevation.de>
Tim Englich <tim.englich@intevation.de>
parents:
52
diff
changeset
|
56 |
52
4d6a82b96059
First Implementation of the GNV-Artifacts
Tim Englich <tim.englich@intevation.de>
parents:
diff
changeset
|
57 /** |
4d6a82b96059
First Implementation of the GNV-Artifacts
Tim Englich <tim.englich@intevation.de>
parents:
diff
changeset
|
58 * The XPATH to the XML-Fragment that should be used for the Configuration |
4d6a82b96059
First Implementation of the GNV-Artifacts
Tim Englich <tim.englich@intevation.de>
parents:
diff
changeset
|
59 */ |
4d6a82b96059
First Implementation of the GNV-Artifacts
Tim Englich <tim.englich@intevation.de>
parents:
diff
changeset
|
60 public static final String XPATH_ARTIFACT_CONFIGURATION= "/artifact-database/artifacts/artifact[@name='"+XPATH_IDENTIFIER_REPLACE+"']"; |
4d6a82b96059
First Implementation of the GNV-Artifacts
Tim Englich <tim.englich@intevation.de>
parents:
diff
changeset
|
61 |
54
09b4bf848c7b
2009-09-08 Tim Englich <tim.englich@intevation.de>
Tim Englich <tim.englich@intevation.de>
parents:
52
diff
changeset
|
62 |
09b4bf848c7b
2009-09-08 Tim Englich <tim.englich@intevation.de>
Tim Englich <tim.englich@intevation.de>
parents:
52
diff
changeset
|
63 /** |
09b4bf848c7b
2009-09-08 Tim Englich <tim.englich@intevation.de>
Tim Englich <tim.englich@intevation.de>
parents:
52
diff
changeset
|
64 * The current Transition |
09b4bf848c7b
2009-09-08 Tim Englich <tim.englich@intevation.de>
Tim Englich <tim.englich@intevation.de>
parents:
52
diff
changeset
|
65 */ |
52
4d6a82b96059
First Implementation of the GNV-Artifacts
Tim Englich <tim.englich@intevation.de>
parents:
diff
changeset
|
66 protected Transition current = null; |
4d6a82b96059
First Implementation of the GNV-Artifacts
Tim Englich <tim.englich@intevation.de>
parents:
diff
changeset
|
67 |
54
09b4bf848c7b
2009-09-08 Tim Englich <tim.englich@intevation.de>
Tim Englich <tim.englich@intevation.de>
parents:
52
diff
changeset
|
68 /** |
09b4bf848c7b
2009-09-08 Tim Englich <tim.englich@intevation.de>
Tim Englich <tim.englich@intevation.de>
parents:
52
diff
changeset
|
69 * The Transitions that can be used |
09b4bf848c7b
2009-09-08 Tim Englich <tim.englich@intevation.de>
Tim Englich <tim.englich@intevation.de>
parents:
52
diff
changeset
|
70 */ |
52
4d6a82b96059
First Implementation of the GNV-Artifacts
Tim Englich <tim.englich@intevation.de>
parents:
diff
changeset
|
71 protected Map<String, Transition> transitions = null; |
4d6a82b96059
First Implementation of the GNV-Artifacts
Tim Englich <tim.englich@intevation.de>
parents:
diff
changeset
|
72 |
54
09b4bf848c7b
2009-09-08 Tim Englich <tim.englich@intevation.de>
Tim Englich <tim.englich@intevation.de>
parents:
52
diff
changeset
|
73 /** |
09b4bf848c7b
2009-09-08 Tim Englich <tim.englich@intevation.de>
Tim Englich <tim.englich@intevation.de>
parents:
52
diff
changeset
|
74 * The Name of the Artifact |
09b4bf848c7b
2009-09-08 Tim Englich <tim.englich@intevation.de>
Tim Englich <tim.englich@intevation.de>
parents:
52
diff
changeset
|
75 */ |
52
4d6a82b96059
First Implementation of the GNV-Artifacts
Tim Englich <tim.englich@intevation.de>
parents:
diff
changeset
|
76 protected String name = null; |
54
09b4bf848c7b
2009-09-08 Tim Englich <tim.englich@intevation.de>
Tim Englich <tim.englich@intevation.de>
parents:
52
diff
changeset
|
77 |
71
e4ecf3188bdf
Integrated FIS-Artifact
Tim Englich <tim.englich@intevation.de>
parents:
70
diff
changeset
|
78 private ArtifactXMLUtilities xmlUtilities = new ArtifactXMLUtilities(); |
e4ecf3188bdf
Integrated FIS-Artifact
Tim Englich <tim.englich@intevation.de>
parents:
70
diff
changeset
|
79 |
52
4d6a82b96059
First Implementation of the GNV-Artifacts
Tim Englich <tim.englich@intevation.de>
parents:
diff
changeset
|
80 /** |
4d6a82b96059
First Implementation of the GNV-Artifacts
Tim Englich <tim.englich@intevation.de>
parents:
diff
changeset
|
81 * Constructor |
4d6a82b96059
First Implementation of the GNV-Artifacts
Tim Englich <tim.englich@intevation.de>
parents:
diff
changeset
|
82 */ |
4d6a82b96059
First Implementation of the GNV-Artifacts
Tim Englich <tim.englich@intevation.de>
parents:
diff
changeset
|
83 public GNVArtifactBase() { |
4d6a82b96059
First Implementation of the GNV-Artifacts
Tim Englich <tim.englich@intevation.de>
parents:
diff
changeset
|
84 super(); |
4d6a82b96059
First Implementation of the GNV-Artifacts
Tim Englich <tim.englich@intevation.de>
parents:
diff
changeset
|
85 } |
4d6a82b96059
First Implementation of the GNV-Artifacts
Tim Englich <tim.englich@intevation.de>
parents:
diff
changeset
|
86 |
58
f31343d80d53
Artifact.advance initial implementiert
Tim Englich <tim.englich@intevation.de>
parents:
57
diff
changeset
|
87 /** |
73
504570de21fd
Refactoring Work depending on Infrastructurchanges in the Artifact-Module
Tim Englich <tim.englich@intevation.de>
parents:
71
diff
changeset
|
88 * @see de.intevation.artifactdatabase.DefaultArtifact#advance(org.w3c.dom.Document, de.intevation.artifacts.CallContext) |
58
f31343d80d53
Artifact.advance initial implementiert
Tim Englich <tim.englich@intevation.de>
parents:
57
diff
changeset
|
89 */ |
f31343d80d53
Artifact.advance initial implementiert
Tim Englich <tim.englich@intevation.de>
parents:
57
diff
changeset
|
90 @Override |
73
504570de21fd
Refactoring Work depending on Infrastructurchanges in the Artifact-Module
Tim Englich <tim.englich@intevation.de>
parents:
71
diff
changeset
|
91 public Document advance(Document target, CallContext context) { |
89
cde042a0a395
Successreporting added
Tim Englich <tim.englich@intevation.de>
parents:
88
diff
changeset
|
92 log.debug("GNVArtifactBase.advance"); |
99
bb45c5097cb6
ehcache Integration for storing the chartresultvalues
Tim Englich <tim.englich@intevation.de>
parents:
91
diff
changeset
|
93 String uuid = Config.getStringXPath(target, "action/uuid/@value"); |
71
e4ecf3188bdf
Integrated FIS-Artifact
Tim Englich <tim.englich@intevation.de>
parents:
70
diff
changeset
|
94 Document result = XMLUtils.newDocument(); |
88
1b12021905b9
Some CodeCleanup done.
Tim Englich <tim.englich@intevation.de>
parents:
78
diff
changeset
|
95 try { |
1b12021905b9
Some CodeCleanup done.
Tim Englich <tim.englich@intevation.de>
parents:
78
diff
changeset
|
96 if (this.current != null){ |
1b12021905b9
Some CodeCleanup done.
Tim Englich <tim.englich@intevation.de>
parents:
78
diff
changeset
|
97 String transitionName = this.readTransitionName(target); |
116
820238357bab
Added Horizontal-Profile-Support for Meshes.
Tim Englich <tim.englich@intevation.de>
parents:
115
diff
changeset
|
98 log.debug("Transitionsname: "+transitionName); |
88
1b12021905b9
Some CodeCleanup done.
Tim Englich <tim.englich@intevation.de>
parents:
78
diff
changeset
|
99 if (this.current.isTransitionReachable(transitionName)){ |
1b12021905b9
Some CodeCleanup done.
Tim Englich <tim.englich@intevation.de>
parents:
78
diff
changeset
|
100 // 1. Pr�fung ob Transition valide ist |
1b12021905b9
Some CodeCleanup done.
Tim Englich <tim.englich@intevation.de>
parents:
78
diff
changeset
|
101 if (this.current.validate()){ |
1b12021905b9
Some CodeCleanup done.
Tim Englich <tim.englich@intevation.de>
parents:
78
diff
changeset
|
102 |
1b12021905b9
Some CodeCleanup done.
Tim Englich <tim.englich@intevation.de>
parents:
78
diff
changeset
|
103 try { |
1b12021905b9
Some CodeCleanup done.
Tim Englich <tim.englich@intevation.de>
parents:
78
diff
changeset
|
104 Transition nextStep = this.transitions.get(transitionName); |
1b12021905b9
Some CodeCleanup done.
Tim Englich <tim.englich@intevation.de>
parents:
78
diff
changeset
|
105 // 2.Ergebnisse Berechnen |
99
bb45c5097cb6
ehcache Integration for storing the chartresultvalues
Tim Englich <tim.englich@intevation.de>
parents:
91
diff
changeset
|
106 this.current.advance(uuid); |
88
1b12021905b9
Some CodeCleanup done.
Tim Englich <tim.englich@intevation.de>
parents:
78
diff
changeset
|
107 // 3. Ergebnisse �bergeben |
1b12021905b9
Some CodeCleanup done.
Tim Englich <tim.englich@intevation.de>
parents:
78
diff
changeset
|
108 nextStep.setDescibeData(this.current.getDescibeData()); |
99
bb45c5097cb6
ehcache Integration for storing the chartresultvalues
Tim Englich <tim.englich@intevation.de>
parents:
91
diff
changeset
|
109 nextStep.putInputData(this.current.getInputData(),uuid); |
88
1b12021905b9
Some CodeCleanup done.
Tim Englich <tim.englich@intevation.de>
parents:
78
diff
changeset
|
110 // 4. Umschalten auf neue Transistion |
1b12021905b9
Some CodeCleanup done.
Tim Englich <tim.englich@intevation.de>
parents:
78
diff
changeset
|
111 this.current = nextStep; |
89
cde042a0a395
Successreporting added
Tim Englich <tim.englich@intevation.de>
parents:
88
diff
changeset
|
112 result = new ArtifactXMLUtilities().createSuccessReport("Advance success", XMLUtils.newDocument()); |
88
1b12021905b9
Some CodeCleanup done.
Tim Englich <tim.englich@intevation.de>
parents:
78
diff
changeset
|
113 } catch (TransitionException e) { |
1b12021905b9
Some CodeCleanup done.
Tim Englich <tim.englich@intevation.de>
parents:
78
diff
changeset
|
114 log.error(e,e); |
1b12021905b9
Some CodeCleanup done.
Tim Englich <tim.englich@intevation.de>
parents:
78
diff
changeset
|
115 result = new ArtifactXMLUtilities().createExceptionReport(e.getLocalizedMessage(), XMLUtils.newDocument()); |
1b12021905b9
Some CodeCleanup done.
Tim Englich <tim.englich@intevation.de>
parents:
78
diff
changeset
|
116 } |
1b12021905b9
Some CodeCleanup done.
Tim Englich <tim.englich@intevation.de>
parents:
78
diff
changeset
|
117 |
1b12021905b9
Some CodeCleanup done.
Tim Englich <tim.englich@intevation.de>
parents:
78
diff
changeset
|
118 }else{ |
1b12021905b9
Some CodeCleanup done.
Tim Englich <tim.englich@intevation.de>
parents:
78
diff
changeset
|
119 String msg = "Advance nicht m�glich, da die Bedingungen f�r den �bergang " + |
1b12021905b9
Some CodeCleanup done.
Tim Englich <tim.englich@intevation.de>
parents:
78
diff
changeset
|
120 "in den neuen Zustand noch nicht gegeben ist."; |
1b12021905b9
Some CodeCleanup done.
Tim Englich <tim.englich@intevation.de>
parents:
78
diff
changeset
|
121 log.error(msg); |
1b12021905b9
Some CodeCleanup done.
Tim Englich <tim.englich@intevation.de>
parents:
78
diff
changeset
|
122 result = new ArtifactXMLUtilities().createExceptionReport(msg, XMLUtils.newDocument()); |
58
f31343d80d53
Artifact.advance initial implementiert
Tim Englich <tim.englich@intevation.de>
parents:
57
diff
changeset
|
123 } |
f31343d80d53
Artifact.advance initial implementiert
Tim Englich <tim.englich@intevation.de>
parents:
57
diff
changeset
|
124 |
f31343d80d53
Artifact.advance initial implementiert
Tim Englich <tim.englich@intevation.de>
parents:
57
diff
changeset
|
125 }else{ |
88
1b12021905b9
Some CodeCleanup done.
Tim Englich <tim.englich@intevation.de>
parents:
78
diff
changeset
|
126 String msg = "Transitions�bergang wird nicht unterst�tzt."; |
1b12021905b9
Some CodeCleanup done.
Tim Englich <tim.englich@intevation.de>
parents:
78
diff
changeset
|
127 log.error(msg); |
1b12021905b9
Some CodeCleanup done.
Tim Englich <tim.englich@intevation.de>
parents:
78
diff
changeset
|
128 result = new ArtifactXMLUtilities().createExceptionReport(msg, XMLUtils.newDocument()); |
58
f31343d80d53
Artifact.advance initial implementiert
Tim Englich <tim.englich@intevation.de>
parents:
57
diff
changeset
|
129 } |
f31343d80d53
Artifact.advance initial implementiert
Tim Englich <tim.englich@intevation.de>
parents:
57
diff
changeset
|
130 }else{ |
88
1b12021905b9
Some CodeCleanup done.
Tim Englich <tim.englich@intevation.de>
parents:
78
diff
changeset
|
131 String msg = "Kein Transitionsschritt aktiviert."; |
1b12021905b9
Some CodeCleanup done.
Tim Englich <tim.englich@intevation.de>
parents:
78
diff
changeset
|
132 log.error(msg); |
1b12021905b9
Some CodeCleanup done.
Tim Englich <tim.englich@intevation.de>
parents:
78
diff
changeset
|
133 result = new ArtifactXMLUtilities().createExceptionReport(msg, XMLUtils.newDocument()); |
58
f31343d80d53
Artifact.advance initial implementiert
Tim Englich <tim.englich@intevation.de>
parents:
57
diff
changeset
|
134 } |
88
1b12021905b9
Some CodeCleanup done.
Tim Englich <tim.englich@intevation.de>
parents:
78
diff
changeset
|
135 } catch (Exception e) { |
1b12021905b9
Some CodeCleanup done.
Tim Englich <tim.englich@intevation.de>
parents:
78
diff
changeset
|
136 log.error(e,e); |
1b12021905b9
Some CodeCleanup done.
Tim Englich <tim.englich@intevation.de>
parents:
78
diff
changeset
|
137 result = new ArtifactXMLUtilities().createExceptionReport(e.getLocalizedMessage(), XMLUtils.newDocument()); |
58
f31343d80d53
Artifact.advance initial implementiert
Tim Englich <tim.englich@intevation.de>
parents:
57
diff
changeset
|
138 } |
f31343d80d53
Artifact.advance initial implementiert
Tim Englich <tim.englich@intevation.de>
parents:
57
diff
changeset
|
139 return result; |
f31343d80d53
Artifact.advance initial implementiert
Tim Englich <tim.englich@intevation.de>
parents:
57
diff
changeset
|
140 } |
f31343d80d53
Artifact.advance initial implementiert
Tim Englich <tim.englich@intevation.de>
parents:
57
diff
changeset
|
141 |
f31343d80d53
Artifact.advance initial implementiert
Tim Englich <tim.englich@intevation.de>
parents:
57
diff
changeset
|
142 protected String readTransitionName(Document document) { |
f31343d80d53
Artifact.advance initial implementiert
Tim Englich <tim.englich@intevation.de>
parents:
57
diff
changeset
|
143 String returnValue = Config.getStringXPath(document, "action/target/@name"); |
f31343d80d53
Artifact.advance initial implementiert
Tim Englich <tim.englich@intevation.de>
parents:
57
diff
changeset
|
144 return returnValue; |
f31343d80d53
Artifact.advance initial implementiert
Tim Englich <tim.englich@intevation.de>
parents:
57
diff
changeset
|
145 } |
f31343d80d53
Artifact.advance initial implementiert
Tim Englich <tim.englich@intevation.de>
parents:
57
diff
changeset
|
146 |
52
4d6a82b96059
First Implementation of the GNV-Artifacts
Tim Englich <tim.englich@intevation.de>
parents:
diff
changeset
|
147 protected Node getConfigurationFragment(Document document){ |
4d6a82b96059
First Implementation of the GNV-Artifacts
Tim Englich <tim.englich@intevation.de>
parents:
diff
changeset
|
148 log.debug("GNVArtifactBase.getConfigurationFragment"); |
4d6a82b96059
First Implementation of the GNV-Artifacts
Tim Englich <tim.englich@intevation.de>
parents:
diff
changeset
|
149 String xpathQuery = XPATH_ARTIFACT_CONFIGURATION.replaceAll(XPATH_IDENTIFIER_REPLACE, this.name); |
4d6a82b96059
First Implementation of the GNV-Artifacts
Tim Englich <tim.englich@intevation.de>
parents:
diff
changeset
|
150 log.debug(xpathQuery); |
4d6a82b96059
First Implementation of the GNV-Artifacts
Tim Englich <tim.englich@intevation.de>
parents:
diff
changeset
|
151 return Config.getNodeXPath(document,xpathQuery); |
4d6a82b96059
First Implementation of the GNV-Artifacts
Tim Englich <tim.englich@intevation.de>
parents:
diff
changeset
|
152 } |
4d6a82b96059
First Implementation of the GNV-Artifacts
Tim Englich <tim.englich@intevation.de>
parents:
diff
changeset
|
153 |
4d6a82b96059
First Implementation of the GNV-Artifacts
Tim Englich <tim.englich@intevation.de>
parents:
diff
changeset
|
154 /** |
73
504570de21fd
Refactoring Work depending on Infrastructurchanges in the Artifact-Module
Tim Englich <tim.englich@intevation.de>
parents:
71
diff
changeset
|
155 * @see de.intevation.artifactdatabase.DefaultArtifact#feed(org.w3c.dom.Document, de.intevation.artifacts.CallContext) |
57
f01592cd6419
Funktionalität Feed initial bereitgestellt.
Tim Englich <tim.englich@intevation.de>
parents:
56
diff
changeset
|
156 */ |
f01592cd6419
Funktionalität Feed initial bereitgestellt.
Tim Englich <tim.englich@intevation.de>
parents:
56
diff
changeset
|
157 @Override |
73
504570de21fd
Refactoring Work depending on Infrastructurchanges in the Artifact-Module
Tim Englich <tim.englich@intevation.de>
parents:
71
diff
changeset
|
158 public Document feed(Document target, CallContext context) { |
89
cde042a0a395
Successreporting added
Tim Englich <tim.englich@intevation.de>
parents:
88
diff
changeset
|
159 log.debug("GNVArtifactBase.feed"); |
71
e4ecf3188bdf
Integrated FIS-Artifact
Tim Englich <tim.englich@intevation.de>
parents:
70
diff
changeset
|
160 Document result = XMLUtils.newDocument(); |
57
f01592cd6419
Funktionalität Feed initial bereitgestellt.
Tim Englich <tim.englich@intevation.de>
parents:
56
diff
changeset
|
161 try { |
f01592cd6419
Funktionalität Feed initial bereitgestellt.
Tim Englich <tim.englich@intevation.de>
parents:
56
diff
changeset
|
162 if (this.current != null){ |
99
bb45c5097cb6
ehcache Integration for storing the chartresultvalues
Tim Englich <tim.englich@intevation.de>
parents:
91
diff
changeset
|
163 String uuid = Config.getStringXPath(target, "action/uuid/@value"); |
bb45c5097cb6
ehcache Integration for storing the chartresultvalues
Tim Englich <tim.englich@intevation.de>
parents:
91
diff
changeset
|
164 this.current.putInputData(this.parseInputData(target, "/action/data/input"),uuid); |
89
cde042a0a395
Successreporting added
Tim Englich <tim.englich@intevation.de>
parents:
88
diff
changeset
|
165 result = new ArtifactXMLUtilities().createSuccessReport("Feed success", XMLUtils.newDocument()); |
cde042a0a395
Successreporting added
Tim Englich <tim.englich@intevation.de>
parents:
88
diff
changeset
|
166 }else{ |
cde042a0a395
Successreporting added
Tim Englich <tim.englich@intevation.de>
parents:
88
diff
changeset
|
167 String msg = "No Transition instantiated"; |
cde042a0a395
Successreporting added
Tim Englich <tim.englich@intevation.de>
parents:
88
diff
changeset
|
168 log.warn(msg); |
cde042a0a395
Successreporting added
Tim Englich <tim.englich@intevation.de>
parents:
88
diff
changeset
|
169 result = new ArtifactXMLUtilities().createExceptionReport(msg, XMLUtils.newDocument()); |
57
f01592cd6419
Funktionalität Feed initial bereitgestellt.
Tim Englich <tim.englich@intevation.de>
parents:
56
diff
changeset
|
170 } |
f01592cd6419
Funktionalität Feed initial bereitgestellt.
Tim Englich <tim.englich@intevation.de>
parents:
56
diff
changeset
|
171 } catch (TransitionException e) { |
f01592cd6419
Funktionalität Feed initial bereitgestellt.
Tim Englich <tim.englich@intevation.de>
parents:
56
diff
changeset
|
172 log.error(e,e); |
89
cde042a0a395
Successreporting added
Tim Englich <tim.englich@intevation.de>
parents:
88
diff
changeset
|
173 result = new ArtifactXMLUtilities().createExceptionReport(e.getLocalizedMessage(), XMLUtils.newDocument()); |
57
f01592cd6419
Funktionalität Feed initial bereitgestellt.
Tim Englich <tim.englich@intevation.de>
parents:
56
diff
changeset
|
174 } |
f01592cd6419
Funktionalität Feed initial bereitgestellt.
Tim Englich <tim.englich@intevation.de>
parents:
56
diff
changeset
|
175 return result; |
f01592cd6419
Funktionalität Feed initial bereitgestellt.
Tim Englich <tim.englich@intevation.de>
parents:
56
diff
changeset
|
176 } |
f01592cd6419
Funktionalität Feed initial bereitgestellt.
Tim Englich <tim.englich@intevation.de>
parents:
56
diff
changeset
|
177 |
f01592cd6419
Funktionalität Feed initial bereitgestellt.
Tim Englich <tim.englich@intevation.de>
parents:
56
diff
changeset
|
178 /** |
52
4d6a82b96059
First Implementation of the GNV-Artifacts
Tim Englich <tim.englich@intevation.de>
parents:
diff
changeset
|
179 * @see de.intevation.artifactdatabase.DefaultArtifact#setup(java.lang.String, java.lang.Object) |
4d6a82b96059
First Implementation of the GNV-Artifacts
Tim Englich <tim.englich@intevation.de>
parents:
diff
changeset
|
180 */ |
4d6a82b96059
First Implementation of the GNV-Artifacts
Tim Englich <tim.englich@intevation.de>
parents:
diff
changeset
|
181 @Override |
70
0035862b0295
Refactoringwork done because of changes in the artifact-module
Tim Englich <tim.englich@intevation.de>
parents:
68
diff
changeset
|
182 public void setup(String identifier, ArtifactFactory factory, Object context) { |
52
4d6a82b96059
First Implementation of the GNV-Artifacts
Tim Englich <tim.englich@intevation.de>
parents:
diff
changeset
|
183 log.debug("GNVArtifactBase.setup"); |
70
0035862b0295
Refactoringwork done because of changes in the artifact-module
Tim Englich <tim.englich@intevation.de>
parents:
68
diff
changeset
|
184 super.setup(identifier, factory, context); |
77
0e38f512f7e4
Some improvements an bugfixes done
Tim Englich <tim.englich@intevation.de>
parents:
73
diff
changeset
|
185 |
0e38f512f7e4
Some improvements an bugfixes done
Tim Englich <tim.englich@intevation.de>
parents:
73
diff
changeset
|
186 Object localContext = context; |
0e38f512f7e4
Some improvements an bugfixes done
Tim Englich <tim.englich@intevation.de>
parents:
73
diff
changeset
|
187 if (context instanceof CallContext){ |
0e38f512f7e4
Some improvements an bugfixes done
Tim Englich <tim.englich@intevation.de>
parents:
73
diff
changeset
|
188 localContext = ((CallContext)context).globalContext(); |
0e38f512f7e4
Some improvements an bugfixes done
Tim Englich <tim.englich@intevation.de>
parents:
73
diff
changeset
|
189 |
0e38f512f7e4
Some improvements an bugfixes done
Tim Englich <tim.englich@intevation.de>
parents:
73
diff
changeset
|
190 } |
0e38f512f7e4
Some improvements an bugfixes done
Tim Englich <tim.englich@intevation.de>
parents:
73
diff
changeset
|
191 |
0e38f512f7e4
Some improvements an bugfixes done
Tim Englich <tim.englich@intevation.de>
parents:
73
diff
changeset
|
192 if (localContext instanceof GNVArtifactContext){ |
0e38f512f7e4
Some improvements an bugfixes done
Tim Englich <tim.englich@intevation.de>
parents:
73
diff
changeset
|
193 GNVArtifactContext gnvContext = (GNVArtifactContext)localContext; |
52
4d6a82b96059
First Implementation of the GNV-Artifacts
Tim Englich <tim.englich@intevation.de>
parents:
diff
changeset
|
194 Document doc = gnvContext.getConfig(); |
4d6a82b96059
First Implementation of the GNV-Artifacts
Tim Englich <tim.englich@intevation.de>
parents:
diff
changeset
|
195 Node artifactNode = this.getConfigurationFragment(doc); |
4d6a82b96059
First Implementation of the GNV-Artifacts
Tim Englich <tim.englich@intevation.de>
parents:
diff
changeset
|
196 NodeList transitionList = Config.getNodeSetXPath(artifactNode, "transitions/transition"); |
4d6a82b96059
First Implementation of the GNV-Artifacts
Tim Englich <tim.englich@intevation.de>
parents:
diff
changeset
|
197 this.transitions = new HashMap<String, Transition>(transitionList.getLength()); |
4d6a82b96059
First Implementation of the GNV-Artifacts
Tim Englich <tim.englich@intevation.de>
parents:
diff
changeset
|
198 for (int i = 0 ; i < transitionList.getLength(); i++){ |
4d6a82b96059
First Implementation of the GNV-Artifacts
Tim Englich <tim.englich@intevation.de>
parents:
diff
changeset
|
199 Transition tmpTransition = TransitionFactory.getInstance().createTransition(transitionList.item(i)); |
4d6a82b96059
First Implementation of the GNV-Artifacts
Tim Englich <tim.englich@intevation.de>
parents:
diff
changeset
|
200 if (tmpTransition != null){ |
4d6a82b96059
First Implementation of the GNV-Artifacts
Tim Englich <tim.englich@intevation.de>
parents:
diff
changeset
|
201 this.transitions.put(tmpTransition.getID(), tmpTransition); |
4d6a82b96059
First Implementation of the GNV-Artifacts
Tim Englich <tim.englich@intevation.de>
parents:
diff
changeset
|
202 if (this.current == null){ |
4d6a82b96059
First Implementation of the GNV-Artifacts
Tim Englich <tim.englich@intevation.de>
parents:
diff
changeset
|
203 this.current = tmpTransition; |
4d6a82b96059
First Implementation of the GNV-Artifacts
Tim Englich <tim.englich@intevation.de>
parents:
diff
changeset
|
204 } |
4d6a82b96059
First Implementation of the GNV-Artifacts
Tim Englich <tim.englich@intevation.de>
parents:
diff
changeset
|
205 } |
4d6a82b96059
First Implementation of the GNV-Artifacts
Tim Englich <tim.englich@intevation.de>
parents:
diff
changeset
|
206 } |
4d6a82b96059
First Implementation of the GNV-Artifacts
Tim Englich <tim.englich@intevation.de>
parents:
diff
changeset
|
207 |
4d6a82b96059
First Implementation of the GNV-Artifacts
Tim Englich <tim.englich@intevation.de>
parents:
diff
changeset
|
208 } |
4d6a82b96059
First Implementation of the GNV-Artifacts
Tim Englich <tim.englich@intevation.de>
parents:
diff
changeset
|
209 } |
4d6a82b96059
First Implementation of the GNV-Artifacts
Tim Englich <tim.englich@intevation.de>
parents:
diff
changeset
|
210 |
54
09b4bf848c7b
2009-09-08 Tim Englich <tim.englich@intevation.de>
Tim Englich <tim.englich@intevation.de>
parents:
52
diff
changeset
|
211 |
09b4bf848c7b
2009-09-08 Tim Englich <tim.englich@intevation.de>
Tim Englich <tim.englich@intevation.de>
parents:
52
diff
changeset
|
212 protected Document createDescibeOutput(){ |
09b4bf848c7b
2009-09-08 Tim Englich <tim.englich@intevation.de>
Tim Englich <tim.englich@intevation.de>
parents:
52
diff
changeset
|
213 log.debug("GNVArtifactBase.createDescibeOutput"); |
71
e4ecf3188bdf
Integrated FIS-Artifact
Tim Englich <tim.englich@intevation.de>
parents:
70
diff
changeset
|
214 Document document = XMLUtils.newDocument(); |
88
1b12021905b9
Some CodeCleanup done.
Tim Englich <tim.englich@intevation.de>
parents:
78
diff
changeset
|
215 Element rootNode = this.createRootNode(document); |
54
09b4bf848c7b
2009-09-08 Tim Englich <tim.englich@intevation.de>
Tim Englich <tim.englich@intevation.de>
parents:
52
diff
changeset
|
216 this.createHeader(rootNode, document, "describe"); |
59
2c5d8f5bced1
Outputs integrated in describe and XForms integrated
Tim Englich <tim.englich@intevation.de>
parents:
58
diff
changeset
|
217 this.createOutputs(rootNode, document); |
54
09b4bf848c7b
2009-09-08 Tim Englich <tim.englich@intevation.de>
Tim Englich <tim.englich@intevation.de>
parents:
52
diff
changeset
|
218 this.createCurrentState(rootNode, document); |
09b4bf848c7b
2009-09-08 Tim Englich <tim.englich@intevation.de>
Tim Englich <tim.englich@intevation.de>
parents:
52
diff
changeset
|
219 this.createReachableStates(rootNode, document); |
09b4bf848c7b
2009-09-08 Tim Englich <tim.englich@intevation.de>
Tim Englich <tim.englich@intevation.de>
parents:
52
diff
changeset
|
220 this.createModel(rootNode, document); |
09b4bf848c7b
2009-09-08 Tim Englich <tim.englich@intevation.de>
Tim Englich <tim.englich@intevation.de>
parents:
52
diff
changeset
|
221 this.createUserInterface(rootNode, document); |
09b4bf848c7b
2009-09-08 Tim Englich <tim.englich@intevation.de>
Tim Englich <tim.englich@intevation.de>
parents:
52
diff
changeset
|
222 return document; |
09b4bf848c7b
2009-09-08 Tim Englich <tim.englich@intevation.de>
Tim Englich <tim.englich@intevation.de>
parents:
52
diff
changeset
|
223 } |
09b4bf848c7b
2009-09-08 Tim Englich <tim.englich@intevation.de>
Tim Englich <tim.englich@intevation.de>
parents:
52
diff
changeset
|
224 |
09b4bf848c7b
2009-09-08 Tim Englich <tim.englich@intevation.de>
Tim Englich <tim.englich@intevation.de>
parents:
52
diff
changeset
|
225 protected Element createRootNode(Document document){ |
71
e4ecf3188bdf
Integrated FIS-Artifact
Tim Englich <tim.englich@intevation.de>
parents:
70
diff
changeset
|
226 Element rootNode = xmlUtilities.createArtifactElement(document,"result"); |
54
09b4bf848c7b
2009-09-08 Tim Englich <tim.englich@intevation.de>
Tim Englich <tim.englich@intevation.de>
parents:
52
diff
changeset
|
227 document.appendChild(rootNode); |
09b4bf848c7b
2009-09-08 Tim Englich <tim.englich@intevation.de>
Tim Englich <tim.englich@intevation.de>
parents:
52
diff
changeset
|
228 return rootNode; |
09b4bf848c7b
2009-09-08 Tim Englich <tim.englich@intevation.de>
Tim Englich <tim.englich@intevation.de>
parents:
52
diff
changeset
|
229 } |
09b4bf848c7b
2009-09-08 Tim Englich <tim.englich@intevation.de>
Tim Englich <tim.englich@intevation.de>
parents:
52
diff
changeset
|
230 |
09b4bf848c7b
2009-09-08 Tim Englich <tim.englich@intevation.de>
Tim Englich <tim.englich@intevation.de>
parents:
52
diff
changeset
|
231 protected void createHeader(Element parent, Document document, String documentType){ |
71
e4ecf3188bdf
Integrated FIS-Artifact
Tim Englich <tim.englich@intevation.de>
parents:
70
diff
changeset
|
232 Element typeNode = xmlUtilities.createArtifactElement(document,"type"); |
54
09b4bf848c7b
2009-09-08 Tim Englich <tim.englich@intevation.de>
Tim Englich <tim.englich@intevation.de>
parents:
52
diff
changeset
|
233 typeNode.setAttribute("name", documentType); |
09b4bf848c7b
2009-09-08 Tim Englich <tim.englich@intevation.de>
Tim Englich <tim.englich@intevation.de>
parents:
52
diff
changeset
|
234 parent.appendChild(typeNode); |
09b4bf848c7b
2009-09-08 Tim Englich <tim.englich@intevation.de>
Tim Englich <tim.englich@intevation.de>
parents:
52
diff
changeset
|
235 |
71
e4ecf3188bdf
Integrated FIS-Artifact
Tim Englich <tim.englich@intevation.de>
parents:
70
diff
changeset
|
236 Element uuidNode = xmlUtilities.createArtifactElement(document,"uuid"); |
54
09b4bf848c7b
2009-09-08 Tim Englich <tim.englich@intevation.de>
Tim Englich <tim.englich@intevation.de>
parents:
52
diff
changeset
|
237 uuidNode.setAttribute("value", super.identifier); |
09b4bf848c7b
2009-09-08 Tim Englich <tim.englich@intevation.de>
Tim Englich <tim.englich@intevation.de>
parents:
52
diff
changeset
|
238 parent.appendChild(uuidNode); |
09b4bf848c7b
2009-09-08 Tim Englich <tim.englich@intevation.de>
Tim Englich <tim.englich@intevation.de>
parents:
52
diff
changeset
|
239 |
71
e4ecf3188bdf
Integrated FIS-Artifact
Tim Englich <tim.englich@intevation.de>
parents:
70
diff
changeset
|
240 Element hashNode = xmlUtilities.createArtifactElement(document,"hash"); |
54
09b4bf848c7b
2009-09-08 Tim Englich <tim.englich@intevation.de>
Tim Englich <tim.englich@intevation.de>
parents:
52
diff
changeset
|
241 hashNode.setAttribute("value", this.hash()); |
09b4bf848c7b
2009-09-08 Tim Englich <tim.englich@intevation.de>
Tim Englich <tim.englich@intevation.de>
parents:
52
diff
changeset
|
242 parent.appendChild(hashNode); |
89
cde042a0a395
Successreporting added
Tim Englich <tim.englich@intevation.de>
parents:
88
diff
changeset
|
243 } |
54
09b4bf848c7b
2009-09-08 Tim Englich <tim.englich@intevation.de>
Tim Englich <tim.englich@intevation.de>
parents:
52
diff
changeset
|
244 |
09b4bf848c7b
2009-09-08 Tim Englich <tim.englich@intevation.de>
Tim Englich <tim.englich@intevation.de>
parents:
52
diff
changeset
|
245 protected void createReachableStates(Element parent,Document document){ |
71
e4ecf3188bdf
Integrated FIS-Artifact
Tim Englich <tim.englich@intevation.de>
parents:
70
diff
changeset
|
246 Element stateNode = xmlUtilities.createArtifactElement(document,"reachable-states"); |
54
09b4bf848c7b
2009-09-08 Tim Englich <tim.englich@intevation.de>
Tim Englich <tim.englich@intevation.de>
parents:
52
diff
changeset
|
247 if (this.current != null){ |
09b4bf848c7b
2009-09-08 Tim Englich <tim.englich@intevation.de>
Tim Englich <tim.englich@intevation.de>
parents:
52
diff
changeset
|
248 Iterator<String> states = this.current.reachableTransitions().iterator(); |
09b4bf848c7b
2009-09-08 Tim Englich <tim.englich@intevation.de>
Tim Englich <tim.englich@intevation.de>
parents:
52
diff
changeset
|
249 while(states.hasNext()){ |
09b4bf848c7b
2009-09-08 Tim Englich <tim.englich@intevation.de>
Tim Englich <tim.englich@intevation.de>
parents:
52
diff
changeset
|
250 String value = states.next(); |
71
e4ecf3188bdf
Integrated FIS-Artifact
Tim Englich <tim.englich@intevation.de>
parents:
70
diff
changeset
|
251 Element currentNode = xmlUtilities.createArtifactElement(document,"state"); |
54
09b4bf848c7b
2009-09-08 Tim Englich <tim.englich@intevation.de>
Tim Englich <tim.englich@intevation.de>
parents:
52
diff
changeset
|
252 currentNode.setAttribute("name", value); |
88
1b12021905b9
Some CodeCleanup done.
Tim Englich <tim.englich@intevation.de>
parents:
78
diff
changeset
|
253 log.debug("Reachable State: "+value); |
54
09b4bf848c7b
2009-09-08 Tim Englich <tim.englich@intevation.de>
Tim Englich <tim.englich@intevation.de>
parents:
52
diff
changeset
|
254 currentNode.setAttribute("description", transitions.get(value).getDescription()); |
09b4bf848c7b
2009-09-08 Tim Englich <tim.englich@intevation.de>
Tim Englich <tim.englich@intevation.de>
parents:
52
diff
changeset
|
255 stateNode.appendChild(currentNode); |
09b4bf848c7b
2009-09-08 Tim Englich <tim.englich@intevation.de>
Tim Englich <tim.englich@intevation.de>
parents:
52
diff
changeset
|
256 } |
09b4bf848c7b
2009-09-08 Tim Englich <tim.englich@intevation.de>
Tim Englich <tim.englich@intevation.de>
parents:
52
diff
changeset
|
257 } |
09b4bf848c7b
2009-09-08 Tim Englich <tim.englich@intevation.de>
Tim Englich <tim.englich@intevation.de>
parents:
52
diff
changeset
|
258 parent.appendChild(stateNode); |
09b4bf848c7b
2009-09-08 Tim Englich <tim.englich@intevation.de>
Tim Englich <tim.englich@intevation.de>
parents:
52
diff
changeset
|
259 } |
09b4bf848c7b
2009-09-08 Tim Englich <tim.englich@intevation.de>
Tim Englich <tim.englich@intevation.de>
parents:
52
diff
changeset
|
260 |
09b4bf848c7b
2009-09-08 Tim Englich <tim.englich@intevation.de>
Tim Englich <tim.englich@intevation.de>
parents:
52
diff
changeset
|
261 protected void createCurrentState(Element parent, Document document){ |
71
e4ecf3188bdf
Integrated FIS-Artifact
Tim Englich <tim.englich@intevation.de>
parents:
70
diff
changeset
|
262 Element stateNode = xmlUtilities.createArtifactElement(document,"state"); |
54
09b4bf848c7b
2009-09-08 Tim Englich <tim.englich@intevation.de>
Tim Englich <tim.englich@intevation.de>
parents:
52
diff
changeset
|
263 stateNode.setAttribute("name", this.current.getID()); |
09b4bf848c7b
2009-09-08 Tim Englich <tim.englich@intevation.de>
Tim Englich <tim.englich@intevation.de>
parents:
52
diff
changeset
|
264 stateNode.setAttribute("description", this.current.getDescription()); |
09b4bf848c7b
2009-09-08 Tim Englich <tim.englich@intevation.de>
Tim Englich <tim.englich@intevation.de>
parents:
52
diff
changeset
|
265 parent.appendChild(stateNode); |
09b4bf848c7b
2009-09-08 Tim Englich <tim.englich@intevation.de>
Tim Englich <tim.englich@intevation.de>
parents:
52
diff
changeset
|
266 } |
09b4bf848c7b
2009-09-08 Tim Englich <tim.englich@intevation.de>
Tim Englich <tim.englich@intevation.de>
parents:
52
diff
changeset
|
267 |
09b4bf848c7b
2009-09-08 Tim Englich <tim.englich@intevation.de>
Tim Englich <tim.englich@intevation.de>
parents:
52
diff
changeset
|
268 |
09b4bf848c7b
2009-09-08 Tim Englich <tim.englich@intevation.de>
Tim Englich <tim.englich@intevation.de>
parents:
52
diff
changeset
|
269 protected void createModel(Element parent, Document document){ |
71
e4ecf3188bdf
Integrated FIS-Artifact
Tim Englich <tim.englich@intevation.de>
parents:
70
diff
changeset
|
270 Element modelNode = xmlUtilities.createArtifactElement(document,"model"); |
56
737d8bf63701
Required Inputelements integrated in BAsicArtifact-Descibe-Outputv
Tim Englich <tim.englich@intevation.de>
parents:
54
diff
changeset
|
271 if (this.current != null){ |
737d8bf63701
Required Inputelements integrated in BAsicArtifact-Descibe-Outputv
Tim Englich <tim.englich@intevation.de>
parents:
54
diff
changeset
|
272 Collection<InputValue> inputValues = this.current.getRequiredInputValues(); |
737d8bf63701
Required Inputelements integrated in BAsicArtifact-Descibe-Outputv
Tim Englich <tim.englich@intevation.de>
parents:
54
diff
changeset
|
273 if (inputValues != null){ |
737d8bf63701
Required Inputelements integrated in BAsicArtifact-Descibe-Outputv
Tim Englich <tim.englich@intevation.de>
parents:
54
diff
changeset
|
274 Iterator<InputValue> it = inputValues.iterator(); |
737d8bf63701
Required Inputelements integrated in BAsicArtifact-Descibe-Outputv
Tim Englich <tim.englich@intevation.de>
parents:
54
diff
changeset
|
275 while(it.hasNext()){ |
737d8bf63701
Required Inputelements integrated in BAsicArtifact-Descibe-Outputv
Tim Englich <tim.englich@intevation.de>
parents:
54
diff
changeset
|
276 InputValue inputValue = it.next(); |
71
e4ecf3188bdf
Integrated FIS-Artifact
Tim Englich <tim.englich@intevation.de>
parents:
70
diff
changeset
|
277 Element inputNode = xmlUtilities.createArtifactElement(document,"input"); |
56
737d8bf63701
Required Inputelements integrated in BAsicArtifact-Descibe-Outputv
Tim Englich <tim.englich@intevation.de>
parents:
54
diff
changeset
|
278 inputNode.setAttribute("name", inputValue.getName()); |
737d8bf63701
Required Inputelements integrated in BAsicArtifact-Descibe-Outputv
Tim Englich <tim.englich@intevation.de>
parents:
54
diff
changeset
|
279 inputNode.setAttribute("type", inputValue.getType()); |
737d8bf63701
Required Inputelements integrated in BAsicArtifact-Descibe-Outputv
Tim Englich <tim.englich@intevation.de>
parents:
54
diff
changeset
|
280 modelNode.appendChild(inputNode); |
737d8bf63701
Required Inputelements integrated in BAsicArtifact-Descibe-Outputv
Tim Englich <tim.englich@intevation.de>
parents:
54
diff
changeset
|
281 } |
737d8bf63701
Required Inputelements integrated in BAsicArtifact-Descibe-Outputv
Tim Englich <tim.englich@intevation.de>
parents:
54
diff
changeset
|
282 } |
737d8bf63701
Required Inputelements integrated in BAsicArtifact-Descibe-Outputv
Tim Englich <tim.englich@intevation.de>
parents:
54
diff
changeset
|
283 } |
54
09b4bf848c7b
2009-09-08 Tim Englich <tim.englich@intevation.de>
Tim Englich <tim.englich@intevation.de>
parents:
52
diff
changeset
|
284 parent.appendChild(modelNode); |
09b4bf848c7b
2009-09-08 Tim Englich <tim.englich@intevation.de>
Tim Englich <tim.englich@intevation.de>
parents:
52
diff
changeset
|
285 } |
09b4bf848c7b
2009-09-08 Tim Englich <tim.englich@intevation.de>
Tim Englich <tim.englich@intevation.de>
parents:
52
diff
changeset
|
286 |
09b4bf848c7b
2009-09-08 Tim Englich <tim.englich@intevation.de>
Tim Englich <tim.englich@intevation.de>
parents:
52
diff
changeset
|
287 protected void createUserInterface(Element parent, Document document){ |
71
e4ecf3188bdf
Integrated FIS-Artifact
Tim Englich <tim.englich@intevation.de>
parents:
70
diff
changeset
|
288 Element uiNode = xmlUtilities.createArtifactElement(document,"ui"); |
54
09b4bf848c7b
2009-09-08 Tim Englich <tim.englich@intevation.de>
Tim Englich <tim.englich@intevation.de>
parents:
52
diff
changeset
|
289 |
61
5f47881f7c97
Implementation of the MIN- / MAX-Value Representation
Tim Englich <tim.englich@intevation.de>
parents:
59
diff
changeset
|
290 if (this.current != null){ |
5f47881f7c97
Implementation of the MIN- / MAX-Value Representation
Tim Englich <tim.englich@intevation.de>
parents:
59
diff
changeset
|
291 this.current.describe(document, uiNode); |
5f47881f7c97
Implementation of the MIN- / MAX-Value Representation
Tim Englich <tim.englich@intevation.de>
parents:
59
diff
changeset
|
292 } |
54
09b4bf848c7b
2009-09-08 Tim Englich <tim.englich@intevation.de>
Tim Englich <tim.englich@intevation.de>
parents:
52
diff
changeset
|
293 |
09b4bf848c7b
2009-09-08 Tim Englich <tim.englich@intevation.de>
Tim Englich <tim.englich@intevation.de>
parents:
52
diff
changeset
|
294 parent.appendChild(uiNode); |
09b4bf848c7b
2009-09-08 Tim Englich <tim.englich@intevation.de>
Tim Englich <tim.englich@intevation.de>
parents:
52
diff
changeset
|
295 } |
09b4bf848c7b
2009-09-08 Tim Englich <tim.englich@intevation.de>
Tim Englich <tim.englich@intevation.de>
parents:
52
diff
changeset
|
296 |
09b4bf848c7b
2009-09-08 Tim Englich <tim.englich@intevation.de>
Tim Englich <tim.englich@intevation.de>
parents:
52
diff
changeset
|
297 protected void createOutputs(Element parent, Document document){ |
64
5db77e0a8594
Integrated Output Methods and Interfacsstructure
Tim Englich <tim.englich@intevation.de>
parents:
61
diff
changeset
|
298 log.debug("GNVArtifactBase.createOutputs"); |
71
e4ecf3188bdf
Integrated FIS-Artifact
Tim Englich <tim.englich@intevation.de>
parents:
70
diff
changeset
|
299 Element outputsNode = xmlUtilities.createArtifactElement(document,"outputs"); |
64
5db77e0a8594
Integrated Output Methods and Interfacsstructure
Tim Englich <tim.englich@intevation.de>
parents:
61
diff
changeset
|
300 if (this.current instanceof OutputTransition){ |
5db77e0a8594
Integrated Output Methods and Interfacsstructure
Tim Englich <tim.englich@intevation.de>
parents:
61
diff
changeset
|
301 Collection<OutputMode> outputModes = ((OutputTransition)this.current).getOutputModes(); |
5db77e0a8594
Integrated Output Methods and Interfacsstructure
Tim Englich <tim.englich@intevation.de>
parents:
61
diff
changeset
|
302 if (outputModes != null){ |
5db77e0a8594
Integrated Output Methods and Interfacsstructure
Tim Englich <tim.englich@intevation.de>
parents:
61
diff
changeset
|
303 Iterator<OutputMode> it = outputModes.iterator(); |
5db77e0a8594
Integrated Output Methods and Interfacsstructure
Tim Englich <tim.englich@intevation.de>
parents:
61
diff
changeset
|
304 while(it.hasNext()){ |
5db77e0a8594
Integrated Output Methods and Interfacsstructure
Tim Englich <tim.englich@intevation.de>
parents:
61
diff
changeset
|
305 OutputMode outputMode = it.next(); |
5db77e0a8594
Integrated Output Methods and Interfacsstructure
Tim Englich <tim.englich@intevation.de>
parents:
61
diff
changeset
|
306 log.debug("Write Outputnode for "+ outputMode.toString()); |
71
e4ecf3188bdf
Integrated FIS-Artifact
Tim Englich <tim.englich@intevation.de>
parents:
70
diff
changeset
|
307 Element outputModeNode = xmlUtilities.createArtifactElement(document,"output"); |
64
5db77e0a8594
Integrated Output Methods and Interfacsstructure
Tim Englich <tim.englich@intevation.de>
parents:
61
diff
changeset
|
308 outputModeNode.setAttribute("name", outputMode.getName()); |
5db77e0a8594
Integrated Output Methods and Interfacsstructure
Tim Englich <tim.englich@intevation.de>
parents:
61
diff
changeset
|
309 outputModeNode.setAttribute("description", outputMode.getDescription()); |
5db77e0a8594
Integrated Output Methods and Interfacsstructure
Tim Englich <tim.englich@intevation.de>
parents:
61
diff
changeset
|
310 outputModeNode.setAttribute("mime-type", outputMode.getMimeType()); |
5db77e0a8594
Integrated Output Methods and Interfacsstructure
Tim Englich <tim.englich@intevation.de>
parents:
61
diff
changeset
|
311 outputsNode.appendChild(outputModeNode); |
91
bd284d8306db
Added Support for Patameters in OutputModes
Tim Englich <tim.englich@intevation.de>
parents:
90
diff
changeset
|
312 |
bd284d8306db
Added Support for Patameters in OutputModes
Tim Englich <tim.englich@intevation.de>
parents:
90
diff
changeset
|
313 Collection<InputValue> inputParameters = outputMode.getInputParameters(); |
bd284d8306db
Added Support for Patameters in OutputModes
Tim Englich <tim.englich@intevation.de>
parents:
90
diff
changeset
|
314 if (inputParameters != null){ |
bd284d8306db
Added Support for Patameters in OutputModes
Tim Englich <tim.englich@intevation.de>
parents:
90
diff
changeset
|
315 Element inputParametersNode = xmlUtilities.createArtifactElement(document,"parameter"); |
bd284d8306db
Added Support for Patameters in OutputModes
Tim Englich <tim.englich@intevation.de>
parents:
90
diff
changeset
|
316 outputModeNode.appendChild(inputParametersNode); |
bd284d8306db
Added Support for Patameters in OutputModes
Tim Englich <tim.englich@intevation.de>
parents:
90
diff
changeset
|
317 Iterator<InputValue> it2 = inputParameters.iterator(); |
bd284d8306db
Added Support for Patameters in OutputModes
Tim Englich <tim.englich@intevation.de>
parents:
90
diff
changeset
|
318 while (it2.hasNext()){ |
bd284d8306db
Added Support for Patameters in OutputModes
Tim Englich <tim.englich@intevation.de>
parents:
90
diff
changeset
|
319 InputValue inputValue = it2.next(); |
bd284d8306db
Added Support for Patameters in OutputModes
Tim Englich <tim.englich@intevation.de>
parents:
90
diff
changeset
|
320 Element inputParameterNode = xmlUtilities.createArtifactElement(document,"parameter"); |
bd284d8306db
Added Support for Patameters in OutputModes
Tim Englich <tim.englich@intevation.de>
parents:
90
diff
changeset
|
321 inputParametersNode.appendChild(inputParameterNode); |
bd284d8306db
Added Support for Patameters in OutputModes
Tim Englich <tim.englich@intevation.de>
parents:
90
diff
changeset
|
322 inputParameterNode.setAttribute("name", inputValue.getName()); |
bd284d8306db
Added Support for Patameters in OutputModes
Tim Englich <tim.englich@intevation.de>
parents:
90
diff
changeset
|
323 inputParameterNode.setAttribute("type", inputValue.getType()); |
bd284d8306db
Added Support for Patameters in OutputModes
Tim Englich <tim.englich@intevation.de>
parents:
90
diff
changeset
|
324 inputParameterNode.setAttribute("value", inputValue.getDefaultValue()); |
bd284d8306db
Added Support for Patameters in OutputModes
Tim Englich <tim.englich@intevation.de>
parents:
90
diff
changeset
|
325 } |
bd284d8306db
Added Support for Patameters in OutputModes
Tim Englich <tim.englich@intevation.de>
parents:
90
diff
changeset
|
326 } |
64
5db77e0a8594
Integrated Output Methods and Interfacsstructure
Tim Englich <tim.englich@intevation.de>
parents:
61
diff
changeset
|
327 } |
5db77e0a8594
Integrated Output Methods and Interfacsstructure
Tim Englich <tim.englich@intevation.de>
parents:
61
diff
changeset
|
328 }else{ |
5db77e0a8594
Integrated Output Methods and Interfacsstructure
Tim Englich <tim.englich@intevation.de>
parents:
61
diff
changeset
|
329 log.warn("No Outputmodes given."); |
5db77e0a8594
Integrated Output Methods and Interfacsstructure
Tim Englich <tim.englich@intevation.de>
parents:
61
diff
changeset
|
330 } |
5db77e0a8594
Integrated Output Methods and Interfacsstructure
Tim Englich <tim.englich@intevation.de>
parents:
61
diff
changeset
|
331 } |
54
09b4bf848c7b
2009-09-08 Tim Englich <tim.englich@intevation.de>
Tim Englich <tim.englich@intevation.de>
parents:
52
diff
changeset
|
332 parent.appendChild(outputsNode); |
09b4bf848c7b
2009-09-08 Tim Englich <tim.englich@intevation.de>
Tim Englich <tim.englich@intevation.de>
parents:
52
diff
changeset
|
333 } |
09b4bf848c7b
2009-09-08 Tim Englich <tim.englich@intevation.de>
Tim Englich <tim.englich@intevation.de>
parents:
52
diff
changeset
|
334 |
09b4bf848c7b
2009-09-08 Tim Englich <tim.englich@intevation.de>
Tim Englich <tim.englich@intevation.de>
parents:
52
diff
changeset
|
335 |
91
bd284d8306db
Added Support for Patameters in OutputModes
Tim Englich <tim.englich@intevation.de>
parents:
90
diff
changeset
|
336 protected Collection<InputData> parseInputData(Document document, String xPath){ |
57
f01592cd6419
Funktionalität Feed initial bereitgestellt.
Tim Englich <tim.englich@intevation.de>
parents:
56
diff
changeset
|
337 log.debug("GNVArtifactBase.parseInputData"); |
78
969faa37a11b
Added Multiselectsupport for InputValues
Tim Englich <tim.englich@intevation.de>
parents:
77
diff
changeset
|
338 HashMap<String,InputData> returnValue = null; |
57
f01592cd6419
Funktionalität Feed initial bereitgestellt.
Tim Englich <tim.englich@intevation.de>
parents:
56
diff
changeset
|
339 |
71
e4ecf3188bdf
Integrated FIS-Artifact
Tim Englich <tim.englich@intevation.de>
parents:
70
diff
changeset
|
340 log.debug(new ArtifactXMLUtilities().writeDocument2String(document)); |
e4ecf3188bdf
Integrated FIS-Artifact
Tim Englich <tim.englich@intevation.de>
parents:
70
diff
changeset
|
341 |
91
bd284d8306db
Added Support for Patameters in OutputModes
Tim Englich <tim.englich@intevation.de>
parents:
90
diff
changeset
|
342 NodeList inputElemets = (NodeList)XMLUtils.xpath(document, xPath,XPathConstants.NODESET, ArtifactNamespaceContext.INSTANCE);//Config.getNodeSetXPath(document, ""); |
57
f01592cd6419
Funktionalität Feed initial bereitgestellt.
Tim Englich <tim.englich@intevation.de>
parents:
56
diff
changeset
|
343 if(inputElemets != null){ |
78
969faa37a11b
Added Multiselectsupport for InputValues
Tim Englich <tim.englich@intevation.de>
parents:
77
diff
changeset
|
344 returnValue = new HashMap<String,InputData>(inputElemets.getLength()); |
57
f01592cd6419
Funktionalität Feed initial bereitgestellt.
Tim Englich <tim.englich@intevation.de>
parents:
56
diff
changeset
|
345 for (int i = 0; i < inputElemets.getLength(); i++){ |
f01592cd6419
Funktionalität Feed initial bereitgestellt.
Tim Englich <tim.englich@intevation.de>
parents:
56
diff
changeset
|
346 Node inputDataNode = inputElemets.item(i); |
78
969faa37a11b
Added Multiselectsupport for InputValues
Tim Englich <tim.englich@intevation.de>
parents:
77
diff
changeset
|
347 String name = Config.getStringXPath(inputDataNode,"@name"); |
969faa37a11b
Added Multiselectsupport for InputValues
Tim Englich <tim.englich@intevation.de>
parents:
77
diff
changeset
|
348 String value = Config.getStringXPath(inputDataNode,"@value"); |
969faa37a11b
Added Multiselectsupport for InputValues
Tim Englich <tim.englich@intevation.de>
parents:
77
diff
changeset
|
349 |
969faa37a11b
Added Multiselectsupport for InputValues
Tim Englich <tim.englich@intevation.de>
parents:
77
diff
changeset
|
350 if (returnValue.containsKey(name)){ |
969faa37a11b
Added Multiselectsupport for InputValues
Tim Englich <tim.englich@intevation.de>
parents:
77
diff
changeset
|
351 InputData inputData = returnValue.get(name); |
969faa37a11b
Added Multiselectsupport for InputValues
Tim Englich <tim.englich@intevation.de>
parents:
77
diff
changeset
|
352 inputData.concartValue(value); |
969faa37a11b
Added Multiselectsupport for InputValues
Tim Englich <tim.englich@intevation.de>
parents:
77
diff
changeset
|
353 log.debug(inputData.toString()); |
969faa37a11b
Added Multiselectsupport for InputValues
Tim Englich <tim.englich@intevation.de>
parents:
77
diff
changeset
|
354 returnValue.put(name, inputData); |
969faa37a11b
Added Multiselectsupport for InputValues
Tim Englich <tim.englich@intevation.de>
parents:
77
diff
changeset
|
355 }else{ |
969faa37a11b
Added Multiselectsupport for InputValues
Tim Englich <tim.englich@intevation.de>
parents:
77
diff
changeset
|
356 InputData inputData = new DefaultInputData(name,value); |
969faa37a11b
Added Multiselectsupport for InputValues
Tim Englich <tim.englich@intevation.de>
parents:
77
diff
changeset
|
357 |
969faa37a11b
Added Multiselectsupport for InputValues
Tim Englich <tim.englich@intevation.de>
parents:
77
diff
changeset
|
358 returnValue.put(name,inputData); |
969faa37a11b
Added Multiselectsupport for InputValues
Tim Englich <tim.englich@intevation.de>
parents:
77
diff
changeset
|
359 } |
57
f01592cd6419
Funktionalität Feed initial bereitgestellt.
Tim Englich <tim.englich@intevation.de>
parents:
56
diff
changeset
|
360 } |
f01592cd6419
Funktionalität Feed initial bereitgestellt.
Tim Englich <tim.englich@intevation.de>
parents:
56
diff
changeset
|
361 } |
78
969faa37a11b
Added Multiselectsupport for InputValues
Tim Englich <tim.englich@intevation.de>
parents:
77
diff
changeset
|
362 return returnValue.values(); |
57
f01592cd6419
Funktionalität Feed initial bereitgestellt.
Tim Englich <tim.englich@intevation.de>
parents:
56
diff
changeset
|
363 } |
99
bb45c5097cb6
ehcache Integration for storing the chartresultvalues
Tim Englich <tim.englich@intevation.de>
parents:
91
diff
changeset
|
364 |
73
504570de21fd
Refactoring Work depending on Infrastructurchanges in the Artifact-Module
Tim Englich <tim.englich@intevation.de>
parents:
71
diff
changeset
|
365 |
504570de21fd
Refactoring Work depending on Infrastructurchanges in the Artifact-Module
Tim Englich <tim.englich@intevation.de>
parents:
71
diff
changeset
|
366 /** |
504570de21fd
Refactoring Work depending on Infrastructurchanges in the Artifact-Module
Tim Englich <tim.englich@intevation.de>
parents:
71
diff
changeset
|
367 * @see de.intevation.artifactdatabase.DefaultArtifact#out(org.w3c.dom.Document, java.io.OutputStream, de.intevation.artifacts.CallContext) |
504570de21fd
Refactoring Work depending on Infrastructurchanges in the Artifact-Module
Tim Englich <tim.englich@intevation.de>
parents:
71
diff
changeset
|
368 */ |
504570de21fd
Refactoring Work depending on Infrastructurchanges in the Artifact-Module
Tim Englich <tim.englich@intevation.de>
parents:
71
diff
changeset
|
369 @Override |
504570de21fd
Refactoring Work depending on Infrastructurchanges in the Artifact-Module
Tim Englich <tim.englich@intevation.de>
parents:
71
diff
changeset
|
370 public void out(Document format, OutputStream outputStream, CallContext context) |
504570de21fd
Refactoring Work depending on Infrastructurchanges in the Artifact-Module
Tim Englich <tim.englich@intevation.de>
parents:
71
diff
changeset
|
371 throws IOException { |
68
d117fd4b82e5
Chartrendering integrated in Timeseries Transition
Tim Englich <tim.englich@intevation.de>
parents:
64
diff
changeset
|
372 log.debug("TGNVArtifactBase.out"); |
d117fd4b82e5
Chartrendering integrated in Timeseries Transition
Tim Englich <tim.englich@intevation.de>
parents:
64
diff
changeset
|
373 try { |
d117fd4b82e5
Chartrendering integrated in Timeseries Transition
Tim Englich <tim.englich@intevation.de>
parents:
64
diff
changeset
|
374 |
d117fd4b82e5
Chartrendering integrated in Timeseries Transition
Tim Englich <tim.englich@intevation.de>
parents:
64
diff
changeset
|
375 if (current != null && current instanceof OutputTransition){ |
99
bb45c5097cb6
ehcache Integration for storing the chartresultvalues
Tim Englich <tim.englich@intevation.de>
parents:
91
diff
changeset
|
376 String uuid = Config.getStringXPath(format, "action/uuid/@value"); |
bb45c5097cb6
ehcache Integration for storing the chartresultvalues
Tim Englich <tim.englich@intevation.de>
parents:
91
diff
changeset
|
377 ((OutputTransition)current).out(this.readOutputType(format),this.parseInputData(format, "/action/out/params/input"), outputStream,uuid); |
bb45c5097cb6
ehcache Integration for storing the chartresultvalues
Tim Englich <tim.englich@intevation.de>
parents:
91
diff
changeset
|
378 //context.afterCall(CallContext.STORE); // TODO: FIXME Schmutzige L�sung: Besser einen weiteren Transitionsschritt zwischenschalten. |
68
d117fd4b82e5
Chartrendering integrated in Timeseries Transition
Tim Englich <tim.englich@intevation.de>
parents:
64
diff
changeset
|
379 } |
d117fd4b82e5
Chartrendering integrated in Timeseries Transition
Tim Englich <tim.englich@intevation.de>
parents:
64
diff
changeset
|
380 } catch (TransitionException e) { |
d117fd4b82e5
Chartrendering integrated in Timeseries Transition
Tim Englich <tim.englich@intevation.de>
parents:
64
diff
changeset
|
381 log.error(e,e); |
89
cde042a0a395
Successreporting added
Tim Englich <tim.englich@intevation.de>
parents:
88
diff
changeset
|
382 throw new IOException(e.getMessage()); |
68
d117fd4b82e5
Chartrendering integrated in Timeseries Transition
Tim Englich <tim.englich@intevation.de>
parents:
64
diff
changeset
|
383 } |
d117fd4b82e5
Chartrendering integrated in Timeseries Transition
Tim Englich <tim.englich@intevation.de>
parents:
64
diff
changeset
|
384 } |
73
504570de21fd
Refactoring Work depending on Infrastructurchanges in the Artifact-Module
Tim Englich <tim.englich@intevation.de>
parents:
71
diff
changeset
|
385 |
91
bd284d8306db
Added Support for Patameters in OutputModes
Tim Englich <tim.englich@intevation.de>
parents:
90
diff
changeset
|
386 |
68
d117fd4b82e5
Chartrendering integrated in Timeseries Transition
Tim Englich <tim.englich@intevation.de>
parents:
64
diff
changeset
|
387 protected String readOutputType(Document document){ |
d117fd4b82e5
Chartrendering integrated in Timeseries Transition
Tim Englich <tim.englich@intevation.de>
parents:
64
diff
changeset
|
388 String value = Config.getStringXPath(document,"action/out/@name"); |
d117fd4b82e5
Chartrendering integrated in Timeseries Transition
Tim Englich <tim.englich@intevation.de>
parents:
64
diff
changeset
|
389 return value; |
d117fd4b82e5
Chartrendering integrated in Timeseries Transition
Tim Englich <tim.englich@intevation.de>
parents:
64
diff
changeset
|
390 } |
52
4d6a82b96059
First Implementation of the GNV-Artifacts
Tim Englich <tim.englich@intevation.de>
parents:
diff
changeset
|
391 } |