annotate artifacts/src/main/java/org/dive4elements/river/artifacts/AnnotationArtifact.java @ 8856:5e38e2924c07 3.2.x

Fix code style.
author Tom Gottfried <tom@intevation.de>
date Thu, 18 Jan 2018 20:12:01 +0100
parents be7864b4fabb
children 0a5239a1e46e
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: 5867
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: 5867
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: 4497
diff changeset
9 package org.dive4elements.river.artifacts;
1026
a39511688679 Added initial version of AnnotationArtifact and friends.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
diff changeset
10
a39511688679 Added initial version of AnnotationArtifact and friends.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
diff changeset
11 import java.util.ArrayList;
a39511688679 Added initial version of AnnotationArtifact and friends.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
diff changeset
12 import java.util.List;
a39511688679 Added initial version of AnnotationArtifact and friends.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
diff changeset
13
a39511688679 Added initial version of AnnotationArtifact and friends.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
diff changeset
14 import org.w3c.dom.Document;
a39511688679 Added initial version of AnnotationArtifact and friends.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
diff changeset
15 import org.w3c.dom.Element;
a39511688679 Added initial version of AnnotationArtifact and friends.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
diff changeset
16
a39511688679 Added initial version of AnnotationArtifact and friends.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
diff changeset
17 import org.apache.log4j.Logger;
a39511688679 Added initial version of AnnotationArtifact and friends.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
diff changeset
18
5831
bd047b71ab37 Repaired internal references
Sascha L. Teichmann <teichmann@intevation.de>
parents: 4497
diff changeset
19 import org.dive4elements.artifacts.Artifact;
bd047b71ab37 Repaired internal references
Sascha L. Teichmann <teichmann@intevation.de>
parents: 4497
diff changeset
20 import org.dive4elements.artifacts.ArtifactFactory;
bd047b71ab37 Repaired internal references
Sascha L. Teichmann <teichmann@intevation.de>
parents: 4497
diff changeset
21 import org.dive4elements.artifacts.ArtifactNamespaceContext;
bd047b71ab37 Repaired internal references
Sascha L. Teichmann <teichmann@intevation.de>
parents: 4497
diff changeset
22 import org.dive4elements.artifacts.CallContext;
bd047b71ab37 Repaired internal references
Sascha L. Teichmann <teichmann@intevation.de>
parents: 4497
diff changeset
23 import org.dive4elements.artifacts.CallMeta;
1026
a39511688679 Added initial version of AnnotationArtifact and friends.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
diff changeset
24
5831
bd047b71ab37 Repaired internal references
Sascha L. Teichmann <teichmann@intevation.de>
parents: 4497
diff changeset
25 import org.dive4elements.artifactdatabase.ProtocolUtils;
bd047b71ab37 Repaired internal references
Sascha L. Teichmann <teichmann@intevation.de>
parents: 4497
diff changeset
26 import org.dive4elements.artifactdatabase.state.Facet;
bd047b71ab37 Repaired internal references
Sascha L. Teichmann <teichmann@intevation.de>
parents: 4497
diff changeset
27 import org.dive4elements.artifactdatabase.state.FacetActivity;
bd047b71ab37 Repaired internal references
Sascha L. Teichmann <teichmann@intevation.de>
parents: 4497
diff changeset
28 import org.dive4elements.artifactdatabase.state.Output;
bd047b71ab37 Repaired internal references
Sascha L. Teichmann <teichmann@intevation.de>
parents: 4497
diff changeset
29 import org.dive4elements.artifactdatabase.state.State;
bd047b71ab37 Repaired internal references
Sascha L. Teichmann <teichmann@intevation.de>
parents: 4497
diff changeset
30 import org.dive4elements.artifactdatabase.state.StateEngine;
1026
a39511688679 Added initial version of AnnotationArtifact and friends.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
diff changeset
31
5831
bd047b71ab37 Repaired internal references
Sascha L. Teichmann <teichmann@intevation.de>
parents: 4497
diff changeset
32 import org.dive4elements.river.artifacts.model.FacetTypes;
1026
a39511688679 Added initial version of AnnotationArtifact and friends.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
diff changeset
33
5831
bd047b71ab37 Repaired internal references
Sascha L. Teichmann <teichmann@intevation.de>
parents: 4497
diff changeset
34 import org.dive4elements.artifacts.common.utils.XMLUtils;
1055
61c051e53f9b Moved WINFO specific stuff from FLYS into WINFO artifact.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents: 1050
diff changeset
35
5831
bd047b71ab37 Repaired internal references
Sascha L. Teichmann <teichmann@intevation.de>
parents: 4497
diff changeset
36 import org.dive4elements.river.artifacts.states.DefaultState;
5866
9a6741ccf6d4 FLYS artifacts: Renamed FLYSContext(Factory) to RiverContext(Factory).
Sascha L. Teichmann <teichmann@intevation.de>
parents: 5865
diff changeset
37 import org.dive4elements.river.artifacts.context.RiverContext;
5831
bd047b71ab37 Repaired internal references
Sascha L. Teichmann <teichmann@intevation.de>
parents: 4497
diff changeset
38
5865
73da40528cf2 River artifacts: Renamed FLYSUtils to RiverUtils.
Sascha L. Teichmann <teichmann@intevation.de>
parents: 5863
diff changeset
39 import org.dive4elements.river.utils.RiverUtils;
1026
a39511688679 Added initial version of AnnotationArtifact and friends.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
diff changeset
40
a39511688679 Added initial version of AnnotationArtifact and friends.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
diff changeset
41 /**
a39511688679 Added initial version of AnnotationArtifact and friends.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
diff changeset
42 * Artifact to access names of Points Of Interest along a segment of a river.
a39511688679 Added initial version of AnnotationArtifact and friends.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
diff changeset
43 */
4209
7d0fb0109c01 Let AnnotationFacets come to life inactively in FixAnalysis LS settings.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents: 4049
diff changeset
44 public class AnnotationArtifact
5867
59ff03ff48f1 River artifacts: Renamed FLYSArtifact(Collection) to D4EArtifact(Collection).
Sascha L. Teichmann <teichmann@intevation.de>
parents: 5866
diff changeset
45 extends StaticD4EArtifact
4209
7d0fb0109c01 Let AnnotationFacets come to life inactively in FixAnalysis LS settings.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents: 4049
diff changeset
46 implements FacetTypes {
1026
a39511688679 Added initial version of AnnotationArtifact and friends.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
diff changeset
47
8202
e4606eae8ea5 sed src/**/*.java 's/logger/log/g'
Sascha L. Teichmann <teichmann@intevation.de>
parents: 7842
diff changeset
48 /** The log for this class. */
e4606eae8ea5 sed src/**/*.java 's/logger/log/g'
Sascha L. Teichmann <teichmann@intevation.de>
parents: 7842
diff changeset
49 private static Logger log = Logger.getLogger(AnnotationArtifact.class);
1026
a39511688679 Added initial version of AnnotationArtifact and friends.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
diff changeset
50
a39511688679 Added initial version of AnnotationArtifact and friends.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
diff changeset
51 /** The name of the artifact. */
a39511688679 Added initial version of AnnotationArtifact and friends.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
diff changeset
52 public static final String ARTIFACT_NAME = "annotation";
a39511688679 Added initial version of AnnotationArtifact and friends.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
diff changeset
53
4209
7d0fb0109c01 Let AnnotationFacets come to life inactively in FixAnalysis LS settings.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents: 4049
diff changeset
54 // Let Annotations enter life inactively if in Fix Analysis LS setting.
7d0fb0109c01 Let AnnotationFacets come to life inactively in FixAnalysis LS settings.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents: 4049
diff changeset
55 static {
7d0fb0109c01 Let AnnotationFacets come to life inactively in FixAnalysis LS settings.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents: 4049
diff changeset
56 FacetActivity.Registry.getInstance().register(
7d0fb0109c01 Let AnnotationFacets come to life inactively in FixAnalysis LS settings.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents: 4049
diff changeset
57 "annotation",
7d0fb0109c01 Let AnnotationFacets come to life inactively in FixAnalysis LS settings.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents: 4049
diff changeset
58 new FacetActivity() {
7d0fb0109c01 Let AnnotationFacets come to life inactively in FixAnalysis LS settings.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents: 4049
diff changeset
59 @Override
7d0fb0109c01 Let AnnotationFacets come to life inactively in FixAnalysis LS settings.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents: 4049
diff changeset
60 public Boolean isInitialActive(
7d0fb0109c01 Let AnnotationFacets come to life inactively in FixAnalysis LS settings.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents: 4049
diff changeset
61 Artifact artifact,
7d0fb0109c01 Let AnnotationFacets come to life inactively in FixAnalysis LS settings.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents: 4049
diff changeset
62 Facet facet,
7d0fb0109c01 Let AnnotationFacets come to life inactively in FixAnalysis LS settings.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents: 4049
diff changeset
63 String output
7d0fb0109c01 Let AnnotationFacets come to life inactively in FixAnalysis LS settings.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents: 4049
diff changeset
64 ) {
8856
5e38e2924c07 Fix code style.
Tom Gottfried <tom@intevation.de>
parents: 8333
diff changeset
65 if (output.contains(
5e38e2924c07 Fix code style.
Tom Gottfried <tom@intevation.de>
parents: 8333
diff changeset
66 FacetTypes.ChartType.FLSC.toString())
5e38e2924c07 Fix code style.
Tom Gottfried <tom@intevation.de>
parents: 8333
diff changeset
67 ) {
4209
7d0fb0109c01 Let AnnotationFacets come to life inactively in FixAnalysis LS settings.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents: 4049
diff changeset
68 // Longitudinal section chart
7d0fb0109c01 Let AnnotationFacets come to life inactively in FixAnalysis LS settings.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents: 4049
diff changeset
69 String name = facet.getName();
7d0fb0109c01 Let AnnotationFacets come to life inactively in FixAnalysis LS settings.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents: 4049
diff changeset
70
8856
5e38e2924c07 Fix code style.
Tom Gottfried <tom@intevation.de>
parents: 8333
diff changeset
71 if (name.contains(
5e38e2924c07 Fix code style.
Tom Gottfried <tom@intevation.de>
parents: 8333
diff changeset
72 FacetTypes.LONGITUDINAL_ANNOTATION)
5e38e2924c07 Fix code style.
Tom Gottfried <tom@intevation.de>
parents: 8333
diff changeset
73 ) {
4209
7d0fb0109c01 Let AnnotationFacets come to life inactively in FixAnalysis LS settings.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents: 4049
diff changeset
74 return Boolean.FALSE;
7d0fb0109c01 Let AnnotationFacets come to life inactively in FixAnalysis LS settings.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents: 4049
diff changeset
75 }
7d0fb0109c01 Let AnnotationFacets come to life inactively in FixAnalysis LS settings.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents: 4049
diff changeset
76 }
7d0fb0109c01 Let AnnotationFacets come to life inactively in FixAnalysis LS settings.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents: 4049
diff changeset
77
7d0fb0109c01 Let AnnotationFacets come to life inactively in FixAnalysis LS settings.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents: 4049
diff changeset
78 return Boolean.TRUE;
7d0fb0109c01 Let AnnotationFacets come to life inactively in FixAnalysis LS settings.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents: 4049
diff changeset
79 }
7d0fb0109c01 Let AnnotationFacets come to life inactively in FixAnalysis LS settings.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents: 4049
diff changeset
80 });
7d0fb0109c01 Let AnnotationFacets come to life inactively in FixAnalysis LS settings.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents: 4049
diff changeset
81 }
7d0fb0109c01 Let AnnotationFacets come to life inactively in FixAnalysis LS settings.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents: 4049
diff changeset
82
7d0fb0109c01 Let AnnotationFacets come to life inactively in FixAnalysis LS settings.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents: 4049
diff changeset
83
4015
7f8d92873d58 Handle annotationtypes in AnnotationArtifact and -Facet.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents: 4010
diff changeset
84 @Override
7f8d92873d58 Handle annotationtypes in AnnotationArtifact and -Facet.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents: 4010
diff changeset
85 public void setup(
7f8d92873d58 Handle annotationtypes in AnnotationArtifact and -Facet.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents: 4010
diff changeset
86 String identifier,
7f8d92873d58 Handle annotationtypes in AnnotationArtifact and -Facet.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents: 4010
diff changeset
87 ArtifactFactory factory,
7f8d92873d58 Handle annotationtypes in AnnotationArtifact and -Facet.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents: 4010
diff changeset
88 Object context,
7f8d92873d58 Handle annotationtypes in AnnotationArtifact and -Facet.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents: 4010
diff changeset
89 CallMeta callMeta,
7842
8d5ca5175038 Updated signature of artifacts setup method; Removed unnecessary setup overrides.
Raimund Renkert <rrenkert@intevation.de>
parents: 5994
diff changeset
90 Document data,
8d5ca5175038 Updated signature of artifacts setup method; Removed unnecessary setup overrides.
Raimund Renkert <rrenkert@intevation.de>
parents: 5994
diff changeset
91 List<Class> loadFacets)
4015
7f8d92873d58 Handle annotationtypes in AnnotationArtifact and -Facet.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents: 4010
diff changeset
92 {
8202
e4606eae8ea5 sed src/**/*.java 's/logger/log/g'
Sascha L. Teichmann <teichmann@intevation.de>
parents: 7842
diff changeset
93 log.debug("AnnotationArtifact.setup");
5867
59ff03ff48f1 River artifacts: Renamed FLYSArtifact(Collection) to D4EArtifact(Collection).
Sascha L. Teichmann <teichmann@intevation.de>
parents: 5866
diff changeset
94 String filter = StaticD4EArtifact.getDatacageIDValue(data);
4015
7f8d92873d58 Handle annotationtypes in AnnotationArtifact and -Facet.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents: 4010
diff changeset
95 String[] splits = filter.split(":");
7f8d92873d58 Handle annotationtypes in AnnotationArtifact and -Facet.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents: 4010
diff changeset
96 if (splits.length > 1) {
7f8d92873d58 Handle annotationtypes in AnnotationArtifact and -Facet.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents: 4010
diff changeset
97 addStringData("nameFilter", splits[1]);
7f8d92873d58 Handle annotationtypes in AnnotationArtifact and -Facet.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents: 4010
diff changeset
98 }
7842
8d5ca5175038 Updated signature of artifacts setup method; Removed unnecessary setup overrides.
Raimund Renkert <rrenkert@intevation.de>
parents: 5994
diff changeset
99 super.setup(identifier, factory, context, callMeta, data, loadFacets);
4015
7f8d92873d58 Handle annotationtypes in AnnotationArtifact and -Facet.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents: 4010
diff changeset
100 }
7f8d92873d58 Handle annotationtypes in AnnotationArtifact and -Facet.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents: 4010
diff changeset
101
4210
e47559908acc Cosmetics.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents: 4209
diff changeset
102
2112
2d0b22602fc2 Cosmetics.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents: 1777
diff changeset
103 /** Get river, setup Facets. */
1026
a39511688679 Added initial version of AnnotationArtifact and friends.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
diff changeset
104 @Override
1077
3067e700fc13 Minor cosmetics and docs.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents: 1070
diff changeset
105 protected void initialize(Artifact artifact, Object context,
3067e700fc13 Minor cosmetics and docs.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents: 1070
diff changeset
106 CallMeta meta) {
8202
e4606eae8ea5 sed src/**/*.java 's/logger/log/g'
Sascha L. Teichmann <teichmann@intevation.de>
parents: 7842
diff changeset
107 log.debug("AnnotationArtifact.initialize, id: "
2112
2d0b22602fc2 Cosmetics.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents: 1777
diff changeset
108 + artifact.identifier());
1026
a39511688679 Added initial version of AnnotationArtifact and friends.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
diff changeset
109
5867
59ff03ff48f1 River artifacts: Renamed FLYSArtifact(Collection) to D4EArtifact(Collection).
Sascha L. Teichmann <teichmann@intevation.de>
parents: 5866
diff changeset
110 D4EArtifact flys = (D4EArtifact) artifact;
2112
2d0b22602fc2 Cosmetics.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents: 1777
diff changeset
111 importData(flys, "river");
1026
a39511688679 Added initial version of AnnotationArtifact and friends.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
diff changeset
112
a39511688679 Added initial version of AnnotationArtifact and friends.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
diff changeset
113 List<Facet> fs = new ArrayList<Facet>();
a39511688679 Added initial version of AnnotationArtifact and friends.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
diff changeset
114
a39511688679 Added initial version of AnnotationArtifact and friends.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
diff changeset
115 DefaultState state = (DefaultState) getCurrentState(context);
a39511688679 Added initial version of AnnotationArtifact and friends.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
diff changeset
116 state.computeInit(this, hash(), context, meta, fs);
a39511688679 Added initial version of AnnotationArtifact and friends.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
diff changeset
117
a39511688679 Added initial version of AnnotationArtifact and friends.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
diff changeset
118 if (!fs.isEmpty()) {
8202
e4606eae8ea5 sed src/**/*.java 's/logger/log/g'
Sascha L. Teichmann <teichmann@intevation.de>
parents: 7842
diff changeset
119 log.debug("Facets to add in AnnotationsArtifact.initialize .");
4497
a2735a4bf75e Change facets member variable to private
Björn Ricks <bjoern.ricks@intevation.de>
parents: 4210
diff changeset
120 addFacets(getCurrentStateId(), fs);
1026
a39511688679 Added initial version of AnnotationArtifact and friends.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
diff changeset
121 }
a39511688679 Added initial version of AnnotationArtifact and friends.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
diff changeset
122 else {
8202
e4606eae8ea5 sed src/**/*.java 's/logger/log/g'
Sascha L. Teichmann <teichmann@intevation.de>
parents: 7842
diff changeset
123 log.debug("No facets to add in AnnotationsArtifact.initialize .");
1026
a39511688679 Added initial version of AnnotationArtifact and friends.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
diff changeset
124 }
a39511688679 Added initial version of AnnotationArtifact and friends.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
diff changeset
125 }
a39511688679 Added initial version of AnnotationArtifact and friends.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
diff changeset
126
4210
e47559908acc Cosmetics.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents: 4209
diff changeset
127
e47559908acc Cosmetics.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents: 4209
diff changeset
128 /** Shortcut to nameFilter-data (TODO: move to respective Access). */
4015
7f8d92873d58 Handle annotationtypes in AnnotationArtifact and -Facet.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents: 4010
diff changeset
129 public String getFilterName() {
7f8d92873d58 Handle annotationtypes in AnnotationArtifact and -Facet.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents: 4010
diff changeset
130 return getDataAsString("nameFilter");
7f8d92873d58 Handle annotationtypes in AnnotationArtifact and -Facet.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents: 4010
diff changeset
131 }
7f8d92873d58 Handle annotationtypes in AnnotationArtifact and -Facet.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents: 4010
diff changeset
132
1026
a39511688679 Added initial version of AnnotationArtifact and friends.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
diff changeset
133
a39511688679 Added initial version of AnnotationArtifact and friends.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
diff changeset
134 public double[] getDistance() {
1032
abd2ab6dff4f Let AnnotationArtifact fetch "more correct" data.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents: 1026
diff changeset
135 /** TODO In initialize(), access maximal range of river (via
3076
5642a83420f2 FLYS artifacts: Removed trailing whitespace.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents: 2144
diff changeset
136 * AnnotationFactory) instead of overriding getDistance,
1032
abd2ab6dff4f Let AnnotationArtifact fetch "more correct" data.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents: 1026
diff changeset
137 * important for diagram generation. */
1026
a39511688679 Added initial version of AnnotationArtifact and friends.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
diff changeset
138 return new double[] {0f, 1000f};
a39511688679 Added initial version of AnnotationArtifact and friends.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
diff changeset
139 }
a39511688679 Added initial version of AnnotationArtifact and friends.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
diff changeset
140
a39511688679 Added initial version of AnnotationArtifact and friends.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
diff changeset
141
a39511688679 Added initial version of AnnotationArtifact and friends.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
diff changeset
142 /**
a39511688679 Added initial version of AnnotationArtifact and friends.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
diff changeset
143 * Create the description of this AnnotationArtifact-instance.
a39511688679 Added initial version of AnnotationArtifact and friends.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
diff changeset
144 *
a39511688679 Added initial version of AnnotationArtifact and friends.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
diff changeset
145 * @param data Some data.
a39511688679 Added initial version of AnnotationArtifact and friends.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
diff changeset
146 * @param context The CallContext.
a39511688679 Added initial version of AnnotationArtifact and friends.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
diff changeset
147 *
a39511688679 Added initial version of AnnotationArtifact and friends.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
diff changeset
148 * @return the description of this artifact.
a39511688679 Added initial version of AnnotationArtifact and friends.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
diff changeset
149 */
1070
b1ed0ec0236f Smaller Cosmetics.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents: 1055
diff changeset
150 @Override
1026
a39511688679 Added initial version of AnnotationArtifact and friends.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
diff changeset
151 public Document describe(Document data, CallContext context) {
8202
e4606eae8ea5 sed src/**/*.java 's/logger/log/g'
Sascha L. Teichmann <teichmann@intevation.de>
parents: 7842
diff changeset
152 log.debug("Describe: the current state is: " + getCurrentStateId());
1026
a39511688679 Added initial version of AnnotationArtifact and friends.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
diff changeset
153
8202
e4606eae8ea5 sed src/**/*.java 's/logger/log/g'
Sascha L. Teichmann <teichmann@intevation.de>
parents: 7842
diff changeset
154 if (log.isDebugEnabled()) {
1026
a39511688679 Added initial version of AnnotationArtifact and friends.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
diff changeset
155 dumpArtifact();
a39511688679 Added initial version of AnnotationArtifact and friends.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
diff changeset
156 }
a39511688679 Added initial version of AnnotationArtifact and friends.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
diff changeset
157
a39511688679 Added initial version of AnnotationArtifact and friends.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
diff changeset
158 Document description = XMLUtils.newDocument();
a39511688679 Added initial version of AnnotationArtifact and friends.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
diff changeset
159 XMLUtils.ElementCreator creator = new XMLUtils.ElementCreator(
a39511688679 Added initial version of AnnotationArtifact and friends.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
diff changeset
160 description,
a39511688679 Added initial version of AnnotationArtifact and friends.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
diff changeset
161 ArtifactNamespaceContext.NAMESPACE_URI,
a39511688679 Added initial version of AnnotationArtifact and friends.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
diff changeset
162 ArtifactNamespaceContext.NAMESPACE_PREFIX);
a39511688679 Added initial version of AnnotationArtifact and friends.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
diff changeset
163
a39511688679 Added initial version of AnnotationArtifact and friends.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
diff changeset
164 Element root = ProtocolUtils.createRootNode(creator);
a39511688679 Added initial version of AnnotationArtifact and friends.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
diff changeset
165 description.appendChild(root);
a39511688679 Added initial version of AnnotationArtifact and friends.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
diff changeset
166
a39511688679 Added initial version of AnnotationArtifact and friends.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
diff changeset
167 State current = getCurrentState(context);
a39511688679 Added initial version of AnnotationArtifact and friends.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
diff changeset
168
8856
5e38e2924c07 Fix code style.
Tom Gottfried <tom@intevation.de>
parents: 8333
diff changeset
169 ProtocolUtils.appendDescribeHeader(
5e38e2924c07 Fix code style.
Tom Gottfried <tom@intevation.de>
parents: 8333
diff changeset
170 creator, root, identifier(), hash());
1026
a39511688679 Added initial version of AnnotationArtifact and friends.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
diff changeset
171 ProtocolUtils.appendState(creator, root, current);
a39511688679 Added initial version of AnnotationArtifact and friends.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
diff changeset
172
a39511688679 Added initial version of AnnotationArtifact and friends.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
diff changeset
173 Element name = ProtocolUtils.createArtNode(
a39511688679 Added initial version of AnnotationArtifact and friends.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
diff changeset
174 creator, "name",
a39511688679 Added initial version of AnnotationArtifact and friends.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
diff changeset
175 new String[] { "value" },
a39511688679 Added initial version of AnnotationArtifact and friends.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
diff changeset
176 new String[] { getName() });
a39511688679 Added initial version of AnnotationArtifact and friends.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
diff changeset
177
a39511688679 Added initial version of AnnotationArtifact and friends.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
diff changeset
178 Element outs = ProtocolUtils.createArtNode(
a39511688679 Added initial version of AnnotationArtifact and friends.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
diff changeset
179 creator, "outputmodes", null, null);
a39511688679 Added initial version of AnnotationArtifact and friends.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
diff changeset
180 appendOutputModes(description, outs, context);
a39511688679 Added initial version of AnnotationArtifact and friends.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
diff changeset
181
a39511688679 Added initial version of AnnotationArtifact and friends.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
diff changeset
182 root.appendChild(name);
a39511688679 Added initial version of AnnotationArtifact and friends.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
diff changeset
183 root.appendChild(outs);
a39511688679 Added initial version of AnnotationArtifact and friends.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
diff changeset
184
a39511688679 Added initial version of AnnotationArtifact and friends.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
diff changeset
185 return description;
a39511688679 Added initial version of AnnotationArtifact and friends.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
diff changeset
186 }
a39511688679 Added initial version of AnnotationArtifact and friends.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
diff changeset
187
a39511688679 Added initial version of AnnotationArtifact and friends.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
diff changeset
188
a39511688679 Added initial version of AnnotationArtifact and friends.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
diff changeset
189 /**
a39511688679 Added initial version of AnnotationArtifact and friends.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
diff changeset
190 * Returns the name of the concrete artifact.
a39511688679 Added initial version of AnnotationArtifact and friends.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
diff changeset
191 *
a39511688679 Added initial version of AnnotationArtifact and friends.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
diff changeset
192 * @return the name of the concrete artifact.
a39511688679 Added initial version of AnnotationArtifact and friends.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
diff changeset
193 */
a39511688679 Added initial version of AnnotationArtifact and friends.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
diff changeset
194 public String getName() {
a39511688679 Added initial version of AnnotationArtifact and friends.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
diff changeset
195 return ARTIFACT_NAME;
a39511688679 Added initial version of AnnotationArtifact and friends.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
diff changeset
196 }
a39511688679 Added initial version of AnnotationArtifact and friends.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
diff changeset
197
a39511688679 Added initial version of AnnotationArtifact and friends.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
diff changeset
198
a39511688679 Added initial version of AnnotationArtifact and friends.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
diff changeset
199 /**
a39511688679 Added initial version of AnnotationArtifact and friends.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
diff changeset
200 * Append outputmode elements to given document.
a39511688679 Added initial version of AnnotationArtifact and friends.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
diff changeset
201 *
a39511688679 Added initial version of AnnotationArtifact and friends.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
diff changeset
202 * @param doc Document to add outputmodes to.
a39511688679 Added initial version of AnnotationArtifact and friends.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
diff changeset
203 * @param outs Element to add outputmode elements to.
a39511688679 Added initial version of AnnotationArtifact and friends.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
diff changeset
204 * @param context The given CallContext (mostly for internationalization).
a39511688679 Added initial version of AnnotationArtifact and friends.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
diff changeset
205 */
1070
b1ed0ec0236f Smaller Cosmetics.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents: 1055
diff changeset
206 //@Override
1026
a39511688679 Added initial version of AnnotationArtifact and friends.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
diff changeset
207 protected void appendOutputModes(
a39511688679 Added initial version of AnnotationArtifact and friends.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
diff changeset
208 Document doc,
a39511688679 Added initial version of AnnotationArtifact and friends.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
diff changeset
209 Element outs,
a39511688679 Added initial version of AnnotationArtifact and friends.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
diff changeset
210 CallContext context)
a39511688679 Added initial version of AnnotationArtifact and friends.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
diff changeset
211 {
a39511688679 Added initial version of AnnotationArtifact and friends.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
diff changeset
212 List<String> stateIds = getPreviousStateIds();
a39511688679 Added initial version of AnnotationArtifact and friends.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
diff changeset
213
5866
9a6741ccf6d4 FLYS artifacts: Renamed FLYSContext(Factory) to RiverContext(Factory).
Sascha L. Teichmann <teichmann@intevation.de>
parents: 5865
diff changeset
214 RiverContext flysContext = RiverUtils.getFlysContext(context);
1026
a39511688679 Added initial version of AnnotationArtifact and friends.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
diff changeset
215 StateEngine engine = (StateEngine) flysContext.get(
5866
9a6741ccf6d4 FLYS artifacts: Renamed FLYSContext(Factory) to RiverContext(Factory).
Sascha L. Teichmann <teichmann@intevation.de>
parents: 5865
diff changeset
216 RiverContext.STATE_ENGINE_KEY);
1026
a39511688679 Added initial version of AnnotationArtifact and friends.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
diff changeset
217
a39511688679 Added initial version of AnnotationArtifact and friends.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
diff changeset
218 for (String stateId: stateIds) {
8202
e4606eae8ea5 sed src/**/*.java 's/logger/log/g'
Sascha L. Teichmann <teichmann@intevation.de>
parents: 7842
diff changeset
219 log.debug("Append output modes for state: " + stateId);
1026
a39511688679 Added initial version of AnnotationArtifact and friends.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
diff changeset
220 DefaultState state = (DefaultState) engine.getState(stateId);
a39511688679 Added initial version of AnnotationArtifact and friends.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
diff changeset
221
a39511688679 Added initial version of AnnotationArtifact and friends.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
diff changeset
222 List<Output> list = state.getOutputs();
3555
b1912514e0f5 s/container.size() == 0/container.isEmpty()/
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents: 3076
diff changeset
223 if (list == null || list.isEmpty()) {
8202
e4606eae8ea5 sed src/**/*.java 's/logger/log/g'
Sascha L. Teichmann <teichmann@intevation.de>
parents: 7842
diff changeset
224 log.debug("-> No output modes for this state.");
1026
a39511688679 Added initial version of AnnotationArtifact and friends.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
diff changeset
225 continue;
a39511688679 Added initial version of AnnotationArtifact and friends.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
diff changeset
226 }
a39511688679 Added initial version of AnnotationArtifact and friends.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
diff changeset
227
4497
a2735a4bf75e Change facets member variable to private
Björn Ricks <bjoern.ricks@intevation.de>
parents: 4210
diff changeset
228 List<Facet> fs = getFacets(stateId);
3555
b1912514e0f5 s/container.size() == 0/container.isEmpty()/
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents: 3076
diff changeset
229 if (fs == null || fs.isEmpty()) {
8202
e4606eae8ea5 sed src/**/*.java 's/logger/log/g'
Sascha L. Teichmann <teichmann@intevation.de>
parents: 7842
diff changeset
230 log.debug("No facets found.");
1026
a39511688679 Added initial version of AnnotationArtifact and friends.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
diff changeset
231 continue;
a39511688679 Added initial version of AnnotationArtifact and friends.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
diff changeset
232 }
a39511688679 Added initial version of AnnotationArtifact and friends.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
diff changeset
233
8202
e4606eae8ea5 sed src/**/*.java 's/logger/log/g'
Sascha L. Teichmann <teichmann@intevation.de>
parents: 7842
diff changeset
234 log.debug("Found " + fs.size() + " facets in previous states.");
1026
a39511688679 Added initial version of AnnotationArtifact and friends.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
diff changeset
235
1771
c62ff9e72cea Restore mapping of state id to facets (revert, rev 3083 and 3088).
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents: 1765
diff changeset
236 List<Output> generated = generateOutputs(list, fs);
1026
a39511688679 Added initial version of AnnotationArtifact and friends.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
diff changeset
237
a39511688679 Added initial version of AnnotationArtifact and friends.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
diff changeset
238 ProtocolUtils.appendOutputModes(doc, outs, generated);
a39511688679 Added initial version of AnnotationArtifact and friends.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
diff changeset
239 }
a39511688679 Added initial version of AnnotationArtifact and friends.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
diff changeset
240
a39511688679 Added initial version of AnnotationArtifact and friends.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
diff changeset
241 try {
a39511688679 Added initial version of AnnotationArtifact and friends.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
diff changeset
242 DefaultState cur = (DefaultState) getCurrentState(context);
1050
eccf966fb677 State engine: Removed CallContext from state validation.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents: 1033
diff changeset
243 if (cur.validate(this)) {
1026
a39511688679 Added initial version of AnnotationArtifact and friends.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
diff changeset
244 List<Output> list = cur.getOutputs();
a39511688679 Added initial version of AnnotationArtifact and friends.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
diff changeset
245 if (list != null && list.size() > 0) {
8202
e4606eae8ea5 sed src/**/*.java 's/logger/log/g'
Sascha L. Teichmann <teichmann@intevation.de>
parents: 7842
diff changeset
246 log.debug(
1026
a39511688679 Added initial version of AnnotationArtifact and friends.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
diff changeset
247 "Append output modes for state: " + cur.getID());
a39511688679 Added initial version of AnnotationArtifact and friends.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
diff changeset
248
4497
a2735a4bf75e Change facets member variable to private
Björn Ricks <bjoern.ricks@intevation.de>
parents: 4210
diff changeset
249 List<Facet> fs = getFacets(cur.getID());
1771
c62ff9e72cea Restore mapping of state id to facets (revert, rev 3083 and 3088).
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents: 1765
diff changeset
250 if (fs != null && fs.size() > 0) {
c62ff9e72cea Restore mapping of state id to facets (revert, rev 3083 and 3088).
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents: 1765
diff changeset
251 List<Output> generated = generateOutputs(list, fs);
1026
a39511688679 Added initial version of AnnotationArtifact and friends.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
diff changeset
252
8202
e4606eae8ea5 sed src/**/*.java 's/logger/log/g'
Sascha L. Teichmann <teichmann@intevation.de>
parents: 7842
diff changeset
253 log.debug("Found " + fs.size() + " current facets.");
1026
a39511688679 Added initial version of AnnotationArtifact and friends.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
diff changeset
254 if (!generated.isEmpty()) {
a39511688679 Added initial version of AnnotationArtifact and friends.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
diff changeset
255 ProtocolUtils.appendOutputModes(
a39511688679 Added initial version of AnnotationArtifact and friends.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
diff changeset
256 doc, outs, generated);
a39511688679 Added initial version of AnnotationArtifact and friends.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
diff changeset
257 }
a39511688679 Added initial version of AnnotationArtifact and friends.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
diff changeset
258 else{
8856
5e38e2924c07 Fix code style.
Tom Gottfried <tom@intevation.de>
parents: 8333
diff changeset
259 log.debug(
5e38e2924c07 Fix code style.
Tom Gottfried <tom@intevation.de>
parents: 8333
diff changeset
260 "Cannot append output to generated document.");
1026
a39511688679 Added initial version of AnnotationArtifact and friends.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
diff changeset
261 }
a39511688679 Added initial version of AnnotationArtifact and friends.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
diff changeset
262 }
a39511688679 Added initial version of AnnotationArtifact and friends.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
diff changeset
263 else {
8202
e4606eae8ea5 sed src/**/*.java 's/logger/log/g'
Sascha L. Teichmann <teichmann@intevation.de>
parents: 7842
diff changeset
264 log.debug("No facets found for the current state.");
1026
a39511688679 Added initial version of AnnotationArtifact and friends.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
diff changeset
265 }
a39511688679 Added initial version of AnnotationArtifact and friends.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
diff changeset
266 }
a39511688679 Added initial version of AnnotationArtifact and friends.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
diff changeset
267 }
a39511688679 Added initial version of AnnotationArtifact and friends.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
diff changeset
268 }
a39511688679 Added initial version of AnnotationArtifact and friends.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
diff changeset
269 catch (IllegalArgumentException iae) {
a39511688679 Added initial version of AnnotationArtifact and friends.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
diff changeset
270 // state is not valid, so we do not append its outputs.
a39511688679 Added initial version of AnnotationArtifact and friends.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
diff changeset
271 }
3076
5642a83420f2 FLYS artifacts: Removed trailing whitespace.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents: 2144
diff changeset
272 }
1026
a39511688679 Added initial version of AnnotationArtifact and friends.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
diff changeset
273 }
a39511688679 Added initial version of AnnotationArtifact and friends.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
diff changeset
274 // vim:set ts=4 sw=4 si et sta sts=4 fenc=utf8 :

http://dive4elements.wald.intevation.org