00001 #ifndef _IT_WSDL_WSDL_NODE_H_
00002 #define _IT_WSDL_WSDL_NODE_H_
00003
00004
00005
00006
00007 #include <it_bus/types.h>
00008 #include <it_wsdl/api_defines.h>
00009
00010 #include <it_bus/qname.h>
00011 #include <it_bus/io_exception.h>
00012 #include <it_bus/xml_output_stream.h>
00013
00014 namespace IT_WSDL
00015 {
00053 enum NodeType
00054 {
00055 WSDL_DEFINITIONS,
00056 WSDL_MESSAGE,
00057 WSDL_PART,
00058 WSDL_PORT_TYPE,
00059 WSDL_BINDING,
00060 WSDL_BINDING_OPERATION,
00061 WSDL_BINDING_INPUT,
00062 WSDL_BINDING_OUTPUT,
00063 WSDL_BINDING_FAULT,
00064 WSDL_SERVICE,
00065 WSDL_PORT,
00066 WSDL_INPUT,
00067 WSDL_OUTPUT,
00068 WSDL_FAULT,
00069 WSDL_OPERATION,
00070 WSDL_TYPES,
00071 WSDL_EXTENSION_ELEMENT,
00072 WSDL_TYPES_IMPORT,
00073 WSDL_TYPES_SCHEMA_IMPORT,
00074 WSDL_TYPES_SCHEMA_INCLUDE,
00075 WSDL_IMPORT
00076 };
00077
00088 class IT_WSDL_API WSDLNode
00089 {
00090 public:
00091 virtual ~WSDLNode();
00092
00098 virtual NodeType
00099 get_node_type() = 0;
00100
00106 virtual const IT_Bus::QName &
00107 get_element_name() const = 0;
00108
00114 virtual const IT_Bus::String &
00115 get_target_namespace() const = 0;
00116
00141 virtual void
00142 write(
00143 IT_Bus::XMLOutputStream & stream
00144 ) const throw((IT_Bus::IOException)) = 0;
00145
00146 protected:
00147 WSDLNode() {}
00148
00149 private:
00150
00151 WSDLNode(const WSDLNode&);
00152 void operator=(const WSDLNode&);
00153 };
00154
00155 class WSDLExtensionElement;
00156
00160 typedef IT_Vector<WSDLExtensionElement *> WSDLExtensionElementList;
00161
00166 class IT_WSDL_API WSDLExtensibleNode : public virtual WSDLNode
00167 {
00168 public:
00180 virtual const WSDLExtensionElementList &
00181 get_extension_elements() const = 0;
00182
00194 virtual WSDLExtensionElementList &
00195 get_extension_elements() = 0;
00196
00204 virtual WSDLExtensionElement*
00205 find_extension_element(
00206 const IT_Bus::QName& extension_element
00207 ) const = 0;
00208
00216 virtual WSDLExtensionElement*
00217 create_extension_element(
00218 const IT_Bus::QName& extension_element
00219 ) = 0;
00220
00226 virtual void
00227 add_extension_element(
00228 WSDLExtensionElement* extension_element
00229 ) = 0;
00230
00231 protected:
00232 WSDLExtensibleNode() {}
00233
00234 };
00235
00236 typedef IT_Vector<WSDLNode *> WSDLNodeList;
00237 }
00238
00239 #endif