Package eu.scape_project.planning.model.scales

Examples of eu.scape_project.planning.model.scales.PositiveIntegerScale


        // output bounds.
        double scaleUpperBound = Double.MAX_VALUE;

        // At Positive Scales lowerBound is 0, upperBound has to be fetched
        if (scale instanceof PositiveIntegerScale) {
            PositiveIntegerScale s = (PositiveIntegerScale) scale;
            scaleUpperBound = s.getUpperBound();
        }
        if (scale instanceof PositiveFloatScale) {
            PositiveFloatScale s = (PositiveFloatScale) scale;
            scaleUpperBound = s.getUpperBound();
        }

        // At Range Scales lowerBound and upperBound have to be fetched
        if (scale instanceof IntRangeScale) {
            IntRangeScale s = (IntRangeScale) scale;
            scaleUpperBound = s.getUpperBound();
        }
        if (scale instanceof FloatRangeScale) {
            FloatRangeScale s = (FloatRangeScale) scale;
            scaleUpperBound = s.getUpperBound();
        }

        return scaleUpperBound;
    }
View Full Code Here


            double scaleLowerBound = Double.MIN_VALUE;
            double scaleUpperBound = Double.MAX_VALUE;

            // At Positive Scales lowerBound is 0, upperBound has to be fetched
            if (scale instanceof PositiveIntegerScale) {
                PositiveIntegerScale s = (PositiveIntegerScale) scale;
                scaleLowerBound = 0;
                scaleUpperBound = s.getUpperBound();
            }
            if (scale instanceof PositiveFloatScale) {
                PositiveFloatScale s = (PositiveFloatScale) scale;
                scaleLowerBound = 0;
                scaleUpperBound = s.getUpperBound();
            }

            // At Range Scales lowerBound and upperBound have to be fetched
            if (scale instanceof IntRangeScale) {
                IntRangeScale s = (IntRangeScale) scale;
                scaleLowerBound = s.getLowerBound();
                scaleUpperBound = s.getUpperBound();
            }
            if (scale instanceof FloatRangeScale) {
                FloatRangeScale s = (FloatRangeScale) scale;
                scaleLowerBound = s.getLowerBound();
                scaleUpperBound = s.getUpperBound();
            }

            // get Transformer tresholds
            NumericTransformer nt = (NumericTransformer) transformer;
            double transformerT1 = nt.getThreshold1();
View Full Code Here

    @Test
    public void checkLeafRelations() {
        Leaf l = new Leaf();
        l.setName("test");
        l.setSingle(false);
        l.changeScale(new PositiveIntegerScale());
        // to properly initialize the value list, we need alternatives
        List<Alternative> alternatives = new ArrayList<Alternative>();
        alternatives.add(new Alternative("a", "alternative a"));
        alternatives.add(new Alternative("x", "alternative x"));
        alternatives.add(new Alternative("b", "alternative b"));
View Full Code Here

                continue;
            }

            // evaluation was successful!
            if (measureId.startsWith(MeasureConstants.NUMBER_OF_TOOLS)) {
                scale = new PositiveIntegerScale();
                value = scale.createValue();

                // _measure_ is the number of tools found
                result = "" + resultSet.size();
                value.parse(result);
View Full Code Here

        scales.add(new IntegerScale());
        scales.add(new IntRangeScale());
        scales.add(new FloatScale());
        scales.add(new FloatRangeScale());
        scales.add(new PositiveFloatScale());
        scales.add(new PositiveIntegerScale());
        scales.add(new FreeStringScale());

        for (Scale scale : scales) {
            scaleList.add(new SelectItem(scale.getClass().getCanonicalName(), scale.getDisplayName()));
        }
View Full Code Here

            double scaleLowerBound = Double.MIN_VALUE;
            double scaleUpperBound = Double.MAX_VALUE;

            // At Positive Scales lowerBound is 0, upperBound has to be fetched
            if (scale instanceof PositiveIntegerScale) {
                PositiveIntegerScale s = (PositiveIntegerScale) scale;
                scaleLowerBound = 0;
                scaleUpperBound = s.getUpperBound();
            }
            if (scale instanceof PositiveFloatScale) {
                PositiveFloatScale s = (PositiveFloatScale) scale;
                scaleLowerBound = 0;
                scaleUpperBound = s.getUpperBound();
            }

            // At Range Scales lowerBound and upperBound have to be fetched
            if (scale instanceof IntRangeScale) {
                IntRangeScale s = (IntRangeScale) scale;
                scaleLowerBound = s.getLowerBound();
                scaleUpperBound = s.getUpperBound();
            }
            if (scale instanceof FloatRangeScale) {
                FloatRangeScale s = (FloatRangeScale) scale;
                scaleLowerBound = s.getLowerBound();
                scaleUpperBound = s.getUpperBound();
            }

            // get Transformer thresholds
            NumericTransformer nt = (NumericTransformer) transformer;
            double transformerT1 = nt.getThreshold1();
View Full Code Here

        } else if ("Number".equalsIgnoreCase(scaleName)) {
            return new FloatScale();
        } else if ("PositiveNumber".equalsIgnoreCase(scaleName)) {
            return new PositiveFloatScale();
        } else if ("PositiveInteger".equalsIgnoreCase(scaleName)) {
            return new PositiveIntegerScale();
        } else if ("Ordinal".equalsIgnoreCase(scaleName)) {
            return new OrdinalScale();
        }

        return null;
View Full Code Here

TOP

Related Classes of eu.scape_project.planning.model.scales.PositiveIntegerScale

Copyright © 2018 www.massapicom. 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.