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

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


            WSDLToIDLAction idlgen = new WSDLToIDLAction();
            idlgen.setBindingName("TypeInheritanceCORBABinding");
            idlgen.setOutputFile("typeInherit.idl");
            idlgen.generateIDL(model);

            Anonstring str = (Anonstring)mapType.getStructOrExceptionOrUnion().get(6);
            assertEquals("Name is incorrect for AnonString Type", "attrib2Type",
                         str.getName());
            assertEquals("Type is incorrect for AnonString Type", "string",
                         str.getType().getLocalPart());           

            Union un = (Union)mapType.getStructOrExceptionOrUnion().get(7);
            assertEquals("Name is incorrect for Union Type", "attrib2Type_nil",
                         un.getName());
            assertEquals("Type is incorrect for Union Type", "attrib2",
View Full Code Here


    private IdlType checkAnon(CorbaTypeImpl corbaTypeImpl, IdlScopeBase scope,
                              String local) throws Exception {
        IdlType result = null;
       
        if (corbaTypeImpl instanceof Anonstring) {
            Anonstring as = (Anonstring)corbaTypeImpl;  
            Long lbound = as.getBound();
            int bound = lbound.intValue()
            result = IdlString.create(bound);       
        }
        return result;
    }
View Full Code Here

            WSDLToIDLAction idlgen = new WSDLToIDLAction();
            idlgen.setBindingName("XCORBABinding");
            idlgen.setOutputFile("atype.idl");
            idlgen.generateIDL(model);

            Anonstring str = (Anonstring)mapType.getStructOrExceptionOrUnion().get(2);
            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",
View Full Code Here

            throw new Exception("illegal number" , e);
        }

        if (boundedString) {
            // bounded string
            Anonstring anonString = new Anonstring();
            anonString.setBound(bound);
            anonString.setName(name.getLocalPart());
            anonString.setQName(name);
            anonString.setType(corbaTypeImpl.getQName());           
            corbaTypeImpl = anonString;          
        }
        return corbaTypeImpl;
    }
View Full Code Here

        } 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;
            tc = orb.create_wstring_tc((int)anonWStringType.getBound());
        } else if (obj instanceof Array) {
            Array arrayType = (Array)obj;
View Full Code Here

        schema.getItems().add(simpleType);
        schema.addType(simpleType);
        setSchemaType(simpleType);

        // corba:anonstring
        Anonstring anonstring = new Anonstring();
        anonstring.setQName(new QName(typeMap.getTargetNamespace(), stringScopedName.toString()));
        anonstring.setBound(new Long(boundNode.toString()));
        anonstring.setType(simpleType.getQName());
       
        // add corba:anonstring
        typeMap.getStructOrExceptionOrUnion().add(anonstring);
        setCorbaType(anonstring);
    }
View Full Code Here

        Scope anonstringScopedName = new Scope(getScope(), "_1_" + stringScopedName.tail());
        String anonstringName = anonstringScopedName.toString();
        CorbaTypeImpl anon = null;
        if (stringNode.getType() == IDLTokenTypes.LITERAL_string) {
            // corba:anonstring
            Anonstring anonstring = new Anonstring();
            anonstring.setQName(new QName(typeMap.getTargetNamespace(), anonstringName));
            anonstring.setBound(new Long(boundNode.toString()));
            anonstring.setType(simpleType.getQName());

            anon = anonstring;
           
        } else if (stringNode.getType() == IDLTokenTypes.LITERAL_wstring) {
            // corba:anonwstring
View Full Code Here

            WSDLToIDLAction idlgen = new WSDLToIDLAction();
            idlgen.setBindingName("TypeInheritanceCORBABinding");
            idlgen.setOutputFile("typeInherit.idl");
            idlgen.generateIDL(model);

            Anonstring str = (Anonstring)mapType.getStructOrExceptionOrUnion().get(6);
            assertEquals("Name is incorrect for AnonString Type", "attrib2Type",
                         str.getName());
            assertEquals("Type is incorrect for AnonString Type", "string",
                         str.getType().getLocalPart());           

            Union un = (Union)mapType.getStructOrExceptionOrUnion().get(7);
            assertEquals("Name is incorrect for Union Type", "attrib2Type_nil",
                         un.getName());
            assertEquals("Type is incorrect for Union Type", "attrib2",
View Full Code Here

            WSDLToIDLAction idlgen = new WSDLToIDLAction();
            idlgen.setBindingName("XCORBABinding");
            idlgen.setOutputFile("atype.idl");
            idlgen.generateIDL(model);

            Anonstring str = (Anonstring)mapType.getStructOrExceptionOrUnion().get(1);
            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",
View Full Code Here

            throw new Exception("illegal number" , e);
        }

        if (boundedString) {
            // bounded string
            Anonstring anonString = new Anonstring();
            anonString.setBound(bound);
            anonString.setName(name.getLocalPart());
            anonString.setQName(name);
            anonString.setType(corbaTypeImpl.getQName());           
            corbaTypeImpl = anonString;          
        }
        return corbaTypeImpl;
    }
View Full Code Here

TOP

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

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.