Package at.salzburgresearch.nodekeeper.eca.function

Examples of at.salzburgresearch.nodekeeper.eca.function.Function


                                    String name  = bindingElement.getAttribute("name");
                                    String type  = bindingElement.getAttribute("type");

                                    if(type==null || type.equals("")) {
                                        Function f = new StaticValueFunction();
                                        f.init(bindingElement.getTextContent().trim());
                                        rule.bindings.add(new Binding(name,f));
                                    } else {
                                        Function f = createFunction(type,bindingElement.getChildNodes());
                                        rule.bindings.add(new Binding(name,f));
                                    }
                                }
                            }
                        }
View Full Code Here


            }
            return null;
        }

        private static Function createFunction(String name, NodeList params) {
            Function f = FunctionFactory.createFunction(name);
            ArrayList<Object> paramObjects = new ArrayList<Object>();
            for(int i = 0; i < params.getLength(); i++) {
                org.w3c.dom.Node paramNode = params.item(i);
                if(paramNode.getNodeType() == org.w3c.dom.Node.ELEMENT_NODE) {
                    Element param = (Element)paramNode;
                    String pname  = param.getAttribute("name");
                    String ptype  =param.getAttribute("type");

                    if(ptype==null || ptype.equals("")) {
                        Function fx = new StaticValueFunction();
                        fx.init(param.getTextContent());
                        paramObjects.add(fx);
                    } else {
                        Function fx = createFunction(ptype,param.getChildNodes());
                        paramObjects.add(fx);
                    }
                }
            }
            f.init(paramObjects.toArray());
View Full Code Here

                                    String name  = bindingElement.getAttribute("name");
                                    String type  = bindingElement.getAttribute("type");

                                    if(type==null || type.equals("")) {
                                        Function f = new StaticValueFunction();
                                        f.init(bindingElement.getTextContent().trim());
                                        rule.bindings.add(new Binding(name,f));
                                    } else {
                                        Function f = createFunction(type,bindingElement.getChildNodes());
                                        rule.bindings.add(new Binding(name,f));
                                    }
                                }
                            }
                        }
View Full Code Here

            }
            return null;
        }

        private static Function createFunction(String name, NodeList params) {
            Function f = FunctionFactory.createFunction(name);
            ArrayList<Object> paramObjects = new ArrayList<Object>();
            for(int i = 0; i < params.getLength(); i++) {
                org.w3c.dom.Node paramNode = params.item(i);
                if(paramNode.getNodeType() == org.w3c.dom.Node.ELEMENT_NODE) {
                    Element param = (Element)paramNode;
                    String pname  = param.getAttribute("name");
                    String ptype  =param.getAttribute("type");

                    if(ptype==null || ptype.equals("")) {
                        Function fx = new StaticValueFunction();
                        fx.init(param.getTextContent());
                        paramObjects.add(fx);
                    } else {
                        Function fx = createFunction(ptype,param.getChildNodes());
                        paramObjects.add(fx);
                    }
                }
            }
            f.init(paramObjects.toArray());
View Full Code Here

TOP

Related Classes of at.salzburgresearch.nodekeeper.eca.function.Function

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.