comparison artifacts/src/main/java/org/dive4elements/river/artifacts/sinfo/common/CollisionCountProcessor.java @ 9157:f9bb5d0a6ff3

Added the S-Info collision calculation and chart output
author mschaefer
date Tue, 19 Jun 2018 14:19:32 +0200
parents 7235a610558a
children a4121ec450d6
comparison
equal deleted inserted replaced
9156:568961ff709a 9157:f9bb5d0a6ff3
63 63
64 final StyledXYSeries series = new StyledXYSeries(bundle.getFacetDescription(), theme); 64 final StyledXYSeries series = new StyledXYSeries(bundle.getFacetDescription(), theme);
65 series.putMetaData(metaData, artifact, context); 65 series.putMetaData(metaData, artifact, context);
66 66
67 final String facetName = bundle.getFacetName(); 67 final String facetName = bundle.getFacetName();
68
68 final CollisionQueryCalculationResult data = (CollisionQueryCalculationResult) bundle.getData(context); 69 final CollisionQueryCalculationResult data = (CollisionQueryCalculationResult) bundle.getData(context);
69 if (data == null) { 70 if (data == null) {
70 // Check has been here before so we keep it for security reasons 71 // Check has been here before so we keep it for security reasons
71 // this should never happen though. 72 // this should never happen though.
72 throw new IllegalStateException("Data is null for facet: " + facetName); 73 throw new IllegalStateException("Data is null for facet: " + facetName);
82 83
83 public static Facet createFacet(final CallMeta callMeta, final String seriesName) { 84 public static Facet createFacet(final CallMeta callMeta, final String seriesName) {
84 return new CollisionFacet(FACET_COLLISION_COUNT, 85 return new CollisionFacet(FACET_COLLISION_COUNT,
85 Resources.getMsg(callMeta, I18N_SERIES_NAME_PATTERN, I18N_SERIES_NAME_PATTERN, seriesName), I18N_AXIS_LABEL); 86 Resources.getMsg(callMeta, I18N_SERIES_NAME_PATTERN, I18N_SERIES_NAME_PATTERN, seriesName), I18N_AXIS_LABEL);
86 } 87 }
88
87 } 89 }

http://dive4elements.wald.intevation.org