comparison artifacts/src/main/java/org/dive4elements/river/artifacts/model/minfo/BedloadDiameterFacet.java @ 7987:98ca61cb58fb facet-metadata

Split bed quality facets and updated processors and state.
author Raimund Renkert <rrenkert@intevation.de>
date Wed, 02 Jul 2014 09:31:14 +0200
parents 42076d94977e
children 5acaf44062b5
comparison
equal deleted inserted replaced
7986:b0cee7dfd6fe 7987:98ca61cb58fb
48 48
49 CalculationResult res = (CalculationResult) flys.compute(context, hash, 49 CalculationResult res = (CalculationResult) flys.compute(context, hash,
50 stateId, type, false); 50 stateId, type, false);
51 51
52 int ndx = index >> 8; 52 int ndx = index >> 8;
53 Object[] data = 53 Object[] raw =
54 ((BedQualityResult[]) res.getData())[ndx].getBedloadResults(); // TODO CAST TO SPECIFIC CLASS 54 ((BedQualityResult[]) res.getData())[ndx].getBedloadResults(); // TODO CAST TO SPECIFIC CLASS
55 55
56 int ndy = index & 255; 56 int ndy = index & 255;
57 return data != null && data.length > ndy ? data[ndy] : null; 57 if (raw != null && raw.length > ndy) {
58 BedloadDiameterResult data = (BedloadDiameterResult)raw[ndy];
59 return data.getDiameterData();
60 }
61 return null;
58 } 62 }
59 63
60 /** Copy deeply. */ 64 /** Copy deeply. */
61 @Override 65 @Override
62 public Facet deepCopy() { 66 public Facet deepCopy() {

http://dive4elements.wald.intevation.org