Package eu.planets_project.pp.plato.model.values

Examples of eu.planets_project.pp.plato.model.values.FreeStringValue


   
    public Measurement(String propertyName, String value) {
        MeasurableProperty p = new MeasurableProperty();
        p.setName(propertyName);
        p.setScale(new FreeStringScale());
        FreeStringValue s = (FreeStringValue) p.getScale().createValue();
        s.setValue(value);
        this.setProperty(p);
        this.setValue(s);
    }
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 occur (anymore)
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

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

            return null;
        } else if (OBJECT_ACTION_ACTIVITYLOGGING_FORMAT.equals(propertyURI)) {
            Map<SampleObject, DetailedExperimentInfo> detailedInfo = alternative.getExperiment().getDetailedInfo();
            DetailedExperimentInfo detailedExperimentInfo = detailedInfo.get(sample);
            if ((detailedExperimentInfo != null) && (detailedExperimentInfo.getProgramOutput() != null)) {
                FreeStringValue v = (FreeStringValue) scale.createValue();
                v.setValue(evaluateLogging(detailedExperimentInfo.getProgramOutput()));
                v.setComment("extracted from experiments details");
                return v;
            }
            return null;
        } else if (OBJECT_ACTION_RUNTIME_PERFORMANCE_THROUGHPUT.equals(propertyURI)) {
            Value extracted = extractMeasuredValue(alternative, sample, OBJECT_ACTION_RUNTIME_PERFORMANCE_TIME_PERSAMPLE);
View Full Code Here

TOP

Related Classes of eu.planets_project.pp.plato.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.