Package org.apache.schemas.yoko.bindings.corba

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


            Array arr = (Array)mapType.getStructOrExceptionOrUnion().get(0);           
            assertEquals("ElementType is incorrect for Array Type", "X._5_A",
                         arr.getElemtype().getLocalPart());
           
            Anonarray arr2 = (Anonarray)mapType.getStructOrExceptionOrUnion().get(3);
            assertEquals("ElementType is incorrect for Anon Array Type", "X._4_A",
                         arr2.getElemtype().getLocalPart());
           
            Anonarray arr3 = (Anonarray)mapType.getStructOrExceptionOrUnion().get(2);
            assertEquals("ElementType is incorrect for Anon Array Type", "X._1_A",
                         arr3.getElemtype().getLocalPart());
           
           
            Anonsequence seq = (Anonsequence)mapType.getStructOrExceptionOrUnion().get(5);
            assertEquals("Name is incorrect for Anon Array Type", "X._1_A",
                         seq.getName());                       
View Full Code Here


    }
   
    private IdlType createAnonArray(CorbaTypeImpl ctype, IdlScopeBase scope, String local)
        throws Exception {
        IdlType idlType = null;
        Anonarray s = (Anonarray)ctype;
        IdlType base = findType(s.getElemtype());       
        int bound = (int)s.getBound();
        idlType = IdlAnonArray.create(scope, base, bound);
        scope.addToScope(idlType);
        return idlType;
    }
View Full Code Here

                                       + WSDLToCorbaHelper.IDL_VERSION);
            corbaArray.setQName(name);           
            corbatype = corbaArray;
        } else {
            //Create an Anonymous Array
            Anonarray corbaArray = new Anonarray();
            corbaArray.setName(name.getLocalPart());
            corbaArray.setType(schematypeName);           
            corbaArray.setElemtype(arrayType);
            corbaArray.setBound(bound);
            corbaArray.setQName(name);                       
            corbatype = corbaArray;
        }          
        return corbatype;
    }
View Full Code Here

        if (baseType instanceof Array) {
            Array arrayType = (Array)baseType;
            arrayElementType = arrayType.getElemtype();
            arrayBound = arrayType.getBound();
        } else {
            Anonarray anonArrayType = (Anonarray)baseType;
            arrayElementType = anonArrayType.getElemtype();
            arrayBound = anonArrayType.getBound();
        }
        for (int i = 0; i < arrayBound; ++i) {
            CorbaObjectHandler elementObj =
                initializeObjectHandler(orb, elementName, arrayElementType, el, typeMaps, serviceInfo);
            ((CorbaArrayHandler)obj).addElement(elementObj);
View Full Code Here

        //    tc = orb.create_alias_tc(aliasType.getRepositoryID(),
        //                             aliasType.getName(),
        //                             getTypeCode(orb, aliasType.getBasetype(), typeMaps));
        //} else if (obj instanceof Anonarray) {
        if (obj instanceof Anonarray) {
            Anonarray anonArrayType = (Anonarray)obj;
            tc = orb.create_array_tc((int) anonArrayType.getBound(),
                                     getTypeCode(orb, anonArrayType.getElemtype(), typeMaps));
        } else if (obj instanceof Anonfixed) {
            Anonfixed anonFixedType = (Anonfixed) obj;
            tc = orb.create_fixed_tc((short) anonFixedType.getDigits(), (short) anonFixedType.getScale());
        } else if (obj instanceof Anonsequence) {
            Anonsequence anonSeqType = (Anonsequence)obj;
View Full Code Here

            QName arrayElemType = null;
            long arrayBound = 0;
            CorbaTypeImpl type = CorbaUtils.getCorbaType(idlType, typeMaps);
            // Arrays and anonymous arrays can be handled by the same method
            if (type instanceof Anonarray) {
                Anonarray anonArrayType = (Anonarray)type;
                arrayElemType = anonArrayType.getElemtype();
                arrayBound = anonArrayType.getBound();
            } else {
                Array arrayType = (Array)type;
                arrayElemType = arrayType.getElemtype();
                arrayBound = arrayType.getBound();
            }
View Full Code Here

        array.setType(type);
        return array;
    }

    private Anonarray generateCorbaAnonarray(String name, Long size, QName type) {
        Anonarray anonarray = new Anonarray();
        anonarray.setQName(new QName(typeMap.getTargetNamespace(), name));
        anonarray.setBound(size);
        anonarray.setType(type);
        return anonarray;
    }
View Full Code Here

            Array arr = (Array)mapType.getStructOrExceptionOrUnion().get(0);           
            assertEquals("ElementType is incorrect for Array Type", "X._5_A",
                         arr.getElemtype().getLocalPart());
           
            Anonarray arr2 = (Anonarray)mapType.getStructOrExceptionOrUnion().get(3);
            assertEquals("ElementType is incorrect for Anon Array Type", "X._4_A",
                         arr2.getElemtype().getLocalPart());
           
            Anonarray arr3 = (Anonarray)mapType.getStructOrExceptionOrUnion().get(2);
            assertEquals("ElementType is incorrect for Anon Array Type", "X._1_A",
                         arr3.getElemtype().getLocalPart());
           
           
            Anonsequence seq = (Anonsequence)mapType.getStructOrExceptionOrUnion().get(5);
            assertEquals("Name is incorrect for Anon Array Type", "X._1_A",
                         seq.getName());                       
View Full Code Here

            corbaArray.setRepositoryID(repoString + name.getLocalPart().replace('.', '/') + idlversion);
            corbaArray.setQName(name);           
            corbatype = corbaArray;
        } else {
            //Create an Anonymous Array
            Anonarray corbaArray = new Anonarray();
            corbaArray.setName(name.getLocalPart());
            corbaArray.setType(schematypeName);           
            corbaArray.setElemtype(arrayType);
            corbaArray.setBound(bound);
            corbaArray.setQName(name);                       
            corbatype = corbaArray;
        }          
        return corbatype;
    }
View Full Code Here

        if (baseType instanceof Array) {
            Array arrayType = (Array)baseType;
            arrayElementType = arrayType.getElemtype();
            arrayBound = arrayType.getBound();
        } else {
            Anonarray anonArrayType = (Anonarray)baseType;
            arrayElementType = anonArrayType.getElemtype();
            arrayBound = anonArrayType.getBound();
        }
        for (int i = 0; i < arrayBound; ++i) {
            QName elementName = new QName(name.getNamespaceURI(), "item");
            CorbaObjectHandler elementObj =
                initializeObjectHandler(orb, elementName, arrayElementType, typeMaps);
View Full Code Here

TOP

Related Classes of org.apache.schemas.yoko.bindings.corba.Anonarray

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.