Examples of NumericTransformer


Examples of eu.scape_project.planning.model.transform.NumericTransformer

                                .addAttribute("target",
                                    floatFormatter.formatFloatPrecisly(mapping.get(ordinal).getValue()));
                        }
                    }
                    if (l.getTransformer() instanceof NumericTransformer) {
                        NumericTransformer nt = (NumericTransformer) l.getTransformer();
                        transformer.addElement("mode").addAttribute("value", nt.getMode().name());
                        Element thresholds = transformer.addElement("thresholds");
                        thresholds.addElement("threshold1").setText(
                            floatFormatter.formatFloatPrecisly(nt.getThreshold1()));
                        thresholds.addElement("threshold2").setText(
                            floatFormatter.formatFloatPrecisly(nt.getThreshold2()));
                        thresholds.addElement("threshold3").setText(
                            floatFormatter.formatFloatPrecisly(nt.getThreshold3()));
                        thresholds.addElement("threshold4").setText(
                            floatFormatter.formatFloatPrecisly(nt.getThreshold4()));
                        thresholds.addElement("threshold5").setText(
                            floatFormatter.formatFloatPrecisly(nt.getThreshold5()));

                    }
                    addChangeLog(l.getTransformer().getChangeLog(), transformer);
                }
View Full Code Here

Examples of eu.scape_project.planning.model.transform.NumericTransformer

      Measure meas = leaf.getMeasure();
      Question q = null;
        if (leaf.getTransformer() instanceof OrdinalTransformer) {
          // TODO
        } else if (leaf.getTransformer() instanceof NumericTransformer){
            NumericTransformer numericT = (NumericTransformer)leaf.getTransformer();
           
            String name = meas.getName();
            String operator;
            if (numericT.hasIncreasingOrder()) {
              // values must be greater or equal threshold 1, therefore we watch for smaller values
                operator = " < ";
            } else {
              // values must be smaller or equal threshold 1, therefore we watch for higher values
                operator = " > ";
            }
           
        if ("http://purl.org/DP/quality/measures#11".equals(meas.getUri())) {
          // this value is accumulated, we check for min/max
         
              if (numericT.hasIncreasingOrder()) {
                  name = "Minimum " + name;
              } else {
                  name = "Maximum " + name;
              }
              String threshold = "" + numericT.getThreshold1();
          String sparql = String.format(
              "?p rdf:type watch:Property. " +
                "?p watch:name ?n . " +
                "?v watch:property ?p. " +
                "?v watch:floatValue ?fv. " +
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.