comparison artifacts/src/main/java/org/dive4elements/river/artifacts/states/ManualPointsSingleState.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 af13ceeba52a
children 5e38e2924c07
comparison
equal deleted inserted replaced
8201:4b8c5a08de04 8202:e4606eae8ea5
41 41
42 /** Part of data key. */ 42 /** Part of data key. */
43 protected static final String DOT_LINES 43 protected static final String DOT_LINES
44 = ".lines"; 44 = ".lines";
45 45
46 /** The logger that is used in this state. */ 46 /** The log that is used in this state. */
47 private static final Logger logger = 47 private static final Logger log =
48 Logger.getLogger(ManualPointsSingleState.class); 48 Logger.getLogger(ManualPointsSingleState.class);
49 49
50 50
51 /** 51 /**
52 * Add ManualPointsFacets to list of Facets. 52 * Add ManualPointsFacets to list of Facets.
62 D4EArtifact artifact, 62 D4EArtifact artifact,
63 String hash, 63 String hash,
64 CallMeta meta, 64 CallMeta meta,
65 List<Facet> facets 65 List<Facet> facets
66 ) { 66 ) {
67 logger.debug("ManualPointsSingleState.compute()"); 67 log.debug("ManualPointsSingleState.compute()");
68 ManualPointsArtifact points = (ManualPointsArtifact) artifact; 68 ManualPointsArtifact points = (ManualPointsArtifact) artifact;
69 69
70 // Add Facet per Diagram type if data given. 70 // Add Facet per Diagram type if data given.
71 for (ChartType ct: ChartType.values()) { 71 for (ChartType ct: ChartType.values()) {
72 // Handle points. 72 // Handle points.
78 ManualPointsFacet facet = new ManualPointsFacet( 78 ManualPointsFacet facet = new ManualPointsFacet(
79 0, 79 0,
80 fName, 80 fName,
81 Resources.getMsg(meta, MANUALPOINTS, "Manual Points")); 81 Resources.getMsg(meta, MANUALPOINTS, "Manual Points"));
82 facets.add(facet); 82 facets.add(facet);
83 logger.debug("compute(): ManualPointsFacet for " + ct + " created"); 83 log.debug("compute(): ManualPointsFacet for " + ct + " created");
84 } 84 }
85 else { 85 else {
86 logger.debug("compute(): No points for " + ct); 86 log.debug("compute(): No points for " + ct);
87 } 87 }
88 88
89 // Handle lines. 89 // Handle lines.
90 String linesData = points.getDataAsString(ct + "." + MANUALPOINTS + 90 String linesData = points.getDataAsString(ct + "." + MANUALPOINTS +
91 DOT_LINES); 91 DOT_LINES);
96 for (int i = 0, P = lines.length(); i < P; i++) { 96 for (int i = 0, P = lines.length(); i < P; i++) {
97 JSONArray array = lines.getJSONArray(i); 97 JSONArray array = lines.getJSONArray(i);
98 double y = array.getDouble(0); 98 double y = array.getDouble(0);
99 String name = array.getString(1); 99 String name = array.getString(1);
100 String fName = ct + "." + MANUALLINE; 100 String fName = ct + "." + MANUALLINE;
101 logger.debug("have facet: " + y + " / " + name + " -> " + fName); 101 log.debug("have facet: " + y + " / " + name + " -> " + fName);
102 CrossSectionWaterLineFacet facet = new CrossSectionWaterLineFacet( 102 CrossSectionWaterLineFacet facet = new CrossSectionWaterLineFacet(
103 i, 103 i,
104 fName, 104 fName,
105 name); 105 name);
106 106
107 facets.add(facet); 107 facets.add(facet);
108 } 108 }
109 } 109 }
110 catch(JSONException e){ 110 catch(JSONException e){
111 logger.error("Could not decode json."); 111 log.error("Could not decode json.");
112 } 112 }
113 113
114 } 114 }
115 else { 115 else {
116 //logger.debug("No points for " + ct); 116 //log.debug("No points for " + ct);
117 } 117 }
118 } 118 }
119 119
120 return null; 120 return null;
121 } 121 }

http://dive4elements.wald.intevation.org