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

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


            assertEquals("Name is incorrect for Array Type", "X._1_S",
                         str.getName());
            assertEquals("Type is incorrect for AnonString Type", "string",
                         str.getType().getLocalPart());
           
            Anonfixed fx = (Anonfixed)mapType.getStructOrExceptionOrUnion().get(3);
            assertEquals("Name is incorrect for Anon Array Type", "X._2_S",
                         fx.getName());
            assertEquals("Type is incorrect for AnonFixed Type", "decimal",
                         fx.getType().getLocalPart());
           
            Struct struct = (Struct)mapType.getStructOrExceptionOrUnion().get(1);
            assertEquals("Name is incorrect for Anon Array Type", "X.S",
                         struct.getName());           
            assertEquals("Type is incorrect for Struct Type", "X.S",
View Full Code Here


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

            }
        }

        if (!boundedDecimal) {
            if (anonymous) {
                Anonfixed fixed = (Anonfixed)corbaTypeImpl;
                digits = Integer.parseInt(String.valueOf(fixed.getDigits()));
            } else {
                Fixed fixed = (Fixed)corbaTypeImpl;
                digits = Integer.parseInt(String.valueOf(fixed.getDigits()));
            }           
        }

        if (!boundedScale) {
            if (anonymous) {
                Anonfixed fixed = (Anonfixed)corbaTypeImpl;
                scale = Integer.parseInt(String.valueOf(fixed.getScale()));
            } else {
                Fixed fixed = (Fixed)corbaTypeImpl;
                scale = Integer.parseInt(String.valueOf(fixed.getScale()));
            }
        }

        if (boundedDecimal || boundedScale) {
            if (anonymous) {
View Full Code Here

                              + WSDLToCorbaHelper.IDL_VERSION);      
        return fixed;
    }
   
    public static CorbaTypeImpl getAnonFixedCorbaType(QName name, QName stype, int digits, int scale) {
        Anonfixed fixed = new Anonfixed();
        fixed.setName(name.getLocalPart());
        fixed.setQName(name);
        fixed.setType(stype);
        fixed.setDigits(digits);
        fixed.setScale(scale);
        return fixed;
    }
View Full Code Here

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

            assertEquals("Name is incorrect for Array Type", "X._1_S",
                         str.getName());
            assertEquals("Type is incorrect for AnonString Type", "string",
                         str.getType().getLocalPart());
           
            Anonfixed fx = (Anonfixed)mapType.getStructOrExceptionOrUnion().get(2);
            assertEquals("Name is incorrect for Anon Array Type", "X._2_S",
                         fx.getName());
            assertEquals("Type is incorrect for AnonFixed Type", "decimal",
                         fx.getType().getLocalPart());
           
            Struct struct = (Struct)mapType.getStructOrExceptionOrUnion().get(0);
            assertEquals("Name is incorrect for Anon Array Type", "X.S",
                         struct.getName());           
            assertEquals("Type is incorrect for Struct Type", "X.S",
View Full Code Here

            }
        }

        if (!boundedDecimal) {
            if (anonymous) {
                Anonfixed fixed = (Anonfixed)corbaTypeImpl;
                digits = Integer.parseInt(String.valueOf(fixed.getDigits()));
            } else {
                Fixed fixed = (Fixed)corbaTypeImpl;
                digits = Integer.parseInt(String.valueOf(fixed.getDigits()));
            }           
        }

        if (!boundedScale) {
            if (anonymous) {
                Anonfixed fixed = (Anonfixed)corbaTypeImpl;
                scale = Integer.parseInt(String.valueOf(fixed.getScale()));
            } else {
                Fixed fixed = (Fixed)corbaTypeImpl;
                scale = Integer.parseInt(String.valueOf(fixed.getScale()));
            }
        }

        if (boundedDecimal || boundedScale) {
            if (anonymous) {
View Full Code Here

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

                mappingType.getStructOrExceptionOrUnion().add(anonstringType);
            } else if (currentNode.getNodeName().equals("corba:anonwstring")) {
                Anonstring anonstringType = getAnonWStringDefinition(currentNode, def);
                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")) {
View Full Code Here

        }
        return anonStringType;
    }

    public Anonfixed getAnonFixedDefinition(Node node, Definition def) {
        Anonfixed anonFixedType = new Anonfixed();

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

TOP

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

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.