Mercurial > dive4elements > river
annotate flys-artifacts/src/main/java/de/intevation/flys/wsplgen/ProblemObserver.java @ 5622:b28a6d05e969
Add a new mechanism in mapfish print call to add arbitary data maps
Data properties are identified by starting with mapfish-data
and they are then split in info value pairs where info
can be the description of the information and value the value
of the information to be transported in the data map.
author | Andre Heinecke <aheinecke@intevation.de> |
---|---|
date | Tue, 09 Apr 2013 19:04:32 +0200 |
parents | 453d2d0c4258 |
children |
rev | line source |
---|---|
1147
e7d5452a7381
Added a 'ProblemObserver' that analyses WSPLGEN's error stream for errors and warnings.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
1 package de.intevation.flys.wsplgen; |
e7d5452a7381
Added a 'ProblemObserver' that analyses WSPLGEN's error stream for errors and warnings.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
2 |
e7d5452a7381
Added a 'ProblemObserver' that analyses WSPLGEN's error stream for errors and warnings.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
3 import java.util.regex.Matcher; |
e7d5452a7381
Added a 'ProblemObserver' that analyses WSPLGEN's error stream for errors and warnings.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
4 import java.util.regex.Pattern; |
e7d5452a7381
Added a 'ProblemObserver' that analyses WSPLGEN's error stream for errors and warnings.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
5 |
e7d5452a7381
Added a 'ProblemObserver' that analyses WSPLGEN's error stream for errors and warnings.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
6 import org.apache.log4j.Logger; |
e7d5452a7381
Added a 'ProblemObserver' that analyses WSPLGEN's error stream for errors and warnings.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
7 |
3302
453d2d0c4258
Organized and added missing imports.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
1649
diff
changeset
|
8 import de.intevation.flys.artifacts.model.map.WSPLGENCalculation; |
453d2d0c4258
Organized and added missing imports.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
1649
diff
changeset
|
9 import de.intevation.flys.artifacts.model.map.WSPLGENJob; |
1147
e7d5452a7381
Added a 'ProblemObserver' that analyses WSPLGEN's error stream for errors and warnings.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
10 |
e7d5452a7381
Added a 'ProblemObserver' that analyses WSPLGEN's error stream for errors and warnings.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
11 |
e7d5452a7381
Added a 'ProblemObserver' that analyses WSPLGEN's error stream for errors and warnings.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
12 public class ProblemObserver extends JobObserver { |
e7d5452a7381
Added a 'ProblemObserver' that analyses WSPLGEN's error stream for errors and warnings.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
13 |
e7d5452a7381
Added a 'ProblemObserver' that analyses WSPLGEN's error stream for errors and warnings.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
14 private static Logger logger = Logger.getLogger(ProblemObserver.class); |
e7d5452a7381
Added a 'ProblemObserver' that analyses WSPLGEN's error stream for errors and warnings.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
15 |
e7d5452a7381
Added a 'ProblemObserver' that analyses WSPLGEN's error stream for errors and warnings.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
16 |
e7d5452a7381
Added a 'ProblemObserver' that analyses WSPLGEN's error stream for errors and warnings.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
17 public static final Pattern WSPLGEN_ERROR_START = Pattern.compile( |
1648
d1d6fd8cfbb2
Improved regex used to track WSPLGEN errors - will now match critical errors as well.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
1149
diff
changeset
|
18 ".*->(.*Fehler)(\\s*\\((\\d+)\\).*)*", |
1147
e7d5452a7381
Added a 'ProblemObserver' that analyses WSPLGEN's error stream for errors and warnings.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
19 Pattern.DOTALL); |
e7d5452a7381
Added a 'ProblemObserver' that analyses WSPLGEN's error stream for errors and warnings.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
20 |
e7d5452a7381
Added a 'ProblemObserver' that analyses WSPLGEN's error stream for errors and warnings.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
21 public static final Pattern WSPLGEN_ERROR_END = Pattern.compile( |
1648
d1d6fd8cfbb2
Improved regex used to track WSPLGEN errors - will now match critical errors as well.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
1149
diff
changeset
|
22 ".*<-(.*Fehler).*", |
1147
e7d5452a7381
Added a 'ProblemObserver' that analyses WSPLGEN's error stream for errors and warnings.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
23 Pattern.DOTALL); |
e7d5452a7381
Added a 'ProblemObserver' that analyses WSPLGEN's error stream for errors and warnings.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
24 |
e7d5452a7381
Added a 'ProblemObserver' that analyses WSPLGEN's error stream for errors and warnings.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
25 public static final Pattern WSPLGEN_WARNING_START = Pattern.compile( |
e7d5452a7381
Added a 'ProblemObserver' that analyses WSPLGEN's error stream for errors and warnings.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
26 ".*->Warnung\\s*\\((\\d+)\\).*", |
e7d5452a7381
Added a 'ProblemObserver' that analyses WSPLGEN's error stream for errors and warnings.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
27 Pattern.DOTALL); |
e7d5452a7381
Added a 'ProblemObserver' that analyses WSPLGEN's error stream for errors and warnings.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
28 |
e7d5452a7381
Added a 'ProblemObserver' that analyses WSPLGEN's error stream for errors and warnings.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
29 public static final Pattern WSPLGEN_WARNING_END = Pattern.compile( |
e7d5452a7381
Added a 'ProblemObserver' that analyses WSPLGEN's error stream for errors and warnings.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
30 ".*<-Warnung .*", |
e7d5452a7381
Added a 'ProblemObserver' that analyses WSPLGEN's error stream for errors and warnings.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
31 Pattern.DOTALL); |
e7d5452a7381
Added a 'ProblemObserver' that analyses WSPLGEN's error stream for errors and warnings.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
32 |
e7d5452a7381
Added a 'ProblemObserver' that analyses WSPLGEN's error stream for errors and warnings.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
33 |
e7d5452a7381
Added a 'ProblemObserver' that analyses WSPLGEN's error stream for errors and warnings.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
34 protected int error; |
e7d5452a7381
Added a 'ProblemObserver' that analyses WSPLGEN's error stream for errors and warnings.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
35 protected int warning; |
e7d5452a7381
Added a 'ProblemObserver' that analyses WSPLGEN's error stream for errors and warnings.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
36 |
1149
64b465699a24
Added an Output target for WSPLGEN reports that will be available when an WSPLGEN calculation is finished.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
1147
diff
changeset
|
37 protected WSPLGENCalculation calculation; |
1147
e7d5452a7381
Added a 'ProblemObserver' that analyses WSPLGEN's error stream for errors and warnings.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
38 |
e7d5452a7381
Added a 'ProblemObserver' that analyses WSPLGEN's error stream for errors and warnings.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
39 |
e7d5452a7381
Added a 'ProblemObserver' that analyses WSPLGEN's error stream for errors and warnings.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
40 public ProblemObserver(WSPLGENJob job) { |
e7d5452a7381
Added a 'ProblemObserver' that analyses WSPLGEN's error stream for errors and warnings.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
41 super(job); |
1149
64b465699a24
Added an Output target for WSPLGEN reports that will be available when an WSPLGEN calculation is finished.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
1147
diff
changeset
|
42 error = -1; |
64b465699a24
Added an Output target for WSPLGEN reports that will be available when an WSPLGEN calculation is finished.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
1147
diff
changeset
|
43 warning = -1; |
64b465699a24
Added an Output target for WSPLGEN reports that will be available when an WSPLGEN calculation is finished.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
1147
diff
changeset
|
44 calculation = job.getCalculation(); |
1147
e7d5452a7381
Added a 'ProblemObserver' that analyses WSPLGEN's error stream for errors and warnings.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
45 } |
e7d5452a7381
Added a 'ProblemObserver' that analyses WSPLGEN's error stream for errors and warnings.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
46 |
e7d5452a7381
Added a 'ProblemObserver' that analyses WSPLGEN's error stream for errors and warnings.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
47 |
e7d5452a7381
Added a 'ProblemObserver' that analyses WSPLGEN's error stream for errors and warnings.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
48 public void run() { |
e7d5452a7381
Added a 'ProblemObserver' that analyses WSPLGEN's error stream for errors and warnings.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
49 logger.debug("Start observation..."); |
e7d5452a7381
Added a 'ProblemObserver' that analyses WSPLGEN's error stream for errors and warnings.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
50 |
e7d5452a7381
Added a 'ProblemObserver' that analyses WSPLGEN's error stream for errors and warnings.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
51 super.run(); |
e7d5452a7381
Added a 'ProblemObserver' that analyses WSPLGEN's error stream for errors and warnings.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
52 } |
e7d5452a7381
Added a 'ProblemObserver' that analyses WSPLGEN's error stream for errors and warnings.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
53 |
e7d5452a7381
Added a 'ProblemObserver' that analyses WSPLGEN's error stream for errors and warnings.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
54 |
e7d5452a7381
Added a 'ProblemObserver' that analyses WSPLGEN's error stream for errors and warnings.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
55 @Override |
e7d5452a7381
Added a 'ProblemObserver' that analyses WSPLGEN's error stream for errors and warnings.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
56 protected void prepareRegexes() { |
e7d5452a7381
Added a 'ProblemObserver' that analyses WSPLGEN's error stream for errors and warnings.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
57 // do nothing |
e7d5452a7381
Added a 'ProblemObserver' that analyses WSPLGEN's error stream for errors and warnings.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
58 } |
e7d5452a7381
Added a 'ProblemObserver' that analyses WSPLGEN's error stream for errors and warnings.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
59 |
e7d5452a7381
Added a 'ProblemObserver' that analyses WSPLGEN's error stream for errors and warnings.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
60 |
e7d5452a7381
Added a 'ProblemObserver' that analyses WSPLGEN's error stream for errors and warnings.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
61 @Override |
e7d5452a7381
Added a 'ProblemObserver' that analyses WSPLGEN's error stream for errors and warnings.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
62 protected void update(String log) { |
e7d5452a7381
Added a 'ProblemObserver' that analyses WSPLGEN's error stream for errors and warnings.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
63 Matcher startError = WSPLGEN_ERROR_START.matcher(log); |
e7d5452a7381
Added a 'ProblemObserver' that analyses WSPLGEN's error stream for errors and warnings.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
64 if (startError.matches()) { |
1648
d1d6fd8cfbb2
Improved regex used to track WSPLGEN errors - will now match critical errors as well.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
1149
diff
changeset
|
65 if (startError.groupCount() >= 2) { |
1649
74142aa5d938
Improved WSPLGEN start to suppress inconsistent Artifact states.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
1648
diff
changeset
|
66 String tmp = startError.group(3); |
1648
d1d6fd8cfbb2
Improved regex used to track WSPLGEN errors - will now match critical errors as well.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
1149
diff
changeset
|
67 |
d1d6fd8cfbb2
Improved regex used to track WSPLGEN errors - will now match critical errors as well.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
1149
diff
changeset
|
68 if (tmp != null && tmp.length() > 0) { |
d1d6fd8cfbb2
Improved regex used to track WSPLGEN errors - will now match critical errors as well.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
1149
diff
changeset
|
69 error = Integer.parseInt(tmp); |
d1d6fd8cfbb2
Improved regex used to track WSPLGEN errors - will now match critical errors as well.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
1149
diff
changeset
|
70 } |
d1d6fd8cfbb2
Improved regex used to track WSPLGEN errors - will now match critical errors as well.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
1149
diff
changeset
|
71 else error = 1; |
d1d6fd8cfbb2
Improved regex used to track WSPLGEN errors - will now match critical errors as well.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
1149
diff
changeset
|
72 } |
d1d6fd8cfbb2
Improved regex used to track WSPLGEN errors - will now match critical errors as well.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
1149
diff
changeset
|
73 else { |
d1d6fd8cfbb2
Improved regex used to track WSPLGEN errors - will now match critical errors as well.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
1149
diff
changeset
|
74 error = 1; |
d1d6fd8cfbb2
Improved regex used to track WSPLGEN errors - will now match critical errors as well.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
1149
diff
changeset
|
75 } |
d1d6fd8cfbb2
Improved regex used to track WSPLGEN errors - will now match critical errors as well.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
1149
diff
changeset
|
76 |
1147
e7d5452a7381
Added a 'ProblemObserver' that analyses WSPLGEN's error stream for errors and warnings.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
77 return; |
e7d5452a7381
Added a 'ProblemObserver' that analyses WSPLGEN's error stream for errors and warnings.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
78 } |
e7d5452a7381
Added a 'ProblemObserver' that analyses WSPLGEN's error stream for errors and warnings.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
79 |
e7d5452a7381
Added a 'ProblemObserver' that analyses WSPLGEN's error stream for errors and warnings.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
80 Matcher endError = WSPLGEN_ERROR_END.matcher(log); |
e7d5452a7381
Added a 'ProblemObserver' that analyses WSPLGEN's error stream for errors and warnings.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
81 if (endError.matches()) { |
e7d5452a7381
Added a 'ProblemObserver' that analyses WSPLGEN's error stream for errors and warnings.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
82 error = -1; |
e7d5452a7381
Added a 'ProblemObserver' that analyses WSPLGEN's error stream for errors and warnings.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
83 } |
e7d5452a7381
Added a 'ProblemObserver' that analyses WSPLGEN's error stream for errors and warnings.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
84 |
e7d5452a7381
Added a 'ProblemObserver' that analyses WSPLGEN's error stream for errors and warnings.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
85 if (error > 0) { |
1149
64b465699a24
Added an Output target for WSPLGEN reports that will be available when an WSPLGEN calculation is finished.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
1147
diff
changeset
|
86 calculation.addError(new Integer(error), log); |
1147
e7d5452a7381
Added a 'ProblemObserver' that analyses WSPLGEN's error stream for errors and warnings.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
87 } |
e7d5452a7381
Added a 'ProblemObserver' that analyses WSPLGEN's error stream for errors and warnings.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
88 |
e7d5452a7381
Added a 'ProblemObserver' that analyses WSPLGEN's error stream for errors and warnings.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
89 Matcher startWarning = WSPLGEN_WARNING_START.matcher(log); |
e7d5452a7381
Added a 'ProblemObserver' that analyses WSPLGEN's error stream for errors and warnings.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
90 if (startWarning.matches()) { |
e7d5452a7381
Added a 'ProblemObserver' that analyses WSPLGEN's error stream for errors and warnings.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
91 warning = Integer.parseInt(startWarning.group(1)); |
e7d5452a7381
Added a 'ProblemObserver' that analyses WSPLGEN's error stream for errors and warnings.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
92 return; |
e7d5452a7381
Added a 'ProblemObserver' that analyses WSPLGEN's error stream for errors and warnings.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
93 } |
e7d5452a7381
Added a 'ProblemObserver' that analyses WSPLGEN's error stream for errors and warnings.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
94 |
e7d5452a7381
Added a 'ProblemObserver' that analyses WSPLGEN's error stream for errors and warnings.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
95 Matcher endWarning = WSPLGEN_WARNING_END.matcher(log); |
e7d5452a7381
Added a 'ProblemObserver' that analyses WSPLGEN's error stream for errors and warnings.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
96 if (endWarning.matches()) { |
e7d5452a7381
Added a 'ProblemObserver' that analyses WSPLGEN's error stream for errors and warnings.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
97 warning = -1; |
e7d5452a7381
Added a 'ProblemObserver' that analyses WSPLGEN's error stream for errors and warnings.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
98 } |
e7d5452a7381
Added a 'ProblemObserver' that analyses WSPLGEN's error stream for errors and warnings.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
99 |
e7d5452a7381
Added a 'ProblemObserver' that analyses WSPLGEN's error stream for errors and warnings.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
100 if (warning > 0) { |
1149
64b465699a24
Added an Output target for WSPLGEN reports that will be available when an WSPLGEN calculation is finished.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
1147
diff
changeset
|
101 calculation.addWarning(new Integer(warning), log); |
1147
e7d5452a7381
Added a 'ProblemObserver' that analyses WSPLGEN's error stream for errors and warnings.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
102 } |
e7d5452a7381
Added a 'ProblemObserver' that analyses WSPLGEN's error stream for errors and warnings.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
103 } |
e7d5452a7381
Added a 'ProblemObserver' that analyses WSPLGEN's error stream for errors and warnings.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
104 |
e7d5452a7381
Added a 'ProblemObserver' that analyses WSPLGEN's error stream for errors and warnings.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
105 |
e7d5452a7381
Added a 'ProblemObserver' that analyses WSPLGEN's error stream for errors and warnings.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
106 public int numErrors() { |
1149
64b465699a24
Added an Output target for WSPLGEN reports that will be available when an WSPLGEN calculation is finished.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
1147
diff
changeset
|
107 return calculation.numErrors(); |
1147
e7d5452a7381
Added a 'ProblemObserver' that analyses WSPLGEN's error stream for errors and warnings.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
108 } |
e7d5452a7381
Added a 'ProblemObserver' that analyses WSPLGEN's error stream for errors and warnings.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
109 |
e7d5452a7381
Added a 'ProblemObserver' that analyses WSPLGEN's error stream for errors and warnings.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
110 |
e7d5452a7381
Added a 'ProblemObserver' that analyses WSPLGEN's error stream for errors and warnings.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
111 public int numWarnings() { |
1149
64b465699a24
Added an Output target for WSPLGEN reports that will be available when an WSPLGEN calculation is finished.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
1147
diff
changeset
|
112 return calculation.numWarnings(); |
1147
e7d5452a7381
Added a 'ProblemObserver' that analyses WSPLGEN's error stream for errors and warnings.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
113 } |
e7d5452a7381
Added a 'ProblemObserver' that analyses WSPLGEN's error stream for errors and warnings.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
114 } |
e7d5452a7381
Added a 'ProblemObserver' that analyses WSPLGEN's error stream for errors and warnings.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
115 // vim:set ts=4 sw=4 si et sta sts=5 fenc=utf-8 : |