Package it.freedomotic.core

Examples of it.freedomotic.core.Condition


        if (reader.getNodeName().equalsIgnoreCase("conditions")) {
            while (reader.hasMoreChildren()) {
                //read a single condition
                reader.moveDown(); //move down to condition
                reader.moveDown(); //move down to target
                Condition condition = new Condition();
                condition.setTarget(reader.getValue().trim());
                reader.moveUp(); //move up to condition
                //parse statement
                ArrayList<String> statementValues = new ArrayList<String>();
                reader.moveDown(); //move down to statement
                while (reader.hasMoreChildren()) { //childs of statement (logical, attribute, ...)
                    reader.moveDown(); //move down to statement property
                    System.out.println("    " + reader.getValue().trim());
                    statementValues.add(reader.getValue());
                    reader.moveUp(); //move up to statement
                }
                reader.moveUp();//move up to condition
                Statement stm = new Statement();
                stm.create(statementValues.get(0),
                        statementValues.get(1),
                        statementValues.get(2),
                        statementValues.get(3));
                condition.setStatement(stm);
                conditions.add(condition);
                reader.moveUp(); //move up to conditions
            }
            reader.moveUp(); //move up to root
            reader.moveDown();//move down to sequence
View Full Code Here

TOP

Related Classes of it.freedomotic.core.Condition

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.