Package eu.scape_project.planning.model.values

Examples of eu.scape_project.planning.model.values.FreeStringValue


        for (Measure measure: getMeasures()) {
            if (measure.getUri().startsWith("machine:")) {
                Measurement measurement = new Measurement();
                measurement.setMeasureId(measure.getUri());
                FreeStringValue v =(FreeStringValue) measure.getScale().createValue();
                if (measure.getUri().equals(Machine.MACHINE_NAME)) {
                    v.setValue(m.getId());
                } else if (measure.getUri().equals(Machine.MACHINE_OS)) {
                    v.setValue(m.getOperatingSystem());
                } else if (measure.getUri().equals(Machine.MACHINE_CPUS)) {
                    v.setValue(m.getCpus());
                } else if (measure.getUri().equals(Machine.MACHINE_CPUCLOCK)) {
                    v.setValue(m.getCpuClock());
                } else if (measure.getUri().equals(Machine.MACHINE_CPUTYPE)) {
                    v.setValue(m.getCpuType());
                } else if (measure.getUri().equals(Machine.MACHINE_MEMORY)) {
                    v.setValue(m.getMemory());
                }
                measurement.setValue(v);
                result.getMeasurements().put(measure.getUri(), measurement);
            }
        }       
View Full Code Here


            Map<String, TargetValueObject> map = t.getMapping();

            HashSet<String> allValues = new HashSet<String>();
            for (Values values : valueMap.values()) {
                for (Value v : values.getList()) {
                    FreeStringValue text = (FreeStringValue) v;
                    if (!text.toString().equals("")) {
                        for (String s : map.keySet()) {
                            // if the value is NOT the same, but IS the same
                            // with other case,
                            // we replace the value with the cases predefined by
                            // the mapping
                            if (text.getValue().equalsIgnoreCase(s) && !text.getValue().equals(s)) {
                                text.setValue(s);
                            }
                        }
                        allValues.add(text.getValue());
                    }
                }
            }

            // We remove all values from the transformer that do not actually
View Full Code Here

     * @param value
     *            the value
     */
    public Measurement(String measureId, String value) {
        this.measureId = measureId;
        this.value = new FreeStringValue();
        ((FreeStringValue) this.value).setValue(value);
    }
View Full Code Here

     */
    private static final long serialVersionUID = -3878622271778070882L;

    @Override
    public Value createValue() {
        FreeStringValue v = new FreeStringValue();
        v.setScale(this);
        return v;
    }
View Full Code Here

    @Override
    public boolean isEvaluated(Value v) {
        if (v == null || ! (v instanceof FreeStringValue)) {
            return false;
        }
        FreeStringValue sv= (FreeStringValue)v;
        return (sv.getValue() != null && (!"".equals(sv.getValue())));
    }
View Full Code Here

TOP

Related Classes of eu.scape_project.planning.model.values.FreeStringValue

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.