Package org.apache.yoko.tools.common.idltypes

Examples of org.apache.yoko.tools.common.idltypes.IdlScopeBase


        if (pos != -1) {
            nm[nm.length - 1] = nm[nm.length - 1].substring(0, pos);
        }

        IdlScopeBase parent = root;

        if (nm.length > 1) {
            for (int i = 0; i < nm.length - 1; ++i) {
                IdlModule mod = IdlModule.create(parent, nm[i]);
                parent.addToScope(mod);
                parent = mod;
            }
        }
       
        intf = IdlInterface.create(parent, nm[nm.length - 1]);
        parent.holdForScope(intf);
        try {
            getAllIdlTypes();
            collectIdlDefns(binding);
            root.flush();
        } catch (Exception ex) {
            ex.printStackTrace();
        }
        parent.promoteHeldToScope();
        root.write(printWriter);
        printWriter.close();
    }
View Full Code Here


            org.apache.cxf.common.i18n.Message msg =
                new org.apache.cxf.common.i18n.Message(msgStr, LOG);
            throw new Exception(msg.toString());               
        }
       
        IdlScopeBase scope = root;
        String dotScopedName = "";

        for (int i = 0; i < name.length - 1; ++i) {
            dotScopedName += name[i];

            // If we have the name CORBA, we need to make sure we are not handling the CORBA.Object
            // name which is used for object references.  If so, we don't want to generate a module
            // since it is not a type we need to define in our IDL.  This only happens when the
            // name is "CORBA", we have a name array of length 2 and we are at the beginning of the
            // name array.
            if (dotScopedName.equals("CORBA") && name.length == 2 && i == 0) {
                if (name[i + 1].equals("Object")) {
                    break;
                }
            }
           
            IdlDefn idlDef = scope.lookup(name[i]);

            if (idlDef == null) {
                // Before creating module, check to see if a Corba type
                // represent this name aleady exists.
                // For example if type is a.b.c and we are about to create
                // module b,look to see if a.b
                // is an interface that needs to be processed
                QName qname = new QName(corbaTypeImpl.getType().getNamespaceURI(), dotScopedName);

                // Check to see if CORBAType exists. If so, create type for it
                // otherwise
                // create module for this scope              
                CorbaTypeImpl possibleCorbaType = getCorbaType(qname);

                if (possibleCorbaType != null) {
                    idlDef = findType(qname);                   
                }

                if (idlDef == null) {
                    idlDef = IdlModule.create(scope, name[i]);
                    scope.addToScope(idlDef);
                }
            }

            dotScopedName += ".";
            scope = (IdlScopeBase)idlDef;
View Full Code Here

        if (pos != -1) {
            nm[nm.length - 1] = nm[nm.length - 1].substring(0, pos);
        }

        IdlScopeBase parent = root;

        if (nm.length > 1) {
            for (int i = 0; i < nm.length - 1; ++i) {
                IdlModule mod = IdlModule.create(parent, nm[i]);
                parent.addToScope(mod);
                parent = mod;
            }
        }
       
        intf = IdlInterface.create(parent, nm[nm.length - 1]);
        parent.holdForScope(intf);
        try {
            getAllIdlTypes();
            collectIdlDefns(binding);
            root.flush();
        } catch (Exception ex) {
            ex.printStackTrace();
        }
        parent.promoteHeldToScope();
        root.write(printWriter);
        printWriter.close();
    }
View Full Code Here

            // MessageDef msg = WSDLToCorbaMessages.IDL_TYPE_NOT_FOUND;
            // throw new Exception(msg.getLocalMessage(new Object[] { idlType
            // }));
        }
       
        IdlScopeBase scope = root;
        String dotScopedName = "";

        for (int i = 0; i < name.length - 1; ++i) {
            dotScopedName += name[i];

            IdlDefn idlDef = scope.lookup(name[i]);

            if (idlDef == null) {
                // Before creating module, check to see if a Corba type
                // represent this name aleady exists.
                // For example if type is a.b.c and we are about to create
                // module b,look to see if a.b
                // is an interface that needs to be processed
                QName qname = new QName(corbaTypeImpl.getType().getNamespaceURI(), dotScopedName);

                // Check to see if CORBAType exists. If so, create type for it
                // otherwise
                // create module for this scope              
                CorbaTypeImpl possibleCorbaType = getCorbaType(qname);

                if (possibleCorbaType != null) {
                    idlDef = findType(qname);                   
                }

                if (idlDef == null) {
                    idlDef = IdlModule.create(scope, name[i]);
                    scope.addToScope(idlDef);
                }
            }

            dotScopedName += ".";
            scope = (IdlScopeBase)idlDef;
View Full Code Here

TOP

Related Classes of org.apache.yoko.tools.common.idltypes.IdlScopeBase

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.