w2c_schema_writer.h

Go to the documentation of this file.
00001 /*
00002  * Licensed to the Apache Software Foundation (ASF) under one or more
00003  * contributor license agreements.  See the NOTICE file distributed with
00004  * this work for additional information regarding copyright ownership.
00005  * The ASF licenses this file to You under the Apache License, Version 2.0
00006  * (the "License"); you may not use this file except in compliance with
00007  * the License.  You may obtain a copy of the License at
00008  *
00009  *      http://www.apache.org/licenses/LICENSE-2.0
00010  *
00011  * Unless required by applicable law or agreed to in writing, software
00012  * distributed under the License is distributed on an "AS IS" BASIS,
00013  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
00014  * See the License for the specific language governing permissions and
00015  * limitations under the License.
00016  */
00017   
00018 #ifndef W2C_SCHEMA_WRITER_H
00019 #define W2C_SCHEMA_WRITER_H
00020 
00026 #include <axis2_utils.h>
00027 #include <axis2_hash.h>
00028 #include <w2c_schema_compiler_options.h>
00029 #include <xml_schema_element.h>
00030 #include <w2c_schema_writer_meta_info.h>
00031 #include <xml_schema_complex_type.h>
00032 #include <xml_schema_simple_type.h>
00033 #include <axis2_qname.h>
00034 
00035 #ifdef __cplusplus
00036 extern "C"
00037 {
00038 #endif
00039 
00040 #define W2C_SCHEMA_WRITER_XSLT_PATH "/conf/templates/"
00041 
00048 typedef struct w2c_schema_writer w2c_schema_writer_t;
00049 typedef struct w2c_schema_writer_ops w2c_schema_writer_ops_t;
00050 
00051 AXIS2_DECLARE_DATA  struct w2c_schema_writer_ops
00052 {
00060     axis2_status_t (AXIS2_CALL *
00061     free)(w2c_schema_writer_t *schema_writer,
00062           const axis2_env_t *env);
00063 
00064     axis2_hash_t* (AXIS2_CALL *
00065     get_model_map)( w2c_schema_writer_t *writer,
00066         const axis2_env_t *env);
00067 
00068     axis2_status_t (AXIS2_CALL *
00069     init)( w2c_schema_writer_t *writer,
00070          const axis2_env_t *env,
00071          w2c_schema_compiler_options_t *options,
00072          axis2_char_t *template_name,
00073          axis2_hash_t *base_typemap);
00074 
00075     axis2_char_t* (AXIS2_CALL *
00076     write_element)( w2c_schema_writer_t *writer,
00077          const axis2_env_t *env,
00078          xml_schema_element_t *element,
00079          axis2_hash_t *typemap,
00080          w2c_schema_writer_meta_info_t *meta_info);
00081 
00082     axis2_char_t* (AXIS2_CALL *
00083     write_complex_type)( w2c_schema_writer_t *writer,
00084          const axis2_env_t *env,
00085          xml_schema_complex_type_t *type,
00086          axis2_hash_t *typemap,
00087          w2c_schema_writer_meta_info_t *meta_info);
00088 
00089     axis2_status_t (AXIS2_CALL *
00090     write_batch)( w2c_schema_writer_t *writer,
00091                  const axis2_env_t *env);
00092 
00093     axis2_char_t* (AXIS2_CALL *
00094     write_simple_type)( w2c_schema_writer_t *writer,
00095          const axis2_env_t *env,
00096          xml_schema_complex_type_t *type,
00097          axis2_hash_t *typemap,
00098          w2c_schema_writer_meta_info_t *meta_info);
00099 
00100     axis2_char_t* (AXIS2_CALL *
00101     make_fully_qualified_class_name)( w2c_schema_writer_t *writer,
00102         const axis2_env_t *env,
00103         axis2_qname_t *qname);
00104 
00105 
00106     axis2_status_t (AXIS2_CALL *
00107     register_extension_mapper_packagename)(w2c_schema_writer_t *writer,
00108                                         const axis2_env_t *env,
00109                                         axis2_char_t *package_name);
00110 
00111     axis2_status_t (AXIS2_CALL *
00112     write_extension_mapper)( w2c_schema_writer_t *writer,
00113                                 const axis2_env_t *env,
00114                                 axis2_hash_t *meta_info_array);
00115 
00116 
00117     axis2_char_t* (AXIS2_CALL *
00118     get_extension_mapper_package_name)(w2c_schema_writer_t *writer,
00119                                         const axis2_env_t *env);
00120  
00121      
00122    };
00123 
00124 AXIS2_DECLARE_DATA  struct w2c_schema_writer
00125 {
00126      struct w2c_schema_writer_ops *ops;
00127 };
00128 
00131 /*************************** Function macros **********************************/
00132 
00133 #define W2C_SCHEMA_WRITER_FREE(schema_writer, env) \
00134       ((schema_writer)->ops->free (schema_writer, env)) 
00135 
00136 #define W2C_SCHEMA_WRITER_GET_MODEL_MAP(schema_writer, env) \
00137       ((schema_writer)->ops->get_model_map(schema_writer, env))
00138 
00139 #define W2C_SCHEMA_WRITER_INIT(schema_writer, env, options, template_name, base_typemap) \
00140       ((schema_writer)->ops->init(schema_writer, env, options, template_name, base_typemap))
00141 
00142 #define W2C_SCHEMA_WRITER_WRITE_ELEMENT(schema_writer, env, element, typemap, meta_info) \
00143       ((schema_writer)->ops->write_element(schema_writer, env, element, typemap, meta_info))
00144 
00145 #define W2C_SCHEMA_WRITER_WRITE_COMPLEX_TYPE(schema_writer, env, type, typemap, meta_info) \
00146       ((schema_writer)->ops->write_complex_type(schema_writer, env, type, typemap, meta_info))
00147 
00148 #define W2C_SCHEMA_WRITER_WRITE_BATCH(schema_writer, env) \
00149       ((schema_writer)->ops->write_batch(schema_writer, env)) 
00150 
00151 #define W2C_SCHEMA_WRITER_WRITE_SIMPLE_TYPE(schema_writer, env, type, typemap, meta_info) \
00152       ((schema_writer)->ops->write_simple_type(schema_writer, env, type, typemap, meta_info))
00153 
00154 #define W2C_SCHEMA_WRITER_MAKE_FULLY_QUALIFIED_CLASS_NAME(schema_writer, env, qname) \
00155       ((schema_writer)->ops->make_fully_qualified_class_name(schema_writer, env, qname))
00156 
00157 #define W2C_SCHEMA_WRITER_REGISTER_EXTENSION_MAPPER_PACKAGENAME(schema_writer, env, package) \
00158       ((schema_writer)->ops->register_extension_mapper_packagename(schema_writer, env, package)) 
00159 
00160 #define W2C_SCHEMA_WRITER_WRITE_EXTENSION_MAPPER(schema_writer, env, array) \
00161       ((schema_writer)->ops->write_extension_mapper(schema_writer, env, array)) 
00162 
00163 #define W2C_SCHEMA_WRITER_GET_EXTENSION_MAPPER_PACKAGE_NAME(schema_writer, env) \
00164       ((schema_writer)->ops->get_extension_mapper_package_name(schema_writer, env)) 
00165 
00168 #ifdef __cplusplus
00169 }
00170 #endif
00171 
00172 #endif /* W2C_SCHEMA_WRITER_H */

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