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

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


                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 {
                // TODO: How do we want to handle this?
            }
        }
View Full Code Here


        }
        return anonSequenceType;
    }

    public Anonarray getAnonArrayDefinition(Node node, Definition def) {
        Anonarray anonArrayType = new Anonarray();

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

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

        return idlType;
    }
   
    private IdlType createAnonArray(CorbaTypeImpl ctype, IdlScopeBase scope, String local) {
        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

            Alias aliasType = (Alias)obj;
            tc = orb.create_alias_tc(aliasType.getRepositoryID(),
                                     aliasType.getName(),
                                     getTypeCode(orb, aliasType.getBasetype(), typeMaps));
        } else 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

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.