00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018 #ifndef XML_SCHEMA_COMPLEX_TYPE_H
00019 #define XML_SCHEMA_COMPLEX_TYPE_H
00020
00027 #include <xml_schema_annotated.h>
00028 #include <xml_schema_type.h>
00029 #include <axis2_hash.h>
00030 #include <axis2_qname.h>
00031 #include <xml_schema_complex_type.h>
00032 #include <xml_schema_any_attribute.h>
00033 #include <xml_schema_obj_collection.h>
00034 #include <xml_schema_obj_table.h>
00035 #include <xml_schema_derivation_method.h>
00036 #include <xml_schema_content_type.h>
00037
00038 #ifdef __cplusplus
00039 extern "C"
00040 {
00041 #endif
00042
00048 typedef struct xml_schema_complex_type
00049 xml_schema_complex_type_t;
00050 typedef struct xml_schema_complex_type_ops
00051 xml_schema_complex_type_ops_t;
00052
00053 struct xml_schema_complex_type_ops
00054 {
00059 axis2_status_t (AXIS2_CALL *
00060 free) (void *cmp_type,
00061 const axis2_env_t *env);
00062
00063 xml_schema_type_t *(AXIS2_CALL *
00064 get_base_impl)(
00065 void *cmp_type,
00066 const axis2_env_t *env);
00067
00068 axis2_hash_t *(AXIS2_CALL *
00069 super_objs)(
00070 void *cmp_type,
00071 const axis2_env_t *env);
00072
00073 xml_schema_types_t (AXIS2_CALL *
00074 get_type)(
00075 void *cmp_type,
00076 const axis2_env_t *env);
00077
00078 xml_schema_any_attribute_t* (AXIS2_CALL *
00079 get_any_attribute)(
00080 void *cmp_type,
00081 const axis2_env_t *env);
00082
00083 axis2_status_t (AXIS2_CALL *
00084 set_any_attribute)(
00085 void *cmp_type,
00086 const axis2_env_t *env,
00087 xml_schema_any_attribute_t *any_attr);
00088
00089 xml_schema_obj_collection_t* (AXIS2_CALL *
00090 get_attributes)(
00091 void *cmp_type,
00092 const axis2_env_t *env);
00093
00094 xml_schema_obj_table_t* (AXIS2_CALL *
00095 get_attribute_use)(
00096 void *cmp_type,
00097 const axis2_env_t *env);
00098
00099 xml_schema_any_attribute_t* (AXIS2_CALL *
00100 get_attribute_wildcard)(
00101 void *cmp_type,
00102 const axis2_env_t *env);
00103
00104 xml_schema_derivation_method_t* (AXIS2_CALL *
00105 get_block)(
00106 void *cmp_type,
00107 const axis2_env_t *env);
00108
00109 axis2_status_t (AXIS2_CALL *
00110 set_block)(
00111 void *cmp_type,
00112 const axis2_env_t *env,
00113 xml_schema_derivation_method_t *block);
00114
00115 xml_schema_derivation_method_t* (AXIS2_CALL *
00116 get_block_resolved)(
00117 void *cmp_type,
00118 const axis2_env_t *env);
00119
00120 void* (AXIS2_CALL *
00121 get_content_model)(
00122 void *cmp_type,
00123 const axis2_env_t *env);
00124
00125 axis2_status_t (AXIS2_CALL *
00126 set_content_model)(
00127 void *cmp_type,
00128 const axis2_env_t *env,
00129 void *content_model);
00130
00131 xml_schema_content_type_t* (AXIS2_CALL *
00132 get_content_type)(
00133 void *cmp_type,
00134 const axis2_env_t *env);
00135
00136 axis2_status_t (AXIS2_CALL *
00137 set_content_type)(
00138 void *cmp_type,
00139 const axis2_env_t *env,
00140 xml_schema_content_type_t *content_type);
00141
00142 xml_schema_particle_t * (AXIS2_CALL *
00143 get_content_type_particle)(
00144 void *cmp_type,
00145 const axis2_env_t *env);
00146
00147 axis2_bool_t (AXIS2_CALL *
00148 is_abstract)(
00149 void *cmp_type,
00150 const axis2_env_t *env);
00151
00152 axis2_status_t (AXIS2_CALL *
00153 set_abstract)(
00154 void *cmp_type,
00155 const axis2_env_t *env,
00156 axis2_bool_t b);
00157
00158 axis2_bool_t (AXIS2_CALL*
00159 is_mixed)(
00160 void *cmp_type,
00161 const axis2_env_t *env);
00162
00163 axis2_status_t (AXIS2_CALL *
00164 set_mixed)(
00165 void *cmp_type,
00166 const axis2_env_t *env,
00167 axis2_bool_t b);
00168
00169 void* (AXIS2_CALL *
00170 get_particle)(
00171 void *cmp_type,
00172 const axis2_env_t *env);
00173
00174 axis2_status_t (AXIS2_CALL *
00175 set_particle)(
00176 void *cmp_type,
00177 const axis2_env_t *env,
00178 void *particle);
00179
00180
00181
00182 axis2_char_t* (AXIS2_CALL*
00183 to_string)(
00184 void *cmp_type,
00185 const axis2_env_t *env,
00186 axis2_char_t *prefix,
00187 int tab);
00188
00189 };
00190
00191 struct xml_schema_complex_type
00192 {
00193 xml_schema_type_t base;
00194 xml_schema_complex_type_ops_t *ops;
00195 };
00196
00205 AXIS2_EXTERN xml_schema_complex_type_t * AXIS2_CALL
00206 xml_schema_complex_type_create(const axis2_env_t *env,
00207 struct xml_schema *schema);
00208
00209
00210
00211 #define XML_SCHEMA_COMPLEX_TYPE_FREE(complex_type, env) \
00212 (((xml_schema_complex_type_t *) complex_type)->ops->\
00213 free(complex_type, env))
00214
00215 #define XML_SCHEMA_COMPLEX_TYPE_GET_BASE_IMPL(complex_type, env) \
00216 (((xml_schema_complex_type_t *) complex_type)->ops->\
00217 get_base_impl(complex_type, env))
00218
00219 #define XML_SCHEMA_COMPLEX_TYPE_GET_TYPE(complex_type, env) \
00220 (((xml_schema_complex_type_t *) complex_type)->ops->\
00221 get_type(complex_type, env))
00222
00223 #define XML_SCHEMA_COMPLEX_TYPE_SUPER_OBJS(complex_type, env) \
00224 (((xml_schema_complex_type_t *) complex_type)->ops->\
00225 super_objs(complex_type, env))
00226
00227 #define XML_SCHEMA_COMPLEX_TYPE_GET_ANY_ATTRIBUTE(complex_type, env) \
00228 (((xml_schema_complex_type_t *) complex_type)->ops->\
00229 get_any_attribute(complex_type, env))
00230
00231 #define XML_SCHEMA_COMPLEX_TYPE_SET_ANY_ATTRIBUTE(complex_type, env, any_attr) \
00232 (((xml_schema_complex_type_t *) complex_type)->ops->\
00233 set_any_attribute(complex_type, env, any_attr))
00234
00235 #define XML_SCHEMA_COMPLEX_TYPE_GET_ATTRIBUTES(complex_type, env) \
00236 (((xml_schema_complex_type_t *) complex_type)->ops->\
00237 get_attributes(complex_type, env))
00238
00239 #define XML_SCHEMA_COMPLEX_TYPE_GET_ATTRIBUTE_USE(complex_type, env) \
00240 (((xml_schema_complex_type_t *) complex_type)->ops->\
00241 get_attribute_use(complex_type, env))
00242
00243 #define XML_SCHEMA_COMPLEX_TYPE_GET_ATTRIBUTE_WILDCARD(complex_type, env) \
00244 (((xml_schema_complex_type_t *) complex_type)->ops->\
00245 get_attribute_wildcard(complex_type, env))
00246
00247 #define XML_SCHEMA_COMPLEX_TYPE_GET_BLOCK(complex_type, env) \
00248 (((xml_schema_complex_type_t *) complex_type)->ops->\
00249 get_block(complex_type, env))
00250
00251 #define XML_SCHEMA_COMPLEX_TYPE_SET_BLOCK(complex_type, env, block) \
00252 (((xml_schema_complex_type_t *) complex_type)->ops->\
00253 set_block(complex_type, env, block))
00254
00255 #define XML_SCHEMA_COMPLEX_TYPE_GET_BLOCK_RESOLVED(complex_type, env) \
00256 (((xml_schema_complex_type_t *) complex_type)->ops->\
00257 get_block_resolved(complex_type, env))
00258
00259 #define XML_SCHEMA_COMPLEX_TYPE_GET_CONTENT_MODEL(complex_type, env) \
00260 (((xml_schema_complex_type_t *) complex_type)->ops->\
00261 get_content_model(complex_type, env))
00262
00263 #define XML_SCHEMA_COMPLEX_TYPE_SET_CONTENT_MODEL(complex_type, env, cnt_model) \
00264 (((xml_schema_complex_type_t *) complex_type)->ops->\
00265 set_content_model(complex_type, env, cnt_model))
00266
00267 #define XML_SCHEMA_COMPLEX_TYPE_GET_CONTENT_TYPE(complex_type, env) \
00268 (((xml_schema_complex_type_t *) complex_type)->ops->\
00269 get_content_type(complex_type, env))
00270
00271 #define XML_SCHEMA_COMPLEX_TYPE_SET_CONTENT_TYPE(complex_type, env, cnt_type) \
00272 (((xml_schema_complex_type_t *) complex_type)->ops->\
00273 set_content_type(complex_type, env, cnt_type))
00274
00275 #define XML_SCHEMA_COMPLEX_TYPE_GET_CONTENT_TYPE_PARTICLE(complex_type, env) \
00276 (((xml_schema_complex_type_t *) complex_type)->ops->\
00277 get_content_type_particle(complex_type, env))
00278
00279 #define XML_SCHEMA_COMPLEX_TYPE_IS_ABSTRACT(complex_type, env) \
00280 (((xml_schema_complex_type_t *) complex_type)->ops->\
00281 is_abstract(complex_type, env))
00282
00283 #define XML_SCHEMA_COMPLEX_TYPE_SET_ABSTRACT(complex_type, env, b) \
00284 (((xml_schema_complex_type_t *) complex_type)->ops->\
00285 set_abstract(complex_type, env, b))
00286
00287 #define XML_SCHEMA_COMPLEX_TYPE_IS_MIXED(complex_type, env) \
00288 (((xml_schema_complex_type_t *) complex_type)->ops->\
00289 is_mixed(complex_type, env))
00290
00291 #define XML_SCHEMA_COMPLEX_TYPE_SET_MIXED(complex_type, env, b) \
00292 (((xml_schema_complex_type_t *) complex_type)->ops->\
00293 set_mixed(complex_type, env, b))
00294
00295 #define XML_SCHEMA_COMPLEX_TYPE_GET_PARTICLE(complex_type, env) \
00296 (((xml_schema_complex_type_t *) complex_type)->ops->\
00297 get_particle(complex_type, env))
00298
00299 #define XML_SCHEMA_COMPLEX_TYPE_SET_PARTICLE(complex_type, env, particle) \
00300 (((xml_schema_complex_type_t *)complex_type)->ops->\
00301 set_particle(complex_type, env, particle))
00302
00303 #define XML_SCHEMA_COMPLEX_TYPE_TO_STRING(complex_type, env, prefix, tab) \
00304 (((xml_schema_complex_type_t *) complex_type)->ops->\
00305 to_string(complex_type, env, prefix, tab))
00306
00307
00308
00310 #ifdef __cplusplus
00311 }
00312 #endif
00313 #endif