woden_types.h

Go to the documentation of this file.
00001 /*
00002  * Copyright 2004,2005 The Apache Software Foundation.
00003  *
00004  * Licensed under the Apache License, Version 2.0 (the "License");
00005  * you may not use this file except in compliance with the License.
00006  * You may obtain a copy of the License at
00007  *
00008  *      http://www.apache.org/licenses/LICENSE-2.0
00009  *
00010  * Unless required by applicable law or agreed to in writing, software
00011  * distributed under the License is distributed on an "AS IS" BASIS,
00012  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
00013  * See the License for the specific language governing permissions and
00014  * limitations under the License.
00015  */
00016 
00017 #ifndef WODEN_TYPES_H
00018 #define WODEN_TYPES_H
00019 
00029 #include <woden.h>
00030 #include <woden_types_element.h>
00031 #include <woden_documentable.h>
00032 #include <woden_nested_component.h>
00033 #include <woden_wsdl_obj.h>
00034 #include <xml_schema.h>
00035 #include <xml_schema_element.h>
00036 #include <xml_schema_type.h>
00037 #include <axis2_array_list.h>
00038 
00039 
00045 typedef union woden_types_base woden_types_base_t;
00046 typedef struct woden_types woden_types_t;
00047 typedef struct woden_types_ops woden_types_ops_t;
00048 struct woden_documentation_element;
00049 struct woden_documentation;
00050 struct xml_schema;
00051 struct xml_schema_element;
00052 struct xml_schema_type;
00053 
00054 #ifdef __cplusplus
00055 extern "C"
00056 {
00057 #endif
00058 
00059 struct woden_types_ops
00060 {
00065     axis2_status_t (AXIS2_CALL *
00066     free) (void *types,
00067             const axis2_env_t *env);
00068 
00069     axis2_hash_t *(AXIS2_CALL *
00070     super_objs) (void *types,
00071             const axis2_env_t *env);
00072 
00073     woden_obj_types_t (AXIS2_CALL *
00074     type) (void *types,
00075             const axis2_env_t *env);
00079     struct woden_documentable *(AXIS2_CALL *
00080     get_base_impl) (
00081             void *types,
00082             const axis2_env_t *env);
00083     
00084     /* ************************************************************
00085      *  Non-API implementation methods
00086      * ************************************************************/
00087 
00088     /* 
00089      * 
00090      * Returns the schema element declaration identified by the QName,
00091      * providing the element declaration is referenceable to the 
00092      * WSDL description (i.e. visible). This means it must exist in a
00093      * Schema that has been inlined or resolved from a schema import
00094      * within the &lt;types&gt; element according to the schema 
00095      * referenceability rules in the WSDL 2.0 spec.
00096      * If the element declaration is not referenceable, null is returned.
00097      * If validation is disabled, the referenceability rules do not apply
00098      * so all schemas are considered referenceable by the WSDL. 
00099      * 
00100      */
00101     void *(AXIS2_CALL * 
00102     get_element_declaration) (
00103             void *types,
00104             const axis2_env_t *env,
00105             axis2_qname_t *qname);
00106 
00107     /*
00108      * 
00109      * Returns the schema type definition identified by the QName,
00110      * providing the type definition is referenceable by the 
00111      * WSDL description (i.e. visible). This means it must exist in a
00112      * Schema that has been inlined or resolved from a schema import
00113      * within the &lt;types&gt; element according to the schema
00114      * referenceability rules in the WSDL 2.0 spec.
00115      * If the type definition is not referenceable, null is returned.
00116      * If validation is disabled, the referenceability rules do not apply
00117      * so all schemas are considered referenceable by the WSDL.
00118      *  
00119      */
00120     void *(AXIS2_CALL * 
00121     get_type_definition) (
00122             void *types,
00123             const axis2_env_t *env,
00124             axis2_qname_t *qname);
00125 /*
00126  * Returns a List of Xml Schema objects for all schemas that are referenceable 
00127  * by the containing WSDL. Examples of schemas that are not referenceable include
00128  * schemas without a target namespace or schemas resolved from a schema import
00129  * whose target namespace does not match the imported namespace. Referenceability
00130  * is determined by validation.
00131  */
00132     axis2_array_list_t *(AXIS2_CALL *
00133     get_referenceable_schema_defs) (
00134             void *types,
00135             const axis2_env_t *env);
00136 
00137     /*
00138      * Indicates if the namespace represented by the specified URI
00139      * is in-scope or referenceable by the WSDL description. 
00140      * This means it must be the target namespace of a schema correctly
00141      * imported or inlined directly within the &lt;types&gt; element.
00142      * 
00143      * @return true if the namespace is in-scope, or false if it is not.
00144      * 
00145      */
00146     axis2_bool_t (AXIS2_CALL * 
00147     is_namespace_in_scope_with_namespace_uri) (
00148             void *types,
00149             const axis2_env_t *env,
00150             axis2_uri_t *namespc_uri);
00151 
00152     /*
00153      * Indicates if the namespace represented by the specified QName
00154      * is in-scope or referenceable by the WSDL description. 
00155      * This means it must be the target namespace of a schema correctly
00156      * imported or inlined directly within the &lt;types&gt; element.
00157      * 
00158      */
00159     axis2_bool_t (AXIS2_CALL * 
00160     is_namespace_in_scope_with_qname) (
00161             void *types,
00162             const axis2_env_t *env,
00163             axis2_qname_t *qname);
00164 
00165     /*
00166      * 
00167      * Indicates if the namespace represented by the specified String
00168      * is in-scope or referenceable by the WSDL description. 
00169      * This means it must be the target namespace of a schema correctly
00170      * imported or inlined directly within the &lt;types&gt; element.
00171      * 
00172      */
00173     axis2_bool_t (AXIS2_CALL * 
00174     is_namespace_in_scope_with_namespace) (
00175             void *types,
00176             const axis2_env_t *env,
00177             axis2_char_t *namespc);
00178 
00179 
00180 };
00181 
00182 union woden_types_base
00183 {
00184     woden_documentable_t documentable;
00185     woden_types_element_t types_element;
00186     woden_nested_component_t nested_component;
00187 };
00188 
00189 struct woden_types
00190 {
00191     woden_types_base_t base;
00192     woden_types_ops_t *ops;
00193 };
00194 
00195 AXIS2_EXTERN woden_types_t * AXIS2_CALL
00196 woden_types_create(
00197         const axis2_env_t *env);
00198 
00199 
00200 /***************************Woden C Internal Methods***************************/
00201 AXIS2_EXTERN woden_types_t * AXIS2_CALL
00202 woden_types_to_types_element(
00203         void *types,
00204         const axis2_env_t *env);
00205 
00206 AXIS2_EXTERN woden_types_t * AXIS2_CALL
00207 woden_types_to_nested_element(
00208         void *types,
00209         const axis2_env_t *env);
00210 
00211 AXIS2_EXTERN woden_types_t * AXIS2_CALL
00212 woden_types_to_documentable_element(
00213         void *types,
00214         const axis2_env_t *env);
00215 
00216 AXIS2_EXTERN woden_types_t * AXIS2_CALL
00217 woden_types_to_documentable(
00218         void *types,
00219         const axis2_env_t *env);
00220 
00221 AXIS2_EXTERN woden_types_t * AXIS2_CALL
00222 woden_types_to_wsdl_obj(
00223         void *types,
00224         const axis2_env_t *env);
00225 
00226 AXIS2_EXTERN woden_types_t * AXIS2_CALL
00227 woden_types_to_nested_component(
00228         void *types,
00229         const axis2_env_t *env);
00230 
00231 AXIS2_EXTERN woden_types_t * AXIS2_CALL
00232 woden_types_to_wsdl_component(
00233         void *types,
00234         const axis2_env_t *env);
00235 
00236 AXIS2_EXTERN woden_types_t * AXIS2_CALL
00237 woden_types_to_element_extensible(
00238         void *types,
00239         const axis2_env_t *env);
00240 
00241 AXIS2_EXTERN woden_types_t * AXIS2_CALL
00242 woden_types_to_attr_extensible(
00243         void *types,
00244         const axis2_env_t *env);
00245 
00246 
00247 AXIS2_EXTERN axis2_status_t AXIS2_CALL
00248 woden_types_resolve_methods(
00249         woden_types_t *types,
00250         const axis2_env_t *env,
00251         woden_types_t *types_impl,
00252         axis2_hash_t *methods);
00253 /************************End of Woden C Internal Methods***********************/
00254 
00255 #define WODEN_TYPES_FREE(types, env) \
00256       (((woden_types_t *) types)->ops->free(types, env))
00257 
00258 #define WODEN_TYPES_SUPER_OBJS(types, env) \
00259       (((woden_types_t *) types)->ops->super_objs(types, env))
00260 
00261 #define WODEN_TYPES_TYPE(types, env) \
00262       (((woden_types_t *) types)->ops->type(types, env))
00263 
00264 #define WODEN_TYPES_GET_BASE_IMPL(types, env) \
00265       (((woden_types_t *) types)->ops->get_base_impl(types, env))
00266 
00267 #define WODEN_TYPES_GET_ELEMENT_DECLARATION(types, env, qname) \
00268       (((woden_types_t *) types)->ops->\
00269          get_element_declaration(types, env, qname))
00270 
00271 #define WODEN_TYPES_GET_TYPE_DEFINITION(types, env, qname) \
00272       (((woden_types_t *) types)->ops->\
00273          get_type_definition(types, env, qname))
00274 
00275 #define WODEN_TYPES_GET_REFERENCEABLE_SCHEMA_DEFS(types, env) \
00276       (((woden_types_t *) types)->ops->\
00277          get_referenceable_schema_defs(types, env))
00278 
00279 #define WODEN_TYPES_GET_REFERENCEABLE_SCHEMA_DEFS_WITH_NAMESPACE(types, env, namespc) \
00280       (((woden_types_t *) types)->ops->\
00281          get_referenceable_schema_defs_with_namespace(types, env, namespc))
00282 
00283 #define WODEN_TYPES_IS_NAMESPACE_IN_SCOPE_WITH_NAMESPACE_URI(types, env, namespc_uri) \
00284       (((woden_types_t *) types)->ops->\
00285          is_namespace_in_scope_with_namespace_uri(types, env, namespc_uri))
00286 
00287 #define WODEN_TYPES_IS_NAMESPACE_IN_SCOPE_WITH_QNAME(types, env, qname) \
00288       (((woden_types_t *) types)->ops->\
00289          is_namespace_in_scope_with_qname(types, env, qname))
00290 
00291 #define WODEN_TYPES_IS_NAMESPACE_IN_SCOPE_WITH_NAMESPACE(types, env, namespc) \
00292       (((woden_types_t *) types)->ops->\
00293          is_namespace_in_scope_with_namespace(types, env, namespc))
00294 
00296 #ifdef __cplusplus
00297 }
00298 #endif
00299 #endif /* WODEN_TYPES_H */

Generated on Thu Aug 31 17:32:37 2006 for Axis2/C by  doxygen 1.4.6