Examples of DataArray


Examples of fr.soleil.comete.util.DataArray

                && yAxisComponents != null) {
            dataList = new ArrayList<DataArray>();
            if (scanResult.getSensorsList() != null) {
                Map<ISensor, DataArray> dataSensorMap = new HashMap<ISensor, DataArray>();
                Map<IActuator, DataArray> dataActuatorMap = new HashMap<IActuator, DataArray>();
                DataArray dataTime = null;
                Object component;
                ISensor sensorComponent;
                IActuator actuatorComponent;
                for (String dataName : yAxisComponents) {
                    dataName = dataName.toLowerCase();
                    component = getComponent(scanResult, dataName);
                    if (component instanceof ISensor) {
                        sensorComponent = (ISensor) component;
                        DataArray dataArray = new DataArray();
                        String name = sensorComponent.getName().toLowerCase();
                        dataArray.setId(name);
                        dataArray.setDisplayName(name);
                        dataArray.setFormat(getFormat());
                        dataArray.setReadOnly(true);
                        dataList.add(dataArray);
                        dataSensorMap.put(sensorComponent, dataArray);
                    }
                    else if (component instanceof IActuator) {
                        actuatorComponent = (IActuator) component;
                        DataArray dataArray = new DataArray();
                        String name = actuatorComponent.getName().toLowerCase();
                        dataArray.setId(name);
                        dataArray.setDisplayName(name);
                        dataArray.setFormat(getFormat());
                        dataArray.setReadOnly(true);
                        dataList.add(dataArray);
                        dataActuatorMap.put(actuatorComponent, dataArray);
                    }
                    else {
                        dataTime = new DataArray();
                        dataTime.setId(dataName);
                        dataTime.setDisplayName(dataName);
                        dataTime.setFormat(getFormat());
                        dataTime.setReadOnly(true);
                        dataList.add(dataTime);
                    }
                }

                Object xComponent = getComponent(scanResult, xAxisComponent);

                List<IScanPoint> scanPointList = scanResult.getScanPointsList();
                Double xx;
                DataArray dataArray;
                Point point;
                ISensor sensor;
                IActuator actuator;
                for (IScanPoint scanPoint : scanPointList) {
                    if (xComponent instanceof IActuator) {
                        xx = scanPoint.getValue((IActuator) xComponent);
                    }
                    else if (xComponent instanceof ISensor) {
                        xx = scanPoint.getValue((ISensor) xComponent);
                    }
                    else {
                        xx = scanPoint.getTime();
                    }
                    for (Map.Entry<ISensor, DataArray> dataSensorEntry : dataSensorMap.entrySet()) {
                        sensor = dataSensorEntry.getKey();
                        dataArray = dataSensorEntry.getValue();
                        point = new Point(xx, scanPoint.getValue(sensor));
                        dataArray.add(point);
                    }
                    for (Map.Entry<IActuator, DataArray> dataActuatorEntry : dataActuatorMap
                            .entrySet()) {
                        actuator = dataActuatorEntry.getKey();
                        dataArray = dataActuatorEntry.getValue();
                        point = new Point(xx, scanPoint.getValue(actuator));
                        dataArray.add(point);
                    }
                    if (dataTime != null) {
                        point = new Point(xx, scanPoint.getTime());
                        dataTime.add(point);
                    }
View Full Code Here

Examples of fr.soleil.comete.util.DataArray

        if (report.getDimensionType() != DimensionType.SPECTRUM) {
            return null;
        }
        List<DataArray> dataList = new ArrayList<DataArray>();
        Double[] readDoubleArray = report.getReadSpectrumData();
        DataArray readArray = new DataArray();
        readArray.setId(actuator.getName());
        readArray.setDisplayName(actuator.getName());
        readArray.setFormat(getFormat());
        readArray.setReadOnly(true);
        for (int index = 0; index < readDoubleArray.length; ++index) {
            readArray.add(new Point(index, readDoubleArray[index]));
        }
        dataList.add(readArray);
        if (!getReadOnly()) {
            Double[] writeDoubleArray = report.getWriteSpectrumData();
            DataArray writeArray = new DataArray();
            writeArray.setId("Write part");
            writeArray.setDisplayName("Write part");
            writeArray.setFormat(getFormat());
            writeArray.setReadOnly(false);
            for (int index = 0; index < writeDoubleArray.length; ++index) {
                writeArray.add(new Point(index, writeDoubleArray[index]));
            }
            dataList.add(writeArray);
        }
        return dataList;
    }
View Full Code Here

Examples of fr.soleil.comete.util.DataArray

     */
    @Override
    public void setData(List<DataArray> data) {
        if (actuator != null && actuator.getName() != null && !"".equals(actuator.getName().trim())) {
            try {
                DataArray da = data.get(0);
                double[] doubleArray = da.getFlatValues();
                int length = doubleArray.length;
                Double[] dataArray = new Double[length];
                for (int index = 0; index < length; ++index) {
                    dataArray[index] = new Double(doubleArray[index]);
                }
View Full Code Here

Examples of fr.soleil.comete.util.DataArray

                && yAxisComponents != null) {
            dataList = new ArrayList<DataArray>();
            if (scanResult.getSensorsList() != null) {
                Map<ISensor, DataArray> dataSensorMap = new HashMap<ISensor, DataArray>();
                Map<IActuator, DataArray> dataActuatorMap = new HashMap<IActuator, DataArray>();
                DataArray dataTime = null;
                Object component;
                ISensor sensorComponent;
                IActuator actuatorComponent;
                for (String dataName : yAxisComponents) {
                    component = getComponent(scanResult, dataName);
                    if (component instanceof ISensor) {
                        sensorComponent = (ISensor) component;
                        DataArray dataArray = new DataArray();
                        dataArray.setId(sensorComponent.getName());
                        dataArray.setDisplayName(sensorComponent.getName());
                        dataArray.setFormat(getFormat());
                        dataArray.setReadOnly(true);
                        dataList.add(dataArray);
                        dataSensorMap.put(sensorComponent, dataArray);
                    }
                    else if (component instanceof IActuator) {
                        actuatorComponent = (IActuator) component;
                        DataArray dataArray = new DataArray();
                        dataArray.setId(actuatorComponent.getName());
                        dataArray.setDisplayName(actuatorComponent.getName());
                        dataArray.setFormat(getFormat());
                        dataArray.setReadOnly(true);
                        dataList.add(dataArray);
                        dataActuatorMap.put(actuatorComponent, dataArray);
                    }
                    else {
                        dataTime = new DataArray();
                        dataTime.setId(dataName);
                        dataTime.setDisplayName(dataName);
                        dataTime.setFormat(getFormat());
                        dataTime.setReadOnly(true);
                        dataList.add(dataTime);
                    }
                }

                Object xComponent = getComponent(scanResult, xAxisComponent);

                List<IScanPoint> scanPointList = scanResult.getScanPointsList();
                Double xx;
                DataArray dataArray;
                Point point;
                ISensor sensor;
                IActuator actuator;
                for (IScanPoint scanPoint : scanPointList) {
                    if (xComponent instanceof IActuator) {
                        xx = scanPoint.getValue((IActuator) xComponent);
                    }
                    else if (xComponent instanceof ISensor) {
                        xx = scanPoint.getValue((ISensor) xComponent);
                    }
                    else {
                        xx = scanPoint.getTime();
                    }
                    for (Map.Entry<ISensor, DataArray> dataSensorEntry : dataSensorMap.entrySet()) {
                        sensor = dataSensorEntry.getKey();
                        dataArray = dataSensorEntry.getValue();
                        point = new Point(xx, scanPoint.getValue(sensor));
                        dataArray.add(point);
                    }
                    for (Map.Entry<IActuator, DataArray> dataActuatorEntry : dataActuatorMap
                            .entrySet()) {
                        actuator = dataActuatorEntry.getKey();
                        dataArray = dataActuatorEntry.getValue();
                        point = new Point(xx, scanPoint.getValue(actuator));
                        dataArray.add(point);
                    }
                    if (dataTime != null) {
                        point = new Point(xx, scanPoint.getTime());
                        dataTime.add(point);
                    }
View Full Code Here

Examples of fr.soleil.comete.util.DataArray

                && yAxisComponents != null) {
            dataList = new ArrayList<DataArray>();
            if (scanResult.getSensorsList() != null) {
                Map<ISensor, DataArray> dataSensorMap = new HashMap<ISensor, DataArray>();
                Map<IActuator, DataArray> dataActuatorMap = new HashMap<IActuator, DataArray>();
                DataArray dataTime = null;
                Object component;
                ISensor sensorComponent;
                IActuator actuatorComponent;
                for (String dataName : yAxisComponents) {
                    component = getComponent(scanResult, dataName);
                    if (component instanceof ISensor) {
                        sensorComponent = (ISensor) component;
                        DataArray dataArray = new DataArray();
                        dataArray.setId(sensorComponent.getName());
                        dataArray.setDisplayName(sensorComponent.getName());
                        dataArray.setFormat(getFormat());
                        dataArray.setReadOnly(true);
                        dataList.add(dataArray);
                        dataSensorMap.put(sensorComponent, dataArray);
                    }
                    else if (component instanceof IActuator) {
                        actuatorComponent = (IActuator) component;
                        DataArray dataArray = new DataArray();
                        dataArray.setId(actuatorComponent.getName());
                        dataArray.setDisplayName(actuatorComponent.getName());
                        dataArray.setFormat(getFormat());
                        dataArray.setReadOnly(true);
                        dataList.add(dataArray);
                        dataActuatorMap.put(actuatorComponent, dataArray);
                    }
                    else {
                        dataTime = new DataArray();
                        dataTime.setId(dataName);
                        dataTime.setDisplayName(dataName);
                        dataTime.setFormat(getFormat());
                        dataTime.setReadOnly(true);
                        dataList.add(dataTime);
                    }
                }

                Object xComponent = getComponent(scanResult, xAxisComponent);

                List<IScanPoint> scanPointList = scanResult.getScanPointsList();
                Double xx;
                DataArray dataArray;
                Point point;
                ISensor sensor;
                IActuator actuator;
                for (IScanPoint scanPoint : scanPointList) {
                    if (xComponent instanceof IActuator) {
                        xx = scanPoint.getValue((IActuator) xComponent);
                    }
                    else if (xComponent instanceof ISensor) {
                        xx = scanPoint.getValue((ISensor) xComponent);
                    }
                    else {
                        xx = scanPoint.getTime();
                    }
                    for (Map.Entry<ISensor, DataArray> dataSensorEntry : dataSensorMap.entrySet()) {
                        sensor = dataSensorEntry.getKey();
                        dataArray = dataSensorEntry.getValue();
                        point = new Point(xx, scanPoint.getValue(sensor));
                        dataArray.add(point);
                    }
                    for (Map.Entry<IActuator, DataArray> dataActuatorEntry : dataActuatorMap
                            .entrySet()) {
                        actuator = dataActuatorEntry.getKey();
                        dataArray = dataActuatorEntry.getValue();
                        point = new Point(xx, scanPoint.getValue(actuator));
                        dataArray.add(point);
                    }
                    if (dataTime != null) {
                        point = new Point(xx, scanPoint.getTime());
                        dataTime.add(point);
                    }
View Full Code Here

Examples of fr.soleil.comete.util.DataArray

                && yAxisComponents != null && yAxisComponents.size() != 0) {
            dataList = new ArrayList<DataArray>();
            if (scanResult.getSensorsList() != null) {
                Map<ISensor, DataArray> dataSensorMap = new HashMap<ISensor, DataArray>();
                Map<IActuator, DataArray> dataActuatorMap = new HashMap<IActuator, DataArray>();
                DataArray dataTime = null;
                Object component;
                ISensor sensorComponent;
                IActuator actuatorComponent;
                for (String dataName : yAxisComponents) {
                    component = getComponent(scanResult, dataName);
                    if (component instanceof ISensor) {
                        sensorComponent = (ISensor) component;
                        DataArray dataArray = new DataArray();
                        dataArray.setId(sensorComponent.getName());
                        dataArray.setDisplayName(sensorComponent.getName());
                        dataArray.setFormat(getFormat());
                        dataArray.setReadOnly(true);
                        dataList.add(dataArray);
                        dataSensorMap.put(sensorComponent, dataArray);
                    }
                    else if (component instanceof IActuator) {
                        actuatorComponent = (IActuator) component;
                        DataArray dataArray = new DataArray();
                        dataArray.setId(actuatorComponent.getName());
                        dataArray.setDisplayName(actuatorComponent.getName());
                        dataArray.setFormat(getFormat());
                        dataArray.setReadOnly(true);
                        dataList.add(dataArray);
                        dataActuatorMap.put(actuatorComponent, dataArray);
                    }
                    else {
                        dataTime = new DataArray();
                        dataTime.setId(dataName);
                        dataTime.setDisplayName(dataName);
                        dataTime.setFormat(getFormat());
                        dataTime.setReadOnly(true);
                        dataList.add(dataTime);
                    }
                }

                Object xComponent = getComponent(scanResult, xAxisComponent);

                List<IScanPoint> scanPointList = scanResult.getScanPointsList();
                Double xx;
                DataArray dataArray;
                Point point;
                ISensor sensor;
                IActuator actuator;
                for (IScanPoint scanPoint : scanPointList) {
                    if (xComponent instanceof IActuator) {
                        xx = scanPoint.getValue((IActuator) xComponent);
                    }
                    else if (xComponent instanceof ISensor) {
                        xx = scanPoint.getValue((ISensor) xComponent);
                    }
                    else {
                        xx = scanPoint.getTime();
                    }
                    for (Map.Entry<ISensor, DataArray> dataSensorEntry : dataSensorMap.entrySet()) {
                        sensor = dataSensorEntry.getKey();
                        dataArray = dataSensorEntry.getValue();
                        point = new Point(xx, scanPoint.getValue(sensor));
                        dataArray.add(point);
                    }
                    for (Map.Entry<IActuator, DataArray> dataActuatorEntry : dataActuatorMap
                            .entrySet()) {
                        actuator = dataActuatorEntry.getKey();
                        dataArray = dataActuatorEntry.getValue();
                        point = new Point(xx, scanPoint.getValue(actuator));
                        dataArray.add(point);
                    }
                    if (dataTime != null) {
                        point = new Point(xx, scanPoint.getTime());
                        dataTime.add(point);
                    }
View Full Code Here

Examples of fr.soleil.comete.util.DataArray

        if(scanResult.getResultType() == IScanResult.ResultType.RESULT_1D && yAxisComponents != null && yAxisComponents.size() != 0) {
            dataList = new ArrayList<DataArray>();
            if(scanResult.getSensorsList() != null) {
                Map<ISensor, DataArray> dataSensorMap = new HashMap<ISensor, DataArray>();
                Map<IActuator, DataArray> dataActuatorMap = new HashMap<IActuator, DataArray>();
                DataArray dataTime = null;
                Object component;
                ISensor sensorComponent;
                IActuator actuatorComponent;
                for(String dataName : yAxisComponents) {
                    component = getComponent(scanResult, dataName);
                    if(component instanceof ISensor) {
                        sensorComponent = (ISensor) component;
                        DataArray dataArray = new DataArray();
                        dataArray.setId(sensorComponent.getName());
                        dataArray.setDisplayName(sensorComponent.getName());
                        dataArray.setFormat(getFormat());
                        dataArray.setReadOnly(true);
                        dataList.add(dataArray);
                        dataSensorMap.put(sensorComponent, dataArray);
                    }
                    else if(component instanceof IActuator) {
                        actuatorComponent = (IActuator) component;
                        DataArray dataArray = new DataArray();
                        dataArray.setId(actuatorComponent.getName());
                        dataArray.setDisplayName(actuatorComponent.getName());
                        dataArray.setFormat(getFormat());
                        dataArray.setReadOnly(true);
                        dataList.add(dataArray);
                        dataActuatorMap.put(actuatorComponent, dataArray);
                    }
                    else {
                        dataTime = new DataArray();
                        dataTime.setId(dataName);
                        dataTime.setDisplayName(dataName);
                        dataTime.setFormat(getFormat());
                        dataTime.setReadOnly(true);
                        dataList.add(dataTime);
                    }
                }
               
                Object xComponent = getComponent(scanResult, xAxisComponent);
               
                List<IScanPoint> scanPointList = scanResult.getScanPointsList();
                Double xx;
                DataArray dataArray;
                Point point;
                ISensor sensor;
                IActuator actuator;
                for(IScanPoint scanPoint : scanPointList) {
                    if(xComponent instanceof IActuator) {
                        xx = scanPoint.getValue((IActuator) xComponent);
                    }
                    else if(xComponent instanceof ISensor) {
                        xx = scanPoint.getValue((ISensor) xComponent);
                    }
                    else {
                        xx = scanPoint.getTime();
                    }
                    for(Map.Entry<ISensor, DataArray> dataSensorEntry : dataSensorMap.entrySet()) {
                        sensor = dataSensorEntry.getKey();
                        dataArray = dataSensorEntry.getValue();
                        point = new Point(xx, scanPoint.getValue(sensor));
                        dataArray.add(point);
                    }
                    for(Map.Entry<IActuator, DataArray> dataActuatorEntry : dataActuatorMap.entrySet()) {
                        actuator = dataActuatorEntry.getKey();
                        dataArray = dataActuatorEntry.getValue();
                        point = new Point(xx, scanPoint.getValue(actuator));
                        dataArray.add(point);
                    }
                    if(dataTime != null) {
                        point = new Point(xx, scanPoint.getTime());
                        dataTime.add(point);
                    }
View Full Code Here

Examples of fr.soleil.comete.util.DataArray

        if (report.getDimensionType() != DimensionType.SPECTRUM) {
            return null;
        }
        List<DataArray> dataList = new ArrayList<DataArray>();
        Double[] readDoubleArray = report.getReadSpectrumData();
        DataArray readArray = new DataArray();
        readArray.setId(sensor.getName());
        readArray.setDisplayName(sensor.getName());
        readArray.setFormat(getFormat());
        readArray.setReadOnly(true);
        for (int index = 0; index < readDoubleArray.length; ++index) {
            readArray.add(new Point(index, readDoubleArray[index]));
        }
        dataList.add(readArray);
        if (!getReadOnly()) {
            Double[] writeDoubleArray = report.getWriteSpectrumData();
            DataArray writeArray = new DataArray();
            writeArray.setId("Write part");
            writeArray.setDisplayName("Write part");
            writeArray.setFormat(getFormat());
            writeArray.setReadOnly(false);
            for (int index = 0; index < writeDoubleArray.length; ++index) {
                writeArray.add(new Point(index, writeDoubleArray[index]));
            }
            dataList.add(writeArray);
        }
        return dataList;
    }
View Full Code Here

Examples of fr.soleil.comete.util.DataArray

     */
    @Override
    public void setData(List<DataArray> data) {
        if (sensor != null && sensor.getName() != null && !"".equals(sensor.getName().trim())) {
            try {
                DataArray da = data.get(0);
                double[] doubleArray = da.getFlatValues();
                int length = doubleArray.length;
                Double[] dataArray = new Double[length];
                for (int index = 0; index < length; ++index) {
                    dataArray[index] = new Double(doubleArray[index]);
                }
View Full Code Here

Examples of fr.soleil.comete.util.DataArray

                && yAxisComponents != null && yAxisComponents.size() != 0) {
            dataList = new ArrayList<DataArray>();
            if (scanResult.getSensorsList() != null) {
                Map<ISensor, DataArray> dataSensorMap = new HashMap<ISensor, DataArray>();
                Map<IActuator, DataArray> dataActuatorMap = new HashMap<IActuator, DataArray>();
                DataArray dataTime = null;
                Object component;
                ISensor sensorComponent;
                IActuator actuatorComponent;
                for (String dataName : yAxisComponents) {
                    component = getComponent(scanResult, dataName);
                    if (component instanceof ISensor) {
                        sensorComponent = (ISensor) component;
                        DataArray dataArray = new DataArray();
                        dataArray.setId(sensorComponent.getName());
                        dataArray.setDisplayName(sensorComponent.getName());
                        dataArray.setFormat(getFormat());
                        dataArray.setReadOnly(true);
                        dataList.add(dataArray);
                        dataSensorMap.put(sensorComponent, dataArray);
                    }
                    else if (component instanceof IActuator) {
                        actuatorComponent = (IActuator) component;
                        DataArray dataArray = new DataArray();
                        dataArray.setId(actuatorComponent.getName());
                        dataArray.setDisplayName(actuatorComponent.getName());
                        dataArray.setFormat(getFormat());
                        dataArray.setReadOnly(true);
                        dataList.add(dataArray);
                        dataActuatorMap.put(actuatorComponent, dataArray);
                    }
                    else {
                        dataTime = new DataArray();
                        dataTime.setId(dataName);
                        dataTime.setDisplayName(dataName);
                        dataTime.setFormat(getFormat());
                        dataTime.setReadOnly(true);
                        dataList.add(dataTime);
                    }
                }

                Object xComponent = getComponent(scanResult, xAxisComponent);

                List<IScanPoint> scanPointList = scanResult.getScanPointsList();
                Double xx;
                DataArray dataArray;
                Point point;
                ISensor sensor;
                IActuator actuator;
                for (IScanPoint scanPoint : scanPointList) {
                    if (xComponent instanceof IActuator) {
                        xx = scanPoint.getValue((IActuator) xComponent);
                    }
                    else if (xComponent instanceof ISensor) {
                        xx = scanPoint.getValue((ISensor) xComponent);
                    }
                    else {
                        xx = scanPoint.getTime();
                    }
                    for (Map.Entry<ISensor, DataArray> dataSensorEntry : dataSensorMap.entrySet()) {
                        sensor = dataSensorEntry.getKey();
                        dataArray = dataSensorEntry.getValue();
                        point = new Point(xx, scanPoint.getValue(sensor));
                        dataArray.add(point);
                    }
                    for (Map.Entry<IActuator, DataArray> dataActuatorEntry : dataActuatorMap
                            .entrySet()) {
                        actuator = dataActuatorEntry.getKey();
                        dataArray = dataActuatorEntry.getValue();
                        point = new Point(xx, scanPoint.getValue(actuator));
                        dataArray.add(point);
                    }
                    if (dataTime != null) {
                        point = new Point(xx, scanPoint.getTime());
                        dataTime.add(point);
                    }
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.