Author: damitha
Date: Mon Apr 17 21:06:03 2006
New Revision: 394833

URL: http://svn.apache.org/viewcvs?rev=394833&view=rev
Log:
Now all files are compiling

Added:
    
webservices/axis2/trunk/c/modules/xml/xml_schema/axis2_validation_event_handler.h
    webservices/axis2/trunk/c/modules/xml/xml_schema/validation_event_handler.c
Modified:
    webservices/axis2/trunk/c/modules/xml/xml_schema/Makefile.am
    webservices/axis2/trunk/c/modules/xml/xml_schema/Makefile.am.old
    webservices/axis2/trunk/c/modules/xml/xml_schema/axis2_xml_schema.h
    
webservices/axis2/trunk/c/modules/xml/xml_schema/axis2_xml_schema_collection.h
    webservices/axis2/trunk/c/modules/xml/xml_schema/axis2_xml_schema_element.h
    
webservices/axis2/trunk/c/modules/xml/xml_schema/axis2_xml_schema_type_receiver.h
    webservices/axis2/trunk/c/modules/xml/xml_schema/xml_schema.c
    webservices/axis2/trunk/c/modules/xml/xml_schema/xml_schema_collection.c
    webservices/axis2/trunk/c/modules/xml/xml_schema/xml_schema_element.c
    webservices/axis2/trunk/c/modules/xml/xml_schema/xml_schema_type_receiver.c

Modified: webservices/axis2/trunk/c/modules/xml/xml_schema/Makefile.am
URL: 
http://svn.apache.org/viewcvs/webservices/axis2/trunk/c/modules/xml/xml_schema/Makefile.am?rev=394833&r1=394832&r2=394833&view=diff
==============================================================================
--- webservices/axis2/trunk/c/modules/xml/xml_schema/Makefile.am (original)
+++ webservices/axis2/trunk/c/modules/xml/xml_schema/Makefile.am Mon Apr 17 
21:06:03 2006
@@ -2,6 +2,35 @@
 SUBDIRS = constants
 lib_LTLIBRARIES = libaxis2_xml_schema.la
 libaxis2_xml_schema_la_SOURCES = \
+                                                                
constants/xml_schema_enum.c \
+                                                                
xml_schema_obj.c \
+                                                                
xml_schema_annotation.c \
+                                                                
xml_schema_annotated.c \
+                                                                
xml_schema_use.c \
+                                                                
xml_schema_content_processing.c \
+                                                                
xml_schema_particle.c \
+                                                                
xml_schema_any.c \
+                                                                
xml_schema_app_info.c \
+                                                                
xml_schema_obj_collection.c \
+                                                                
xml_schema_group_base.c \
+                                                                
xml_schema_group.c \
+                                                                
xml_schema_group_ref.c \
+                                                                
xml_schema_form.c \
+                                                                
xml_schema_all.c \
+                                                                
xml_schema_choice.c \
+                                                                
xml_schema_sequence.c \
+                                                                
xml_tokenized_type.c \
+                                                                
xml_schema_data_type.c \
+                                                                
xml_schema_facet.c \
+                                                                
xml_schema_xpath.c \
+                                                                
xml_schema_identity_constraint.c \
+                                                                
xml_schema_derivation_method.c \
+                                                                
xml_schema_obj_table.c \
+                                                                
xml_schema_collection.c \
+                                                                
xml_schema_type.c \
+                                                                
xml_schema_type_receiver.c \
+                                                                
xml_schema_element.c \
+                                                                
validation_event_handler.c \
                                                                 xml_schema.c
 
 INCLUDES = -I$(top_builddir)/include \

Modified: webservices/axis2/trunk/c/modules/xml/xml_schema/Makefile.am.old
URL: 
http://svn.apache.org/viewcvs/webservices/axis2/trunk/c/modules/xml/xml_schema/Makefile.am.old?rev=394833&r1=394832&r2=394833&view=diff
==============================================================================
--- webservices/axis2/trunk/c/modules/xml/xml_schema/Makefile.am.old (original)
+++ webservices/axis2/trunk/c/modules/xml/xml_schema/Makefile.am.old Mon Apr 17 
21:06:03 2006
@@ -26,7 +26,12 @@
                                                                 
xml_schema_identity_constraint.c \
                                                                 
xml_schema_derivation_method.c \
                                                                 
xml_schema_obj_table.c \
-                                                                
xml_schema_type.c
+                                                                
xml_schema_collection.c \
+                                                                
xml_schema_type.c \
+                                                                
xml_schema_type_receiver.c \
+                                                                
xml_schema_element.c \
+                                                                
validation_event_handler.c \
+                                                                xml_schema.c
 
 INCLUDES = -I$(top_builddir)/include \
             -I$(top_builddir)/modules/util \

Added: 
webservices/axis2/trunk/c/modules/xml/xml_schema/axis2_validation_event_handler.h
URL: 
http://svn.apache.org/viewcvs/webservices/axis2/trunk/c/modules/xml/xml_schema/axis2_validation_event_handler.h?rev=394833&view=auto
==============================================================================
--- 
webservices/axis2/trunk/c/modules/xml/xml_schema/axis2_validation_event_handler.h
 (added)
+++ 
webservices/axis2/trunk/c/modules/xml/xml_schema/axis2_validation_event_handler.h
 Mon Apr 17 21:06:03 2006
@@ -0,0 +1,83 @@
+/*
+ * Copyright 2004,2005 The Apache Software Foundation.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+#ifndef AXIS2_XML_SCHEMA_VALIDATION_EVENT_HANDLER_H
+#define AXIS2_XML_SCHEMA_VALIDATION_EVENT_HANDLER_H
+
+/**
+ * @file axis2_xml_schema_validation_event_handler.h
+ * @brief Axis2 Xml Schema Validation Event Handler  interface
+ */
+
+#include <axis2_allocator.h>
+#include <axis2_env.h>
+#include <axis2_error.h>
+#include <axis2_string.h>
+#include <axis2.h>
+#include <axis2_array_list.h>
+#include <axis2_hash.h>
+
+#ifdef __cplusplus
+extern "C"
+{
+#endif
+
+typedef struct axis2_xml_schema_validation_event_handler 
axis2_xml_schema_validation_event_handler_t;
+typedef struct axis2_xml_schema_validation_event_handler_ops 
axis2_xml_schema_validation_event_handler_ops_t;
+
+/** @defgroup axis2_xml_schema_validation_event_handler Xml Schema Validation 
Event Handler
+  * @ingroup axis2_xml_schema
+  * @{
+  */
+
+struct axis2_xml_schema_validation_event_handler_ops
+{
+       /** 
+     * Deallocate memory
+     * @return status code
+     */
+    axis2_status_t (AXIS2_CALL *
+    free) (void *axis2_validation_event_handler,
+            axis2_env_t **env);
+
+};
+
+struct axis2_xml_schema_validation_event_handler
+{
+    axis2_xml_schema_validation_event_handler_ops_t *ops;
+};
+
+AXIS2_DECLARE(axis2_xml_schema_validation_event_handler_t *)
+axis2_xml_schema_validation_event_handler_create(axis2_env_t **env);
+
+/**
+ * This method is internal to Axis2 C. It is called from Child Constructor
+ */
+AXIS2_DECLARE(axis2_status_t)
+axis2_xml_schema_validation_event_handler_resolve_methods(axis2_xml_schema_validation_event_handler_t
 *schema_axis2_validation_event_handler,
+                                        axis2_env_t **env,
+                                        
axis2_xml_schema_validation_event_handler_t 
*schema_axis2_validation_event_handler_impl,
+                                        axis2_hash_t *methods);
+
+#define 
AXIS2_XML_SCHEMA_VALIDATION_EVENT_HANDLER_FREE(axis2_validation_event_handler, 
env) \
+               (((axis2_xml_schema_validation_event_handler_t *) 
axis2_validation_event_handler)->ops->free (axis2_validation_event_handler, 
env))
+
+
+/** @} */
+#ifdef __cplusplus
+}
+#endif
+#endif /* AXIS2_XML_SCHEMA_VALIDATION_EVENT_HANDLER_H */

Modified: webservices/axis2/trunk/c/modules/xml/xml_schema/axis2_xml_schema.h
URL: 
http://svn.apache.org/viewcvs/webservices/axis2/trunk/c/modules/xml/xml_schema/axis2_xml_schema.h?rev=394833&r1=394832&r2=394833&view=diff
==============================================================================
--- webservices/axis2/trunk/c/modules/xml/xml_schema/axis2_xml_schema.h 
(original)
+++ webservices/axis2/trunk/c/modules/xml/xml_schema/axis2_xml_schema.h Mon Apr 
17 21:06:03 2006
@@ -44,6 +44,7 @@
 struct axis2_xml_schema_element;
 struct axis2_xml_schema_type;
 struct axis2_xml_schema_obj_collection;
+struct axis2_xml_schema_collection;
 
 #define AXIS2_XML_SCHEMA_NS "http://www.w3.org/2001/XMLSchema";
 
@@ -207,8 +208,8 @@
  */
 AXIS2_DECLARE(axis2_xml_schema_t *)
 axis2_xml_schema_create(axis2_env_t **env,
-                                void *value,
-                                axis2_bool_t fixed);
+                                axis2_char_t *namespc,
+                                struct axis2_xml_schema_collection *parent);
 
 /**
  * This method is internal to Axis2 C. It is called from Child Constructor

Modified: 
webservices/axis2/trunk/c/modules/xml/xml_schema/axis2_xml_schema_collection.h
URL: 
http://svn.apache.org/viewcvs/webservices/axis2/trunk/c/modules/xml/xml_schema/axis2_xml_schema_collection.h?rev=394833&r1=394832&r2=394833&view=diff
==============================================================================
--- 
webservices/axis2/trunk/c/modules/xml/xml_schema/axis2_xml_schema_collection.h 
(original)
+++ 
webservices/axis2/trunk/c/modules/xml/xml_schema/axis2_xml_schema_collection.h 
Mon Apr 17 21:06:03 2006
@@ -41,7 +41,7 @@
 typedef struct axis2_xml_schema_collection axis2_xml_schema_collection_t;
 typedef struct axis2_xml_schema_collection_ops 
axis2_xml_schema_collection_ops_t;
 struct axis2_xml_schema;
-struct axis2_validation_event_handler;
+struct axis2_xml_schema_validation_event_handler;
 struct axis2_om_element;
 struct axis2_om_node;
 struct axis2_xml_schema_type_receiver;
@@ -88,28 +88,28 @@
                                 void *collection,
                                 axis2_env_t **env,
                                 void *reader, 
-                                struct axis2_validation_event_handler *veh); 
+                                struct 
axis2_xml_schema_validation_event_handler *veh); 
 
     struct axis2_xml_schema *(AXIS2_CALL *
     read_a_input_source_and_validation_event_handler) (
                                 void *collection,
                                 axis2_env_t **env,
                                 void *input_source, 
-                                struct axis2_validation_event_handler *veh);
+                                struct 
axis2_xml_schema_validation_event_handler *veh);
 
     struct axis2_xml_schema *(AXIS2_CALL *
     read_a_source_and_validation_event_handler) (
                                 void *collection,
                                 axis2_env_t **env,
                                 void *source, 
-                                struct axis2_validation_event_handler *veh); 
+                                struct 
axis2_xml_schema_validation_event_handler *veh); 
 
     struct axis2_xml_schema *(AXIS2_CALL *
     read_a_document_and_validation_event_handler) (
                                 void *collection,
                                 axis2_env_t **env,
                                 void *source, 
-                                struct axis2_validation_event_handler *veh);
+                                struct 
axis2_xml_schema_validation_event_handler *veh);
 
     struct axis2_xml_schema *(AXIS2_CALL *
     read_a_element) (
@@ -124,7 +124,7 @@
                                 axis2_env_t **env,
                                 void *document,
                                 axis2_char_t *uri,
-                                struct axis2_validation_event_handler *veh); 
+                                struct 
axis2_xml_schema_validation_event_handler *veh); 
 
     struct axis2_xml_schema *(AXIS2_CALL *
     read_a_element_and_uri) (
@@ -134,13 +134,13 @@
                                 struct axis2_om_node *node,
                                 axis2_char_t *uri);
 
-    struct axis2_xml_schema_element (AXIS2_CALL *
+    struct axis2_xml_schema_element *(AXIS2_CALL *
     get_element_by_qname) (void *collection,
                                      axis2_env_t **env,
                                      axis2_qname_t *qname);
 
     struct axis2_xml_schema_type *(AXIS2_CALL *
-    get_type_by_qame) (void *collection,
+    get_type_by_qname) (void *collection,
                                  axis2_env_t **env,
                                  axis2_qname_t *schema_type_qname);
 

Modified: 
webservices/axis2/trunk/c/modules/xml/xml_schema/axis2_xml_schema_element.h
URL: 
http://svn.apache.org/viewcvs/webservices/axis2/trunk/c/modules/xml/xml_schema/axis2_xml_schema_element.h?rev=394833&r1=394832&r2=394833&view=diff
==============================================================================
--- webservices/axis2/trunk/c/modules/xml/xml_schema/axis2_xml_schema_element.h 
(original)
+++ webservices/axis2/trunk/c/modules/xml/xml_schema/axis2_xml_schema_element.h 
Mon Apr 17 21:06:03 2006
@@ -25,6 +25,7 @@
  */
 
 #include <axis2_xml_schema_type_receiver.h>
+#include <axis2_qname.h>
 
 /** @defgroup axis2_xml_schema_element Xml Schema Element
   * @ingroup axis2_xml_schema
@@ -34,6 +35,11 @@
 typedef struct axis2_xml_schema_element axis2_xml_schema_element_t;
 typedef struct axis2_xml_schema_element_ops axis2_xml_schema_element_ops_t;
 struct axis2_xml_schema;
+struct axis2_xml_schema_type_receiver;
+struct axis2_xml_schema_obj_collection;
+struct axis2_xml_schema_derivation_method;
+struct axis2_xml_schema_form;
+struct axis2_xml_schema_type;
 
 #ifdef __cplusplus
 extern "C"
@@ -50,14 +56,14 @@
     free) (void *element,
             axis2_env_t **env);
     
-    axis2_xml_schema_obj_t *(AXIS2_CALL *
+    struct axis2_xml_schema_type_receiver *(AXIS2_CALL *
     get_base_impl) (void *element,
                     axis2_env_t **env);
 
     /**
      * Returns a collection of constraints on the element.
      */
-    axis2_xml_schema_obj_collection_t *(AXIS2_CALL *
+    struct axis2_xml_schema_obj_collection *(AXIS2_CALL *
     get_constraints) (void *element,
                                 axis2_env_t **env); 
 
@@ -70,25 +76,25 @@
                                 axis2_env_t **env,
                                 axis2_char_t *default_value);
 
-    axis2_xml_schema_derivation_method_t *(AXIS2_CALL *
+    struct axis2_xml_schema_derivation_method *(AXIS2_CALL *
     get_block) (void *element,
                         axis2_env_t **env); 
 
     axis2_status_t (AXIS2_CALL * 
     set_block) (void *element,
                         axis2_env_t **env,
-                        axis2_xml_schema_derivation_method_t * block);
+                        struct axis2_xml_schema_derivation_method * block);
 
-    axis2_xml_schema_derivation_method_t *(AXIS2_CALL *
+    struct axis2_xml_schema_derivation_method *(AXIS2_CALL *
     get_final) (void *element,
                         axis2_env_t **env);
 
     axis2_status_t (AXIS2_CALL *
     set_final) (void *element,
                         axis2_env_t **env,
-                        axis2_xml_schema_derivation_method_t 
*final_derivation);
+                        struct axis2_xml_schema_derivation_method 
*final_derivation);
 
-    axis2_xml_schema_derivation_method_t *(AXIS2_CALL * 
+    struct axis2_xml_schema_derivation_method *(AXIS2_CALL * 
     get_block_resolved) (void *element,
                                 axis2_env_t **env);
 
@@ -105,14 +111,14 @@
     get_element_type) (void *element,
                                 axis2_env_t **env); 
 
-    axis2_xml_schema_form_t *(AXIS2_CALL *
+    struct axis2_xml_schema_form *(AXIS2_CALL *
     get_form) (void *element,
                         axis2_env_t **env); 
 
     axis2_status_t (AXIS2_CALL *
     set_form) (void *element,
                         axis2_env_t **env,
-                        axis2_xml_schema_form_t *form); 
+                        struct axis2_xml_schema_form *form); 
 
     axis2_bool_t (AXIS2_CALL *
     is_abstract) (void *element,
@@ -159,21 +165,21 @@
                         axis2_env_t **env,
                         axis2_qname_t *qualified_name); 
 
-    axis2_xml_schema_type_t *(AXIS2_CALL *
+    struct axis2_xml_schema_type *(AXIS2_CALL *
     get_schema_type) (void *element,
                                 axis2_env_t **env);
 
     axis2_status_t (AXIS2_CALL * 
     set_schema_type) (void *element,
                                 axis2_env_t **env,
-                                axis2_xml_schema_type_t *schema_type);
+                                struct axis2_xml_schema_type *schema_type);
 
     axis2_qname_t *(AXIS2_CALL * 
     get_schema_type_qname) (void *element,
                                     axis2_env_t **env);
 
     axis2_status_t (AXIS2_CALL * 
-    set_schema_type_name) (void *element,
+    set_schema_type_qname) (void *element,
                                     axis2_env_t **env,
                                     axis2_qname_t *schema_type_qname);
 
@@ -195,7 +201,7 @@
     axis2_status_t (AXIS2_CALL * 
     set_type) (void *element,
                     axis2_env_t **env,
-                    axis2_xml_schema_type_t *type);
+                    struct axis2_xml_schema_type *type);
 
 };
 

Modified: 
webservices/axis2/trunk/c/modules/xml/xml_schema/axis2_xml_schema_type_receiver.h
URL: 
http://svn.apache.org/viewcvs/webservices/axis2/trunk/c/modules/xml/xml_schema/axis2_xml_schema_type_receiver.h?rev=394833&r1=394832&r2=394833&view=diff
==============================================================================
--- 
webservices/axis2/trunk/c/modules/xml/xml_schema/axis2_xml_schema_type_receiver.h
 (original)
+++ 
webservices/axis2/trunk/c/modules/xml/xml_schema/axis2_xml_schema_type_receiver.h
 Mon Apr 17 21:06:03 2006
@@ -39,6 +39,7 @@
 
 typedef struct axis2_xml_schema_type_receiver axis2_xml_schema_type_receiver_t;
 typedef struct axis2_xml_schema_type_receiver_ops 
axis2_xml_schema_type_receiver_ops_t;
+struct axis2_xml_schema_type;
 
 /** @defgroup axis2_xml_schema_type_receiver Xml Schema Type Receiver
   * @ingroup axis2_xml_schema
@@ -58,7 +59,7 @@
     axis2_status_t (AXIS2_CALL *
     set_type) (void *type_receiver,
                axis2_env_t **env,
-               axis2_xml_schema_type_t *type);
+               struct axis2_xml_schema_type *type);
 
 };
 

Added: 
webservices/axis2/trunk/c/modules/xml/xml_schema/validation_event_handler.c
URL: 
http://svn.apache.org/viewcvs/webservices/axis2/trunk/c/modules/xml/xml_schema/validation_event_handler.c?rev=394833&view=auto
==============================================================================
--- webservices/axis2/trunk/c/modules/xml/xml_schema/validation_event_handler.c 
(added)
+++ webservices/axis2/trunk/c/modules/xml/xml_schema/validation_event_handler.c 
Mon Apr 17 21:06:03 2006
@@ -0,0 +1,98 @@
+/*
+ * Copyright 2004,2005 The Apache Software Foundation.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+ 
+#include <axis2_validation_event_handler.h>
+#include <axis2_hash.h>
+
+typedef struct axis2_xml_schema_validation_event_handler_impl 
axis2_xml_schema_validation_event_handler_impl_t;
+
+/** 
+ * @brief Xml Schema Validation Event Handler Struct Impl
+ *     Axis2 Xml Schema Validation Event Handler  
+ */ 
+struct axis2_xml_schema_validation_event_handler_impl
+{
+    axis2_xml_schema_validation_event_handler_t axis2_validation_event_handler;
+};
+
+#define INTF_TO_IMPL(axis2_validation_event_handler) 
((axis2_xml_schema_validation_event_handler_impl_t *) 
axis2_validation_event_handler)
+
+axis2_status_t AXIS2_CALL 
+axis2_xml_schema_validation_event_handler_free(void 
*axis2_validation_event_handler,
+                axis2_env_t **env);
+
+AXIS2_DECLARE(axis2_xml_schema_validation_event_handler_t *)
+axis2_xml_schema_validation_event_handler_create(axis2_env_t **env)
+{
+    axis2_xml_schema_validation_event_handler_impl_t 
*axis2_validation_event_handler_impl = NULL;
+    
+    axis2_validation_event_handler_impl = AXIS2_MALLOC((*env)->allocator, 
+                    sizeof(axis2_xml_schema_validation_event_handler_impl_t));
+
+    axis2_validation_event_handler_impl->axis2_validation_event_handler.ops = 
AXIS2_MALLOC((*env)->allocator, 
+                    sizeof(axis2_xml_schema_validation_event_handler_ops_t)); 
+
+
+    
axis2_validation_event_handler_impl->axis2_validation_event_handler.ops->free = 
axis2_xml_schema_validation_event_handler_free;
+
+    return 
&(axis2_validation_event_handler_impl->axis2_validation_event_handler);
+}
+
+
+axis2_status_t AXIS2_CALL
+axis2_xml_schema_validation_event_handler_free(void 
*axis2_validation_event_handler,
+                axis2_env_t **env)
+{
+    axis2_xml_schema_validation_event_handler_impl_t 
*axis2_validation_event_handler_impl = NULL;
+
+    axis2_validation_event_handler_impl = 
INTF_TO_IMPL(axis2_validation_event_handler);
+
+    
if((&(axis2_validation_event_handler_impl->axis2_validation_event_handler))->ops)
+    {
+        
free((&(axis2_validation_event_handler_impl->axis2_validation_event_handler))->ops);
+        
(&(axis2_validation_event_handler_impl->axis2_validation_event_handler))->ops = 
NULL;
+    }
+
+    if(axis2_validation_event_handler_impl)
+    {
+        free(axis2_validation_event_handler_impl);
+        axis2_validation_event_handler_impl = NULL;
+    }
+    return AXIS2_SUCCESS;
+}
+
+AXIS2_DECLARE(axis2_status_t)
+axis2_xml_schema_validation_event_handler_resolve_methods(axis2_xml_schema_validation_event_handler_t
 *axis2_validation_event_handler,
+                                        axis2_env_t **env,
+                                        
axis2_xml_schema_validation_event_handler_t 
*axis2_validation_event_handler_impl,
+                                        axis2_hash_t *methods)
+{    
+    axis2_xml_schema_validation_event_handler_impl_t 
*axis2_validation_event_handler_impl_l = NULL;
+
+    AXIS2_ENV_CHECK(env, AXIS2_FAILURE);
+    AXIS2_PARAM_CHECK((*env)->error, axis2_validation_event_handler_impl, 
AXIS2_FAILURE);
+    AXIS2_PARAM_CHECK((*env)->error, methods, AXIS2_FAILURE);
+    
+    axis2_validation_event_handler_impl_l = 
(axis2_xml_schema_validation_event_handler_impl_t *) 
axis2_validation_event_handler_impl;
+    
+    axis2_validation_event_handler->ops = AXIS2_MALLOC((*env)->allocator, 
+            sizeof(axis2_xml_schema_validation_event_handler_ops_t));
+    axis2_validation_event_handler->ops->free = axis2_hash_get(methods, 
"free", 
+            AXIS2_HASH_KEY_STRING);
+    return AXIS2_SUCCESS;    
+
+}
+

Modified: webservices/axis2/trunk/c/modules/xml/xml_schema/xml_schema.c
URL: 
http://svn.apache.org/viewcvs/webservices/axis2/trunk/c/modules/xml/xml_schema/xml_schema.c?rev=394833&r1=394832&r2=394833&view=diff
==============================================================================
--- webservices/axis2/trunk/c/modules/xml/xml_schema/xml_schema.c (original)
+++ webservices/axis2/trunk/c/modules/xml/xml_schema/xml_schema.c Mon Apr 17 
21:06:03 2006
@@ -21,6 +21,8 @@
 #include <axis2_xml_schema_derivation_method.h>
 #include <axis2_xml_schema_type.h>
 #include <axis2_xml_schema_obj_collection.h>
+#include <axis2_validation_event_handler.h>
+#include <axis2_xml_schema_element.h>
 
 typedef struct axis2_xml_schema_impl axis2_xml_schema_impl_t;
 /** 
@@ -32,6 +34,7 @@
     axis2_xml_schema_t schema;
     axis2_xml_schema_annotated_t *annotated;
     axis2_hash_t *methods;
+    axis2_xml_schema_form_t *attr_form_default;
     axis2_xml_schema_form_t *element_form_default;
     axis2_xml_schema_obj_table_t *attr_groups;
     axis2_xml_schema_obj_table_t *attrs;
@@ -106,12 +109,12 @@
                                 axis2_env_t **env); 
 
 axis2_xml_schema_element_t *AXIS2_CALL
-axis2_xml_schema_get_element_by_name(void *schema,
+axis2_xml_schema_get_element_by_qname(void *schema,
                                         axis2_env_t **env,
                                         axis2_qname_t *qname); 
 
 axis2_xml_schema_type_t *AXIS2_CALL
-axis2_xml_schema_get_type_by_name(void *schema,
+axis2_xml_schema_get_type_by_qname(void *schema,
                                     axis2_env_t **env,
                                     axis2_qname_t *qname); 
 
@@ -164,7 +167,7 @@
 axis2_status_t AXIS2_CALL 
 axis2_xml_schema_compile(void *schema,
                             axis2_env_t **env,
-                            axis2_xml_schema_validation_event_handler *eh);
+                            axis2_xml_schema_validation_event_handler_t *eh);
 
 axis2_status_t AXIS2_CALL 
 axis2_xml_schema_write_a_out(void *schema,
@@ -176,7 +179,7 @@
                                 void *writer); 
 
 static axis2_status_t 
-serialize_internal(void schema,
+serialize_internal(void *schema,
                     void *writer);
 
 axis2_hash_t *AXIS2_CALL 
@@ -260,7 +263,7 @@
     schema_impl->schema.ops->get_includes = 
             axis2_xml_schema_get_includes;
     schema_impl->schema.ops->is_compiled = 
-            axis2_xml_schema_is_compiled
+            axis2_xml_schema_is_compiled;
     schema_impl->schema.ops->get_items = 
             axis2_xml_schema_get_items;
     schema_impl->schema.ops->get_notations = 
@@ -315,7 +318,7 @@
     axis2_hash_set(schema_impl->methods, "get_elements", 
             AXIS2_HASH_KEY_STRING, axis2_xml_schema_get_elements);
     axis2_hash_set(schema_impl->methods, "get_element_by_qname", 
-            AXIS2_HASH_KEY_STRING, axis2_xml_schema_get_elment_by_qname);
+            AXIS2_HASH_KEY_STRING, axis2_xml_schema_get_element_by_qname);
     axis2_hash_set(schema_impl->methods, "get_type_by_qname", 
             AXIS2_HASH_KEY_STRING, axis2_xml_schema_get_type_by_qname);
     axis2_hash_set(schema_impl->methods, "get_final_default", 
@@ -370,12 +373,6 @@
     AXIS2_ENV_CHECK(env, AXIS2_FAILURE);
     schema_impl = INTF_TO_IMPL(schema);
 
-    if(schema_impl->x_path)
-    {
-        AXIS2_FREE((*env)->allocator, schema_impl->x_path);
-        schema_impl->x_path = NULL;
-    }
-
     if(schema_impl->methods)
     {
         axis2_hash_free(schema_impl->methods, env);
@@ -590,11 +587,11 @@
 axis2_xml_schema_get_elements(void *schema,
                                 axis2_env_t **env) 
 {
-    return elements;
+    return NULL;
 }
 
 axis2_xml_schema_element_t *AXIS2_CALL
-axis2_xml_schema_get_element_by_name(void *schema,
+axis2_xml_schema_get_element_by_qname(void *schema,
                                         axis2_env_t **env,
                                         axis2_qname_t *qname) 
 {
@@ -602,7 +599,7 @@
 }
 
 axis2_xml_schema_type_t *AXIS2_CALL
-axis2_xml_schema_get_type_by_name(void *schema,
+axis2_xml_schema_get_type_by_qname(void *schema,
                                     axis2_env_t **env,
                                     axis2_qname_t *qname) 
 {
@@ -679,7 +676,7 @@
                                         axis2_env_t **env,
                                         axis2_char_t *target_namespc) 
 {
-    return NULL;
+    return AXIS2_SUCCESS;
 }
 
 axis2_char_t *AXIS2_CALL 
@@ -692,7 +689,7 @@
 axis2_status_t AXIS2_CALL 
 axis2_xml_schema_compile(void *schema,
                             axis2_env_t **env,
-                            axis2_xml_schema_validation_event_handler *eh) 
+                            axis2_xml_schema_validation_event_handler_t *eh) 
 {
     return AXIS2_SUCCESS;
 
@@ -714,7 +711,7 @@
 }
 
 static axis2_status_t 
-serialize_internal(void schema,
+serialize_internal(void *schema,
                     void *writer)
 {
     return AXIS2_SUCCESS;

Modified: 
webservices/axis2/trunk/c/modules/xml/xml_schema/xml_schema_collection.c
URL: 
http://svn.apache.org/viewcvs/webservices/axis2/trunk/c/modules/xml/xml_schema/xml_schema_collection.c?rev=394833&r1=394832&r2=394833&view=diff
==============================================================================
--- webservices/axis2/trunk/c/modules/xml/xml_schema/xml_schema_collection.c 
(original)
+++ webservices/axis2/trunk/c/modules/xml/xml_schema/xml_schema_collection.c 
Mon Apr 17 21:06:03 2006
@@ -15,6 +15,8 @@
  */
  
 #include <axis2_xml_schema_collection.h>
+#include <axis2_xml_schema_element.h>
+#include <axis2_xml_schema_type.h>
 #include <axis2_xml_schema.h>
 #include <axis2_validation_event_handler.h>
 #include <axis2_hash.h>
@@ -81,28 +83,28 @@
                                             void *collection,
                                             axis2_env_t **env,
                                             void *reader, 
-                                            axis2_validation_event_handler_t 
*veh); 
+                                            
axis2_xml_schema_validation_event_handler_t *veh); 
 
 axis2_xml_schema_t *AXIS2_CALL
 axis2_xml_schema_collection_read_a_input_source_and_validation_event_handler(
                                             void *collection,
                                             axis2_env_t **env,
                                             void *input_source, 
-                                            axis2_validation_event_handler_t 
*veh);
+                                            
axis2_xml_schema_validation_event_handler_t *veh);
 
 axis2_xml_schema_t *AXIS2_CALL
 axis2_xml_schema_collection_read_a_source_and_validation_event_handler(
                                             void *collection,
                                             axis2_env_t **env,
                                             void *source, 
-                                            axis2_validation_event_handler_t 
*veh); 
+                                            
axis2_xml_schema_validation_event_handler_t *veh); 
 
 axis2_xml_schema_t *AXIS2_CALL
 axis2_xml_schema_collection_read_a_document_and_validation_event_handler(
                                             void *collection,
                                             axis2_env_t **env,
                                             void *source, 
-                                            axis2_validation_event_handler_t 
*veh) 
+                                            
axis2_xml_schema_validation_event_handler_t *veh);
 
 axis2_xml_schema_t *AXIS2_CALL
 axis2_xml_schema_collection_read_a_element(
@@ -117,7 +119,7 @@
                                             axis2_env_t **env,
                                             void *document,
                                             axis2_char_t *uri,
-                                            axis2_validation_event_handler_t 
*veh); 
+                                            
axis2_xml_schema_validation_event_handler_t *veh); 
 
 axis2_xml_schema_t *AXIS2_CALL
 axis2_xml_schema_collection_read_a_element_and_uri(
@@ -127,13 +129,13 @@
                                             axis2_om_node_t *node,
                                             axis2_char_t *uri);
 
-axis2_xml_schema_element_t AXIS2_CALL
+axis2_xml_schema_element_t *AXIS2_CALL
 axis2_xml_schema_collection_get_element_by_qname(void *collection,
                                                  axis2_env_t **env,
                                                  axis2_qname_t *qname);
 
 axis2_xml_schema_type_t *AXIS2_CALL
-axis2_xml_schema_collection_get_type_by_qame(void *collection,
+axis2_xml_schema_collection_get_type_by_qname(void *collection,
                                              axis2_env_t **env,
                                              axis2_qname_t *schema_type_qname);
 
@@ -151,9 +153,9 @@
                                             axis2_xml_schema_type_t *type); 
 
 axis2_char_t *AXIS2_CALL 
-axis2_xml_schema_collection_get_namespc_for_prefix(void *collection,
+axis2_xml_schema_collection_get_namespace_for_prefix(void *collection,
                                                     axis2_env_t **env,
-                                                    axis2_chat_t *prefix); 
+                                                    axis2_char_t *prefix); 
 
 axis2_status_t AXIS2_CALL
 axis2_xml_schema_collection_map_namespace(void *collection,
@@ -170,12 +172,10 @@
     collection_impl = AXIS2_MALLOC((*env)->allocator, 
                     sizeof(axis2_xml_schema_collection_impl_t));
 
-    collection_impl->objs = NULL;
-
     collection_impl->collection.ops = AXIS2_MALLOC((*env)->allocator, 
                     sizeof(axis2_xml_schema_collection_ops_t)); 
 
-    axis2_xml_schema_collection_init();
+    axis2_xml_schema_collection_init(&(collection_impl->collection), env);
 
     collection_impl->collection.ops->free = 
             axis2_xml_schema_collection_free;
@@ -183,8 +183,6 @@
             axis2_xml_schema_collection_set_base_uri;
     collection_impl->collection.ops->init = 
             axis2_xml_schema_collection_init;
-    collection_impl->collection.ops->add_simple_type = 
-            axis2_xml_schema_collection_add_simple_type;
     
collection_impl->collection.ops->read_a_reader_and_validation_event_handler = 
             
axis2_xml_schema_collection_read_a_reader_and_validation_event_handler;
     
collection_impl->collection.ops->read_a_input_source_and_validation_event_handler
 = 
@@ -195,7 +193,7 @@
             
axis2_xml_schema_collection_read_a_document_and_validation_event_handler;
     collection_impl->collection.ops->read_a_element = 
             axis2_xml_schema_collection_read_a_element;
-    
collection_impl->collection.ops->ed_a_document_and_uri_and_validation_event_handler=
 
+    
collection_impl->collection.ops->read_a_document_and_uri_and_validation_event_handler=
 
             
axis2_xml_schema_collection_read_a_document_and_uri_and_validation_event_handler;
     collection_impl->collection.ops->read_a_element_and_uri = 
             axis2_xml_schema_collection_read_a_element_and_uri;
@@ -224,12 +222,6 @@
 
     collection_impl = INTF_TO_IMPL(collection);
 
-    if(collection_impl->objs)
-    {
-        AXIS2_ARRAY_LIST_FREE(collection_impl->objs, env);
-        collection_impl->objs = NULL;
-    }
-
     if((&(collection_impl->collection))->ops)
     {
         free((&(collection_impl->collection))->ops);
@@ -267,8 +259,6 @@
             collection_impl_l->collection.ops->set_base_uri;
     collection->ops->init = 
             collection_impl_l->collection.ops->init; 
-    collection->ops->add_simple_type = 
-            collection_impl_l->collection.ops->add_simple_type; 
     collection->ops->read_a_reader_and_validation_event_handler = 
             
collection_impl_l->collection.ops->read_a_reader_and_validation_event_handler; 
     collection->ops->read_a_input_source_and_validation_event_handler = 
@@ -394,7 +384,7 @@
                                             void *collection,
                                             axis2_env_t **env,
                                             void *reader, 
-                                            axis2_validation_event_handler_t 
*veh) 
+                                            
axis2_xml_schema_validation_event_handler_t *veh) 
 {
     return NULL;
 }
@@ -404,7 +394,7 @@
                                             void *collection,
                                             axis2_env_t **env,
                                             void *input_source, 
-                                            axis2_validation_event_handler_t 
*veh) 
+                                            
axis2_xml_schema_validation_event_handler_t *veh) 
 {
     return NULL;
 }
@@ -414,7 +404,7 @@
                                             void *collection,
                                             axis2_env_t **env,
                                             void *source, 
-                                            axis2_validation_event_handler_t 
*veh) 
+                                            
axis2_xml_schema_validation_event_handler_t *veh) 
 {
     return NULL;
 }
@@ -424,7 +414,7 @@
                                             void *collection,
                                             axis2_env_t **env,
                                             void *source, 
-                                            axis2_validation_event_handler_t 
*veh) 
+                                            
axis2_xml_schema_validation_event_handler_t *veh) 
 {
     return NULL;
 }
@@ -445,7 +435,7 @@
                                             axis2_env_t **env,
                                             void *document,
                                             axis2_char_t *uri,
-                                            axis2_validation_event_handler_t 
*veh) 
+                                            
axis2_xml_schema_validation_event_handler_t *veh) 
 {
     return NULL;
 }
@@ -461,7 +451,7 @@
     return NULL;
 }
 
-axis2_xml_schema_element_t AXIS2_CALL
+axis2_xml_schema_element_t *AXIS2_CALL
 axis2_xml_schema_collection_get_element_by_qname(void *collection,
                                                  axis2_env_t **env,
                                                  axis2_qname_t *qname) 
@@ -470,7 +460,7 @@
 }
 
 axis2_xml_schema_type_t *AXIS2_CALL
-axis2_xml_schema_collection_get_type_by_qame(void *collection,
+axis2_xml_schema_collection_get_type_by_qname(void *collection,
                                              axis2_env_t **env,
                                              axis2_qname_t *schema_type_qname) 
 {
@@ -497,9 +487,9 @@
 }
 
 axis2_char_t *AXIS2_CALL 
-axis2_xml_schema_collection_get_namespc_for_prefix(void *collection,
+axis2_xml_schema_collection_get_namespace_for_prefix(void *collection,
                                                     axis2_env_t **env,
-                                                    axis2_chat_t *prefix) 
+                                                    axis2_char_t *prefix) 
 {
     return NULL;
 }

Modified: webservices/axis2/trunk/c/modules/xml/xml_schema/xml_schema_element.c
URL: 
http://svn.apache.org/viewcvs/webservices/axis2/trunk/c/modules/xml/xml_schema/xml_schema_element.c?rev=394833&r1=394832&r2=394833&view=diff
==============================================================================
--- webservices/axis2/trunk/c/modules/xml/xml_schema/xml_schema_element.c 
(original)
+++ webservices/axis2/trunk/c/modules/xml/xml_schema/xml_schema_element.c Mon 
Apr 17 21:06:03 2006
@@ -16,6 +16,12 @@
 
 #include <axis2_xml_schema_element.h>
 #include <axis2_xml_schema_annotation.h>
+#include <axis2_xml_schema_type_receiver.h>
+#include <axis2_xml_schema_particle.h>
+#include <axis2_xml_schema_derivation_method.h>
+#include <axis2_xml_schema_obj_collection.h>
+#include <axis2_xml_schema_type.h>
+#include <axis2_xml_schema_form.h>
 
 typedef struct axis2_xml_schema_element_impl axis2_xml_schema_element_impl_t;
 
@@ -26,8 +32,8 @@
 struct axis2_xml_schema_element_impl
 {
     axis2_xml_schema_element_t element;
-    axis2_xml_schema_type_reciever_t *type_recv;
-    axis2_xml_particle_t *particle;
+    axis2_xml_schema_type_receiver_t *type_recv;
+    axis2_xml_schema_particle_t *particle;
     axis2_hash_t *methods;
     /**
      * Attribute used to block a type derivation.
@@ -94,7 +100,7 @@
 axis2_xml_schema_element_free(void *element,
                         axis2_env_t **env);
 
-axis2_xml_schema_obj_t *AXIS2_CALL
+axis2_xml_schema_type_receiver_t *AXIS2_CALL
 axis2_xml_schema_element_get_base_impl(void *element,
                                             axis2_env_t **env);
 
@@ -216,7 +222,7 @@
                                                 axis2_env_t **env);
 
 axis2_status_t AXIS2_CALL 
-axis2_xml_schema_element_set_schema_type_name(void *element,
+axis2_xml_schema_element_set_schema_type_qname(void *element,
                                                 axis2_env_t **env,
                                                 axis2_qname_t 
*schema_type_qname);
 
@@ -249,11 +255,8 @@
     element_impl = AXIS2_MALLOC((*env)->allocator, 
                     sizeof(axis2_xml_schema_element_impl_t));
 
-    element_impl->schema_obj = NULL;
+    element_impl->type_recv = NULL;
     element_impl->methods = NULL;
-    element_impl->id = NULL;
-    element_impl->annotation = NULL;
-    element_impl->unhandled_attrs = NULL;
 
     element_impl->element.ops = AXIS2_MALLOC((*env)->allocator, 
                     sizeof(axis2_xml_schema_element_ops_t));
@@ -261,8 +264,68 @@
     element_impl->element.ops->free = axis2_xml_schema_element_free;
     element_impl->element.ops->get_base_impl = 
             axis2_xml_schema_element_get_base_impl;
-    element_impl->element.ops-> = 
-            axis2_xml_schema_element_;
+    element_impl->element.ops->get_constraints = 
+            axis2_xml_schema_element_get_constraints;
+    element_impl->element.ops->get_default_value = 
+            axis2_xml_schema_element_get_default_value;
+    element_impl->element.ops->set_default_value = 
+            axis2_xml_schema_element_set_default_value;
+    element_impl->element.ops->get_block = 
+            axis2_xml_schema_element_get_block;
+    element_impl->element.ops->set_block = 
+            axis2_xml_schema_element_set_block;
+    element_impl->element.ops->get_final = 
+            axis2_xml_schema_element_get_final;
+    element_impl->element.ops->set_final = 
+            axis2_xml_schema_element_set_final;
+    element_impl->element.ops->get_block_resolved = 
+            axis2_xml_schema_element_get_block_resolved;
+    element_impl->element.ops->get_fixed_value = 
+            axis2_xml_schema_element_get_fixed_value;
+    element_impl->element.ops->set_fixed_value = 
+            axis2_xml_schema_element_set_fixed_value;
+    element_impl->element.ops->get_element_type = 
+            axis2_xml_schema_element_get_element_type;
+    element_impl->element.ops->get_form = 
+            axis2_xml_schema_element_get_form;
+    element_impl->element.ops->set_form = 
+            axis2_xml_schema_element_set_form;
+    element_impl->element.ops->is_abstract = 
+            axis2_xml_schema_element_is_abstract;
+    element_impl->element.ops->set_abstract = 
+            axis2_xml_schema_element_set_abstract;
+    element_impl->element.ops->is_nillable = 
+            axis2_xml_schema_element_is_nillable;
+    element_impl->element.ops->set_nillable = 
+            axis2_xml_schema_element_set_nillable;
+    element_impl->element.ops->get_name = 
+            axis2_xml_schema_element_get_name;
+    element_impl->element.ops->set_name = 
+            axis2_xml_schema_element_set_name;
+    element_impl->element.ops->get_ref_qname = 
+            axis2_xml_schema_element_get_ref_qname;
+    element_impl->element.ops->set_ref_qname = 
+            axis2_xml_schema_element_set_ref_qname;
+    element_impl->element.ops->get_qname = 
+            axis2_xml_schema_element_get_qname;
+    element_impl->element.ops->set_qname = 
+            axis2_xml_schema_element_set_qname;
+    element_impl->element.ops->get_schema_type = 
+            axis2_xml_schema_element_get_schema_type;
+    element_impl->element.ops->set_schema_type = 
+            axis2_xml_schema_element_set_schema_type;
+    element_impl->element.ops->get_schema_type_qname = 
+            axis2_xml_schema_element_get_schema_type_qname;
+    element_impl->element.ops->set_schema_type_qname = 
+            axis2_xml_schema_element_set_schema_type_qname;
+    element_impl->element.ops->get_substitution_group = 
+            axis2_xml_schema_element_get_substitution_group;
+    element_impl->element.ops->set_substitution_group = 
+            axis2_xml_schema_element_set_substitution_group;
+    element_impl->element.ops->to_string = 
+            axis2_xml_schema_element_to_string;
+    element_impl->element.ops->set_type = 
+            axis2_xml_schema_element_set_type;
    
     element_impl->methods = axis2_hash_make(env);
     if(!element_impl->methods)
@@ -272,12 +335,74 @@
     }
     axis2_hash_set(element_impl->methods, "free", AXIS2_HASH_KEY_STRING, 
             axis2_xml_schema_element_free);
-    axis2_hash_set(element_impl->methods, "", AXIS2_HASH_KEY_STRING, 
-            axis2_xml_schema_element_);
-
-    element_impl->schema_obj = axis2_xml_schema_obj_create(env);
-    status = axis2_xml_schema_obj_resolve_methods(
-            &(element_impl->element.base), env, element_impl->schema_obj, 
+    axis2_hash_set(element_impl->methods, "get_constraints", 
AXIS2_HASH_KEY_STRING, 
+            axis2_xml_schema_element_get_constraints);
+    axis2_hash_set(element_impl->methods, "get_default_value", 
AXIS2_HASH_KEY_STRING, 
+            axis2_xml_schema_element_get_default_value);
+    axis2_hash_set(element_impl->methods, "set_default_value", 
AXIS2_HASH_KEY_STRING, 
+            axis2_xml_schema_element_set_default_value);
+    axis2_hash_set(element_impl->methods, "get_block", AXIS2_HASH_KEY_STRING, 
+            axis2_xml_schema_element_get_block);
+    axis2_hash_set(element_impl->methods, "set_block", AXIS2_HASH_KEY_STRING, 
+            axis2_xml_schema_element_set_block);
+    axis2_hash_set(element_impl->methods, "get_final", AXIS2_HASH_KEY_STRING, 
+            axis2_xml_schema_element_get_final);
+    axis2_hash_set(element_impl->methods, "set_final", AXIS2_HASH_KEY_STRING, 
+            axis2_xml_schema_element_set_final);
+    axis2_hash_set(element_impl->methods, "get_block_resolved", 
AXIS2_HASH_KEY_STRING, 
+            axis2_xml_schema_element_get_block_resolved);
+    axis2_hash_set(element_impl->methods, "get_fixed_value", 
AXIS2_HASH_KEY_STRING, 
+            axis2_xml_schema_element_get_fixed_value);
+    axis2_hash_set(element_impl->methods, "set_fixed_value", 
AXIS2_HASH_KEY_STRING, 
+            axis2_xml_schema_element_set_fixed_value);
+    axis2_hash_set(element_impl->methods, "get_element_type", 
AXIS2_HASH_KEY_STRING, 
+            axis2_xml_schema_element_get_element_type);
+    axis2_hash_set(element_impl->methods, "get_form", AXIS2_HASH_KEY_STRING, 
+            axis2_xml_schema_element_get_form);
+    axis2_hash_set(element_impl->methods, "set_form", AXIS2_HASH_KEY_STRING, 
+            axis2_xml_schema_element_set_form);
+    axis2_hash_set(element_impl->methods, "is_abstract", 
AXIS2_HASH_KEY_STRING, 
+            axis2_xml_schema_element_is_abstract);
+    axis2_hash_set(element_impl->methods, "set_abstract", 
AXIS2_HASH_KEY_STRING, 
+            axis2_xml_schema_element_set_abstract);
+    axis2_hash_set(element_impl->methods, "is_nillable", 
AXIS2_HASH_KEY_STRING, 
+            axis2_xml_schema_element_is_nillable);
+    axis2_hash_set(element_impl->methods, "set_nillable", 
AXIS2_HASH_KEY_STRING, 
+            axis2_xml_schema_element_set_nillable);
+    axis2_hash_set(element_impl->methods, "get_name", AXIS2_HASH_KEY_STRING, 
+            axis2_xml_schema_element_get_name);
+    axis2_hash_set(element_impl->methods, "set_name", AXIS2_HASH_KEY_STRING, 
+            axis2_xml_schema_element_set_name);
+    axis2_hash_set(element_impl->methods, "get_ref_qname", 
AXIS2_HASH_KEY_STRING, 
+            axis2_xml_schema_element_get_ref_qname);
+    axis2_hash_set(element_impl->methods, "set_ref_qname", 
AXIS2_HASH_KEY_STRING, 
+            axis2_xml_schema_element_set_ref_qname);
+    axis2_hash_set(element_impl->methods, "get_qname", AXIS2_HASH_KEY_STRING, 
+            axis2_xml_schema_element_get_qname);
+    axis2_hash_set(element_impl->methods, "get_qname", AXIS2_HASH_KEY_STRING, 
+            axis2_xml_schema_element_get_qname);
+    axis2_hash_set(element_impl->methods, "set_qname", AXIS2_HASH_KEY_STRING, 
+            axis2_xml_schema_element_set_qname);
+    axis2_hash_set(element_impl->methods, "get_schema_type", 
AXIS2_HASH_KEY_STRING, 
+            axis2_xml_schema_element_get_schema_type);
+    axis2_hash_set(element_impl->methods, "set_schema_type", 
AXIS2_HASH_KEY_STRING, 
+            axis2_xml_schema_element_set_schema_type);
+    axis2_hash_set(element_impl->methods, "get_schema_type_qname", 
AXIS2_HASH_KEY_STRING, 
+            axis2_xml_schema_element_get_schema_type_qname);
+    axis2_hash_set(element_impl->methods, "set_schema-type_qname", 
AXIS2_HASH_KEY_STRING, 
+            axis2_xml_schema_element_set_schema_type_qname);
+    axis2_hash_set(element_impl->methods, "get_substitution_group", 
AXIS2_HASH_KEY_STRING, 
+            axis2_xml_schema_element_get_substitution_group);
+    axis2_hash_set(element_impl->methods, "set_substitution_group", 
AXIS2_HASH_KEY_STRING, 
+            axis2_xml_schema_element_set_substitution_group);
+    axis2_hash_set(element_impl->methods, "to_string", AXIS2_HASH_KEY_STRING, 
+            axis2_xml_schema_element_to_string);
+    axis2_hash_set(element_impl->methods, "set_type", AXIS2_HASH_KEY_STRING, 
+            axis2_xml_schema_element_set_type);
+
+    element_impl->type_recv = axis2_xml_schema_type_receiver_create(env);
+    status = axis2_xml_schema_type_receiver_resolve_methods(
+            &(element_impl->element.base), env, element_impl->type_recv, 
             element_impl->methods);
 
     return &(element_impl->element);
@@ -292,34 +417,22 @@
     AXIS2_ENV_CHECK(env, AXIS2_FAILURE);
     element_impl = INTF_TO_IMPL(element);
 
-    if(element_impl->id)
-    {
-        AXIS2_FREE((*env)->allocator, element_impl->id);
-        element_impl->id = NULL;
-    }
-
-    if(element_impl->annotation)
+    if(element_impl->particle)
     {
-        AXIS2_XML_SCHEMA_ANNOTATION_FREE(element_impl->annotation, env);
-        element_impl->annotation = NULL;
+        AXIS2_XML_SCHEMA_PARTICLE_FREE(element_impl->particle, env);
+        element_impl->particle = NULL;
     }
  
-    if(element_impl->unhandled_attrs)
-    {
-        AXIS2_ARRAY_LIST_FREE(element_impl->unhandled_attrs, env);
-        element_impl->unhandled_attrs = NULL;
-    }  
-
     if(element_impl->methods)
     {
         axis2_hash_free(element_impl->methods, env);
         element_impl->methods = NULL;
     }
     
-    if(element_impl->schema_obj)
+    if(element_impl->type_recv)
     {
-        AXIS2_XML_SCHEMA_OBJ_FREE(element_impl->schema_obj, env);
-        element_impl->schema_obj = NULL;
+        AXIS2_XML_SCHEMA_TYPE_RECEIVER_FREE(element_impl->type_recv, env);
+        element_impl->type_recv = NULL;
     }
     
     if((&(element_impl->element))->ops)
@@ -336,7 +449,7 @@
     return AXIS2_SUCCESS;
 }
 
-axis2_xml_schema_obj_t *AXIS2_CALL
+axis2_xml_schema_type_receiver_t *AXIS2_CALL
 axis2_xml_schema_element_get_base_impl(void *element,
                                 axis2_env_t **env)
 {
@@ -345,7 +458,7 @@
     AXIS2_ENV_CHECK(env, NULL);
     element_impl = INTF_TO_IMPL(element);
 
-    return element_impl->schema_obj;
+    return element_impl->type_recv;
 }
 
 AXIS2_DECLARE(axis2_status_t)
@@ -369,8 +482,68 @@
             AXIS2_HASH_KEY_STRING);
     element->ops->get_base_impl = 
             element_impl_l->element.ops->get_base_impl;
-    element->ops-> = 
-            element_impl_l->element.ops->;
+    element->ops->get_constraints = 
+            element_impl_l->element.ops->get_constraints;
+    element->ops->get_default_value = 
+            element_impl_l->element.ops->get_default_value;
+    element->ops->set_default_value = 
+            element_impl_l->element.ops->set_default_value;
+    element->ops->get_block = 
+            element_impl_l->element.ops->get_block;
+    element->ops->set_block = 
+            element_impl_l->element.ops->set_block;
+    element->ops->get_final = 
+            element_impl_l->element.ops->get_final;
+    element->ops->set_final = 
+            element_impl_l->element.ops->set_final;
+    element->ops->get_block_resolved = 
+            element_impl_l->element.ops->get_block_resolved;
+    element->ops->get_fixed_value = 
+            element_impl_l->element.ops->get_fixed_value;
+    element->ops->set_fixed_value = 
+            element_impl_l->element.ops->set_fixed_value;
+    element->ops->get_element_type = 
+            element_impl_l->element.ops->get_element_type;
+    element->ops->get_form = 
+            element_impl_l->element.ops->get_form;
+    element->ops->set_form = 
+            element_impl_l->element.ops->set_form;
+    element->ops->is_abstract = 
+            element_impl_l->element.ops->is_abstract;
+    element->ops->set_abstract = 
+            element_impl_l->element.ops->set_abstract;
+    element->ops->is_nillable = 
+            element_impl_l->element.ops->is_nillable;
+    element->ops->set_nillable = 
+            element_impl_l->element.ops->set_nillable;
+    element->ops->get_name = 
+            element_impl_l->element.ops->get_name;
+    element->ops->set_name = 
+            element_impl_l->element.ops->set_name;
+    element->ops->get_ref_qname = 
+            element_impl_l->element.ops->get_ref_qname;
+    element->ops->set_ref_qname = 
+            element_impl_l->element.ops->set_ref_qname;
+    element->ops->get_qname = 
+            element_impl_l->element.ops->get_qname;
+    element->ops->set_qname = 
+            element_impl_l->element.ops->set_qname;
+    element->ops->get_schema_type = 
+            element_impl_l->element.ops->get_schema_type;
+    element->ops->set_schema_type = 
+            element_impl_l->element.ops->set_schema_type;
+    element->ops->get_schema_type_qname = 
+            element_impl_l->element.ops->get_schema_type_qname;
+    element->ops->set_schema_type_qname = 
+            element_impl_l->element.ops->set_schema_type_qname;
+    element->ops->get_substitution_group = 
+            element_impl_l->element.ops->get_substitution_group;
+    element->ops->set_substitution_group = 
+            element_impl_l->element.ops->set_substitution_group;
+    element->ops->to_string = 
+            element_impl_l->element.ops->to_string;
+    element->ops->set_type = 
+            element_impl_l->element.ops->set_type;
     
     return 
axis2_xml_schema_schema_type_receiver_resolve_methods(&(element->base), 
             env, element_impl_l->type_recv, methods);
@@ -574,7 +747,7 @@
 }
 
 axis2_status_t AXIS2_CALL 
-axis2_xml_schema_element_set_schema_type_name(void *element,
+axis2_xml_schema_element_set_schema_type_qname(void *element,
                                                 axis2_env_t **env,
                                                 axis2_qname_t 
*schema_type_qname) 
 {

Modified: 
webservices/axis2/trunk/c/modules/xml/xml_schema/xml_schema_type_receiver.c
URL: 
http://svn.apache.org/viewcvs/webservices/axis2/trunk/c/modules/xml/xml_schema/xml_schema_type_receiver.c?rev=394833&r1=394832&r2=394833&view=diff
==============================================================================
--- webservices/axis2/trunk/c/modules/xml/xml_schema/xml_schema_type_receiver.c 
(original)
+++ webservices/axis2/trunk/c/modules/xml/xml_schema/xml_schema_type_receiver.c 
Mon Apr 17 21:06:03 2006
@@ -114,8 +114,6 @@
 
     type_receiver_impl = INTF_TO_IMPL(type_receiver);
 
-    type_receiver_impl->type = type;
-
     return AXIS2_SUCCESS;
 }
 


Reply via email to