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

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


        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
            QName elementName = new QName(name.getNamespaceURI(), "item");
View Full Code Here


                mappingType.getStructOrExceptionOrUnion().add(anonstringType);
            } else if (currentNode.getNodeName().equals("corba:anonfixed")) {
                Anonfixed anonfixedType = getAnonFixedDefinition(currentNode, def);
                mappingType.getStructOrExceptionOrUnion().add(anonfixedType);
            } else if (currentNode.getNodeName().equals("corba:anonsequence")) {
                Anonsequence anonsequenceType = getAnonSequenceDefinition(currentNode, def);
                mappingType.getStructOrExceptionOrUnion().add(anonsequenceType);
            } else if (currentNode.getNodeName().equals("corba:anonarray")) {
                Anonarray anonarrayType = getAnonArrayDefinition(currentNode, def);
                mappingType.getStructOrExceptionOrUnion().add(anonarrayType);
            } else {
View Full Code Here

        }
        return anonFixedType;
    }

    public Anonsequence getAnonSequenceDefinition(Node node, Definition def) {
        Anonsequence anonSequenceType = new Anonsequence();

        // Store information about the sequence
        NamedNodeMap anonSequenceAttributes = node.getAttributes();
        for (int i = 0; i < anonSequenceAttributes.getLength(); ++i) {
            if (anonSequenceAttributes.item(i).getNodeName().equals("name")) {
                anonSequenceType.setName(anonSequenceAttributes.item(i).getNodeValue());
            } else if (anonSequenceAttributes.item(i).getNodeName().equals("elemtype")) {
                String elemType = anonSequenceAttributes.item(i).getNodeValue();
                int seperatorIndex = elemType.indexOf(':');
                String prefix = elemType.substring(0, seperatorIndex);
                String localPart = elemType.substring(seperatorIndex + 1, elemType.length());
                anonSequenceType.setElemtype(new QName(def.getNamespace(prefix), localPart, prefix));
            } else if (anonSequenceAttributes.item(i).getNodeName().equals("bound")) {
                anonSequenceType.setBound(Long.parseLong(anonSequenceAttributes.item(i).getNodeValue()));
            }
        }
        return anonSequenceType;
    }
View Full Code Here

       
        try {
            QName seqElementType = null;
            long bound = 0;
            if (typeDefinition instanceof Anonsequence) {
                Anonsequence anonSeqType = (Anonsequence)typeDefinition;
                seqElementType = anonSeqType.getElemtype();
                bound = anonSeqType.getBound();
            } else {
                Sequence seqType = (Sequence)typeDefinition;
                seqElementType = seqType.getElemtype();
                bound = seqType.getBound();
            }
View Full Code Here

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

                                     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;
            tc = orb.create_sequence_tc((int) anonSeqType.getBound(),
                                        getTypeCode(orb, anonSeqType.getElemtype(), typeMaps));
        } else if (obj instanceof Anonstring) {
            Anonstring anonStringType = (Anonstring)obj;
            tc = orb.create_string_tc((int)anonStringType.getBound());
        } else if (obj instanceof Anonwstring) {
            Anonwstring anonWStringType = (Anonwstring)obj;
View Full Code Here

TOP

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

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.