woden_types.h

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

Generated on Wed Dec 20 20:34:50 2006 for Axis2/C by  doxygen 1.5.1