Examples of ChoiceType


Examples of com.volantis.mcs.build.themes.definitions.types.ChoiceType

            }
        } else if (name.equals("themeDefinition")) {
            // Process all the children.
            processThemePropertyChildren(element);
        } else if (name.equals("choiceType")) {
            ChoiceType choiceType = definitionsFactory.createChoiceType();
            TypeList typeList = new TypeList();

            pushObject(choiceType);
            pushObject(typeList);
            processThemePropertyChildren(element);
            popObject();
            popObject();

            Iterator it = typeList.getList().iterator();
            while (it.hasNext()) {
                choiceType.addType((Type) it.next());
            }
            storeType(choiceType);
        } else if (name.equals("pairType")) {
            PairType pairType = definitionsFactory.createPairType();
View Full Code Here

Examples of net.percederberg.mibble.type.ChoiceType

     * @param node           the node being exited
     *
     * @return the node to add to the parse tree
     */
    protected Node exitChoiceType(Production node) {
        node.addValue(new ChoiceType(getChildValues(node)));
        return node;
    }
View Full Code Here

Examples of org.apache.camel.model.ChoiceType

            this.image = imagePrefix + "ContentBasedRouterIcon.png";
            this.nodeType = "Content Based Router";
            this.label = "Choice";
            this.edgeLabel = "";

            ChoiceType choice = (ChoiceType)node;
            List<ProcessorType> outputs = new ArrayList<ProcessorType>(choice.getWhenClauses());
            if (choice.getOtherwise() != null) {
                outputs.add(choice.getOtherwise());
            }
            this.outputs = outputs;
        } else if (node instanceof RecipientListType) {
            this.image = imagePrefix + "RecipientListIcon.png";
            this.nodeType = "Recipient List";
View Full Code Here

Examples of org.apache.camel.model.ChoiceType

            this.image = imagePrefix + "ContentBasedRouterIcon.png";
            this.nodeType = "Content Based Router";
            this.label = "";
            this.edgeLabel = "";

            ChoiceType choice = (ChoiceType)node;
            List<ProcessorType> outputs = new ArrayList<ProcessorType>(choice.getWhenClauses());
            outputs.add(choice.getOtherwise());
            this.outputs = outputs;
        } else if (node instanceof RecipientListType) {
            this.image = imagePrefix + "RecipientListIcon.png";
            this.nodeType = "Recipient List";
        } else if (node instanceof RoutingSlipType) {
View Full Code Here

Examples of org.apache.camel.model.ChoiceType

                return type.cast(out);
            }

            // special for choice
            if (out instanceof ChoiceType) {
                ChoiceType choice = (ChoiceType) out;
                for (WhenType when : choice.getWhenClauses()) {
                    List<ProcessorType<?>> children = when.getOutputs();
                    T child = findFirstTypeInOutputs(children, type);
                    if (child != null) {
                        return child;
                    }
                }

                List<ProcessorType<?>> children = choice.getOtherwise().getOutputs();
                if (children != null) {
                    T child = findFirstTypeInOutputs(children, type);
                    if (child != null) {
                        return child;
                    }
View Full Code Here

Examples of org.apache.camel.model.ChoiceType

            this.image = imagePrefix + "ContentBasedRouterIcon.png";
            this.nodeType = "Content Based Router";
            this.label = "";
            this.edgeLabel = "";

            ChoiceType choice = (ChoiceType)node;
            List<ProcessorType> outputs = new ArrayList<ProcessorType>(choice.getWhenClauses());
            if (choice.getOtherwise() != null) {
                outputs.add(choice.getOtherwise());
            }
            this.outputs = outputs;
        } else if (node instanceof RecipientListType) {
            this.image = imagePrefix + "RecipientListIcon.png";
            this.nodeType = "Recipient List";
View Full Code Here

Examples of xbird.xquery.type.ChoiceType

    public static boolean isPromotable(final Type src, final AtomicType trg) {
        final Type primeType = src.prime();
        if(primeType instanceof AtomicType) {
            return TypeTable.isCastable((AtomicType) primeType, trg, true);
        } else if(primeType instanceof ChoiceType) {
            final ChoiceType choise = (ChoiceType) primeType;
            for(Type c : choise.getTypes()) {
                if(!isPromotable(c, trg)) {
                    return false;
                }
            }
            return true;
View Full Code Here

Examples of xbird.xquery.type.ChoiceType

    public static Type union(final Type baseType, final Type type) {
        if(baseType instanceof ChoiceType) {
            ((ChoiceType) baseType).combine(type);
            return baseType;
        } else {
            return new ChoiceType(baseType, type);
        }
    }
View Full Code Here

Examples of xbird.xquery.type.ChoiceType

    public Occurrence quantifier() {
        return Occurrence.OCC_EXACTLY_ONE;  // FIXME
    }

    public Type prime() {
        return new ChoiceType(_list);
    }
View Full Code Here

Examples of xbird.xquery.type.ChoiceType

            if(condExpr instanceof Evaluable) {
                Sequence<? extends Item> evaluated = condExpr.eval(null, DynamicContext.DUMMY);
                boolean cond = FnBoolean.effectiveBooleanValue(evaluated);
                return cond ? thenExpr : elseExpr;
            }
            this._type = new ChoiceType(thenExpr.getType(), elseExpr.getType());
        }
        return this;
    }
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.