Mercurial > dive4elements > river
comparison artifacts/src/main/java/org/dive4elements/river/exports/fixings/FixATExport.java @ 8202:e4606eae8ea5
sed src/**/*.java 's/logger/log/g'
author | Sascha L. Teichmann <teichmann@intevation.de> |
---|---|
date | Fri, 05 Sep 2014 12:58:17 +0200 |
parents | 1b35b2ddfc28 |
children | 5e38e2924c07 |
comparison
equal
deleted
inserted
replaced
8201:4b8c5a08de04 | 8202:e4606eae8ea5 |
---|---|
41 import org.w3c.dom.NodeList; | 41 import org.w3c.dom.NodeList; |
42 | 42 |
43 /** Export result of fixation analysis. */ | 43 /** Export result of fixation analysis. */ |
44 public class FixATExport extends AbstractExporter { | 44 public class FixATExport extends AbstractExporter { |
45 | 45 |
46 /** Private logger. */ | 46 /** Private log. */ |
47 private static Logger logger = | 47 private static Logger log = |
48 Logger.getLogger(FixATExport.class); | 48 Logger.getLogger(FixATExport.class); |
49 | 49 |
50 protected Function function; | 50 protected Function function; |
51 protected Parameters parameters; | 51 protected Parameters parameters; |
52 | 52 |
53 | 53 |
54 @Override | 54 @Override |
55 public void doOut(ArtifactAndFacet bundle, ThemeDocument attr, boolean visible) { | 55 public void doOut(ArtifactAndFacet bundle, ThemeDocument attr, boolean visible) { |
56 logger.debug("AT Export doOut()."); | 56 log.debug("AT Export doOut()."); |
57 Object data = bundle.getData(context); | 57 Object data = bundle.getData(context); |
58 if (data instanceof CalculationResult) { | 58 if (data instanceof CalculationResult) { |
59 CalculationResult cr = (CalculationResult)data; | 59 CalculationResult cr = (CalculationResult)data; |
60 Object resData = cr.getData(); | 60 Object resData = cr.getData(); |
61 if (resData instanceof FixResult) { | 61 if (resData instanceof FixResult) { |
62 this.parameters = ((FixResult)resData).getParameters(); | 62 this.parameters = ((FixResult)resData).getParameters(); |
63 } | 63 } |
64 } | 64 } |
65 else { | 65 else { |
66 logger.debug("No CalculationResult found for AT export."); | 66 log.debug("No CalculationResult found for AT export."); |
67 return; | 67 return; |
68 } | 68 } |
69 FixAccess access = new FixAccess((D4EArtifact)this.master); | 69 FixAccess access = new FixAccess((D4EArtifact)this.master); |
70 String f = access.getFunction(); | 70 String f = access.getFunction(); |
71 if (f == null || f.length() == 0) { | 71 if (f == null || f.length() == 0) { |
72 logger.debug("No function found for AT export."); | 72 log.debug("No function found for AT export."); |
73 return; | 73 return; |
74 } | 74 } |
75 this.function = FunctionFactory.getInstance().getFunction(f); | 75 this.function = FunctionFactory.getInstance().getFunction(f); |
76 } | 76 } |
77 | 77 |
78 @Override | 78 @Override |
79 public void generate() throws IOException { | 79 public void generate() throws IOException { |
80 if (this.function == null || this.parameters == null) { | 80 if (this.function == null || this.parameters == null) { |
81 logger.debug("No function or paramters for AT export."); | 81 log.debug("No function or paramters for AT export."); |
82 return; | 82 return; |
83 } | 83 } |
84 | 84 |
85 Writer writer = new OutputStreamWriter(out, DEFAULT_CSV_CHARSET); | 85 Writer writer = new OutputStreamWriter(out, DEFAULT_CSV_CHARSET); |
86 | 86 |