Package uk.ac.soton.itinnovation.pes.data.model

Examples of uk.ac.soton.itinnovation.pes.data.model.AttributeType


   * Create a new CPU model attribute with hard coded 'x86_80486' value.
   * @return CPU model attribute.
   */
    private AttributeType newCpuModelAttrib()
    {
        AttributeType a = new AttributeType();
        a.setName("cpuModel");
        a.setType(BasicType.STRING);
        a.addAValue(new ValueType("x86_80486", MetricType.EXACT));
        return a;
    }
View Full Code Here


   * Create a new CPU speed attribute with hard coded allowed values of '2000, 2200, 2400 MHz'.
   * @return CPU speed attribute.
   */
    private AttributeType newCpuSpeedAttrib()
    {
        AttributeType a = new AttributeType();
        a.setName("cpuSpeed");
        a.setType(BasicType.STRING);
        a.setUnit(new UnitType("MHz", null, null, null));
        a.addAValue(new ValueType("2000", MetricType.VALUESALLOWED));
        a.addAValue(new ValueType("2200", MetricType.VALUESALLOWED));
        a.addAValue(new ValueType("2400", MetricType.VALUESALLOWED));

        return a;
    }
View Full Code Here

   * Set up a CPU attribute with a specific name, value (int) and unit type.
   * @return AttributeType instance.
   */
    private AttributeType newCPUCompAttrib(String name, int val, String unit)
    {
        AttributeType a = new AttributeType();
        a.setName(name);
        a.setType(BasicType.INT);
        a.setUnit(new UnitType(unit, null, null, null));
        a.addAValue(new ValueType(String.valueOf(val), MetricType.EXACT));

        return a;
    }
View Full Code Here

   * Set up a CPU attribute with a specific name, unit type and a min/max/step value range (int).
   * @return AttributeType instance.
   */
    private AttributeType newCPUCompAttrib(String name, int min, int max, int step, String unit)
    {
        AttributeType a = new AttributeType();
        a.setName(name);
        a.setType(BasicType.INT);
        a.setUnit(new UnitType(unit, null, null, null));
        a.addAValue(new ValueType(String.valueOf(min), MetricType.MIN));
        a.addAValue(new ValueType(String.valueOf(max), MetricType.MAX));
        a.addAValue(new ValueType(String.valueOf(step), MetricType.STEP));

        return a;
    }
View Full Code Here

   * Set up a CPU attribute with a specific name, value (double) and unit type.
   * @return AttributeType instance.
   */
    private AttributeType newCPUCompAttrib(String name, double val, String unit)
    {
        AttributeType a = new AttributeType();
        a.setName(name);
        a.setType(BasicType.DOUBLE);
        a.setUnit(new UnitType(unit, null, null, null));
        a.addAValue(new ValueType(String.valueOf(val), MetricType.EXACT));

        return a;
    }
View Full Code Here

   * Set up a CPU attribute with a specific name, unit type and a min/max/step value range (double).
   * @return AttributeType instance.
   */
    private AttributeType newCPUCompAttrib(String name, double min, double max, double step, String unit)
    {
        AttributeType a = new AttributeType();
        a.setName(name);
        a.setType(BasicType.DOUBLE);
        a.setUnit(new UnitType(unit, null, null, null));
        a.addAValue(new ValueType(String.valueOf(min), MetricType.MIN));
        a.addAValue(new ValueType(String.valueOf(max), MetricType.MAX));
        a.addAValue(new ValueType(String.valueOf(step), MetricType.STEP));

        return a;
    }
View Full Code Here

   * @return RAM resource instance.
   */
    private Resource getRAMResource ()
    {
        Resource res = new Resource();
        AttributeType a = new AttributeType();

        res.setName("RAM");

    a.setName("ramSize");
        a.setType(BasicType.STRING);
        a.setUnit(new UnitType("MB", null, null, null));
        a.addAValue(new ValueType("2048", MetricType.EXACT));

        res.addAnAttr(a);

        return res;
    }
View Full Code Here

   * @return Disk resource object.
   */
    private Resource getDiskResource ()
    {
        Resource res = new Resource();
        AttributeType a = new AttributeType();

    res.setName("DISK");

        a.setName("DISKSPACE");
        a.setType(BasicType.STRING);
        a.setUnit(new UnitType("GB", null, null, null));
        a.addAValue(new ValueType("100", MetricType.EXACT));

        res.addAnAttr(a);
        return res;
    }
View Full Code Here

     * [1000000, 10000000] with steps of 1000000 bps.
   * @return Bandwidth attribute instance.
   */
    private AttributeType newBandwidthAttrib()
    {
        AttributeType a = new AttributeType();
        a.setName("bandwidth");
        a.setType(BasicType.INT);
        a.setUnit(new UnitType("bps", null, null, null));
        a.addAValue(new ValueType("1000000", MetricType.MIN));
        a.addAValue(new ValueType("10000000", MetricType.MAX));
        a.addAValue(new ValueType("1000000", MetricType.STEP));
        return a;
    }
View Full Code Here

   * Create a jitter attribute with a hard coded value of '20 ms'.
   * @return Jitter attribute instance.
   */
    private AttributeType newJitterAttrib()
    {
        AttributeType a = new AttributeType();

        a.setName("jitter");
        a.setType(BasicType.INT);
        a.setUnit(new UnitType("msec", null, null, null));
        a.addAValue(new ValueType("20", MetricType.EXACT));

        return a;
    }
View Full Code Here

TOP

Related Classes of uk.ac.soton.itinnovation.pes.data.model.AttributeType

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.