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

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


        }
        return anonymous;
    }
   
    public CorbaTypeImpl getFixedCorbaType(QName name, QName stype, int digits, int scale) {       
        Fixed fixed = new Fixed();
        fixed.setName(name.getLocalPart());
        fixed.setQName(name);
        fixed.setType(stype);
        fixed.setDigits(digits);
        fixed.setScale(scale);       
        return fixed;
    }
View Full Code Here


        BigDecimal fixedValue = new BigDecimal("123.67");
        objName = new QName("member2");
        objIdlType = new QName(nestedNamespaceURI, "BasicFixed", nestedPrefix);
        type = CorbaUtils.getCorbaType(objIdlType, bindingImpl.getCorbaTypeMaps());
        assertTrue(type instanceof Fixed);
        Fixed fixedType = (Fixed)type;
        objTypeCode = CorbaUtils.getTypeCode(orb, objIdlType, bindingImpl.getCorbaTypeMaps());
        CorbaFixedHandler member2Obj = new CorbaFixedHandler(objName, objIdlType, objTypeCode, fixedType);
        assertNotNull(member2Obj);
        obj.addMember(member2Obj);
       
View Full Code Here

    public void testReadWriteStaxFixed() {
        QName objName = new QName("object");
        QName objIdlType = new QName(staxTestNamespaceURI, "TestFixed", staxTestPrefix);
        CorbaTypeImpl type = CorbaUtils.getCorbaType(objIdlType, staxBindingImpl.getCorbaTypeMaps());
        assertTrue(type instanceof Fixed);
        Fixed fixedType = (Fixed)type;
        TypeCode objTypeCode = CorbaUtils.getTypeCode(orb, objIdlType, staxBindingImpl.getCorbaTypeMaps());
        CorbaFixedHandler obj = new CorbaFixedHandler(objName, objIdlType, objTypeCode, fixedType);
        assertNotNull(obj);

        java.math.BigDecimal fixedValue = new java.math.BigDecimal("12345.67");
View Full Code Here

                mappingType.getStructOrExceptionOrUnion().add(structType);
            } else if (currentNode.getNodeName().equals("corba:exception")) {
                Exception exceptType = getExceptionDefinition(currentNode, def);
                mappingType.getStructOrExceptionOrUnion().add(exceptType);
            } else if (currentNode.getNodeName().equals("corba:fixed")) {
                Fixed fixedType = getFixedDefinition(currentNode, def);
                mappingType.getStructOrExceptionOrUnion().add(fixedType);
            } else if (currentNode.getNodeName().equals("corba:union")) {
                Union unionType = getUnionDefinition(currentNode, def);
                mappingType.getStructOrExceptionOrUnion().add(unionType);
            } else if (currentNode.getNodeName().equals("corba:alias")) {
View Full Code Here

        }
        return exceptType;
    }

    public Fixed getFixedDefinition(Node node, Definition def) {
        Fixed fixedType = new Fixed();

        // Store information about the fixed type
        NamedNodeMap fixedAttributes = node.getAttributes();
        for (int i = 0; i < fixedAttributes.getLength(); ++i) {
            if (fixedAttributes.item(i).getNodeName().equals("name")) {
                fixedType.setName(fixedAttributes.item(i).getNodeValue());
            } else if (fixedAttributes.item(i).getNodeName().equals("repositoryID")) {
                fixedType.setRepositoryID(fixedAttributes.item(i).getNodeValue());
            } else if (fixedAttributes.item(i).getNodeName().equals("digits")) {
                fixedType.setDigits(new Long(fixedAttributes.item(i).getNodeValue()));
            } else if (fixedAttributes.item(i).getNodeName().equals("scale")) {
                fixedType.setScale(new Long(fixedAttributes.item(i).getNodeValue()));
            }
        }
        return fixedType;
    }
View Full Code Here

        return idlType;
    }
   
    private IdlType createFixed(CorbaTypeImpl ctype, IdlScopeBase scope, String local) {
        IdlType idlType = null;
        Fixed f = (Fixed)ctype;    
        Long digits = f.getDigits();
        Long scale = f.getScale();       
        idlType = IdlFixed.create(scope, local, digits.intValue(),  
                                  scale.intValue());
        scope.addToScope(idlType);
        return idlType;
    }
View Full Code Here

                                              getTypeCode(orb, member.getIdltype(), typeMaps), null);
            }
            String name = exceptType.getName();
            tc = orb.create_exception_tc(exceptType.getRepositoryID(), name, members);
        } else if (obj instanceof Fixed) {
            Fixed fixedType = (Fixed) obj;
            tc = orb.create_fixed_tc((short) fixedType.getDigits(), (short) fixedType.getScale());
        } else if (obj instanceof Sequence) {
            Sequence seqType = (Sequence)obj;
            tc = orb.create_sequence_tc((int) seqType.getBound(),
                                        getTypeCode(orb, seqType.getElemtype(), typeMaps));
        } else if (obj instanceof Struct) {
View Full Code Here

TOP

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

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.