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

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


        CorbaTypeImpl corbaTypeImpl = null;

        //schematypeName = checkPrefix(schematypeName);
        if (!anonymous) {
            // Create a Sequence
            Sequence corbaSeq = new Sequence();
            corbaSeq.setName(name.getLocalPart());
            corbaSeq.setQName(name);
            corbaSeq.setType(schematypeName);
            corbaSeq.setElemtype(arrayType);
            corbaSeq.setBound(bound);
            corbaSeq.setRepositoryID(WSDLToCorbaHelper.REPO_STRING
                                     + name.getLocalPart().replace('.', '/')
                                     + WSDLToCorbaHelper.IDL_VERSION);
            corbaTypeImpl = corbaSeq;
        } else {
            // Create a Anonymous Sequence
            Anonsequence corbaSeq = new Anonsequence();
            corbaSeq.setName(name.getLocalPart());
            corbaSeq.setQName(name);
            corbaSeq.setType(schematypeName);
            corbaSeq.setElemtype(arrayType);
            corbaSeq.setBound(bound);

            corbaTypeImpl = corbaSeq;
        }
        return corbaTypeImpl;
    }
View Full Code Here


        fixed.setScale(scale);
        return fixed;
    }
   
    public static CorbaTypeImpl getOctetCorbaType(QName name, QName stype, int bound) {
        Sequence seq = new Sequence();
        seq.setName(name.getLocalPart());
        seq.setQName(name);
        seq.setType(stype);       
        seq.setElemtype(CorbaConstants.NT_CORBA_OCTET);
        seq.setBound(bound);
        seq.setRepositoryID(WSDLToCorbaHelper.REPO_STRING
                            + name.getLocalPart().replace('.', '/')
                            + WSDLToCorbaHelper.IDL_VERSION);
        return seq;
    }
View Full Code Here

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

            if (!CorbaUtils.isElementFormQualified(serviceInfo, name.getNamespaceURI())) {
                elementName = new QName("", elementName.getLocalPart());
            }
        }
        if (baseType instanceof Sequence) {
            Sequence seqType = (Sequence)baseType;
            seqElementType = seqType.getElemtype();
            seqBound = seqType.getBound();
        } else {
            Anonsequence seqType = (Anonsequence)baseType;
            seqElementType = seqType.getElemtype();
            seqBound = seqType.getBound();
        }
        if (seqBound == 0) {
            // This is an unbounded sequence.  Store a 'template' object that we can use to create
            // new objects as needed
            CorbaObjectHandler elementObj =
View Full Code Here

                    // Sequence
                    //

                    nextSchemaType = duplicateXmlSchemaComplexType(newScope);

                    Sequence oldSequence = (Sequence) oldCorbaType;
                    Sequence newSequence = new Sequence();

                    newSequence.setQName(newQname);
                    newSequence.setType(nextSchemaType.getQName());
                    newSequence.setElemtype(oldSequence.getElemtype());
                    newSequence.setBound(oldSequence.getBound());
                    newSequence.setRepositoryID(newScope.toIDLRepositoryID());

                    nextCorbaType = newSequence;
                } else if (oldCorbaType instanceof Fixed) {
                    // Fixed
                    //
View Full Code Here

       
        // create an sequence of strings
        QName stringIdlType = new QName(CorbaConstants.NU_WSDL_CORBA, "string", CorbaConstants.NP_WSDL_CORBA);
        QName seqIdlType = new QName(CorbaConstants.NU_WSDL_CORBA, "sequence", CorbaConstants.NP_WSDL_CORBA);

        Sequence seqType = new Sequence();
        seqType.setBound(data.length);
        seqType.setElemtype(stringIdlType);       
        // name and respoitory ID of the sequence are not needed for this test

        // build the object holder for a sequence.
        TypeCode seqTC = orb.create_sequence_tc(data.length, orb.get_primitive_tc(TCKind.tk_string));
        CorbaSequenceHandler obj = new CorbaSequenceHandler(new QName("Seq"), seqIdlType, seqTC, seqType);
View Full Code Here

            if (type instanceof Anonsequence) {
                Anonsequence anonSeqType = (Anonsequence)type;
                seqElementType = anonSeqType.getElemtype();
                bound = anonSeqType.getBound();
            } else {
                Sequence seqType = (Sequence)type;
                seqElementType = seqType.getElemtype();
                bound = seqType.getBound();
            }

            QName name = null;
            if (schemaType instanceof XmlSchemaElement) {
                name = ((XmlSchemaElement) schemaType).getQName();
View Full Code Here

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

        Sequence seqType = (Sequence)type;
        CorbaSequenceHandler obj = new CorbaSequenceHandler(objName, objIdlType, objTypeCode, seqType);
        assertNotNull(obj);

        List<CorbaObjectHandler> objElements = new ArrayList<CorbaObjectHandler>();
        short seqData[] = { 1, 3, 5, 7 };
View Full Code Here

        long bound = 0;
        if (obj.getType() instanceof Anonsequence) {
            Anonsequence anonSeqType = (Anonsequence) obj.getType();
            bound = anonSeqType.getBound();
        } else {
            Sequence seqType = (Sequence) obj.getType();
            bound = seqType.getBound();
        }
        if (bound == 0) {
            seqElements.clear();
            // No predefined elements means an unbounded sequence.  Use the template element
            // to construct each object that is in the input stream.
View Full Code Here

    private CorbaTypeImpl generateCorbaSequence(CorbaTypeImpl ctype,
                                                XmlSchemaType schemaType,
                                                Scope scopedName,
                                                long bound) {
        //create the corba sequence
        Sequence corbaSeq = new Sequence();
        if (bound == -1) {
            bound = 0;
        }               
        corbaSeq.setBound(bound);
        corbaSeq.setQName(new QName(typeMap.getTargetNamespace(), scopedName.toString()));
        corbaSeq.setType(schemaType.getQName());
        corbaSeq.setElemtype(ctype.getQName());
        corbaSeq.setRepositoryID(scopedName.toIDLRepositoryID());

        return corbaSeq;
    }
View Full Code Here

TOP

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

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.