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/Xml/Flags.h> 00022 00023 BEGIN_NAMESPACE_OSGEO_FDO_COMMANDS_SCHEMA 00024 public __gc class PhysicalSchemaMappingCollection; 00025 END_NAMESPACE_OSGEO_FDO_COMMANDS_SCHEMA 00026 00027 BEGIN_NAMESPACE_OSGEO_FDO_XML 00028 public __gc class PhysicalElementMapping; 00029 00030 /// \ingroup (OSGeoFDOXml) 00031 /// \brief 00032 /// XmlFlags defines various options for serializing and deserializing 00033 /// FDO element to and from XML Documents. 00034 public __gc class XmlFlags : public NAMESPACE_OSGEO_RUNTIME::Disposable 00035 { 00036 public: 00037 /// \brief 00038 /// The XmlFlags::ErrorLevel determines how strict the error reporting 00039 /// is when a Feature Schema is read from an XML Document. For each errorLevel a 00040 /// certain level of round-trip fidelity is guaranteed if the read succeeds. 00041 /// 00042 /// \param ErrorLevel_High 00043 /// the read fails with an exception when the 00044 /// Feature Schema cannot be read without alteration. If the Feature Schema 00045 /// is read successfully from document A and then written to document B, 00046 /// documents A and B are guaranteed to be identical. This errorLevel should be 00047 /// used when no alterations to the Feature Schema can be tolerated 00048 /// \param ErrorLevel_Normal 00049 /// fails if the Feature Schema cannot be read 00050 /// without changing the domain of its conforming instance documents. If the 00051 /// Feature Schema is read successfully from document A and then written to 00052 /// document B, any instance document that conforms to the document A schema 00053 /// will also conform to the document B schema. Any instance document that does 00054 /// not conform to A does not conform to B. However, documents A and B will not 00055 /// necessarily be identical. 00056 /// \param ErrorLevel_Low 00057 /// similar to ErrorLevel_Normal except that the 00058 /// instance document domain is allowed to grow. If the Feature Schema is read 00059 /// successfully from document A and then written to document B, any instance 00060 /// document that conforms to the document A schema will also conform to the 00061 /// document B schema. However a document that does not conform to the A schema 00062 /// may or may not conform to the B schema. 00063 /// \param ErrorLevel_VeryLow 00064 /// the read succeeds even if no level of 00065 /// round-trip fidelity is maintained. If the Feature Schema is read successfully 00066 /// from document A and then written to document B, any instance document that 00067 /// conforms to the document A schema may or may not conform to the document B 00068 /// schema. A document that does not conform to the A schema may or may not 00069 /// conform to the B schema. This errorLevel is useful for reading schemas from 00070 /// external sources into FDO when it doesn’t matter how much the schemas are 00071 /// altered during the read. 00072 /// 00073 __value enum ErrorLevel 00074 { 00075 ErrorLevel_High = FdoXmlFlags::ErrorLevel_High, 00076 ErrorLevel_Normal = FdoXmlFlags::ErrorLevel_Normal, 00077 ErrorLevel_Low = FdoXmlFlags::ErrorLevel_Low, 00078 ErrorLevel_VeryLow = FdoXmlFlags::ErrorLevel_VeryLow 00079 }; 00080 00081 /// \brief 00082 /// Constructs an XmlFlags object. 00083 /// 00084 XmlFlags(); 00085 00086 /// \brief 00087 /// Constructs an XmlFlags object. 00088 /// 00089 /// \param location 00090 /// Input When writing Feature Schemas, this specifies the 00091 /// prefix for the target namespace for any schemas that are written. The XML 00092 /// format for Feature Schemas is OGC GML, so a targetNamespace for the 00093 /// xs:schema element is required. This namespace will be http://[url]/[schema_name]. 00094 /// 00095 XmlFlags(System::String* location); 00096 00097 /// \brief 00098 /// Constructs an XmlFlags object. 00099 /// 00100 /// \param location 00101 /// Input When writing Feature Schemas, this specifies the 00102 /// prefix for the target namespace for any schemas that are written. The XML 00103 /// format for Feature Schemas is OGC GML, so a targetNamespace for the 00104 /// xs:schema element is required. This namespace will be http://[url]/[schema_name]. 00105 /// \param errorLevel 00106 /// Input The error level for reading feature schemas. 00107 /// 00108 XmlFlags(System::String* location, NAMESPACE_OSGEO_FDO_XML::XmlFlags::ErrorLevel errorLevel); 00109 00110 /// \brief 00111 /// Constructs an XmlFlags object. 00112 /// 00113 /// \param location 00114 /// Input When writing Feature Schemas, this specifies the 00115 /// prefix for the target namespace for any schemas that are written. The XML 00116 /// format for Feature Schemas is OGC GML, so a targetNamespace for the 00117 /// xs:schema element is required. This namespace will be http://[url]/[schema_name]. 00118 /// \param errorLevel 00119 /// Input The error level for reading feature schemas. 00120 /// \param nameAdjust 00121 /// Input true: apply name adjustment to all elements. 00122 /// false: apply name adjustment only to elements with fdo:nameAdjust="true" 00123 /// 00124 XmlFlags(System::String* location, NAMESPACE_OSGEO_FDO_XML::XmlFlags::ErrorLevel errorLevel, System::Boolean nameAdjust); 00125 00126 /// \brief 00127 /// Sets the target namespace prefix, see XmlFlags::Create(). 00128 /// 00129 /// \param location 00130 /// Input the target namespace prefix. 00131 /// 00132 __property System::Void set_Url(System::String* location); 00133 00134 /// \brief 00135 /// Gets the target namespace prefix, see XmlFlags::Create(). 00136 /// 00137 /// \return 00138 /// Returns the target namespace prefix. 00139 /// 00140 __property System::String* get_Url(); 00141 00142 /// \brief 00143 /// Sets the error level, see XmlFlags::Create(). 00144 /// 00145 /// \param value 00146 /// Input the error level. 00147 /// 00148 __property System::Void set_Errorlevel(NAMESPACE_OSGEO_FDO_XML::XmlFlags::ErrorLevel value); 00149 00150 /// \brief 00151 /// Gets the current error level, see XmlFlags::Create(). 00152 /// 00153 /// \return 00154 /// Returns the error level. 00155 /// 00156 __property NAMESPACE_OSGEO_FDO_XML::XmlFlags::ErrorLevel get_Errorlevel(); 00157 00158 /// \brief 00159 /// Sets the name adjustment flag, see XmlFlags::Create(). 00160 /// 00161 /// \param nameAdjust 00162 /// Input the name adjustment flag. 00163 /// 00164 __property System::Void set_NameAdjust(System::Boolean nameAdjust); 00165 00166 /// \brief 00167 /// Gets the name adjustment flag, see XmlFlags::Create(). 00168 /// 00169 /// \return 00170 /// Returns the name adjustment flag. 00171 /// 00172 __property System::Boolean get_NameAdjust(); 00173 00174 /// \brief 00175 /// Sets the Schema Name as Prefix flag. This flag controls how 00176 /// an FDO Feature Schema name is generated when the schema is read 00177 /// from GML. 00178 /// 00179 /// \param schemaNameAsPrefix 00180 /// Input when true, the Feature Schema 00181 /// name is set to the prefix from the xmlns namespace declaration for 00182 /// the schema's targetNamespace. The target namespace prefix flag on this 00183 /// object is ignored 00184 /// in this case. If no suitable namespace declaration can be found, 00185 /// the Feature Schema name is set as if this flag were false. 00186 /// Schemas cannot be round-tripped when this flag is true. Therefore, it 00187 /// may only be set to true when the current ErrorLevel is VeryLow. 00188 /// Caution must be observed when using this flag. Unpredictable results 00189 /// can occur if a GML Schema uses different prefixes for its 00190 /// targetNamespace in different parts of the schema. 00191 /// 00192 __property System::Void set_SchemaNameAsPrefix(System::Boolean schemaNameAsPrefix); 00193 00194 /// \brief 00195 /// Gets the Schema Name as Prefix flag. 00196 /// 00197 /// \return 00198 /// Returns the Schema Name as Prefix flag. 00199 /// 00200 __property System::Boolean get_SchemaNameAsPrefix(); 00201 00202 /// \brief 00203 /// Sets the Use GML ID flag. 00204 /// 00205 /// \param id 00206 /// Input when true, the feature id ( fid in GML 2, gml:id in GML 3) 00207 /// becomes the identity property of all feature classes. 00208 /// 00209 __property System::Void set_UseGmlId(System::Boolean id); 00210 00211 /// \brief 00212 /// Gets the Use GML ID flag. 00213 /// 00214 /// \return 00215 /// Returns the Use GML ID flag. 00216 /// 00217 __property System::Boolean get_UseGmlId(); 00218 00219 /// \brief 00220 /// Sets the Schema Mapping Overrides for translating schemas 00221 /// between GML and FDO. 00222 /// 00223 /// \param mappings 00224 /// Input the Schema Mapping Overrides. This collection 00225 /// can contain an XmlSchemaMapping element for each Feature Schema that 00226 /// may be written or read. When a Feature Schema is read or written to or 00227 /// from GML, this collection is checked for an XmlSchemaMapping item named 00228 /// the same as the feature schema. If present, the hints in this item 00229 /// affect how the feature schema is read or written. The Schema Mapping 00230 /// Overrides also control how features are read since they 00231 /// can override the default correspondences between feature class names 00232 /// and their GML element names. 00233 /// 00234 __property System::Void set_SchemaMappings(NAMESPACE_OSGEO_FDO_COMMANDS_SCHEMA::PhysicalSchemaMappingCollection* mappings); 00235 00236 /// \brief 00237 /// Gets the current Schema Mapping Overrides. 00238 /// 00239 /// \return 00240 /// Returns XmlSchemaMappingCollection*. 00241 /// 00242 __property NAMESPACE_OSGEO_FDO_COMMANDS_SCHEMA::PhysicalSchemaMappingCollection* get_SchemaMappings(); 00243 00244 public private: 00245 XmlFlags(System::IntPtr unmanaged, System::Boolean autoDelete) : NAMESPACE_OSGEO_RUNTIME::Disposable(unmanaged, autoDelete) 00246 { 00247 00248 } 00249 00250 inline FdoXmlFlags* GetImpObj(); 00251 00252 /// \cond DOXYGEN-IGNORE 00253 protected: 00254 System::Void ReleaseUnmanagedObject(); 00255 /// \endcond 00256 }; 00257 00258 END_NAMESPACE_OSGEO_FDO_XML 00259 00260
Comments or suggestions? Send us feedback. |