Examples of Unionbranch


Examples of org.apache.schemas.yoko.bindings.corba.Unionbranch

       
        TypeCode discTC = getTypeCode(orb, unionType.getDiscriminator(), typeMaps);
        Map<String, UnionMember> members = new LinkedHashMap<String, UnionMember>();
        List<Unionbranch> branches = unionType.getUnionbranch();
        for (Iterator<Unionbranch> branchIter = branches.iterator(); branchIter.hasNext();) {
            Unionbranch branch = branchIter.next();
            List<CaseType> cases = branch.getCase();
            for (Iterator<CaseType> caseIter = cases.iterator(); caseIter.hasNext();) {
                CaseType cs = caseIter.next();
                UnionMember member = new UnionMember();
                member.name = branch.getName();
                member.type = getTypeCode(orb, branch.getIdltype(), typeMaps);
                member.label = orb.create_any();
               
                // We need to insert the labels in a way that depends on the type of the discriminator. 
                // According to the CORBA specification, the following types are permissable as
                // discriminator types:
View Full Code Here

Examples of org.apache.schemas.yoko.bindings.corba.Unionbranch

        }
       
        // Now find the label in the union to get the right case
        Union unionType = (Union)unionHandler.getType();
        List<Unionbranch> branches = unionType.getUnionbranch();
        Unionbranch defaultBranch = null;
        boolean caseFound = false;
        for (Iterator<Unionbranch> iter = branches.iterator(); iter.hasNext();) {
            Unionbranch branch = iter.next();
            if (branch.isSetDefault() && branch.isDefault()) {
                defaultBranch = branch;
            }
            List<CaseType> cases = branch.getCase();
            for (Iterator<CaseType> caseIter = cases.iterator(); caseIter.hasNext();) {
                CaseType c = caseIter.next();
                if (c.getLabel().equals(discLabel)) {
                    CorbaObjectHandler branchObj = unionHandler.getBranchByName(branch.getName());
                    this.read(branchObj);
                    unionHandler.setValue(branch.getName(), branchObj);
                    caseFound = true;
                    break;
                }
            }
            if (caseFound) {
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.