Package fr.soleil.salsa.entity

Examples of fr.soleil.salsa.entity.IDevice


        // check deviceList is correct: for each element in deviceList we check
        // it's in
        // salsaConfiguration
        iterator = salsaDevice.listIterator();
        while (iterator.hasNext()) {
            IDevice device = iterator.next();
            if (device.getName().equalsIgnoreCase(userDevice)) {
                return device.isEnabled();
            }
        }

        return enabled;
    }
View Full Code Here


    private void initSavedAxis(List<? extends IDevice> deviceList,
            Iterator<DisplayAxis> iteratorAxis) {
        if (deviceList != null) {
            Iterator<? extends IDevice> iteratorDevice = deviceList.listIterator();
            IDevice device = null;
            DisplayAxis displayAxis = null;
            String attributeName = null;
            while (iteratorDevice.hasNext()) {
                device = iteratorDevice.next();
                if (iteratorAxis.hasNext()) {
                    displayAxis = iteratorAxis.next();
                    if (displayAxis == null) {
                        displayAxis = getDisplayAxis(Axis.NONE);
                    }
                }
                else {
                    displayAxis = getDisplayAxis(Axis.NONE);
                }
                attributeName = device.getName();
                attributeNameList.add(attributeName);
                // System.out.println("attributeName =" + attributeName + "->" + displayAxis);
                initDefaultAxis(attributeName, getAxis(displayAxis));
            }
        }
View Full Code Here

        if (deviceList == null) {
            return;
        }

        Iterator<?> iteratorDevice = deviceList.listIterator();
        IDevice device = null;
        DisplayAxis displayAxis = null;
        String attributeName = null;
        while (iteratorDevice.hasNext()) {
            device = (IDevice) iteratorDevice.next();
            if (iteratorAxis.hasNext()) {
                displayAxis = iteratorAxis.next();
                if (displayAxis == null) {
                    displayAxis = getDisplayAxis(Axis.NONE);
                }
            }
            else {
                displayAxis = getDisplayAxis(Axis.NONE);
            }
            attributeName = device.getName();
            attributeNameList.add(attributeName);
            // System.out.println("attributeName =" + attributeName + "->" + displayAxis);
            initDefaultAxis(attributeName, getAxis(displayAxis));
        }
    }
View Full Code Here

        if (deviceList1 != null && deviceList2 != null) {
            if (deviceList1.size() != deviceList1.size()) {
                return false;
            }
            for (int i = 0; i < deviceList1.size(); i++) {
                IDevice device1 = deviceList1.get(i);
                IDevice device2 = deviceList2.get(i);
                if (!deviceEquals(device1, device2)) {
                    return false;
                }
            }
        }
View Full Code Here

        // check deviceList is correct: for each element in deviceList we check it's in
        // salsaConfiguration
        iterator = salsaDevice.listIterator();
        while (iterator.hasNext() && !found) {
            IDevice device = iterator.next();
            if (device.getName().equalsIgnoreCase(userDevice)) {
                found = true;
                device.setEnabled(enable);
            }
        }
    }
View Full Code Here

        // check deviceList is correct: for each element in deviceList we check it's in
        // salsaConfiguration
        iterator = salsaDevice.listIterator();
        while (iterator.hasNext()) {
            IDevice device = iterator.next();
            if (device.getName().equalsIgnoreCase(userDevice)) {
                return device.isEnabled();
            }
        }

        return enabled;
    }
View Full Code Here

            equals = true;
        }
        else if ((list1 != null && list2 != null) && (list1.size() == list2.size())) {
            boolean listEquals = true;
            for (int i = 0; i < list1.size(); i++) {
                IDevice device1 = list1.get(i);
                IDevice device2 = list2.get(i);
                if (!deviceEquals(device1, device2)) {
                    listEquals = false;
                    break;
                }
            }
View Full Code Here

    private void initSavedAxis(List<? extends IDevice> deviceList,
            Iterator<DisplayAxis> iteratorAxis) {
        if (deviceList != null) {
            Iterator<? extends IDevice> iteratorDevice = deviceList.listIterator();
            IDevice device = null;
            DisplayAxis displayAxis = null;
            String attributeName = null;
            while (iteratorDevice.hasNext()) {
                device = iteratorDevice.next();
                if (iteratorAxis.hasNext()) {
                    displayAxis = iteratorAxis.next();
                    if (displayAxis == null) {
                        displayAxis = getDisplayAxis(Axis.NONE);
                    }
                }
                else {
                    displayAxis = getDisplayAxis(Axis.NONE);
                }
                attributeName = device.getName();
                attributeNameList.add(attributeName);
                // System.out.println("attributeName =" + attributeName + "->" + displayAxis);
                initDefaultAxis(attributeName, getAxis(displayAxis));
            }
        }
View Full Code Here

    private void initSavedAxis(List<? extends IDevice> deviceList,
            Iterator<DisplayAxis> iteratorAxis, boolean sensor) {
        if (deviceList != null) {
            Iterator<? extends IDevice> iteratorDevice = deviceList.listIterator();
            IDevice device = null;
            DisplayAxis displayAxis = null;
            String attributeName = null;
            while (iteratorDevice.hasNext()) {
                device = iteratorDevice.next();
                if (iteratorAxis.hasNext()) {
                    displayAxis = iteratorAxis.next();
                    if (displayAxis == null) {
                        displayAxis = getDisplayAxis(Axis.NONE);
                    }
                }
                else {
                    displayAxis = getDisplayAxis(Axis.NONE);
                }
                attributeName = device.getName();
                if (sensor) {
                    attributeName = attributeName + "(sensor)";
                }
                attributeNameList.add(attributeName);
                // Add sensor for sensor attribute in case of sensor = actuator
View Full Code Here

            equals = true;
        }
        else if ((list1 != null && list2 != null) && (list1.size() == list2.size())) {
            boolean listEquals = true;
            for (int i = 0; i < list1.size(); i++) {
                IDevice device1 = list1.get(i);
                IDevice device2 = list2.get(i);
                if (!deviceEquals(device1, device2)) {
                    listEquals = false;
                    break;
                }
            }
View Full Code Here

TOP

Related Classes of fr.soleil.salsa.entity.IDevice

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.