You are viewing a plain text version of this content. The canonical link for it is here.
Posted to axis-cvs@ws.apache.org by na...@apache.org on 2006/05/15 11:31:15 UTC
svn commit: r406594 [7/8] - in
/webservices/axis2/trunk/c/modules/xml/xml_schema: ./ include/xml_schema/
Modified: webservices/axis2/trunk/c/modules/xml/xml_schema/xml_schema_particle.c
URL: http://svn.apache.org/viewcvs/webservices/axis2/trunk/c/modules/xml/xml_schema/xml_schema_particle.c?rev=406594&r1=406593&r2=406594&view=diff
==============================================================================
--- webservices/axis2/trunk/c/modules/xml/xml_schema/xml_schema_particle.c (original)
+++ webservices/axis2/trunk/c/modules/xml/xml_schema/xml_schema_particle.c Mon May 15 02:31:10 2006
@@ -26,13 +26,21 @@
struct axis2_xml_schema_particle_impl
{
axis2_xml_schema_particle_t particle;
+
axis2_xml_schema_annotated_t *annotated;
+
axis2_xml_schema_types_t obj_type;
- axis2_hash_t *super;
+
+ axis2_hash_t *ht_super;
+
axis2_hash_t *methods;
+
long max_occurs;
+
axis2_char_t *max_occurs_string;
+
long min_occurs;
+
axis2_char_t *min_occurs_string;
};
@@ -98,7 +106,7 @@
}
particle_impl->annotated = NULL;
particle_impl->obj_type = AXIS2_XML_SCHEMA_PARTICLE;
- particle_impl->super = NULL;
+ particle_impl->ht_super = NULL;
particle_impl->particle.ops = NULL;
particle_impl->particle.base.ops = NULL;
particle_impl->methods = NULL;
@@ -118,18 +126,25 @@
particle_impl->particle.ops->free =
axis2_xml_schema_particle_free;
+
particle_impl->particle.ops->super_objs =
axis2_xml_schema_particle_super_objs;
+
particle_impl->particle.ops->type =
axis2_xml_schema_particle_type;
+
particle_impl->particle.ops->get_base_impl =
axis2_xml_schema_particle_get_base_impl;
+
particle_impl->particle.ops->get_max_occurs =
axis2_xml_schema_particle_get_max_occurs;
+
particle_impl->particle.ops->set_max_occurs =
axis2_xml_schema_particle_set_max_occurs;
+
particle_impl->particle.ops->get_min_occurs =
axis2_xml_schema_particle_get_min_occurs;
+
particle_impl->particle.ops->set_min_occurs =
axis2_xml_schema_particle_set_min_occurs;
@@ -162,18 +177,21 @@
return NULL;
}
- particle_impl->super = axis2_hash_make(env);
- if(!particle_impl->super)
+ particle_impl->ht_super = axis2_hash_make(env);
+ if(!particle_impl->ht_super)
{
axis2_xml_schema_particle_free(&(particle_impl->particle), env);
AXIS2_ERROR_SET((*env)->error, AXIS2_ERROR_NO_MEMORY, AXIS2_FAILURE);
return NULL;
}
- axis2_hash_set(particle_impl->super, "AXIS2_XML_SCHEMA_PARTICLE", AXIS2_HASH_KEY_STRING,
+ axis2_hash_set(particle_impl->ht_super, "AXIS2_XML_SCHEMA_PARTICLE", AXIS2_HASH_KEY_STRING,
&(particle_impl->particle));
- axis2_hash_set(particle_impl->super, "AXIS2_XML_SCHEMA_ANNOTATED", AXIS2_HASH_KEY_STRING,
- &(particle_impl->annotated));
-
+ axis2_hash_set(particle_impl->ht_super, "AXIS2_XML_SCHEMA_ANNOTATED", AXIS2_HASH_KEY_STRING,
+ particle_impl->annotated);
+
+ axis2_hash_set(particle_impl->ht_super, "AXIS2_XML_SCHEMA_OBJ", AXIS2_HASH_KEY_STRING,
+ AXIS2_XML_SCHEMA_ANNOTATED_GET_BASE_IMPL(particle_impl->annotated, env));
+
status = axis2_xml_schema_annotated_resolve_methods(
&(particle_impl->particle.base), env, particle_impl->annotated,
particle_impl->methods);
@@ -190,10 +208,10 @@
AXIS2_ENV_CHECK(env, AXIS2_FAILURE);
particle_impl = AXIS2_INTF_TO_IMPL(particle);
- if(NULL != particle_impl->super)
+ if(NULL != particle_impl->ht_super)
{
- axis2_hash_free(particle_impl->super, env);
- particle_impl->super = NULL;
+ axis2_hash_free(particle_impl->ht_super, env);
+ particle_impl->ht_super = NULL;
}
if(NULL != particle_impl->methods)
@@ -232,11 +250,9 @@
axis2_env_t **env)
{
axis2_xml_schema_particle_impl_t *particle_impl = NULL;
-
AXIS2_ENV_CHECK(env, NULL);
particle_impl = AXIS2_INTF_TO_IMPL(particle);
-
- return particle_impl->super;
+ return particle_impl->ht_super;
}
axis2_xml_schema_types_t AXIS2_CALL
@@ -244,10 +260,8 @@
axis2_env_t **env)
{
axis2_xml_schema_particle_impl_t *particle_impl = NULL;
-
AXIS2_ENV_CHECK(env, AXIS2_FAILURE);
particle_impl = AXIS2_INTF_TO_IMPL(particle);
-
return particle_impl->obj_type;
}
@@ -256,10 +270,8 @@
axis2_env_t **env)
{
axis2_xml_schema_particle_impl_t *particle_impl = NULL;
-
AXIS2_ENV_CHECK(env, NULL);
particle_impl = AXIS2_INTF_TO_IMPL(particle);
-
return particle_impl->annotated;
}
@@ -270,13 +282,13 @@
axis2_xml_schema_particle_t *particle_impl,
axis2_hash_t *methods)
{
- axis2_xml_schema_particle_impl_t *particle_impl_l = NULL;
+ axis2_xml_schema_particle_impl_t *sch_particle_impl = NULL;
AXIS2_ENV_CHECK(env, AXIS2_FAILURE);
AXIS2_PARAM_CHECK((*env)->error, particle_impl, AXIS2_FAILURE);
AXIS2_PARAM_CHECK((*env)->error, methods, AXIS2_FAILURE);
- particle_impl_l = (axis2_xml_schema_particle_impl_t *) particle_impl;
+ sch_particle_impl = (axis2_xml_schema_particle_impl_t *) particle_impl;
particle->ops = AXIS2_MALLOC((*env)->allocator,
sizeof(axis2_xml_schema_particle_ops_t));
@@ -297,28 +309,28 @@
AXIS2_HASH_KEY_STRING);
if(!particle->ops->get_max_occurs)
particle->ops->get_max_occurs =
- particle_impl_l->particle.ops->get_max_occurs;
+ sch_particle_impl->particle.ops->get_max_occurs;
particle->ops->set_max_occurs = axis2_hash_get(methods, "set_max_occurs",
AXIS2_HASH_KEY_STRING);
if(!particle->ops->set_max_occurs)
particle->ops->set_max_occurs =
- particle_impl_l->particle.ops->set_max_occurs;
+ sch_particle_impl->particle.ops->set_max_occurs;
particle->ops->get_min_occurs = axis2_hash_get(methods, "get_min_occurs",
AXIS2_HASH_KEY_STRING);
if(!particle->ops->get_min_occurs)
particle->ops->get_min_occurs =
- particle_impl_l->particle.ops->get_min_occurs;
+ sch_particle_impl->particle.ops->get_min_occurs;
particle->ops->set_min_occurs = axis2_hash_get(methods, "set_min_occurs",
AXIS2_HASH_KEY_STRING);
if(!particle->ops->set_min_occurs)
particle->ops->set_min_occurs =
- particle_impl_l->particle.ops->set_min_occurs;
+ sch_particle_impl->particle.ops->set_min_occurs;
return axis2_xml_schema_annotated_resolve_methods(&(particle->base),
- env, particle_impl_l->annotated, methods);
+ env, sch_particle_impl->annotated, methods);
}
long AXIS2_CALL
@@ -326,13 +338,17 @@
axis2_env_t **env)
{
axis2_xml_schema_particle_impl_t *particle_impl = NULL;
- axis2_hash_t *super = NULL;
+ axis2_hash_t *ht_super = NULL;
AXIS2_ENV_CHECK(env, AXIS2_FAILURE);
- super = AXIS2_XML_SCHEMA_PARTICLE_SUPER_OBJS(particle, env);
- particle_impl = AXIS2_INTF_TO_IMPL(axis2_hash_get(super,
+ ht_super = AXIS2_XML_SCHEMA_PARTICLE_SUPER_OBJS(particle, env);
+ if(NULL != ht_super)
+ {
+ particle_impl = AXIS2_INTF_TO_IMPL(axis2_hash_get(ht_super,
"AXIS2_XML_SCHEMA_PARTICLE", AXIS2_HASH_KEY_STRING));
-
+ if(!particle_impl)
+ return AXIS2_FAILURE;
+ }
return particle_impl->max_occurs;
}
@@ -342,12 +358,17 @@
long max_occurs)
{
axis2_xml_schema_particle_impl_t *particle_impl = NULL;
- axis2_hash_t *super = NULL;
+ axis2_hash_t *ht_super = NULL;
AXIS2_ENV_CHECK(env, AXIS2_FAILURE);
- super = AXIS2_XML_SCHEMA_PARTICLE_SUPER_OBJS(particle, env);
- particle_impl = AXIS2_INTF_TO_IMPL(axis2_hash_get(super,
+ ht_super = AXIS2_XML_SCHEMA_PARTICLE_SUPER_OBJS(particle, env);
+ if(NULL != ht_super)
+ {
+ particle_impl = AXIS2_INTF_TO_IMPL(axis2_hash_get(ht_super,
"AXIS2_XML_SCHEMA_PARTICLE", AXIS2_HASH_KEY_STRING));
+ if(!particle_impl)
+ return AXIS2_FAILURE;
+ }
particle_impl->max_occurs = max_occurs;
return AXIS2_SUCCESS;
@@ -358,12 +379,17 @@
axis2_env_t **env)
{
axis2_xml_schema_particle_impl_t *particle_impl = NULL;
- axis2_hash_t *super = NULL;
+ axis2_hash_t *ht_super = NULL;
AXIS2_ENV_CHECK(env, AXIS2_FAILURE);
- super = AXIS2_XML_SCHEMA_PARTICLE_SUPER_OBJS(particle, env);
- particle_impl = AXIS2_INTF_TO_IMPL(axis2_hash_get(super,
+ ht_super = AXIS2_XML_SCHEMA_PARTICLE_SUPER_OBJS(particle, env);
+ if(NULL != ht_super)
+ {
+ particle_impl = AXIS2_INTF_TO_IMPL(axis2_hash_get(ht_super,
"AXIS2_XML_SCHEMA_PARTICLE", AXIS2_HASH_KEY_STRING));
+ if(!particle_impl)
+ return AXIS2_FAILURE;
+ }
return particle_impl->min_occurs;
}
@@ -374,13 +400,17 @@
long min_occurs)
{
axis2_xml_schema_particle_impl_t *particle_impl = NULL;
- axis2_hash_t *super = NULL;
+ axis2_hash_t *ht_super = NULL;
AXIS2_ENV_CHECK(env, AXIS2_FAILURE);
- super = AXIS2_XML_SCHEMA_PARTICLE_SUPER_OBJS(particle, env);
- particle_impl = AXIS2_INTF_TO_IMPL(axis2_hash_get(super,
+ ht_super = AXIS2_XML_SCHEMA_PARTICLE_SUPER_OBJS(particle, env);
+ if(NULL != ht_super)
+ {
+ particle_impl = AXIS2_INTF_TO_IMPL(axis2_hash_get(ht_super,
"AXIS2_XML_SCHEMA_PARTICLE", AXIS2_HASH_KEY_STRING));
-
+ if(!particle_impl)
+ return AXIS2_FAILURE;
+ }
particle_impl->min_occurs = min_occurs;
return AXIS2_SUCCESS;
}
Modified: webservices/axis2/trunk/c/modules/xml/xml_schema/xml_schema_redefine.c
URL: http://svn.apache.org/viewcvs/webservices/axis2/trunk/c/modules/xml/xml_schema/xml_schema_redefine.c?rev=406594&r1=406593&r2=406594&view=diff
==============================================================================
--- webservices/axis2/trunk/c/modules/xml/xml_schema/xml_schema_redefine.c (original)
+++ webservices/axis2/trunk/c/modules/xml/xml_schema/xml_schema_redefine.c Mon May 15 02:31:10 2006
@@ -36,6 +36,10 @@
axis2_xml_schema_obj_table_t *schema_types;
axis2_hash_t *methods;
+
+ axis2_hash_t *ht_super;
+
+ axis2_xml_schema_types_t obj_type;
}axis2_xml_schema_redefine_impl_t;
@@ -51,6 +55,14 @@
axis2_xml_schema_external_t *AXIS2_CALL
axis2_xml_schema_redefine_get_base_impl(void *redefine,
axis2_env_t **env);
+
+axis2_xml_schema_types_t AXIS2_CALL
+axis2_xml_schema_redefine_type(void *redefine,
+ axis2_env_t **env);
+
+axis2_hash_t *AXIS2_CALL
+axis2_xml_schema_redefine_super_objs(void *redefine,
+ axis2_env_t **env);
axis2_xml_schema_obj_table_t* AXIS2_CALL
axis2_xml_schema_redefine_get_attribute_group(void *redefine,
@@ -82,6 +94,7 @@
axis2_xml_schema_redefine_create(axis2_env_t **env)
{
axis2_xml_schema_redefine_impl_t *redefine_impl = NULL;
+ axis2_xml_schema_annotated_t *annotated = NULL;
axis2_status_t status = AXIS2_FAILURE;
redefine_impl = AXIS2_MALLOC((*env)->allocator,
@@ -99,6 +112,8 @@
redefine_impl->groups = NULL;
redefine_impl->schema_types = NULL;
redefine_impl->items = NULL;
+ redefine_impl->obj_type = AXIS2_XML_SCHEMA_REDEFINE;
+ redefine_impl->ht_super = NULL;
redefine_impl->redefine.ops = AXIS2_MALLOC((*env)->allocator,
sizeof(axis2_xml_schema_redefine_ops_t));
@@ -114,15 +129,24 @@
axis2_xml_schema_redefine_free;
redefine_impl->redefine.ops->get_base_impl =
axis2_xml_schema_redefine_get_base_impl;
-
+ redefine_impl->redefine.ops->type =
+ axis2_xml_schema_redefine_type;
+ redefine_impl->redefine.ops->super_objs =
+ axis2_xml_schema_redefine_super_objs;
redefine_impl->redefine.ops->get_items =
- axis2_xml_schema_redefine_get_items;
-
+ axis2_xml_schema_redefine_get_items;
redefine_impl->redefine.ops->get_group =
- axis2_xml_schema_redefine_get_group;
+ axis2_xml_schema_redefine_get_group;
+ redefine_impl->redefine.ops->get_attribute_group =
+ axis2_xml_schema_redefine_get_attribute_group;
+ redefine_impl->redefine.ops->set_attribute_group =
+ axis2_xml_schema_redefine_set_attribute_group;
+ redefine_impl->redefine.ops->get_schema_types =
+ axis2_xml_schema_redefine_get_schema_types;
redefine_impl->methods = axis2_hash_make(env);
- if(!redefine_impl->methods)
+ redefine_impl->ht_super = axis2_hash_make(env);
+ if(!redefine_impl->methods || !redefine_impl->ht_super)
{
axis2_xml_schema_redefine_free(&(redefine_impl->redefine), env);
AXIS2_ERROR_SET((*env)->error, AXIS2_ERROR_NO_MEMORY, AXIS2_FAILURE);
@@ -131,7 +155,10 @@
axis2_hash_set(redefine_impl->methods, "free", AXIS2_HASH_KEY_STRING,
axis2_xml_schema_redefine_free);
-
+ axis2_hash_set(redefine_impl->methods, "type", AXIS2_HASH_KEY_STRING,
+ axis2_xml_schema_redefine_type);
+ axis2_hash_set(redefine_impl->methods, "super_objs", AXIS2_HASH_KEY_STRING,
+ axis2_xml_schema_redefine_super_objs);
axis2_hash_set(redefine_impl->methods, "get_items",
AXIS2_HASH_KEY_STRING, axis2_xml_schema_redefine_get_items);
axis2_hash_set(redefine_impl->methods, "get_group",
@@ -143,6 +170,24 @@
axis2_xml_schema_redefine_free(&(redefine_impl->redefine), env);
return NULL;
}
+
+
+ axis2_hash_set(redefine_impl->ht_super, "AXIS2_XML_SCHEMA_REDEFINE",
+ AXIS2_HASH_KEY_STRING, &(redefine_impl->redefine));
+ axis2_hash_set(redefine_impl->ht_super, "AXIS2_XML_SCHEMA_EXTERNAL",
+ AXIS2_HASH_KEY_STRING, redefine_impl->external);
+
+ annotated = AXIS2_XML_SCHEMA_EXTERNAL_GET_BASE_IMPL(redefine_impl->external, env);
+ if(NULL != redefine_impl->external)
+ {
+
+ axis2_hash_set(redefine_impl->ht_super, "AXIS2_XML_SCHEMA_ANNOTATED",
+ AXIS2_HASH_KEY_STRING, annotated);
+ axis2_hash_set(redefine_impl->ht_super, "AXIS2_XML_SCHEMA_OBJ",
+ AXIS2_HASH_KEY_STRING,
+ AXIS2_XML_SCHEMA_ANNOTATED_GET_BASE_IMPL(annotated, env));
+ }
+
status = axis2_xml_schema_external_resolve_methods(
&(redefine_impl->redefine.base), env, redefine_impl->external,
redefine_impl->methods);
@@ -164,6 +209,11 @@
axis2_hash_free(redefine_impl->methods, env);
redefine_impl->methods = NULL;
}
+ if(NULL != redefine_impl->ht_super)
+ {
+ axis2_hash_free(redefine_impl->ht_super, env);
+ redefine_impl->ht_super = NULL;
+ }
if(NULL != redefine_impl->external)
{
@@ -194,10 +244,12 @@
AXIS2_ENV_CHECK(env, NULL);
redefine_impl = AXIS2_INTF_TO_IMPL(redefine);
-
return redefine_impl->external;
}
+
+/*
+
AXIS2_DECLARE(axis2_status_t)
axis2_xml_schema_redefine_resolve_methods(
axis2_xml_schema_redefine_t *redefine,
@@ -229,26 +281,66 @@
return axis2_xml_schema_external_resolve_methods(&(redefine->base),
env, redefine_impl_l->external, methods);
}
-
+*/
axis2_xml_schema_obj_table_t* AXIS2_CALL
axis2_xml_schema_redefine_get_attribute_group(void *redefine,
- axis2_env_t **env){}
+ axis2_env_t **env)
+{
+ return AXIS2_INTF_TO_IMPL(redefine)->attr_groups;
+}
axis2_status_t AXIS2_CALL
axis2_xml_schema_redefine_set_attribute_group(void *redefine,
axis2_env_t **env,
- axis2_xml_schema_obj_table_t *group){}
+ axis2_xml_schema_obj_table_t *group)
+{
+ axis2_xml_schema_redefine_impl_t *red_impl = NULL;
+ AXIS2_ENV_CHECK(env, AXIS2_FAILURE);
+ AXIS2_PARAM_CHECK((*env)->error, group, AXIS2_FAILURE);
+ red_impl = AXIS2_INTF_TO_IMPL(redefine);
+ if(NULL != red_impl->groups)
+ {
+
+ }
+ red_impl->groups = group;
+ return AXIS2_SUCCESS;
+}
axis2_xml_schema_obj_collection_t* AXIS2_CALL
axis2_xml_schema_redefine_get_items(void *redefine,
- axis2_env_t **env){}
+ axis2_env_t **env)
+{
+ return AXIS2_INTF_TO_IMPL(redefine)->items;
+}
axis2_xml_schema_obj_table_t* AXIS2_CALL
axis2_xml_schema_redefine_get_schema_types(void *redefine,
- axis2_env_t **env){}
+ axis2_env_t **env)
+{
+ return AXIS2_INTF_TO_IMPL(redefine)->schema_types;
+}
axis2_xml_schema_obj_table_t* AXIS2_CALL
axis2_xml_schema_redefine_get_group(void *redefine,
- axis2_env_t **env){}
\ No newline at end of file
+ axis2_env_t **env)
+{
+ return AXIS2_INTF_TO_IMPL(redefine)->groups;
+}
+
+axis2_xml_schema_types_t AXIS2_CALL
+axis2_xml_schema_redefine_type(void *redefine,
+ axis2_env_t **env)
+{
+ return AXIS2_INTF_TO_IMPL(redefine)->obj_type;
+}
+
+
+axis2_hash_t *AXIS2_CALL
+axis2_xml_schema_redefine_super_objs(void *redefine,
+ axis2_env_t **env)
+{
+ return AXIS2_INTF_TO_IMPL(redefine)->ht_super;
+}
+
\ No newline at end of file
Modified: webservices/axis2/trunk/c/modules/xml/xml_schema/xml_schema_simple_content.c
URL: http://svn.apache.org/viewcvs/webservices/axis2/trunk/c/modules/xml/xml_schema/xml_schema_simple_content.c?rev=406594&r1=406593&r2=406594&view=diff
==============================================================================
--- webservices/axis2/trunk/c/modules/xml/xml_schema/xml_schema_simple_content.c (original)
+++ webservices/axis2/trunk/c/modules/xml/xml_schema/xml_schema_simple_content.c Mon May 15 02:31:10 2006
@@ -33,7 +33,9 @@
void *content;
- int content_type;
+ axis2_xml_schema_types_t obj_type;
+
+ axis2_hash_t *ht_super;
};
#define AXIS2_INTF_TO_IMPL(sim_content) \
@@ -50,16 +52,19 @@
void* AXIS2_CALL
axis2_xml_schema_simple_content_get_content(void *sim_content,
axis2_env_t **env);
+
+axis2_xml_schema_types_t AXIS2_CALL
+axis2_xml_schema_simple_content_type(void *sim_content,
+ axis2_env_t **env);
+
+axis2_hash_t* AXIS2_CALL
+axis2_xml_schema_simple_content_super_objs(void *sim_content,
+ axis2_env_t **env);
axis2_status_t AXIS2_CALL
axis2_xml_schema_simple_content_set_content(void *sim_content,
axis2_env_t **env,
- void* content,
- int content_type);
-
-int AXIS2_CALL
-axis2_xml_schema_simple_content_get_content_type(void *sim_content,
- axis2_env_t **env);
+ void* content);
axis2_char_t* AXIS2_CALL
axis2_xml_schema_simple_content_to_string(void *sim_content,
@@ -71,116 +76,142 @@
AXIS2_DECLARE(axis2_xml_schema_simple_content_t *)
axis2_xml_schema_simple_content_create(axis2_env_t **env)
{
- axis2_xml_schema_simple_content_impl_t *group_impl = NULL;
+ axis2_xml_schema_simple_content_impl_t *sim_cnt_impl = NULL;
axis2_status_t status = AXIS2_FAILURE;
- group_impl = (axis2_xml_schema_simple_content_impl_t*)AXIS2_MALLOC((*env)->allocator,
+ sim_cnt_impl = (axis2_xml_schema_simple_content_impl_t*)AXIS2_MALLOC((*env)->allocator,
sizeof(axis2_xml_schema_simple_content_impl_t));
- if(!group_impl)
+ if(!sim_cnt_impl)
{
AXIS2_ERROR_SET((*env)->error, AXIS2_ERROR_NO_MEMORY, AXIS2_FAILURE);
return NULL;
}
- group_impl->annotated = NULL;
- group_impl->methods = NULL;
- group_impl->content = NULL;
- group_impl->content_type = -1;
- group_impl->sim_content.base.ops = NULL;
- group_impl->sim_content.ops = NULL;
+ sim_cnt_impl->annotated = NULL;
+ sim_cnt_impl->methods = NULL;
+ sim_cnt_impl->content = NULL;
+ sim_cnt_impl->sim_content.base.ops = NULL;
+ sim_cnt_impl->sim_content.ops = NULL;
+ sim_cnt_impl->ht_super = NULL;
+ sim_cnt_impl->obj_type = AXIS2_XML_SCHEMA_SIMPLE_CONTENT;
- group_impl->sim_content.ops = AXIS2_MALLOC((*env)->allocator,
+ sim_cnt_impl->sim_content.ops = AXIS2_MALLOC((*env)->allocator,
sizeof(axis2_xml_schema_simple_content_ops_t));
- if(!group_impl->sim_content.ops)
+ if(!sim_cnt_impl->sim_content.ops)
{
- axis2_xml_schema_simple_content_free(&(group_impl->sim_content), env);
+ axis2_xml_schema_simple_content_free(&(sim_cnt_impl->sim_content), env);
AXIS2_ERROR_SET((*env)->error, AXIS2_ERROR_NO_MEMORY, AXIS2_FAILURE);
return NULL;
}
- group_impl->sim_content.ops->free =
+ sim_cnt_impl->sim_content.ops->free =
axis2_xml_schema_simple_content_free;
- group_impl->sim_content.ops->get_base_impl =
+ sim_cnt_impl->sim_content.ops->type =
+ axis2_xml_schema_simple_content_type;
+ sim_cnt_impl->sim_content.ops->super_objs =
+ axis2_xml_schema_simple_content_super_objs;
+ sim_cnt_impl->sim_content.ops->get_base_impl =
axis2_xml_schema_simple_content_get_base_impl;
- group_impl->sim_content.ops->get_content_type =
- axis2_xml_schema_simple_content_get_content_type;
- group_impl->sim_content.ops->set_content =
+ sim_cnt_impl->sim_content.ops->set_content =
axis2_xml_schema_simple_content_set_content;
- group_impl->sim_content.ops->get_content =
+ sim_cnt_impl->sim_content.ops->get_content =
axis2_xml_schema_simple_content_get_content;
- group_impl->sim_content.ops->to_string =
+ sim_cnt_impl->sim_content.ops->to_string =
axis2_xml_schema_simple_content_to_string;
- group_impl->methods = axis2_hash_make(env);
+ sim_cnt_impl->methods = axis2_hash_make(env);
- if(!group_impl->methods)
+ if(!sim_cnt_impl->methods)
{
- axis2_xml_schema_simple_content_free(&(group_impl->sim_content), env);
+ axis2_xml_schema_simple_content_free(&(sim_cnt_impl->sim_content), env);
AXIS2_ERROR_SET((*env)->error, AXIS2_ERROR_NO_MEMORY, AXIS2_FAILURE);
return NULL;
}
- axis2_hash_set(group_impl->methods, "free", AXIS2_HASH_KEY_STRING,
+ axis2_hash_set(sim_cnt_impl->methods, "free", AXIS2_HASH_KEY_STRING,
axis2_xml_schema_simple_content_free);
- axis2_hash_set(group_impl->methods, "get_content",
+ axis2_hash_set(sim_cnt_impl->methods, "type", AXIS2_HASH_KEY_STRING,
+ axis2_xml_schema_simple_content_type);
+ axis2_hash_set(sim_cnt_impl->methods, "super_objs", AXIS2_HASH_KEY_STRING,
+ axis2_xml_schema_simple_content_super_objs);
+ axis2_hash_set(sim_cnt_impl->methods, "get_content",
AXIS2_HASH_KEY_STRING, axis2_xml_schema_simple_content_get_content);
- axis2_hash_set(group_impl->methods, "set_content",
+ axis2_hash_set(sim_cnt_impl->methods, "set_content",
AXIS2_HASH_KEY_STRING, axis2_xml_schema_simple_content_set_content);
- axis2_hash_set(group_impl->methods, "get_content_type",
- AXIS2_HASH_KEY_STRING, axis2_xml_schema_simple_content_get_content_type);
- axis2_hash_set(group_impl->methods, "to_string",
+ axis2_hash_set(sim_cnt_impl->methods, "to_string",
AXIS2_HASH_KEY_STRING, axis2_xml_schema_simple_content_to_string);
- group_impl->annotated = axis2_xml_schema_annotated_create(env);
- if(!group_impl->annotated)
+ sim_cnt_impl->ht_super = axis2_hash_make(env);
+ if(!sim_cnt_impl->ht_super)
+ {
+ axis2_xml_schema_simple_content_free(&(sim_cnt_impl->sim_content), env);
+ return NULL;
+ }
+ sim_cnt_impl->annotated = axis2_xml_schema_annotated_create(env);
+ if(!sim_cnt_impl->annotated)
{
- axis2_xml_schema_simple_content_free(&(group_impl->sim_content), env);
+ axis2_xml_schema_simple_content_free(&(sim_cnt_impl->sim_content), env);
return NULL;
}
+ axis2_hash_set(sim_cnt_impl->ht_super, "AXIS2_XML_SCHEMA_SIMPLE_CONTENT",
+ AXIS2_HASH_KEY_STRING, &(sim_cnt_impl->sim_content));
+
+ axis2_hash_set(sim_cnt_impl->ht_super, "AXIS2_XML_SCHEMA_ANNOTATED",
+ AXIS2_HASH_KEY_STRING, sim_cnt_impl->annotated);
+
+ axis2_hash_set(sim_cnt_impl->ht_super, "AXIS2_XML_SCHEMA_OBJ",
+ AXIS2_HASH_KEY_STRING,
+ AXIS2_XML_SCHEMA_ANNOTATED_GET_BASE_IMPL(sim_cnt_impl->annotated, env));
+
status = axis2_xml_schema_annotated_resolve_methods(
- &(group_impl->sim_content.base), env, group_impl->annotated,
- group_impl->methods);
+ &(sim_cnt_impl->sim_content.base), env, sim_cnt_impl->annotated,
+ sim_cnt_impl->methods);
- return &(group_impl->sim_content);
+ return &(sim_cnt_impl->sim_content);
}
axis2_status_t AXIS2_CALL
axis2_xml_schema_simple_content_free(void *sim_content,
axis2_env_t **env)
{
- axis2_xml_schema_simple_content_impl_t *group_impl = NULL;
+ axis2_xml_schema_simple_content_impl_t *sim_cnt_impl = NULL;
AXIS2_ENV_CHECK(env, AXIS2_FAILURE);
- group_impl = AXIS2_INTF_TO_IMPL(sim_content);
+ sim_cnt_impl = AXIS2_INTF_TO_IMPL(sim_content);
- if(NULL != group_impl->content)
+ if(NULL != sim_cnt_impl->content)
{
/** TODO */
}
- if(NULL != group_impl->methods)
+ if(NULL != sim_cnt_impl->methods)
+ {
+ axis2_hash_free(sim_cnt_impl->methods, env);
+ sim_cnt_impl->methods = NULL;
+ }
+ if(NULL != sim_cnt_impl->annotated)
{
- axis2_hash_free(group_impl->methods, env);
- group_impl->methods = NULL;
+ AXIS2_XML_SCHEMA_ANNOTATED_FREE(sim_cnt_impl->annotated, env);
+ sim_cnt_impl->annotated = NULL;
}
- if(NULL != group_impl->annotated)
+ if(NULL != sim_cnt_impl->ht_super)
{
- AXIS2_XML_SCHEMA_ANNOTATED_FREE(group_impl->annotated, env);
- group_impl->annotated = NULL;
+ axis2_hash_free(sim_cnt_impl->ht_super, env);
+ sim_cnt_impl->ht_super = NULL;
}
- if(NULL != group_impl->sim_content.base.ops)
+ if(NULL != sim_cnt_impl->sim_content.base.ops)
{
- AXIS2_FREE((*env)->allocator, group_impl->sim_content.base.ops);
- group_impl->sim_content.base.ops = NULL;
+ AXIS2_FREE((*env)->allocator, sim_cnt_impl->sim_content.base.ops);
+ sim_cnt_impl->sim_content.base.ops = NULL;
}
- if(NULL != group_impl->sim_content.ops)
+ if(NULL != sim_cnt_impl->sim_content.ops)
{
- AXIS2_FREE((*env)->allocator, group_impl->sim_content.ops);
- group_impl->sim_content.ops = NULL;
+ AXIS2_FREE((*env)->allocator, sim_cnt_impl->sim_content.ops);
+ sim_cnt_impl->sim_content.ops = NULL;
}
- AXIS2_FREE((*env)->allocator, group_impl);
- group_impl = NULL;
+ AXIS2_FREE((*env)->allocator, sim_cnt_impl);
+ sim_cnt_impl = NULL;
return AXIS2_SUCCESS;
}
@@ -188,28 +219,30 @@
axis2_xml_schema_simple_content_get_base_impl(void *sim_content,
axis2_env_t **env)
{
- axis2_xml_schema_simple_content_impl_t *group_impl = NULL;
+ axis2_xml_schema_simple_content_impl_t *sim_cnt_impl = NULL;
AXIS2_ENV_CHECK(env, NULL);
- group_impl = AXIS2_INTF_TO_IMPL(sim_content);
- return group_impl->annotated;
+ sim_cnt_impl = AXIS2_INTF_TO_IMPL(sim_content);
+ return sim_cnt_impl->annotated;
}
+/*
+
AXIS2_DECLARE(axis2_status_t)
axis2_xml_schema_simple_content_resolve_methods(
axis2_xml_schema_simple_content_t *sim_content,
axis2_env_t **env,
- axis2_xml_schema_simple_content_t *group_impl,
+ axis2_xml_schema_simple_content_t *sim_cnt_impl,
axis2_hash_t *methods)
{
axis2_xml_schema_simple_content_impl_t *group_impl_l = NULL;
AXIS2_ENV_CHECK(env, AXIS2_FAILURE);
- AXIS2_PARAM_CHECK((*env)->error, group_impl, AXIS2_FAILURE);
+ AXIS2_PARAM_CHECK((*env)->error, sim_cnt_impl, AXIS2_FAILURE);
AXIS2_PARAM_CHECK((*env)->error, methods, AXIS2_FAILURE);
AXIS2_PARAM_CHECK((*env)->error, sim_content, AXIS2_FAILURE);
- group_impl_l = (axis2_xml_schema_simple_content_impl_t *) group_impl;
+ group_impl_l = (axis2_xml_schema_simple_content_impl_t *) sim_cnt_impl;
sim_content->ops = AXIS2_MALLOC((*env)->allocator,
sizeof(axis2_xml_schema_simple_content_ops_t));
@@ -222,8 +255,6 @@
AXIS2_HASH_KEY_STRING);
sim_content->ops->get_base_impl =
group_impl_l->sim_content.ops->get_base_impl;
- sim_content->ops->get_content_type =
- group_impl_l->sim_content.ops->get_content_type;
sim_content->ops->get_content =
group_impl_l->sim_content.ops->get_content;
sim_content->ops->set_content =
@@ -234,6 +265,8 @@
return axis2_xml_schema_annotated_resolve_methods(&(sim_content->base),
env, group_impl_l->annotated, methods);
}
+*/
+
void* AXIS2_CALL
axis2_xml_schema_simple_content_get_content(void *sim_content,
@@ -246,50 +279,53 @@
axis2_status_t AXIS2_CALL
axis2_xml_schema_simple_content_set_content(void *sim_content,
axis2_env_t **env,
- void *content,
- int content_type)
+ void *content)
{
- axis2_xml_schema_simple_content_impl_t *group_impl = NULL;
+ axis2_xml_schema_simple_content_impl_t *sim_cnt_impl = NULL;
AXIS2_ENV_CHECK(env, AXIS2_FAILURE);
AXIS2_PARAM_CHECK((*env)->error, content, AXIS2_FAILURE);
- group_impl = AXIS2_INTF_TO_IMPL(sim_content);
+ sim_cnt_impl = AXIS2_INTF_TO_IMPL(sim_content);
- if(NULL != group_impl->content)
+ if(NULL != sim_cnt_impl->content)
{
/** TODO */
}
- group_impl->content = content;
- group_impl->content_type = content_type;
-
+ sim_cnt_impl->content = content;
return AXIS2_SUCCESS;
}
-int AXIS2_CALL
-axis2_xml_schema_simple_content_get_content_type(void *sim_content,
- axis2_env_t **env)
-{
- AXIS2_ENV_CHECK(env, -1);
- return AXIS2_INTF_TO_IMPL(sim_content)->content_type;
-}
-
axis2_char_t* AXIS2_CALL
axis2_xml_schema_simple_content_to_string(void *sim_content,
axis2_env_t **env,
axis2_char_t *prefix,
int tab)
{
- axis2_xml_schema_simple_content_impl_t *group_impl = NULL;
+ axis2_xml_schema_simple_content_impl_t *sim_cnt_impl = NULL;
axis2_char_t *xml = NULL;
AXIS2_ENV_CHECK(env, NULL);
- group_impl = AXIS2_INTF_TO_IMPL(sim_content);
+ sim_cnt_impl = AXIS2_INTF_TO_IMPL(sim_content);
if(NULL != prefix && AXIS2_STRCMP(prefix, "") != 0 && strchr(prefix, ':') == NULL)
{
xml = AXIS2_STRACAT(prefix, ":", env);
}
return xml;
}
+
+axis2_xml_schema_types_t AXIS2_CALL
+axis2_xml_schema_simple_content_type(void *sim_content,
+ axis2_env_t **env)
+{
+ return AXIS2_INTF_TO_IMPL(sim_content)->obj_type;
+}
+
+axis2_hash_t* AXIS2_CALL
+axis2_xml_schema_simple_content_super_objs(void *sim_content,
+ axis2_env_t **env)
+{
+ return AXIS2_INTF_TO_IMPL(sim_content)->ht_super;
+}
Modified: webservices/axis2/trunk/c/modules/xml/xml_schema/xml_schema_simple_content_extension.c
URL: http://svn.apache.org/viewcvs/webservices/axis2/trunk/c/modules/xml/xml_schema/xml_schema_simple_content_extension.c?rev=406594&r1=406593&r2=406594&view=diff
==============================================================================
--- webservices/axis2/trunk/c/modules/xml/xml_schema/xml_schema_simple_content_extension.c (original)
+++ webservices/axis2/trunk/c/modules/xml/xml_schema/xml_schema_simple_content_extension.c Mon May 15 02:31:10 2006
@@ -35,6 +35,12 @@
axis2_qname_t *base_type_name;
+ axis2_xml_schema_types_t obj_type;
+
+ axis2_hash_t *ht_super;
+
+ axis2_hash_t *methods;
+
};
#define AXIS2_INTF_TO_IMPL(sim_content_ext) \
@@ -42,45 +48,56 @@
axis2_status_t AXIS2_CALL
axis2_xml_schema_simple_content_extension_free(
- axis2_xml_schema_simple_content_extension_t *sim_content_ext,
+ void *sim_content_ext,
axis2_env_t **env);
axis2_xml_schema_annotated_t *AXIS2_CALL
axis2_xml_schema_simple_content_extension_get_base_impl(
- axis2_xml_schema_simple_content_extension_t *sim_content_ext,
+ void *sim_content_ext,
+ axis2_env_t **env);
+
+axis2_xml_schema_types_t AXIS2_CALL
+axis2_xml_schema_simple_content_extension_type(
+ void *sim_content_ext,
+ axis2_env_t **env);
+
+axis2_hash_t *AXIS2_CALL
+axis2_xml_schema_simple_content_extension_super_objs(
+ void *sim_content_ext,
axis2_env_t **env);
+
axis2_xml_schema_any_attribute_t* AXIS2_CALL
axis2_xml_schema_simple_content_extension_get_any_attribute(
- axis2_xml_schema_simple_content_extension_t *sim_content_ext,
+ void *sim_content_ext,
axis2_env_t **env);
axis2_status_t AXIS2_CALL
axis2_xml_schema_simple_content_extension_set_any_attribute(
- axis2_xml_schema_simple_content_extension_t *sim_content_ext,
+ void *sim_content_ext,
axis2_env_t **env,
axis2_xml_schema_any_attribute_t *any_attr);
axis2_xml_schema_obj_collection_t* AXIS2_CALL
axis2_xml_schema_simple_content_extension_get_attributes(
- axis2_xml_schema_simple_content_extension_t *sim_content_ext,
+ void *sim_content_ext,
axis2_env_t **env);
axis2_status_t AXIS2_CALL
axis2_xml_schema_simple_content_extension_set_base_type_name(
- axis2_xml_schema_simple_content_extension_t *sim_content_ext,
+ void *sim_content_ext,
axis2_env_t **env,
axis2_qname_t *base_type_name);
axis2_qname_t* AXIS2_CALL
axis2_xml_schema_simple_content_extension_get_base_type_name(
- axis2_xml_schema_simple_content_extension_t *sim_content_ext,
+ void *sim_content_ext,
axis2_env_t **env);
int AXIS2_CALL
axis2_xml_schema_simple_content_extension_get_type(
- axis2_xml_schema_simple_content_extension_t *sim_content_ext,
+ void *sim_content_ext,
axis2_env_t **env);
/*************************** end function protos **********************************/
@@ -102,9 +119,12 @@
sim_content_ext_impl->annotated = NULL;
sim_content_ext_impl->sim_content_ext.ops = NULL;
+ sim_content_ext_impl->sim_content_ext.base.ops = NULL;
sim_content_ext_impl->attributes = NULL;
sim_content_ext_impl->base_type_name = NULL;
sim_content_ext_impl->any_attribute = NULL;
+ sim_content_ext_impl->obj_type = AXIS2_XML_SCHEMA_SIMPLE_CONTENT_EXTENSION;
+ sim_content_ext_impl->ht_super = NULL;
sim_content_ext_impl->sim_content_ext.ops = AXIS2_MALLOC((*env)->allocator,
sizeof(axis2_xml_schema_simple_content_extension_ops_t));
@@ -117,11 +137,15 @@
return NULL;
}
-
sim_content_ext_impl->sim_content_ext.ops->free =
axis2_xml_schema_simple_content_extension_free;
sim_content_ext_impl->sim_content_ext.ops->get_base_impl =
axis2_xml_schema_simple_content_extension_get_base_impl;
+ sim_content_ext_impl->sim_content_ext.ops->type =
+ axis2_xml_schema_simple_content_extension_type;
+ sim_content_ext_impl->sim_content_ext.ops->super_objs =
+ axis2_xml_schema_simple_content_extension_super_objs;
+
sim_content_ext_impl->sim_content_ext.ops->get_any_attribute =
axis2_xml_schema_simple_content_extension_get_any_attribute;
sim_content_ext_impl->sim_content_ext.ops->set_any_attribute =
@@ -133,6 +157,35 @@
sim_content_ext_impl->sim_content_ext.ops->set_base_type_name =
axis2_xml_schema_simple_content_extension_set_base_type_name;
+ sim_content_ext_impl->ht_super = axis2_hash_make(env);
+ sim_content_ext_impl->methods = axis2_hash_make(env);
+ if(!sim_content_ext_impl->methods || !sim_content_ext_impl->ht_super)
+ {
+ axis2_xml_schema_simple_content_extension_free(
+ &(sim_content_ext_impl->sim_content_ext), env);
+ return NULL;
+ }
+
+ axis2_hash_set(sim_content_ext_impl->methods, "free", AXIS2_HASH_KEY_STRING,
+ axis2_xml_schema_simple_content_extension_free);
+ axis2_hash_set(sim_content_ext_impl->methods, "type", AXIS2_HASH_KEY_STRING,
+ axis2_xml_schema_simple_content_extension_type);
+ axis2_hash_set(sim_content_ext_impl->methods, "super_objs", AXIS2_HASH_KEY_STRING,
+ axis2_xml_schema_simple_content_extension_super_objs);
+
+ axis2_hash_set(sim_content_ext_impl->methods, "get_any_attribute", AXIS2_HASH_KEY_STRING,
+ axis2_xml_schema_simple_content_extension_get_any_attribute);
+
+ axis2_hash_set(sim_content_ext_impl->methods, "set_any_attribute", AXIS2_HASH_KEY_STRING,
+ axis2_xml_schema_simple_content_extension_set_any_attribute);
+
+ axis2_hash_set(sim_content_ext_impl->methods, "get_attributes", AXIS2_HASH_KEY_STRING,
+ axis2_xml_schema_simple_content_extension_get_attributes);
+ axis2_hash_set(sim_content_ext_impl->methods, "get_base_type_name", AXIS2_HASH_KEY_STRING,
+ axis2_xml_schema_simple_content_extension_get_base_type_name);
+ axis2_hash_set(sim_content_ext_impl->methods, "set_base_type_name", AXIS2_HASH_KEY_STRING,
+ axis2_xml_schema_simple_content_extension_set_base_type_name);
+
sim_content_ext_impl->annotated = axis2_xml_schema_annotated_create(env);
if(!sim_content_ext_impl->annotated)
{
@@ -143,15 +196,27 @@
sim_content_ext_impl->attributes = axis2_xml_schema_obj_collection_create(env);
if(!sim_content_ext_impl->attributes)
{
- axis2_xml_schema_simple_content_extension_free(&(sim_content_ext_impl->sim_content_ext), env);
+ axis2_xml_schema_simple_content_extension_free(&(sim_content_ext_impl->sim_content_ext),
+ env);
return NULL;
}
+ axis2_hash_set(sim_content_ext_impl->ht_super, "AXIS2_XML_SCHEMA_SIMPLE_CONTENT_EXTENSION",
+ AXIS2_HASH_KEY_STRING,&(sim_content_ext_impl->sim_content_ext));
+ axis2_hash_set(sim_content_ext_impl->ht_super, "AXIS2_XML_SCHEMA_ANNOTATED",
+ AXIS2_HASH_KEY_STRING,(sim_content_ext_impl->annotated));
+ axis2_hash_set(sim_content_ext_impl->ht_super, "AXIS2_XML_SCHEMA_OBJ",
+ AXIS2_HASH_KEY_STRING,
+ AXIS2_XML_SCHEMA_ANNOTATED_GET_BASE_IMPL(sim_content_ext_impl->annotated, env));
+
+ axis2_xml_schema_annotated_resolve_methods(&(sim_content_ext_impl->sim_content_ext.base),
+ env, sim_content_ext_impl->annotated, sim_content_ext_impl->methods);
+
return &(sim_content_ext_impl->sim_content_ext);
}
axis2_status_t AXIS2_CALL
axis2_xml_schema_simple_content_extension_free(
- axis2_xml_schema_simple_content_extension_t *sim_content_ext_ext,
+ void *sim_content_ext_ext,
axis2_env_t **env)
{
axis2_xml_schema_simple_content_extension_impl_t *content_ext_impl = NULL;
@@ -177,6 +242,11 @@
AXIS2_XML_SCHEMA_ANNOTATED_FREE(content_ext_impl->annotated, env);
content_ext_impl->annotated = NULL;
}
+ if(NULL != content_ext_impl->sim_content_ext.base.ops)
+ {
+ AXIS2_FREE((*env)->allocator, content_ext_impl->sim_content_ext.base.ops);
+ content_ext_impl->sim_content_ext.base.ops = NULL;
+ }
if(NULL != content_ext_impl->sim_content_ext.ops)
{
AXIS2_FREE((*env)->allocator, content_ext_impl->sim_content_ext.ops);
@@ -190,7 +260,7 @@
axis2_xml_schema_annotated_t *AXIS2_CALL
axis2_xml_schema_simple_content_extension_get_base_impl(
- axis2_xml_schema_simple_content_extension_t *sim_content_ext,
+ void *sim_content_ext,
axis2_env_t **env)
{
axis2_xml_schema_simple_content_extension_impl_t *content_ext_impl = NULL;
@@ -203,7 +273,7 @@
axis2_xml_schema_any_attribute_t* AXIS2_CALL
axis2_xml_schema_simple_content_extension_get_any_attribute(
- axis2_xml_schema_simple_content_extension_t *sim_content_ext,
+ void *sim_content_ext,
axis2_env_t **env)
{
axis2_xml_schema_simple_content_extension_impl_t *cnt_ext_impl = NULL;
@@ -214,7 +284,7 @@
axis2_status_t AXIS2_CALL
axis2_xml_schema_simple_content_extension_set_any_attribute(
- axis2_xml_schema_simple_content_extension_t *sim_content_ext,
+ void *sim_content_ext,
axis2_env_t **env,
axis2_xml_schema_any_attribute_t *any_attr)
{
@@ -233,7 +303,7 @@
axis2_xml_schema_obj_collection_t* AXIS2_CALL
axis2_xml_schema_simple_content_extension_get_attributes(
- axis2_xml_schema_simple_content_extension_t *sim_content,
+ void *sim_content,
axis2_env_t **env)
{
axis2_xml_schema_simple_content_extension_impl_t *cnt_ext_impl = NULL;
@@ -244,7 +314,7 @@
axis2_qname_t* AXIS2_CALL
axis2_xml_schema_simple_content_extension_get_base_type_name(
- axis2_xml_schema_simple_content_extension_t *sim_content,
+ void *sim_content,
axis2_env_t **env)
{
axis2_xml_schema_simple_content_extension_impl_t *content_ext_impl = NULL;
@@ -255,7 +325,7 @@
axis2_status_t AXIS2_CALL
axis2_xml_schema_simple_content_extension_set_base_type_name(
- axis2_xml_schema_simple_content_extension_t *sim_content,
+ void *sim_content,
axis2_env_t **env,
axis2_qname_t *base_type_name)
{
@@ -271,4 +341,19 @@
return AXIS2_SUCCESS;
}
+axis2_xml_schema_types_t AXIS2_CALL
+axis2_xml_schema_simple_content_extension_type(
+ void *sim_content_ext,
+ axis2_env_t **env)
+{
+ return AXIS2_INTF_TO_IMPL(sim_content_ext)->obj_type;
+}
+
+axis2_hash_t *AXIS2_CALL
+axis2_xml_schema_simple_content_extension_super_objs(
+ void *sim_content_ext,
+ axis2_env_t **env)
+{
+ return AXIS2_INTF_TO_IMPL(sim_content_ext)->ht_super;
+}
Modified: webservices/axis2/trunk/c/modules/xml/xml_schema/xml_schema_simple_content_restriction.c
URL: http://svn.apache.org/viewcvs/webservices/axis2/trunk/c/modules/xml/xml_schema/xml_schema_simple_content_restriction.c?rev=406594&r1=406593&r2=406594&view=diff
==============================================================================
--- webservices/axis2/trunk/c/modules/xml/xml_schema/xml_schema_simple_content_restriction.c (original)
+++ webservices/axis2/trunk/c/modules/xml/xml_schema/xml_schema_simple_content_restriction.c Mon May 15 02:31:10 2006
@@ -38,6 +38,12 @@
axis2_qname_t *base_type_name;
axis2_xml_schema_simple_type_t *base_type;
+
+ axis2_xml_schema_types_t obj_type;
+
+ axis2_hash_t *methods;
+
+ axis2_hash_t *ht_super;
};
#define AXIS2_INTF_TO_IMPL(sim_content_res) \
@@ -45,60 +51,80 @@
axis2_status_t AXIS2_CALL
axis2_xml_schema_simple_content_restriction_free(
- axis2_xml_schema_simple_content_restriction_t *sim_content_res,
+ void *sim_content_res,
axis2_env_t **env);
axis2_xml_schema_annotated_t *AXIS2_CALL
axis2_xml_schema_simple_content_restriction_get_base_impl(
- axis2_xml_schema_simple_content_restriction_t *sim_content_res,
+ void *sim_content_res,
+ axis2_env_t **env);
+
+axis2_xml_schema_types_t AXIS2_CALL
+axis2_xml_schema_simple_content_restriction_type(
+ void *sim_content_res,
axis2_env_t **env);
+axis2_hash_t *AXIS2_CALL
+axis2_xml_schema_simple_content_restriction_super_objs(
+ void *sim_content_res,
+ axis2_env_t **env);
+
+axis2_xml_schema_types_t AXIS2_CALL
+axis2_xml_schema_simple_content_restriction_type(
+ void *sim_content_res,
+ axis2_env_t **env);
+
+axis2_hash_t *AXIS2_CALL
+axis2_xml_schema_simple_content_restriction_super_objs(
+ void *sim_content_res,
+ axis2_env_t **env);
+
axis2_xml_schema_any_attribute_t* AXIS2_CALL
axis2_xml_schema_simple_content_restriction_get_any_attribute(
- axis2_xml_schema_simple_content_restriction_t *sim_content_res,
+ void *sim_content_res,
axis2_env_t **env);
axis2_status_t AXIS2_CALL
axis2_xml_schema_simple_content_restriction_set_any_attribute(
- axis2_xml_schema_simple_content_restriction_t *sim_content_res,
+ void *sim_content_res,
axis2_env_t **env,
axis2_xml_schema_any_attribute_t *any_attr);
axis2_xml_schema_obj_collection_t* AXIS2_CALL
axis2_xml_schema_simple_content_restriction_get_attributes(
- axis2_xml_schema_simple_content_restriction_t *sim_content_res,
+ void *sim_content_res,
axis2_env_t **env);
axis2_status_t AXIS2_CALL
axis2_xml_schema_simple_content_restriction_set_base_type_name(
- axis2_xml_schema_simple_content_restriction_t *sim_content_res,
+ void *sim_content_res,
axis2_env_t **env,
axis2_qname_t *base_type_name);
axis2_qname_t* AXIS2_CALL
axis2_xml_schema_simple_content_restriction_get_base_type_name(
- axis2_xml_schema_simple_content_restriction_t *sim_content_res,
+ void *sim_content_res,
axis2_env_t **env);
axis2_status_t AXIS2_CALL
axis2_xml_schema_simple_content_restriction_set_base_type(
- axis2_xml_schema_simple_content_restriction_t *sim_content_res,
+ void *sim_content_res,
axis2_env_t **env,
axis2_xml_schema_simple_type_t *base_type);
axis2_xml_schema_simple_type_t* AXIS2_CALL
axis2_xml_schema_simple_content_restriction_get_base_type(
- axis2_xml_schema_simple_content_restriction_t *sim_content_res,
+ void *sim_content_res,
axis2_env_t **env);
axis2_xml_schema_obj_collection_t* AXIS2_CALL
axis2_xml_schema_simple_content_restriction_get_facets(
- axis2_xml_schema_simple_content_restriction_t *sim_content_res,
+ void *sim_content_res,
axis2_env_t **env);
@@ -121,11 +147,16 @@
sim_content_res_impl->annotated = NULL;
sim_content_res_impl->sim_content_res.ops = NULL;
+ sim_content_res_impl->sim_content_res.base.ops = NULL;
sim_content_res_impl->attributes = NULL;
sim_content_res_impl->base_type_name = NULL;
sim_content_res_impl->any_attribute = NULL;
sim_content_res_impl->facets = NULL;
sim_content_res_impl->base_type = NULL;
+ sim_content_res_impl->ht_super = NULL;
+ sim_content_res_impl->obj_type = AXIS2_XML_SCHEMA_SIMPLE_CONTENT_RESTRICTION;
+ sim_content_res_impl->methods = NULL;
+ sim_content_res_impl->sim_content_res.base.ops = NULL;
sim_content_res_impl->sim_content_res.ops = AXIS2_MALLOC((*env)->allocator,
sizeof(axis2_xml_schema_simple_content_restriction_ops_t));
@@ -142,6 +173,12 @@
sim_content_res_impl->sim_content_res.ops->free =
axis2_xml_schema_simple_content_restriction_free;
+ sim_content_res_impl->sim_content_res.ops->type =
+ axis2_xml_schema_simple_content_restriction_type;
+
+ sim_content_res_impl->sim_content_res.ops->super_objs =
+ axis2_xml_schema_simple_content_restriction_super_objs;
+
sim_content_res_impl->sim_content_res.ops->get_base_impl =
axis2_xml_schema_simple_content_restriction_get_base_impl;
@@ -167,7 +204,47 @@
axis2_xml_schema_simple_content_restriction_get_base_type;
sim_content_res_impl->sim_content_res.ops->get_facets =
- axis2_xml_schema_simple_content_restriction_get_facets;
+ axis2_xml_schema_simple_content_restriction_get_facets;
+
+ sim_content_res_impl->methods = axis2_hash_make(env);
+ if(!sim_content_res_impl->methods)
+ {
+ axis2_xml_schema_simple_content_restriction_free(
+ &(sim_content_res_impl->sim_content_res), env);
+ return NULL;
+ }
+
+ axis2_hash_set(sim_content_res_impl->methods, "free", AXIS2_HASH_KEY_STRING,
+ axis2_xml_schema_simple_content_restriction_free);;
+
+ axis2_hash_set(sim_content_res_impl->methods, "type", AXIS2_HASH_KEY_STRING, axis2_xml_schema_simple_content_restriction_type);
+
+ axis2_hash_set(sim_content_res_impl->methods, "super_objs", AXIS2_HASH_KEY_STRING,
+ axis2_xml_schema_simple_content_restriction_super_objs);
+
+ axis2_hash_set(sim_content_res_impl->methods, "get_any_attribute", AXIS2_HASH_KEY_STRING,
+ axis2_xml_schema_simple_content_restriction_get_any_attribute);
+
+ axis2_hash_set(sim_content_res_impl->methods, "set_any_attribute", AXIS2_HASH_KEY_STRING,
+ axis2_xml_schema_simple_content_restriction_set_any_attribute);
+
+ axis2_hash_set(sim_content_res_impl->methods, "get_attribute", AXIS2_HASH_KEY_STRING,
+ axis2_xml_schema_simple_content_restriction_get_attributes);
+
+ axis2_hash_set(sim_content_res_impl->methods, "get_base_type_name", AXIS2_HASH_KEY_STRING,
+ axis2_xml_schema_simple_content_restriction_get_base_type_name);
+
+ axis2_hash_set(sim_content_res_impl->methods, "set_base_type_name", AXIS2_HASH_KEY_STRING,
+ axis2_xml_schema_simple_content_restriction_set_base_type_name);
+
+ axis2_hash_set(sim_content_res_impl->methods, "set_base_type", AXIS2_HASH_KEY_STRING,
+ axis2_xml_schema_simple_content_restriction_set_base_type);
+
+ axis2_hash_set(sim_content_res_impl->methods, "get_base_type", AXIS2_HASH_KEY_STRING,
+ axis2_xml_schema_simple_content_restriction_get_base_type);
+
+ axis2_hash_set(sim_content_res_impl->methods, "get_facets", AXIS2_HASH_KEY_STRING,
+ axis2_xml_schema_simple_content_restriction_get_facets);
sim_content_res_impl->annotated = axis2_xml_schema_annotated_create(env);
if(!sim_content_res_impl->annotated)
@@ -184,13 +261,29 @@
&(sim_content_res_impl->sim_content_res), env);
return NULL;
}
+ sim_content_res_impl->ht_super = axis2_hash_make(env);
+
+ axis2_hash_set(sim_content_res_impl->ht_super ,
+ "AXIS2_XML_SCHEMA_SIMPLE_CONTENT_RESTRICTION", AXIS2_HASH_KEY_STRING,
+ &(sim_content_res_impl->sim_content_res));
+
+ axis2_hash_set(sim_content_res_impl->ht_super ,
+ "AXIS2_XML_SCHEMA_ANNOTATED", AXIS2_HASH_KEY_STRING,
+ sim_content_res_impl->annotated);
+
+ axis2_hash_set(sim_content_res_impl->ht_super ,
+ "AXIS2_XML_SCHEMA_OBJ", AXIS2_HASH_KEY_STRING,
+ AXIS2_XML_SCHEMA_ANNOTATED_GET_BASE_IMPL(sim_content_res_impl->annotated, env));
+
+ axis2_xml_schema_annotated_resolve_methods(&(sim_content_res_impl->sim_content_res.base),
+ env, sim_content_res_impl->annotated, sim_content_res_impl->methods);
return &(sim_content_res_impl->sim_content_res);
}
axis2_status_t AXIS2_CALL
axis2_xml_schema_simple_content_restriction_free(
- axis2_xml_schema_simple_content_restriction_t *sim_content_res,
+ void *sim_content_res,
axis2_env_t **env)
{
axis2_xml_schema_simple_content_restriction_impl_t *content_res_impl = NULL;
@@ -202,6 +295,12 @@
AXIS2_XML_SCHEMA_ANY_ATTRIBUTE_FREE(content_res_impl->any_attribute, env);
content_res_impl->any_attribute = NULL;
}
+ if(NULL != content_res_impl->sim_content_res.base.ops)
+ {
+ AXIS2_FREE((*env)->allocator, content_res_impl->sim_content_res.base.ops);
+ content_res_impl->sim_content_res.base.ops = NULL;
+
+ }
if(NULL != content_res_impl->attributes)
{
/** TODO free attributes */
@@ -233,7 +332,7 @@
axis2_xml_schema_annotated_t *AXIS2_CALL
axis2_xml_schema_simple_content_restriction_get_base_impl(
- axis2_xml_schema_simple_content_restriction_t *sim_content_res,
+ void *sim_content_res,
axis2_env_t **env)
{
axis2_xml_schema_simple_content_restriction_impl_t *content_res_impl = NULL;
@@ -246,7 +345,7 @@
axis2_xml_schema_any_attribute_t* AXIS2_CALL
axis2_xml_schema_simple_content_restriction_get_any_attribute(
- axis2_xml_schema_simple_content_restriction_t *sim_content_res,
+ void *sim_content_res,
axis2_env_t **env)
{
axis2_xml_schema_simple_content_restriction_impl_t *cnt_res_impl = NULL;
@@ -257,7 +356,7 @@
axis2_status_t AXIS2_CALL
axis2_xml_schema_simple_content_restriction_set_any_attribute(
- axis2_xml_schema_simple_content_restriction_t *sim_content_res,
+ void *sim_content_res,
axis2_env_t **env,
axis2_xml_schema_any_attribute_t *any_attr)
{
@@ -276,7 +375,7 @@
axis2_xml_schema_obj_collection_t* AXIS2_CALL
axis2_xml_schema_simple_content_restriction_get_attributes(
- axis2_xml_schema_simple_content_restriction_t *sim_content,
+ void *sim_content,
axis2_env_t **env)
{
axis2_xml_schema_simple_content_restriction_impl_t *cnt_res_impl = NULL;
@@ -287,7 +386,7 @@
axis2_qname_t* AXIS2_CALL
axis2_xml_schema_simple_content_restriction_get_base_type_name(
- axis2_xml_schema_simple_content_restriction_t *sim_content,
+ void *sim_content,
axis2_env_t **env)
{
axis2_xml_schema_simple_content_restriction_impl_t *content_res_impl = NULL;
@@ -298,7 +397,7 @@
axis2_status_t AXIS2_CALL
axis2_xml_schema_simple_content_restriction_set_base_type_name(
- axis2_xml_schema_simple_content_restriction_t *sim_content,
+ void *sim_content,
axis2_env_t **env,
axis2_qname_t *base_type_name)
{
@@ -316,7 +415,7 @@
axis2_status_t AXIS2_CALL
axis2_xml_schema_simple_content_restriction_set_base_type(
- axis2_xml_schema_simple_content_restriction_t *sim_content_res,
+ void *sim_content_res,
axis2_env_t **env,
axis2_xml_schema_simple_type_t *base_type)
{
@@ -336,7 +435,7 @@
axis2_xml_schema_simple_type_t* AXIS2_CALL
axis2_xml_schema_simple_content_restriction_get_base_type(
- axis2_xml_schema_simple_content_restriction_t *sim_content_res,
+ void *sim_content_res,
axis2_env_t **env)
{
return AXIS2_INTF_TO_IMPL(sim_content_res)->base_type;
@@ -345,8 +444,24 @@
axis2_xml_schema_obj_collection_t* AXIS2_CALL
axis2_xml_schema_simple_content_restriction_get_facets(
- axis2_xml_schema_simple_content_restriction_t *sim_content_res,
+ void *sim_content_res,
axis2_env_t **env)
{
return AXIS2_INTF_TO_IMPL(sim_content_res)->facets;
-}
\ No newline at end of file
+}
+
+axis2_xml_schema_types_t AXIS2_CALL
+axis2_xml_schema_simple_content_restriction_type(
+ void *sim_content_res,
+ axis2_env_t **env)
+{
+ return AXIS2_INTF_TO_IMPL(sim_content_res)->obj_type;
+}
+
+axis2_hash_t *AXIS2_CALL
+axis2_xml_schema_simple_content_restriction_super_objs(
+ void *sim_content_res,
+ axis2_env_t **env)
+{
+ return AXIS2_INTF_TO_IMPL(sim_content_res)->ht_super;
+}
\ No newline at end of file
Modified: webservices/axis2/trunk/c/modules/xml/xml_schema/xml_schema_simple_type.c
URL: http://svn.apache.org/viewcvs/webservices/axis2/trunk/c/modules/xml/xml_schema/xml_schema_simple_type.c?rev=406594&r1=406593&r2=406594&view=diff
==============================================================================
--- webservices/axis2/trunk/c/modules/xml/xml_schema/xml_schema_simple_type.c (original)
+++ webservices/axis2/trunk/c/modules/xml/xml_schema/xml_schema_simple_type.c Mon May 15 02:31:10 2006
@@ -37,6 +37,10 @@
axis2_hash_t *methods;
+ axis2_hash_t *ht_super;
+
+ axis2_xml_schema_types_t obj_type;
+
axis2_xml_schema_simple_type_content_t *content;
};
@@ -52,6 +56,15 @@
axis2_xml_schema_simple_type_get_base_impl(void *simple_type,
axis2_env_t **env);
+axis2_hash_t *AXIS2_CALL
+axis2_xml_schema_simple_type_super_objs(void *simple_type,
+ axis2_env_t **env);
+
+axis2_xml_schema_types_t AXIS2_CALL
+axis2_xml_schema_simple_type_type(void *simple_type,
+ axis2_env_t **env);
+
+
axis2_xml_schema_simple_type_content_t* AXIS2_CALL
axis2_xml_schema_simple_type_get_content(void *simple_type,
axis2_env_t **env);
@@ -74,6 +87,7 @@
axis2_xml_schema_t *schema)
{
axis2_xml_schema_simple_type_impl_t *simple_type = NULL;
+ axis2_xml_schema_annotated_t *annotated = NULL;
axis2_status_t status = AXIS2_FAILURE;
simple_type = AXIS2_MALLOC((*env)->allocator,
@@ -90,6 +104,8 @@
simple_type->schema_type = NULL;
simple_type->simple_type.ops = NULL;
simple_type->simple_type.base.ops = NULL;
+ simple_type->ht_super = NULL;
+ simple_type->obj_type = AXIS2_XML_SCHEMA_SIMPLE_TYPE;
simple_type->simple_type.ops = AXIS2_MALLOC((*env)->allocator,
sizeof(axis2_xml_schema_simple_type_ops_t));
@@ -120,9 +136,16 @@
simple_type->simple_type.ops->set_content =
axis2_xml_schema_simple_type_set_content;
+
+ simple_type->simple_type.ops->type =
+ axis2_xml_schema_simple_type_type;
+
+ simple_type->simple_type.ops->super_objs =
+ axis2_xml_schema_simple_type_super_objs;
simple_type->methods = axis2_hash_make(env);
- if(!simple_type->methods)
+ simple_type->ht_super = axis2_hash_make(env);
+ if(!simple_type->methods || !simple_type->ht_super)
{
axis2_xml_schema_simple_type_free(&(simple_type->simple_type), env);
AXIS2_ERROR_SET((*env)->error, AXIS2_ERROR_NO_MEMORY, AXIS2_FAILURE);
@@ -135,6 +158,25 @@
AXIS2_HASH_KEY_STRING, axis2_xml_schema_simple_type_get_content);
axis2_hash_set(simple_type->methods, "set_content",
AXIS2_HASH_KEY_STRING, axis2_xml_schema_simple_type_set_content);
+ axis2_hash_set(simple_type->methods, "type",
+ AXIS2_HASH_KEY_STRING, axis2_xml_schema_simple_type_type);
+ axis2_hash_set(simple_type->methods, "super_objs",
+ AXIS2_HASH_KEY_STRING, axis2_xml_schema_simple_type_super_objs);
+
+ axis2_hash_set(simple_type->ht_super, "AXIS2_XML_SCHEMA_SIMPLE_TYPE",
+ AXIS2_HASH_KEY_STRING, &(simple_type->simple_type));
+ axis2_hash_set(simple_type->ht_super, "AXIS2_XML_SCHEMA_TYPE",
+ AXIS2_HASH_KEY_STRING, simple_type->schema_type);
+
+ annotated = AXIS2_XML_SCHEMA_TYPE_GET_BASE_IMPL(simple_type->schema_type, env);
+ if(NULL != annotated)
+ {
+ axis2_hash_set(simple_type->ht_super, "AXIS2_XML_SCHEMA_ANNOTATED",
+ AXIS2_HASH_KEY_STRING, annotated);
+ axis2_hash_set(simple_type->ht_super, "AXIS2_XML_SCHEMA_OBJ",
+ AXIS2_HASH_KEY_STRING,
+ AXIS2_XML_SCHEMA_ANNOTATED_GET_BASE_IMPL(annotated, env));
+ }
status = axis2_xml_schema_type_resolve_methods(&(simple_type->simple_type.base),
env, simple_type->schema_type, simple_type->methods);
@@ -156,7 +198,11 @@
axis2_hash_free(simple_type_impl->methods, env);
simple_type_impl->methods = NULL;
}
-
+ if(NULL != simple_type_impl->ht_super)
+ {
+ axis2_hash_free(simple_type_impl->ht_super, env);
+ simple_type_impl->ht_super = NULL;
+ }
if(NULL != simple_type_impl->schema_type)
{
AXIS2_XML_SCHEMA_TYPE_FREE(simple_type_impl->schema_type, env);
@@ -266,3 +312,16 @@
return NULL;
}
+axis2_hash_t *AXIS2_CALL
+axis2_xml_schema_simple_type_super_objs(void *simple_type,
+ axis2_env_t **env)
+{
+ return AXIS2_INTF_TO_IMPL(simple_type)->ht_super;
+}
+
+axis2_xml_schema_types_t AXIS2_CALL
+axis2_xml_schema_simple_type_type(void *simple_type,
+ axis2_env_t **env)
+{
+ return AXIS2_INTF_TO_IMPL(simple_type)->obj_type;
+}
\ No newline at end of file
Modified: webservices/axis2/trunk/c/modules/xml/xml_schema/xml_schema_simple_type_content.c
URL: http://svn.apache.org/viewcvs/webservices/axis2/trunk/c/modules/xml/xml_schema/xml_schema_simple_type_content.c?rev=406594&r1=406593&r2=406594&view=diff
==============================================================================
--- webservices/axis2/trunk/c/modules/xml/xml_schema/xml_schema_simple_type_content.c (original)
+++ webservices/axis2/trunk/c/modules/xml/xml_schema/xml_schema_simple_type_content.c Mon May 15 02:31:10 2006
@@ -29,10 +29,11 @@
axis2_xml_schema_annotated_t *annotated;
- int type;
-
axis2_hash_t *methods;
+
+ axis2_hash_t *ht_super;
+ axis2_xml_schema_types_t obj_type;
};
#define AXIS2_INTF_TO_IMPL(sim_type_cont) \
@@ -48,14 +49,13 @@
axis2_xml_schema_simple_type_content_get_base_impl(void *sim_type_cont,
axis2_env_t **env);
-int AXIS2_CALL
-axis2_xml_schema_simple_type_content_get_type(void *sim_type_cont,
+axis2_xml_schema_types_t AXIS2_CALL
+axis2_xml_schema_simple_type_content_type(void *sim_type_cont,
axis2_env_t **env);
-axis2_status_t AXIS2_CALL
-axis2_xml_schema_simple_type_content_set_type(void *sim_type_cont,
- axis2_env_t **env,
- int type);
+axis2_hash_t* AXIS2_CALL
+axis2_xml_schema_simple_type_content_super_objs(void *sim_type_cont,
+ axis2_env_t **env);
/*************** function prototypes *****************************************/
@@ -78,8 +78,8 @@
sim_type_cont_impl->sim_type_cont.ops = NULL;
sim_type_cont_impl->sim_type_cont.base.ops = NULL;
sim_type_cont_impl->methods = NULL;
- sim_type_cont_impl->type = AXIS2_XML_SCHEMA_SIMPLE_CONTENT_TYPE;
-
+ sim_type_cont_impl->ht_super = NULL;
+ sim_type_cont_impl->obj_type = AXIS2_XML_SCHEMA_SIMPLE_TYPE_CONTENT;
sim_type_cont_impl->sim_type_cont.ops = AXIS2_MALLOC((*env)->allocator,
sizeof(axis2_xml_schema_simple_type_content_ops_t));
@@ -95,13 +95,14 @@
axis2_xml_schema_simple_type_content_free;
sim_type_cont_impl->sim_type_cont.ops->get_base_impl =
axis2_xml_schema_simple_type_content_get_base_impl;
- sim_type_cont_impl->sim_type_cont.ops->get_type =
- axis2_xml_schema_simple_type_content_get_type;
- sim_type_cont_impl->sim_type_cont.ops->set_type =
- axis2_xml_schema_simple_type_content_set_type;
+ sim_type_cont_impl->sim_type_cont.ops->type =
+ axis2_xml_schema_simple_type_content_type;
+ sim_type_cont_impl->sim_type_cont.ops->super_objs =
+ axis2_xml_schema_simple_type_content_super_objs;
sim_type_cont_impl->methods = axis2_hash_make(env);
- if(!sim_type_cont_impl->methods)
+ sim_type_cont_impl->ht_super = axis2_hash_make(env);
+ if(!sim_type_cont_impl->methods || !sim_type_cont_impl->ht_super)
{
axis2_xml_schema_simple_type_content_free(&(sim_type_cont_impl->sim_type_cont), env);
AXIS2_ERROR_SET((*env)->error, AXIS2_ERROR_NO_MEMORY, AXIS2_FAILURE);
@@ -109,10 +110,10 @@
}
axis2_hash_set(sim_type_cont_impl->methods, "free", AXIS2_HASH_KEY_STRING,
axis2_xml_schema_simple_type_content_free);
- axis2_hash_set(sim_type_cont_impl->methods, "get_type",
- AXIS2_HASH_KEY_STRING, axis2_xml_schema_simple_type_content_get_type);
- axis2_hash_set(sim_type_cont_impl->methods, "set_type",
- AXIS2_HASH_KEY_STRING, axis2_xml_schema_simple_type_content_set_type);
+ axis2_hash_set(sim_type_cont_impl->methods, "type",
+ AXIS2_HASH_KEY_STRING, axis2_xml_schema_simple_type_content_type);
+ axis2_hash_set(sim_type_cont_impl->methods, "super_objs",
+ AXIS2_HASH_KEY_STRING, axis2_xml_schema_simple_type_content_super_objs);
sim_type_cont_impl->annotated = axis2_xml_schema_annotated_create(env);
if(!sim_type_cont_impl->annotated)
@@ -120,6 +121,17 @@
axis2_xml_schema_simple_type_content_free(&(sim_type_cont_impl->sim_type_cont), env);
return NULL;
}
+
+ axis2_hash_set(sim_type_cont_impl->ht_super, "AXIS2_XML_SCHEMA_SIMPLE_TYPE_CONTENT",
+ AXIS2_HASH_KEY_STRING, &(sim_type_cont_impl->sim_type_cont));
+
+ axis2_hash_set(sim_type_cont_impl->ht_super, "AXIS2_XML_SCHEMA_ANNOTATED",
+ AXIS2_HASH_KEY_STRING, sim_type_cont_impl->annotated);
+
+ axis2_hash_set(sim_type_cont_impl->ht_super, "AXIS2_XML_SCHEMA_OBJ",
+ AXIS2_HASH_KEY_STRING,
+ AXIS2_XML_SCHEMA_ANNOTATED_GET_BASE_IMPL(sim_type_cont_impl->annotated, env));
+
status = axis2_xml_schema_annotated_resolve_methods(
&(sim_type_cont_impl->sim_type_cont.base), env, sim_type_cont_impl->annotated,
sim_type_cont_impl->methods);
@@ -141,6 +153,11 @@
axis2_hash_free(sim_type_cont_impl->methods, env);
sim_type_cont_impl->methods = NULL;
}
+ if(NULL != sim_type_cont_impl->ht_super)
+ {
+ axis2_hash_free(sim_type_cont_impl->ht_super, env);
+ sim_type_cont_impl->ht_super = NULL;
+ }
if(NULL != sim_type_cont_impl->annotated)
{
@@ -203,32 +220,27 @@
sim_type_cont->ops->free = axis2_hash_get(methods, "free",
AXIS2_HASH_KEY_STRING);
- sim_type_cont->ops->get_base_impl =
- sim_type_cont_impl_l->sim_type_cont.ops->get_base_impl;
- sim_type_cont->ops->get_type =
- sim_type_cont_impl_l->sim_type_cont.ops->get_type;
- sim_type_cont->ops->set_type =
- sim_type_cont_impl_l->sim_type_cont.ops->set_type;
+ sim_type_cont->ops->type = axis2_hash_get(methods, "type",
+ AXIS2_HASH_KEY_STRING);
+ sim_type_cont->ops->super_objs = axis2_hash_get(methods, "super_objs",
+ AXIS2_HASH_KEY_STRING);
return axis2_xml_schema_annotated_resolve_methods(&(sim_type_cont->base),
env, sim_type_cont_impl_l->annotated, methods);
}
-int AXIS2_CALL
-axis2_xml_schema_simple_type_content_get_type(void *sim_type_cont,
- axis2_env_t **env)
-{
- AXIS2_ENV_CHECK(env, AXIS2_FAILURE);
- return AXIS2_INTF_TO_IMPL(sim_type_cont)->type;
-}
-axis2_status_t AXIS2_CALL
-axis2_xml_schema_simple_type_content_set_type(void *sim_type_cont,
- axis2_env_t **env,
- int type)
+axis2_xml_schema_types_t AXIS2_CALL
+axis2_xml_schema_simple_type_content_type(void *sim_type_cont,
+ axis2_env_t **env)
+{
+ return AXIS2_INTF_TO_IMPL(sim_type_cont)->obj_type;
+}
+
+axis2_hash_t* AXIS2_CALL
+axis2_xml_schema_simple_type_content_super_objs(void *sim_type_cont,
+ axis2_env_t **env)
{
- AXIS2_ENV_CHECK(env, AXIS2_FAILURE);
- AXIS2_INTF_TO_IMPL(sim_type_cont)->type = type;
- return AXIS2_SUCCESS;
-}
+ return AXIS2_INTF_TO_IMPL(sim_type_cont)->ht_super;
+}
Modified: webservices/axis2/trunk/c/modules/xml/xml_schema/xml_schema_simple_type_list.c
URL: http://svn.apache.org/viewcvs/webservices/axis2/trunk/c/modules/xml/xml_schema/xml_schema_simple_type_list.c?rev=406594&r1=406593&r2=406594&view=diff
==============================================================================
--- webservices/axis2/trunk/c/modules/xml/xml_schema/xml_schema_simple_type_list.c (original)
+++ webservices/axis2/trunk/c/modules/xml/xml_schema/xml_schema_simple_type_list.c Mon May 15 02:31:10 2006
@@ -31,6 +31,10 @@
axis2_hash_t *methods;
+ axis2_xml_schema_types_t obj_type;
+
+ axis2_hash_t *ht_super;
+
axis2_xml_schema_simple_type_t *item_type;
axis2_qname_t *item_type_name;
@@ -50,10 +54,18 @@
axis2_xml_schema_simple_type_list_get_base_impl(void *simple_type_list,
axis2_env_t **env);
+axis2_hash_t* AXIS2_CALL
+axis2_xml_schema_simple_type_list_super_objs(void *simple_type_list,
+ axis2_env_t **env);
+
+axis2_xml_schema_types_t AXIS2_CALL
+axis2_xml_schema_simple_type_list_type(void *simple_type_list,
+ axis2_env_t **env);
+
axis2_xml_schema_simple_type_t* AXIS2_CALL
axis2_xml_schema_simple_type_list_get_item_type(void *simple_type_list,
axis2_env_t **env);
-
+
axis2_status_t AXIS2_CALL
axis2_xml_schema_simple_type_list_set_item_type(void *simple_type_list,
axis2_env_t **env,
@@ -74,6 +86,7 @@
axis2_xml_schema_simple_type_list_create(axis2_env_t **env)
{
axis2_xml_schema_simple_type_list_impl_t *simple_type_list_impl = NULL;
+ axis2_xml_schema_annotated_t *annotated = NULL;
axis2_status_t status = AXIS2_FAILURE;
simple_type_list_impl = AXIS2_MALLOC((*env)->allocator,
@@ -91,7 +104,8 @@
simple_type_list_impl->methods = NULL;
simple_type_list_impl->item_type = NULL;
simple_type_list_impl->item_type_name = NULL;
-
+ simple_type_list_impl->ht_super = NULL;
+ simple_type_list_impl->obj_type = AXIS2_XML_SCHEMA_SIMPLE_TYPE_LIST;
simple_type_list_impl->simple_type_list.ops =
AXIS2_MALLOC((*env)->allocator,
@@ -107,6 +121,10 @@
simple_type_list_impl->simple_type_list.ops->free =
axis2_xml_schema_simple_type_list_free;
+ simple_type_list_impl->simple_type_list.ops->type =
+ axis2_xml_schema_simple_type_list_type;
+ simple_type_list_impl->simple_type_list.ops->super_objs =
+ axis2_xml_schema_simple_type_list_super_objs;
simple_type_list_impl->simple_type_list.ops->get_base_impl =
axis2_xml_schema_simple_type_list_get_base_impl;
simple_type_list_impl->simple_type_list.ops->get_item_type =
@@ -119,9 +137,11 @@
axis2_xml_schema_simple_type_list_set_item_type_name;
simple_type_list_impl->methods = axis2_hash_make(env);
- if(!simple_type_list_impl->methods)
+ simple_type_list_impl->ht_super = axis2_hash_make(env);
+ if(!simple_type_list_impl->methods || !simple_type_list_impl->ht_super)
{
- axis2_xml_schema_simple_type_list_free(&(simple_type_list_impl->simple_type_list), env);
+ axis2_xml_schema_simple_type_list_free(
+ &(simple_type_list_impl->simple_type_list), env);
AXIS2_ERROR_SET((*env)->error, AXIS2_ERROR_NO_MEMORY, AXIS2_FAILURE);
return NULL;
}
@@ -135,6 +155,10 @@
AXIS2_HASH_KEY_STRING, axis2_xml_schema_simple_type_list_get_item_type_name);
axis2_hash_set(simple_type_list_impl->methods, "set_base_type_name",
AXIS2_HASH_KEY_STRING, axis2_xml_schema_simple_type_list_set_item_type_name);
+ axis2_hash_set(simple_type_list_impl->methods, "type",
+ AXIS2_HASH_KEY_STRING, axis2_xml_schema_simple_type_list_type);
+ axis2_hash_set(simple_type_list_impl->methods, "super_objs",
+ AXIS2_HASH_KEY_STRING, axis2_xml_schema_simple_type_list_super_objs);
simple_type_list_impl->sim_type_content =
axis2_xml_schema_simple_type_content_create(env);
@@ -145,10 +169,28 @@
&(simple_type_list_impl->simple_type_list), env);
return NULL;
}
- AXIS2_XML_SCHEMA_SIMPLE_TYPE_CONTENT_SET_TYPE(
- simple_type_list_impl->sim_type_content, env,
- AXIS2_XML_SCHEMA_SIMPLE_TYPE_LIST);
+
+ axis2_hash_set(simple_type_list_impl->ht_super, "AXIS2_XML_SCHEMA_SIMPLE_TYPE_LIST",
+ AXIS2_HASH_KEY_STRING, &(simple_type_list_impl->simple_type_list));
+
+ axis2_hash_set(simple_type_list_impl->ht_super, "AXIS2_XML_SCHEMA_SIMPLE_TYPE_CONTENT",
+ AXIS2_HASH_KEY_STRING, &(simple_type_list_impl->sim_type_content));
+ annotated = AXIS2_XML_SCHEMA_SIMPLE_TYPE_CONTENT_GET_BASE_IMPL(
+ simple_type_list_impl->sim_type_content, env);
+ if(NULL != annotated)
+ {
+ axis2_hash_set(simple_type_list_impl->ht_super,
+ "AXIS2_XML_SCHEMA_ANNOTATED",
+ AXIS2_HASH_KEY_STRING, annotated);
+
+ axis2_hash_set(simple_type_list_impl->ht_super,
+ "AXIS2_XML_SCHEMA_OBJ",
+ AXIS2_HASH_KEY_STRING,
+ AXIS2_XML_SCHEMA_ANNOTATED_GET_BASE_IMPL(annotated, env));
+
+ }
+
status = axis2_xml_schema_simple_type_content_resolve_methods(
&(simple_type_list_impl->simple_type_list.base), env, simple_type_list_impl->sim_type_content,
simple_type_list_impl->methods);
@@ -170,7 +212,11 @@
axis2_hash_free(simple_type_list_impl->methods, env);
simple_type_list_impl->methods = NULL;
}
-
+ if(NULL != simple_type_list_impl->ht_super)
+ {
+ axis2_hash_free(simple_type_list_impl->ht_super, env);
+ simple_type_list_impl->ht_super = NULL;
+ }
if(NULL != simple_type_list_impl->sim_type_content)
{
AXIS2_XML_SCHEMA_SIMPLE_TYPE_CONTENT_FREE(
@@ -211,6 +257,7 @@
return simple_type_list_impl->sim_type_content;
}
+/*
AXIS2_DECLARE(axis2_status_t)
axis2_xml_schema_simple_type_list_resolve_methods(
axis2_xml_schema_simple_type_list_t *simple_type_list,
@@ -255,7 +302,7 @@
&(simple_type_list->base), env,
simple_type_list_impl_l->sim_type_content, methods);
}
-
+*/
axis2_xml_schema_simple_type_t* AXIS2_CALL
axis2_xml_schema_simple_type_list_get_item_type(void *simple_type_list,
axis2_env_t **env)
@@ -308,3 +355,17 @@
sim_type_res_impl->item_type_name = item_type_name;
return AXIS2_SUCCESS;
}
+
+axis2_hash_t* AXIS2_CALL
+axis2_xml_schema_simple_type_list_super_objs(void *simple_type_list,
+ axis2_env_t **env)
+{
+ return AXIS2_INTF_TO_IMPL(simple_type_list)->ht_super;
+}
+
+axis2_xml_schema_types_t AXIS2_CALL
+axis2_xml_schema_simple_type_list_type(void *simple_type_list,
+ axis2_env_t **env)
+{
+ return AXIS2_INTF_TO_IMPL(simple_type_list)->obj_type;
+}
\ No newline at end of file
Modified: webservices/axis2/trunk/c/modules/xml/xml_schema/xml_schema_simple_type_restriction.c
URL: http://svn.apache.org/viewcvs/webservices/axis2/trunk/c/modules/xml/xml_schema/xml_schema_simple_type_restriction.c?rev=406594&r1=406593&r2=406594&view=diff
==============================================================================
--- webservices/axis2/trunk/c/modules/xml/xml_schema/xml_schema_simple_type_restriction.c (original)
+++ webservices/axis2/trunk/c/modules/xml/xml_schema/xml_schema_simple_type_restriction.c Mon May 15 02:31:10 2006
@@ -32,6 +32,10 @@
axis2_hash_t *methods;
+ axis2_hash_t *ht_super;
+
+ axis2_xml_schema_types_t obj_type;
+
axis2_xml_schema_simple_type_t *base_type;
axis2_qname_t *base_type_name;
@@ -57,6 +61,15 @@
axis2_xml_schema_simple_type_restriction_get_base_type(void *simple_type_restriction,
axis2_env_t **env);
+axis2_xml_schema_types_t AXIS2_CALL
+axis2_xml_schema_simple_type_restriction_type(void *simple_type_restriction,
+ axis2_env_t **env);
+
+axis2_hash_t* AXIS2_CALL
+axis2_xml_schema_simple_type_restriction_super_objs(void *simple_type_restriction,
+ axis2_env_t **env);
+
+
axis2_status_t AXIS2_CALL
axis2_xml_schema_simple_type_restriction_set_base_type(void *simple_type_restriction,
axis2_env_t **env,
@@ -80,6 +93,7 @@
axis2_xml_schema_simple_type_restriction_create(axis2_env_t **env)
{
axis2_xml_schema_simple_type_restriction_impl_t *simple_type_restriction_impl = NULL;
+ axis2_xml_schema_annotated_t *annotated = NULL;
axis2_status_t status = AXIS2_FAILURE;
simple_type_restriction_impl = AXIS2_MALLOC((*env)->allocator,
@@ -98,6 +112,8 @@
simple_type_restriction_impl->base_type = NULL;
simple_type_restriction_impl->base_type_name = NULL;
simple_type_restriction_impl->facets = NULL;
+ simple_type_restriction_impl->ht_super = NULL;
+ simple_type_restriction_impl->obj_type = AXIS2_XML_SCHEMA_SIMPLE_TYPE_RESTRICTION;
simple_type_restriction_impl->simple_type_restriction.ops =
@@ -116,6 +132,10 @@
axis2_xml_schema_simple_type_restriction_free;
simple_type_restriction_impl->simple_type_restriction.ops->get_base_impl =
axis2_xml_schema_simple_type_restriction_get_base_impl;
+ simple_type_restriction_impl->simple_type_restriction.ops->type =
+ axis2_xml_schema_simple_type_restriction_type;
+ simple_type_restriction_impl->simple_type_restriction.ops->super_objs =
+ axis2_xml_schema_simple_type_restriction_super_objs;
simple_type_restriction_impl->simple_type_restriction.ops->get_base_type =
axis2_xml_schema_simple_type_restriction_get_base_type;
simple_type_restriction_impl->simple_type_restriction.ops->set_base_type =
@@ -129,7 +149,8 @@
simple_type_restriction_impl->methods = axis2_hash_make(env);
- if(!simple_type_restriction_impl->methods)
+ simple_type_restriction_impl->ht_super = axis2_hash_make(env);
+ if(!simple_type_restriction_impl->methods || !simple_type_restriction_impl->ht_super)
{
axis2_xml_schema_simple_type_restriction_free(&(simple_type_restriction_impl->simple_type_restriction), env);
AXIS2_ERROR_SET((*env)->error, AXIS2_ERROR_NO_MEMORY, AXIS2_FAILURE);
@@ -139,7 +160,10 @@
axis2_xml_schema_simple_type_restriction_free);
axis2_hash_set(simple_type_restriction_impl->methods, "get_base_type",
AXIS2_HASH_KEY_STRING, axis2_xml_schema_simple_type_restriction_get_base_type);
- axis2_hash_set(simple_type_restriction_impl->methods, "set_base_type",
+ axis2_hash_set(simple_type_restriction_impl->methods, "type",
+ AXIS2_HASH_KEY_STRING, axis2_xml_schema_simple_type_restriction_type);
+ axis2_hash_set(simple_type_restriction_impl->methods, "super_objs",
+ AXIS2_HASH_KEY_STRING, axis2_xml_schema_simple_type_restriction_super_objs); axis2_hash_set(simple_type_restriction_impl->methods, "set_base_type",
AXIS2_HASH_KEY_STRING, axis2_xml_schema_simple_type_restriction_set_base_type);
axis2_hash_set(simple_type_restriction_impl->methods, "get_base_type_name",
AXIS2_HASH_KEY_STRING, axis2_xml_schema_simple_type_restriction_get_base_type_name);
@@ -155,10 +179,26 @@
&(simple_type_restriction_impl->simple_type_restriction), env);
return NULL;
}
- AXIS2_XML_SCHEMA_SIMPLE_TYPE_CONTENT_SET_TYPE(
- simple_type_restriction_impl->sim_type_content, env,
- AXIS2_XML_SCHEMA_SIMPLE_TYPE_RESTRICTION);
+
+ axis2_hash_set(simple_type_restriction_impl->methods,
+ "AXIS2_XML_SCHEMA_SIMPLE_TYPE_RESTRICTION",
+ AXIS2_HASH_KEY_STRING, &(simple_type_restriction_impl->simple_type_restriction));
+ axis2_hash_set(simple_type_restriction_impl->methods,
+ "AXIS2_XML_SCHEMA_SIMPLE_TYPE_CONTENT",
+ AXIS2_HASH_KEY_STRING, simple_type_restriction_impl->sim_type_content);
+ annotated = AXIS2_XML_SCHEMA_SIMPLE_TYPE_CONTENT_GET_BASE_IMPL(
+ simple_type_restriction_impl->sim_type_content, env);
+ if(NULL != annotated)
+ {
+ axis2_hash_set(simple_type_restriction_impl->methods,
+ "AXIS2_XML_SCHEMA_ANNOTATED",
+ AXIS2_HASH_KEY_STRING, annotated);
+ axis2_hash_set(simple_type_restriction_impl->methods,
+ "AXIS2_XML_SCHEMA_OBJ", AXIS2_HASH_KEY_STRING,
+ AXIS2_XML_SCHEMA_ANNOTATED_GET_BASE_IMPL(annotated, env));
+ }
+
status = axis2_xml_schema_simple_type_content_resolve_methods(
&(simple_type_restriction_impl->simple_type_restriction.base), env, simple_type_restriction_impl->sim_type_content,
simple_type_restriction_impl->methods);
@@ -180,6 +220,12 @@
axis2_hash_free(simple_type_restriction_impl->methods, env);
simple_type_restriction_impl->methods = NULL;
}
+ if(NULL != simple_type_restriction_impl->ht_super)
+ {
+ axis2_hash_free(simple_type_restriction_impl->ht_super, env);
+ simple_type_restriction_impl->ht_super = NULL;
+ }
+
if(NULL != simple_type_restriction_impl->sim_type_content)
{
@@ -221,6 +267,7 @@
return simple_type_restriction_impl->sim_type_content;
}
+/*
AXIS2_DECLARE(axis2_status_t)
axis2_xml_schema_simple_type_restriction_resolve_methods(
axis2_xml_schema_simple_type_restriction_t *simple_type_restriction,
@@ -268,7 +315,7 @@
&(simple_type_restriction->base), env,
simple_type_restriction_impl_l->sim_type_content, methods);
}
-
+*/
axis2_xml_schema_simple_type_t* AXIS2_CALL
axis2_xml_schema_simple_type_restriction_get_base_type(void *simple_type_restriction,
axis2_env_t **env)
@@ -333,3 +380,17 @@
sim_type_res_impl = AXIS2_INTF_TO_IMPL(simple_type_restriction);
return sim_type_res_impl->facets;
}
+
+axis2_xml_schema_types_t AXIS2_CALL
+axis2_xml_schema_simple_type_restriction_type(void *simple_type_restriction,
+ axis2_env_t **env)
+{
+ return AXIS2_INTF_TO_IMPL(simple_type_restriction)->obj_type;
+}
+
+axis2_hash_t* AXIS2_CALL
+axis2_xml_schema_simple_type_restriction_super_objs(void *simple_type_restriction,
+ axis2_env_t **env)
+{
+ return AXIS2_INTF_TO_IMPL(simple_type_restriction)->ht_super;
+}
\ No newline at end of file