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

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


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


            WSDLToIDLAction idlgen = new WSDLToIDLAction();
            idlgen.setBindingName("XCORBABinding");
            idlgen.setOutputFile("atype.idl");
            idlgen.generateIDL(model);

            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());
           
View Full Code Here

           
        //schematypeName = checkPrefix(schematypeName);

        if (!anonymous) {
            //Create an Array
            Array corbaArray = new Array();
            corbaArray.setName(name.getLocalPart());
            corbaArray.setType(schematypeName);
            corbaArray.setElemtype(arrayType);
            corbaArray.setBound(bound);
            corbaArray.setRepositoryID(WSDLToCorbaHelper.REPO_STRING
                                       + name.getLocalPart().replace('.', '/')
                                       + 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

        QName elementName = el.getQName();
        if (!CorbaUtils.isElementFormQualified(serviceInfo, name.getNamespaceURI())) {
            elementName = new QName("", elementName.getLocalPart());
        }
        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();
        }
View Full Code Here

        int data[] = { 1, 1, 2, 3, 5, 8, 13, 21 };
       
        // create an array of longs
        QName longIdlType = new QName(CorbaConstants.NU_WSDL_CORBA, "long", CorbaConstants.NP_WSDL_CORBA);
        QName arrayIdlType = new QName(CorbaConstants.NU_WSDL_CORBA, "array", CorbaConstants.NP_WSDL_CORBA);
        Array arrayType = new Array();
        arrayType.setBound(data.length);
        arrayType.setElemtype(longIdlType);
        // name and respoitory ID of the array are not needed for this test

        // build the object holder for an array.
        TypeCode arrayTC = orb.create_array_tc(data.length, orb.get_primitive_tc(TCKind.tk_long));
        CorbaArrayHandler obj = new CorbaArrayHandler(new QName("Array"), arrayIdlType, arrayTC, arrayType);
View Full Code Here

            tc = orb.create_string_tc((int)anonStringType.getBound());
        } else if (obj instanceof Anonwstring) {
            Anonwstring anonWStringType = (Anonwstring)obj;
            tc = orb.create_wstring_tc((int)anonWStringType.getBound());
        } else if (obj instanceof Array) {
            Array arrayType = (Array)obj;
            tc = orb.create_array_tc((int) arrayType.getBound(),
                                     getTypeCode(orb, arrayType.getElemtype(), typeMaps));
        //} else if (obj instanceof Const) {
        //    Const constType = (Const)obj;
        //    tc = getTypeCode(orb, constType.getIdltype(), typeMaps);
        } else if (obj instanceof Enum) {
            Enum enumType = (Enum)obj;
View Full Code Here

            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();
            }
            XmlSchemaElement el = CorbaHandlerUtils.getXmlSchemaSequenceElement(schemaType, serviceInfo);

            QName name;
            if (isTopLevel) {
View Full Code Here

        QName objIdlType = new QName(staxTestNamespaceURI, "TestArray", staxTestPrefix);
        TypeCode objTypeCode = CorbaUtils.getTypeCode(orb, objIdlType, staxObject.getTypeMaps());
        CorbaTypeImpl type = CorbaUtils.getCorbaType(objIdlType, staxObject.getTypeMaps());
        assertTrue(type instanceof Array);

        Array arrayType = (Array)type;
        CorbaArrayHandler obj = new CorbaArrayHandler(objName, objIdlType, objTypeCode, arrayType);
        assertNotNull(obj);

        List<CorbaObjectHandler> objElements = new ArrayList<CorbaObjectHandler>();
        int arrayData[] = { 2, 4, 6, 8, 10 };
View Full Code Here

        return complexType;
    }

    private Array generateCorbaArray(Scope scopedName, Long size, QName type) {
        Array array = new Array();
        array.setQName(new QName(typeMap.getTargetNamespace(), scopedName.toString()));
        array.setBound(size);
        array.setRepositoryID(scopedName.toIDLRepositoryID());
        array.setType(type);
        return array;
    }
View Full Code Here

        CorbaObjectReader reader = new CorbaObjectReader(iStream);

        // create an array of longs
        QName longIdlType = new QName(CorbaConstants.NU_WSDL_CORBA, "long", CorbaConstants.NP_WSDL_CORBA);
        QName arrayIdlType = new QName(CorbaConstants.NU_WSDL_CORBA, "array", CorbaConstants.NP_WSDL_CORBA);
        Array arrayType = new Array();
        arrayType.setBound(data.length);
        arrayType.setElemtype(longIdlType);
        // name and respoitory ID of the array are not needed for this test

        // build the object holder for an array.
        TypeCode arrayTC = orb.create_array_tc(data.length, orb.get_primitive_tc(TCKind.tk_long));
        CorbaArrayHandler obj = new CorbaArrayHandler(new QName("Array"), arrayIdlType, arrayTC, arrayType);
View Full Code Here

TOP

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

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.