comparison artifacts/src/main/java/org/dive4elements/river/exports/process/FlowVelocityProcessor.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 8dbb969091c5
children 28df64078f27 0a5239a1e46e
comparison
equal deleted inserted replaced
8855:d7c005e12af0 8856:5e38e2924c07
41 ArtifactAndFacet bundle, 41 ArtifactAndFacet bundle,
42 ThemeDocument theme, 42 ThemeDocument theme,
43 boolean visible) { 43 boolean visible) {
44 CallContext context = generator.getCallContext(); 44 CallContext context = generator.getCallContext();
45 Map<String, String> metaData = bundle.getFacet().getMetaData(); 45 Map<String, String> metaData = bundle.getFacet().getMetaData();
46 StyledXYSeries series = new StyledXYSeries(bundle.getFacetDescription(), 46 StyledXYSeries series = new StyledXYSeries(
47 theme); 47 bundle.getFacetDescription(),
48 theme);
48 series.putMetaData(metaData, bundle.getArtifact(), context); 49 series.putMetaData(metaData, bundle.getArtifact(), context);
49 yAxisLabel = metaData.get("Y"); 50 yAxisLabel = metaData.get("Y");
50 String facetName = bundle.getFacetName(); 51 String facetName = bundle.getFacetName();
51 Object data = bundle.getData(context); 52 Object data = bundle.getData(context);
52 if (data == null) { 53 if (data == null) {
56 return; 57 return;
57 } 58 }
58 double [][] points; 59 double [][] points;
59 60
60 if (facetName.equals(FacetTypes.FLOW_VELOCITY_TOTALCHANNEL) || 61 if (facetName.equals(FacetTypes.FLOW_VELOCITY_TOTALCHANNEL) ||
61 facetName.equals(FacetTypes.FLOW_VELOCITY_TOTALCHANNEL_FILTERED)) { 62 facetName.equals(
63 FacetTypes.FLOW_VELOCITY_TOTALCHANNEL_FILTERED)
64 ) {
62 FlowVelocityData fData = (FlowVelocityData) data; 65 FlowVelocityData fData = (FlowVelocityData) data;
63 points = fData.getTotalChannelPoints(); 66 points = fData.getTotalChannelPoints();
64 } else if (facetName.equals(FacetTypes.FLOW_VELOCITY_MAINCHANNEL) || 67 } else if (facetName.equals(FacetTypes.FLOW_VELOCITY_MAINCHANNEL) ||
65 facetName.equals(FacetTypes.FLOW_VELOCITY_MAINCHANNEL_FILTERED)) { 68 facetName.equals(
69 FacetTypes.FLOW_VELOCITY_MAINCHANNEL_FILTERED)
70 ) {
66 FlowVelocityData fData = (FlowVelocityData) data; 71 FlowVelocityData fData = (FlowVelocityData) data;
67 points = fData.getMainChannelPoints(); // I hate facets! 72 points = fData.getMainChannelPoints(); // I hate facets!
68 } else if (facetName.equals(FacetTypes.FLOW_VELOCITY_MEASUREMENT)) { 73 } else if (facetName.equals(FacetTypes.FLOW_VELOCITY_MEASUREMENT)) {
69 FastFlowVelocityMeasurementValue fData = 74 FastFlowVelocityMeasurementValue fData =
70 (FastFlowVelocityMeasurementValue) data; 75 (FastFlowVelocityMeasurementValue) data;
77 generator.addAxisSeries(series, axisName, visible); 82 generator.addAxisSeries(series, axisName, visible);
78 } 83 }
79 84
80 @Override 85 @Override
81 public boolean canHandle(String facettype) { 86 public boolean canHandle(String facettype) {
82 return facettype.equals(FacetTypes.FLOW_VELOCITY_MAINCHANNEL_FILTERED) || 87 return facettype.equals(FacetTypes.FLOW_VELOCITY_MAINCHANNEL_FILTERED)
83 facettype.equals(FacetTypes.FLOW_VELOCITY_MAINCHANNEL) || 88 || facettype.equals(FacetTypes.FLOW_VELOCITY_MAINCHANNEL)
84 facettype.equals(FacetTypes.FLOW_VELOCITY_TOTALCHANNEL_FILTERED) || 89 || facettype.equals(FacetTypes.FLOW_VELOCITY_TOTALCHANNEL_FILTERED)
85 facettype.equals(FacetTypes.FLOW_VELOCITY_TOTALCHANNEL) || 90 || facettype.equals(FacetTypes.FLOW_VELOCITY_TOTALCHANNEL)
86 facettype.equals(FacetTypes.FLOW_VELOCITY_MEASUREMENT); 91 || facettype.equals(FacetTypes.FLOW_VELOCITY_MEASUREMENT);
87 } 92 }
88 93
89 @Override 94 @Override
90 public String getAxisLabel(DiagramGenerator generator) { 95 public String getAxisLabel(DiagramGenerator generator) {
91 if (yAxisLabel != null && !yAxisLabel.isEmpty()) { 96 if (yAxisLabel != null && !yAxisLabel.isEmpty()) {

http://dive4elements.wald.intevation.org