Examples of Const


Examples of org.apache.cxf.binding.corba.wsdl.Const

    public static String getConstValueByName(AST node, TypeMappingType typeMap) {
        List<CorbaTypeImpl> types = typeMap.getStructOrExceptionOrUnion();
        for (Iterator<CorbaTypeImpl> it = types.iterator(); it.hasNext();) {
            CorbaTypeImpl corbaType = it.next();
            if (corbaType instanceof Const) {
                Const corbaConst = (Const) corbaType;
                String name = corbaConst.getQName().getLocalPart();
                if (name.equals(node.getText())) {
                    return corbaConst.getValue();
                }
            }            
        }
        return null;
    }
View Full Code Here

Examples of org.apache.cxf.binding.corba.wsdl.Const

    }
   
    private IdlType createConst(CorbaTypeImpl ctype, IdlScopeBase scope,
                                String local) throws Exception {
        IdlType idlType = null;
        Const c = (Const)ctype;
        IdlType base = findType(c.getIdltype());
        String value = c.getValue();
        idlType = IdlConst.create(scope, local, base, value);
        scope.addToScope(idlType);
        return idlType;
    }
View Full Code Here

Examples of org.apache.cxf.binding.corba.wsdl.Const

        visitor.visit(constTypeNode);               
        XmlSchemaType constSchemaType = visitor.getSchemaType();
        CorbaTypeImpl constCorbaType = visitor.getCorbaType();       
       
        // corba:const       
        Const corbaConst = new Const();
        corbaConst.setQName(constQName);
        corbaConst.setValue(constValue.toString());       
        corbaConst.setType(constSchemaType.getQName());
        corbaConst.setIdltype(constCorbaType.getQName());       
       
        typeMap.getStructOrExceptionOrUnion().add(corbaConst);
    }
View Full Code Here

Examples of org.apache.cxf.binding.corba.wsdl.Const

    public static String getConstValueByName(AST node, TypeMappingType typeMap) {
        List<CorbaType> types = typeMap.getStructOrExceptionOrUnion();
        for (Iterator<CorbaType> it = types.iterator(); it.hasNext();) {
            CorbaType corbaType = it.next();
            if (corbaType instanceof Const) {
                Const corbaConst = (Const) corbaType;
                String name = corbaConst.getQName().getLocalPart();
                if (name.endsWith(node.getText())) {
                    return corbaConst.getValue();
                }
            }            
        }
        return null;
    }
View Full Code Here

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

    }
   
    private IdlType createConst(CorbaTypeImpl ctype, IdlScopeBase scope,
                                String local) throws Exception {
        IdlType idlType = null;
        Const c = (Const)ctype;
        IdlType base = findType(c.getIdltype());
        String value = c.getValue();
        idlType = IdlConst.create(scope, local, base, value);
        scope.addToScope(idlType);
        return idlType;
    }
View Full Code Here

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

        XmlSchemaType constSchemaType = visitor.getSchemaType();
        CorbaTypeImpl constCorbaType = visitor.getCorbaType();
        QName constCorbaTypeName = constCorbaType.getQName();
       
        // corba:const
        Const corbaConst = new Const();
        corbaConst.setQName(constQName);
        corbaConst.setValue(constValue);
        corbaConst.setType(constSchemaType.getQName());
        corbaConst.setIdltype(constCorbaTypeName);
       
        typeMap.getStructOrExceptionOrUnion().add(corbaConst);
    }
View Full Code Here

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

        // const types are guaranteed to be primitive types
        QName constCorbaTypeName = TypesUtils.findCorbaTypeName(typeMap, constTypeNode);
       
        // corba:const
        Const corbaConst = new Const();
        corbaConst.setQName(constQName);
        corbaConst.setValue(constValue);
        corbaConst.setType(constSchemaType.getQName());
        //corbaConst.setIdltype(constCorbaType.getQName());
        corbaConst.setIdltype(constCorbaTypeName);
       
        typeMap.getStructOrExceptionOrUnion().add(corbaConst);
    }
View Full Code Here

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

        NodeList typeChildNodes = el.getChildNodes();
        for (int i = 0; i < typeChildNodes.getLength(); ++i) {
            Node currentNode = typeChildNodes.item(i);

            if (currentNode.getNodeName().equals("corba:const")) {
                Const constType = getConstDefinition(currentNode, def);
                mappingType.getStructOrExceptionOrUnion().add(constType);
            } else if (currentNode.getNodeName().equals("corba:enum")) {
                Enum enumType = getEnumDefinition(currentNode, def);
                mappingType.getStructOrExceptionOrUnion().add(enumType);
            } else if (currentNode.getNodeName().equals("corba:struct")) {
View Full Code Here

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

        }
        return mappingType;
    }

    public Const getConstDefinition(Node node, Definition def) {
        Const constType = new Const();
        NamedNodeMap constAttributes = node.getAttributes();

        // Store information about the const
        for (int i = 0; i < constAttributes.getLength(); ++i) {
            if (constAttributes.item(i).getNodeName().equals("name")) {
                constType.setName(constAttributes.item(i).getNodeValue());
            } else if (constAttributes.item(i).getNodeName().equals("value")) {
                constType.setValue(constAttributes.item(i).getNodeValue());
            } else if (constAttributes.item(i).getNodeName().equals("idltype")) {
                String idlType = constAttributes.item(i).getNodeValue();
                int seperatorIndex = idlType.indexOf(':');
                String prefix = idlType.substring(0, seperatorIndex);
                String localPart = idlType.substring(seperatorIndex + 1, idlType.length());
                constType.setIdltype(new QName(def.getNamespace(prefix), localPart, prefix));
            }
        }
        return constType;
    }
View Full Code Here

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

        } else if (obj instanceof Array) {
            Array arrayType = (Array)obj;
            tc = orb.create_array_tc((int) arrayType.getBound(),
                                     getTypeCode(orb, arrayType.getElemtype(), typeMaps));
        } else if (obj instanceof Const) {
            Const constType = (Const)obj;
            tc = getTypeCode(orb, constType.getIdltype(), typeMaps);
        } else if (obj instanceof Enum) {
            Enum enumType = (Enum)obj;
            String name = enumType.getName();
            List enums = enumType.getEnumerator();
            String[] members = new String[enums.size()];
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.