FDO .NET API Reference Feature Data Objects

mgXmlFeaturePropertyWriter.h

Go to the documentation of this file.
00001 /*
00002 * Copyright (C) 2004-2006  Autodesk, Inc.
00003 * 
00004 * This library is free software; you can redistribute it and/or
00005 * modify it under the terms of version 2.1 of the GNU Lesser
00006 * General Public License as published by the Free Software Foundation.
00007 * 
00008 * This library is distributed in the hope that it will be useful,
00009 * but WITHOUT ANY WARRANTY; without even the implied warranty of
00010 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
00011 * Lesser General Public License for more details.
00012 * 
00013 * You should have received a copy of the GNU Lesser General Public
00014 * License along with this library; if not, write to the Free Software
00015 * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA
00016 *
00017 */
00018 
00019 #pragma  once
00020 
00021 class FdoXmlFeaturePropertyWriter;
00022 
00023 BEGIN_NAMESPACE_OSGEO_COMMON_XML
00024 public __gc class XmlWriter;
00025 END_NAMESPACE_OSGEO_COMMON_XML
00026 
00027 BEGIN_NAMESPACE_OSGEO_COMMON
00028 public __gc __interface IStreamReader;
00029 END_NAMESPACE_OSGEO_COMMON
00030 
00031 BEGIN_NAMESPACE_OSGEO_FDO_SCHEMA
00032 public __gc class ClassDefinition;
00033 END_NAMESPACE_OSGEO_FDO_SCHEMA
00034 
00035 BEGIN_NAMESPACE_OSGEO_FDO_COMMANDS
00036 public __gc class PropertyValue;
00037 END_NAMESPACE_OSGEO_FDO_COMMANDS
00038 
00039 BEGIN_NAMESPACE_OSGEO_FDO_RASTER
00040 public __gc __interface IRaster;
00041 END_NAMESPACE_OSGEO_FDO_RASTER
00042 
00043 BEGIN_NAMESPACE_OSGEO_FDO_EXPRESSION
00044 public __gc class LOBValue;
00045 END_NAMESPACE_OSGEO_FDO_EXPRESSION
00046 
00047 BEGIN_NAMESPACE_OSGEO_FDO_XML
00048 public __gc class XmlFlags;
00049 
00050 /// \ingroup (OSGeoFDOXml)
00051 /// \brief
00052 /// XmlFeaturePropertyWriter writes features in GML format. It is similar to 
00053 /// XmlFeatureWriter, except that it provides better performance. However, the 
00054 /// caller is responsible for ensuring that properties are written in proper order. 
00055 public __gc class XmlFeaturePropertyWriter : public NAMESPACE_OSGEO_RUNTIME::Disposable
00056 {
00057 public:
00058     /// \brief
00059     /// Creates a Feature Property Writer for writing FDO features to XML.
00060     /// 
00061     /// \param writer 
00062     /// Input XML document writer. Specifies the XML document that the features will be
00063     /// written to.
00064     /// 
00065     XmlFeaturePropertyWriter(NAMESPACE_OSGEO_COMMON_XML::XmlWriter* writer);
00066 
00067     /// \brief
00068     /// Creates a Feature Property Writer for writing FDO features to XML.
00069     /// 
00070     /// \param writer 
00071     /// Input XML document writer. Specifies the XML document that the features will be
00072     /// written to.
00073     /// \param flags 
00074     /// Input options for controlling the writing of the features. If NULL then the 
00075     /// default flags are used.
00076     /// 
00077     XmlFeaturePropertyWriter(NAMESPACE_OSGEO_COMMON_XML::XmlWriter* writer, NAMESPACE_OSGEO_FDO_XML::XmlFlags* flags);
00078 
00079     /// \brief
00080     /// Gets the underlying XML writer.
00081     /// 
00082     /// \return
00083     /// Returns the underlying XML writer.
00084     /// 
00085     NAMESPACE_OSGEO_COMMON_XML::XmlWriter* GetXmlWriter();
00086 
00087     /// \brief
00088     /// Gets the class definition for the current feature being written.
00089     /// 
00090     /// \return
00091     /// Returns ClassDefinition
00092     /// 
00093     __property NAMESPACE_OSGEO_FDO_SCHEMA::ClassDefinition* get_ClassDefinition();
00094 
00095     /// \brief
00096     /// Sets the class definition for the current feature being written.
00097     /// 
00098     /// \param classDefinition 
00099     /// Input the class definition
00100     /// 
00101     /// \return
00102     /// Returns nothing
00103     /// 
00104     __property System::Void set_ClassDefinition(NAMESPACE_OSGEO_FDO_SCHEMA::ClassDefinition* classDefinition);
00105 
00106     /// \brief
00107     /// Writes the start of a feature to XML. The start tags for the feature member 
00108     /// element and the feature's actual element are written. The feature element name
00109     /// is derived from the feature's class and schema names.
00110     /// 
00111     /// \param startTag 
00112     /// The start tag for the feature element. If it is null, the
00113     /// feature's class name used.
00114     /// 
00115     /// \return
00116     /// Returns nothing
00117     /// 
00118     System::Void WriteFeatureStart(System::String* startTag);
00119 
00120     /// \brief
00121     /// Closes the current feature by writing the feature element and feature member 
00122     /// element end tags.
00123     /// 
00124     /// \return
00125     /// Returns nothing
00126     /// 
00127     System::Void WriteFeatureEnd();
00128 
00129     /// \brief
00130     /// Writes a feature property to XML.
00131     /// 
00132     /// \param name 
00133     /// Input the property name
00134     /// \param value 
00135     /// Input the property value as an FDO property
00136     /// 
00137     /// \return
00138     /// Returns nothing
00139     /// 
00140     System::Void WriteProperty(System::String* name, NAMESPACE_OSGEO_FDO_COMMANDS::PropertyValue* value);
00141 
00142     /// \brief
00143     /// Writes a feature property to XML.
00144     /// 
00145     /// \param name 
00146     /// Input the property name
00147     /// \param value 
00148     /// Input the property value as an FDO property
00149     /// \param valueOnly 
00150     /// false: wrap the property value in a property element
00151     /// true: just write the property value
00152     /// 
00153     /// \return
00154     /// Returns nothing
00155     /// 
00156     System::Void WriteProperty(System::String* name, NAMESPACE_OSGEO_FDO_COMMANDS::PropertyValue* value, System::Boolean valueOnly);
00157 
00158     /// \brief
00159     /// Writes a feature property to XML.
00160     /// 
00161     /// \param name 
00162     /// Input the property name
00163     /// \param value 
00164     /// Input the property value as a string
00165     /// 
00166     /// \return
00167     /// Returns nothing
00168     /// 
00169     System::Void WriteProperty(System::String* name, System::String* value);
00170 
00171     /// \brief
00172     /// Writes a feature property to XML.
00173     /// 
00174     /// \param name 
00175     /// Input the property name
00176     /// \param value 
00177     /// Input the property value as a string
00178     /// \param valueOnly 
00179     /// false: wrap the property value in a property element
00180     /// true: just write the property value
00181     /// 
00182     /// \return
00183     /// Returns nothing
00184     /// 
00185     System::Void WriteProperty(System::String* name, System::String* value, System::Boolean valueOnly);
00186 
00187     // TODO: do we need functions for other basic types or make the caller do the
00188     // conversion to string. 
00189 
00190     /// \brief
00191     /// Writes a raster property to XML.
00192     /// 
00193     /// \param name 
00194     /// Input the property name
00195     /// \param value 
00196     /// Input the raster property value
00197     /// 
00198     /// \return
00199     /// Returns nothing
00200     /// 
00201     System::Void WriteProperty(System::String* name, NAMESPACE_OSGEO_FDO_RASTER::IRaster* value);
00202 
00203     /// \brief
00204     /// Writes a raster property to XML.
00205     /// 
00206     /// \param name 
00207     /// Input the property name
00208     /// \param value 
00209     /// Input the raster property value
00210     /// \param valueOnly 
00211     /// false: wrap the property value in a property element
00212     /// true: just write the property value
00213     /// 
00214     /// \return
00215     /// Returns nothing
00216     /// 
00217     System::Void WriteProperty(System::String* name, NAMESPACE_OSGEO_FDO_RASTER::IRaster* value, System::Boolean valueOnly);
00218 
00219     /// \brief
00220     /// Writes a lob property to XML.
00221     /// 
00222     /// \param name 
00223     /// Input the property name
00224     /// \param value 
00225     /// Input the lob property value
00226     /// 
00227     /// \return
00228     /// Returns nothing
00229     /// 
00230     System::Void WriteProperty(System::String* name, NAMESPACE_OSGEO_FDO_EXPRESSION::LOBValue* value);
00231 
00232     /// \brief
00233     /// Writes a lob property to XML.
00234     /// 
00235     /// \param name 
00236     /// Input the property name
00237     /// \param value 
00238     /// Input the lob property value
00239     /// \param valueOnly 
00240     /// false: wrap the property value in a property element
00241     /// true: just write the property value
00242     /// 
00243     /// \return
00244     /// Returns nothing
00245     /// 
00246     System::Void WriteProperty(System::String* name, NAMESPACE_OSGEO_FDO_EXPRESSION::LOBValue* value, System::Boolean valueOnly);
00247 
00248     /// \brief
00249     /// Writes a LOB feature property from a stream reader to XML.
00250     /// 
00251     /// \param name 
00252     /// Input the property name
00253     /// \param lobReader 
00254     /// Input the reader for retrieving the lob
00255     /// 
00256     /// \return
00257     /// Returns nothing
00258     /// 
00259     System::Void WriteProperty(System::String* name, NAMESPACE_OSGEO_COMMON::IStreamReader* lobReader);
00260 
00261     /// \brief
00262     /// Writes a LOB feature property from a stream reader to XML.
00263     /// 
00264     /// \param name 
00265     /// Input the property name
00266     /// \param lobReader 
00267     /// Input the reader for retrieving the lob
00268     /// \param valueOnly 
00269     /// false: wrap the property value in a property element
00270     /// true: just write the property value
00271     /// 
00272     /// \return
00273     /// Returns nothing
00274     /// 
00275     System::Void WriteProperty(System::String* name, NAMESPACE_OSGEO_COMMON::IStreamReader* lobReader, System::Boolean valueOnly);
00276 
00277     /// \brief
00278     /// Writes a geometric property to XML.
00279     /// 
00280     /// \param name 
00281     /// Input the property name
00282     /// \param buffer 
00283     /// Input the property value as an array of bytes
00284     /// 
00285     /// \return
00286     /// Returns nothing
00287     /// 
00288     System::Void WriteGeometricProperty(System::String* name, System::Byte buffer[]);
00289 
00290     /// \brief
00291     /// Writes a geometric property to XML.
00292     /// 
00293     /// \param name 
00294     /// Input the property name
00295     /// \param buffer 
00296     /// Input the property value as an array of bytes
00297     /// \param valueOnly 
00298     /// false: wrap the property value in a property element
00299     /// true: just write the property value
00300     /// 
00301     /// \return
00302     /// Returns nothing
00303     /// 
00304     System::Void WriteGeometricProperty(System::String* name, System::Byte buffer[], System::Boolean valueOnly);
00305 
00306     /// \brief
00307     /// Writes start tag for an object property. The object property sub-properties
00308     /// can be written by subsequent calls to this class's Write functions.
00309     /// 
00310     /// \param name 
00311     /// Input the object property name
00312     /// 
00313     /// \return
00314     /// Returns nothing
00315     /// 
00316     System::Void WriteObjectPropertyStart(System::String* name);
00317 
00318     /// \brief
00319     /// Closes the current object property by writing its end tag.
00320     /// 
00321     /// \return
00322     /// Returns nothing
00323     /// 
00324     System::Void WriteObjectPropertyEnd();
00325 
00326 public private:
00327     XmlFeaturePropertyWriter(System::IntPtr unmanaged, System::Boolean autoDelete) : NAMESPACE_OSGEO_RUNTIME::Disposable(unmanaged, autoDelete)
00328     {
00329         
00330     }
00331 
00332     inline FdoXmlFeaturePropertyWriter* GetImpObj();
00333 
00334 /// \cond DOXYGEN-IGNORE
00335 protected:
00336     System::Void ReleaseUnmanagedObject();
00337 /// \endcond
00338 };
00339 
00340 END_NAMESPACE_OSGEO_FDO_XML
00341 
00342 

Comments or suggestions? Send us feedback.