Examples of UnionType


Examples of org.apache.axis2.corba.idl.types.UnionType

                inputStream = (org.omg.CORBA_2_3.portable.InputStream) returned.create_input_stream();
                enumValue.read(inputStream);
                returnValue = enumValue;
                break;
            case TCKind._tk_union:
                UnionType unionType = (UnionType) returnType;
                inputStream = (org.omg.CORBA_2_3.portable.InputStream) returned.create_input_stream();
                UnionValue unionValue = new UnionValue(unionType);
                unionValue.read(inputStream);
                returnValue = unionValue;
                break;
View Full Code Here

Examples of org.apache.axis2.corba.idl.types.UnionType

                }
                value.setMemberValues(memberValues);
                return value;
            case TCKind._tk_enum: return new EnumValue((EnumType) type);
            case TCKind._tk_union:
                UnionType unionType = (UnionType) type;
                UnionValue unionValue = new UnionValue(unionType);
                members = unionType.getMembers();
                unionValue.setMemberName(members[0].getName());
                unionValue.setMemberType(members[0].getDataType());
                unionValue.setMemberValue(getEmptyValue(members[0].getDataType()));
                return unionValue;
            case TCKind._tk_alias:
View Full Code Here

Examples of org.apache.axis2.corba.idl.types.UnionType

    public UnionValue(UnionType unionType) {
        super(unionType);   
    }

    public void read(InputStream inputStream) {
        UnionType unionType = (UnionType) dataType;
        discriminator = read(unionType.getDiscriminatorType(), inputStream);
        populateValue();
        memberValue = read(getMemberType(), inputStream);
    }
View Full Code Here

Examples of org.apache.axis2.corba.idl.types.UnionType

            } else if (dataType instanceof UnionType) {
                XmlSchemaComplexType complexType = new XmlSchemaComplexType(xmlSchema);
                XmlSchemaChoice choice = new XmlSchemaChoice();
                XmlSchemaObjectCollection items = choice.getItems();

                UnionType unionType = (UnionType) dataType;
                Member[] members = unionType.getMembers();
                for (int i = 0; i < members.length; i++) {
                    items.add(generateSchemaforFieldsandProperties(xmlSchema, members[i].getDataType(),
                            members[i].getName(), true));
                }
View Full Code Here

Examples of org.apache.axis2.corba.idl.types.UnionType

            } else if (dataType instanceof UnionType) {
                XmlSchemaComplexType complexType = new XmlSchemaComplexType(xmlSchema, false);
                XmlSchemaChoice choice = new XmlSchemaChoice();
                List<XmlSchemaObject> items = choice.getItems();

                UnionType unionType = (UnionType) dataType;
                Member[] members = unionType.getMembers();
                for (int i = 0; i < members.length; i++) {
                    items.add(generateSchemaforFieldsandProperties(xmlSchema, members[i].getDataType(),
                            members[i].getName(), true));
                }
View Full Code Here

Examples of org.yinwang.pysonar.types.UnionType

        if (finalbody != null) {
            tpFinal = transformExpr(finalbody, s);
        }

        return new UnionType(tp1, tp2, tph, tpFinal);
    }
View Full Code Here

Examples of ptolemy.data.type.UnionType

        for (int i = 0; i < size; i++) {
            labels[i] = ((Port) portArray[i]).getName();
            types[i] = BaseType.UNKNOWN;
        }

        UnionType declaredType = new UnionType(labels, types);

        output.setTypeEquals(declaredType);

        // set the constraints between union fields and input ports
        List constraints = new LinkedList();

        // since the output port has a clone of the above UnionType, need to
        // get the type from the output port.
        UnionType outputType = (UnionType) output.getType();

        Iterator inputPorts = inputPortList().iterator();

        while (inputPorts.hasNext()) {
            TypedIOPort inputPort = (TypedIOPort) inputPorts.next();
            String label = inputPort.getName();
            Inequality inequality = new Inequality(inputPort.getTypeTerm(),
                    outputType.getTypeTerm(label));
            constraints.add(inequality);
        }

        return constraints;
    }
View Full Code Here

Examples of ptolemy.data.type.UnionType

        String[] labels = new String[1];
        labels[0] = _label;

        Type[] types = new Type[1];
        types[0] = _value.getType();
        return new UnionType(labels, types);
    }
View Full Code Here

Examples of ptolemy.data.type.UnionType

        for (int i = 0; i < size; i++) {
            labels[i] = ((Port) portArray[i]).getName();
            types[i] = BaseType.GENERAL;
        }

        UnionType declaredType = new UnionType(labels, types);

        //FIXME: is this what we want?
        input.setTypeAtMost(declaredType);

        // set the constraints between union fields and output ports
View Full Code Here

Examples of ptolemy.data.type.UnionType

         */
        public Object getValue() throws IllegalActionException {
            if (input.getType() == BaseType.UNKNOWN) {
                return BaseType.UNKNOWN;
            } else if (input.getType() instanceof UnionType) {
                UnionType type = (UnionType) input.getType();
                Type fieldType = type.get(_name);

                if (fieldType == null) {
                    return BaseType.UNKNOWN;
                } else {
                    return fieldType;
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.