FDO .NET API Reference | Feature Data Objects |
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 #include "FDO\Schema\mgSchemaElement.h" 00022 #include "FDO\Xml\mgIXmlSerializable.h" 00023 00024 class FdoFeatureSchema; 00025 00026 BEGIN_NAMESPACE_OSGEO_FDO_XML 00027 public __gc class XmlFlags; 00028 END_NAMESPACE_OSGEO_FDO_XML 00029 00030 BEGIN_NAMESPACE_OSGEO_FDO_SCHEMA 00031 public __gc class ClassCollection; 00032 00033 /// \ingroup (OSGeoFDOSchema) 00034 /// \brief 00035 /// The FeatureSchema class derives from SchemaElement. 00036 /// A feature schema contains all of the classes and relationships 00037 /// that make up a particular data model. The FeatureSchema class can be used to 00038 /// either create a new schema or to browse the schema end of a 00039 /// connection. In the later case, the FeatureSchema instance is created by the 00040 /// DescribeSchema command. In this case the schema objects have additional properties, 00041 /// such as coordinate system definitions that can be useful to the 00042 /// application when placed in context with the schema objects. 00043 public __gc class FeatureSchema : public NAMESPACE_OSGEO_FDO_SCHEMA::SchemaElement, public NAMESPACE_OSGEO_FDO_XML::IXmlSerializable 00044 { 00045 public: 00046 /// \brief 00047 /// Constructs a default empty instance of an FeatureSchema. 00048 /// 00049 /// \return 00050 /// Returns FeatureSchema 00051 /// 00052 FeatureSchema(); 00053 00054 /// \brief 00055 /// Constructs an instance of a FeatureSchema using the specified arguments. 00056 /// 00057 /// \param name 00058 /// Input name 00059 /// \param description 00060 /// Input description 00061 /// 00062 /// \return 00063 /// Returns FeatureSchema 00064 /// 00065 FeatureSchema(System::String* name, System::String* description); 00066 00067 /// \brief 00068 /// Returns an ClassCollection that contains all of the classes defined in 00069 /// the feature schema. 00070 /// 00071 /// \return 00072 /// Returns an ClassCollection 00073 /// 00074 __property NAMESPACE_OSGEO_FDO_SCHEMA::ClassCollection* get_Classes(); 00075 00076 /// \brief 00077 /// Accepts all of the changes that have been made to the feature schema. 00078 /// All child elements with a schema element state set to 00079 /// SchemaElementState_Deleted are physically removed from the schema. All 00080 /// other child elements have their schema element state values set to 00081 /// SchemaElementState_Unchanged. 00082 /// This method would usually be only called from an FDO Provider (IApplySchema 00083 /// implementation). It would not normally called by an FDO Client. 00084 /// 00085 /// \return 00086 /// Returns nothing 00087 /// 00088 System::Void AcceptChanges(); 00089 00090 /// \brief 00091 /// Rejects all of the changes that have been made to the feature schema. 00092 /// All child elements with a schema element state set to 00093 /// SchemaElementState_Added are physically removed from the schema. All other 00094 /// child elements are restored to their original states and have their schema 00095 /// element state values set to FdoSchemaElementState_Unchanged. 00096 /// 00097 /// \return 00098 /// Returns nothing 00099 /// 00100 System::Void RejectChanges(); 00101 00102 /// \brief 00103 /// Constructs a FeatureSchema object based on an unmanaged instance of the object 00104 /// 00105 /// \param unmanaged 00106 /// Input A Pointer to the unmanaged object. 00107 /// 00108 /// \param autoDelete 00109 /// Input Indicates if the constructed object should be automatically deleted 00110 /// once it no longer referenced. 00111 /// 00112 FeatureSchema(System::IntPtr unmanaged, System::Boolean autoDelete) :NAMESPACE_OSGEO_FDO_SCHEMA::SchemaElement(unmanaged, autoDelete) 00113 { 00114 00115 } 00116 00117 /* 00118 Implementation of XmlSerializable 00119 */ 00120 00121 /// \brief 00122 /// Writes this object to a file. A complete XML document, 00123 /// containing this object, is written. 00124 /// 00125 /// \param fileName 00126 /// Input the file name. 00127 /// 00128 System::Void WriteXml(String* fileName); 00129 00130 /// \brief 00131 /// Writes this object to a file. A complete XML document, 00132 /// containing this object, is written. 00133 /// 00134 /// \param fileName 00135 /// Input the file name. 00136 /// \param flags 00137 /// Input controls the writing of the elements to the document. 00138 /// If NULL then the default flags are used (see XmlFlags::Create()) 00139 /// 00140 System::Void WriteXml(String* fileName, NAMESPACE_OSGEO_FDO_XML::XmlFlags* flags); 00141 00142 /// \brief 00143 /// Writes to an XML writer. This object is appended to the XML document 00144 /// being written. Unlike the other WriteXml() functions it is not necessarily 00145 /// the only object in its document. 00146 /// 00147 /// \param xmlWriter 00148 /// Input the XML writer. When this function completes, the 00149 /// XML writer's current position will be just after this object. 00150 /// 00151 System::Void WriteXml(NAMESPACE_OSGEO_COMMON_XML::XmlWriter* xmlWriter); 00152 00153 /// \brief 00154 /// Writes to an XML writer. This object is appended to the XML document 00155 /// being written. Unlike the other WriteXml() functions it is not necessarily 00156 /// the only object in its document. 00157 /// 00158 /// \param xmlWriter 00159 /// Input the XML writer. When this function completes, the 00160 /// XML writer's current position will be just after this object. 00161 /// \param flags 00162 /// Input controls the writing of the elements to the writer. 00163 /// If NULL then the default flags are used (see XmlFlags::Create()) 00164 /// 00165 System::Void WriteXml(NAMESPACE_OSGEO_COMMON_XML::XmlWriter* xmlWriter, NAMESPACE_OSGEO_FDO_XML::XmlFlags* flags); 00166 00167 /// \brief 00168 /// Writes to a text writer. A complete XML document, 00169 /// containing this object, is written. 00170 /// 00171 /// \param textWriter 00172 /// Input the text writer.When this function completes, the 00173 /// text writer's current position will be just after this object. 00174 /// 00175 System::Void WriteXml(NAMESPACE_OSGEO_COMMON_IO::IoTextWriter* textWriter); 00176 00177 /// \brief 00178 /// Writes to a text writer. A complete XML document, 00179 /// containing this object, is written. 00180 /// 00181 /// \param textWriter 00182 /// Input the text writer.When this function completes, the 00183 /// text writer's current position will be just after this object. 00184 /// \param flags 00185 /// Input controls the writing of the elements to the writer. 00186 /// If NULL then the default flags are used (see XmlFlags::Create()) 00187 /// 00188 System::Void WriteXml(NAMESPACE_OSGEO_COMMON_IO::IoTextWriter* textWriter, NAMESPACE_OSGEO_FDO_XML::XmlFlags* flags); 00189 00190 /// \brief 00191 /// Writes to a stream. A complete XML document, 00192 /// containing this object, is written. 00193 /// 00194 /// \param stream 00195 /// Input the stream. When this function completes, the 00196 /// stream's current position will be just after this object. 00197 /// 00198 System::Void WriteXml(NAMESPACE_OSGEO_COMMON_IO::IoStream* stream); 00199 00200 /// \brief 00201 /// Writes to a stream. A complete XML document, 00202 /// containing this object, is written. 00203 /// 00204 /// \param stream 00205 /// Input the stream. When this function completes, the 00206 /// stream's current position will be just after this object. 00207 /// \param flags 00208 /// Input controls the writing of the elements to the stream. 00209 /// If NULL then the default flags are used (see XmlFlags::Create()) 00210 /// 00211 System::Void WriteXml(NAMESPACE_OSGEO_COMMON_IO::IoStream* stream, NAMESPACE_OSGEO_FDO_XML::XmlFlags* flags); 00212 00213 /// \brief 00214 /// Gets the stylesheet for converting the XML document from 00215 /// internal to external format. When classes derived from XmlSerializable 00216 /// define an internal format, they must override this function to return a 00217 /// stylesheet that does the conversion. 00218 /// 00219 /// \return 00220 /// Returns NULL by default (no internal format defined) 00221 /// 00222 NAMESPACE_OSGEO_COMMON_XML::XmlReader* GetFromInternalStylesheet(); 00223 00224 /// \cond DOXYGEN-IGNORE 00225 public private: 00226 inline FdoFeatureSchema* GetImpObj(); 00227 /// \endcond 00228 }; 00229 00230 END_NAMESPACE_OSGEO_FDO_SCHEMA 00231 00232
Comments or suggestions? Send us feedback. |