Package org.apache.yoko.bindings.corba.types

Examples of org.apache.yoko.bindings.corba.types.CorbaArrayHandler.addElement()


            for (int i = 0; i < arrayBound; ++i) {
                if (nestedArray) {
                    reader.nextEvent().asStartElement();
                }
                CorbaObjectHandler element = readObjectFromStax(reader, arrayElemType, el, true);
                obj.addElement(element);
                if (nestedArray) {
                    reader.nextEvent().asEndElement();
                }
            }
            if (isTopLevel) {
View Full Code Here


        for (int i = 0; i < data.length; ++i) {
            CorbaPrimitiveHandler nestedObj =
                new CorbaPrimitiveHandler(new QName("item"), longIdlType,
                                      orb.get_primitive_tc(TCKind.tk_long), null);
            nestedObj.setValueFromData(Integer.toString(data[i]));
            obj.addElement(nestedObj);
        }

        Buffer buf = new Buffer();
        OutputStream oStream = new OutputStream(buf);
        CorbaObjectWriter writer = new CorbaObjectWriter(oStream);
View Full Code Here

            QName elName = new QName("item");
            QName elIdlType = CorbaConstants.NT_CORBA_LONG;
            TypeCode elTC = orb.get_primitive_tc(TCKind.tk_long);
            CorbaPrimitiveHandler el = new CorbaPrimitiveHandler(elName, elIdlType, elTC, null);
            el.setValue(Integer.valueOf(arrayData[i]));
            obj.addElement(el);
            objElements.add(el);
        }
       
        XMLInputFactory inputFactory = XMLInputFactory.newInstance();
        XMLOutputFactory outputFactory = XMLOutputFactory.newInstance();
View Full Code Here

        CorbaArrayHandler obj = new CorbaArrayHandler(new QName("Array"), arrayIdlType, arrayTC, arrayType);
        for (int i = 0; i < data.length; ++i) {
            CorbaObjectHandler nestedObj =
                new CorbaPrimitiveHandler(new QName("item"), longIdlType,
                                      orb.get_primitive_tc(TCKind.tk_long), null);
            obj.addElement(nestedObj);
        }
       
        reader.readArray(obj);
        int length = obj.getElements().size();
        for (int i = 0; i < length; ++i) {
View Full Code Here

        CorbaArrayHandler obj = new CorbaArrayHandler(new QName("Array"), arrayIdlType, arrayTC, arrayType);
        for (int i = 0; i < data.length; ++i) {
            CorbaObjectHandler nestedObj =
                new CorbaPrimitiveHandler(new QName("item"), longIdlType,
                                      orb.get_primitive_tc(TCKind.tk_long), null);
            obj.addElement(nestedObj);
        }
       
        reader.readArray(obj);
        int length = obj.getElements().size();
        for (int i = 0; i < length; ++i) {
View Full Code Here

        for (int i = 0; i < data.length; ++i) {
            CorbaPrimitiveHandler nestedObj =
                new CorbaPrimitiveHandler(new QName("item"), longIdlType,
                                      orb.get_primitive_tc(TCKind.tk_long), null);
            nestedObj.setValueFromData(Integer.toString(data[i]));
            obj.addElement(nestedObj);
        }

        Buffer buf = new Buffer();
        OutputStream oStream = new OutputStream(buf);
        CorbaObjectWriter writer = new CorbaObjectWriter(oStream);
View Full Code Here

            QName elName = new QName("item");
            QName elIdlType = CorbaConstants.NT_CORBA_LONG;
            TypeCode elTC = orb.get_primitive_tc(TCKind.tk_long);
            CorbaPrimitiveHandler el = new CorbaPrimitiveHandler(elName, elIdlType, elTC, null);
            el.setValue(Long.valueOf(arrayData[i]));
            obj.addElement(el);
            objElements.add(el);
        }
       
        XMLInputFactory inputFactory = XMLInputFactory.newInstance();
        XMLOutputFactory outputFactory = XMLOutputFactory.newInstance();
View Full Code Here

            }
            StartElement arrayStartEl = reader.nextEvent().asStartElement();
            obj = new CorbaArrayHandler(arrayStartEl.getName(), idlType, tc, typeDefinition);
            for (int i = 0; i < arrayBound; ++i) {
                CorbaObjectHandler element = readObjectFromStax(reader, arrayElemType, true);
                obj.addElement(element);
            }
            reader.nextEvent().asEndElement();
        } catch (java.lang.Exception ex) {
            LOG.log(Level.SEVERE, "Received exception while reading object of type " + idlType);
            throw new CorbaBindingException("Error while reading array corba type", ex);
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.