FDO .NET API Reference Feature Data Objects

mgXmlFeatureFlags.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 #include "FDO\Xml\mgXmlFlags.h"
00022 
00023 class FdoXmlFeatureFlags;
00024 
00025 BEGIN_NAMESPACE_OSGEO_FDO_XML
00026 
00027 /// \ingroup (OSGeoFDOXml)
00028 /// \brief
00029 /// XmlFeatureFlags extends XmlFlags to specify flags specific to feature 
00030 /// serialization.
00031 /// \remarks
00032 /// The Error Levels inherited from XmlFlags take on the following meaning when
00033 /// applied to features. Suppose we have GML Document A that conforms to GML Schema A.
00034 /// If Document A is read into FDO and then written to Document B then the Error Levels
00035 /// applied to the Document A read have the following meaning:
00036 /// <ul>
00037 /// <li>ErrorLevel_High: Document B will be structurally identical to Document A.
00038 /// Errors are issued if this cannot be guaranteed. Document B will have the 
00039 /// exact same elements and attributes as Document A.
00040 /// <li>ErrorLevel_Normal: There is no information loss. Document B contains
00041 /// all of the information from Document A and Document B conforms to Schema A.
00042 /// Errors are issued if this cannot be guaranteed.
00043 /// However, Documents A and B might not look exactly alike; some Document A elements
00044 /// may have an equivalent but different structure in Document B.
00045 /// <li>ErrorLevel_Low: There can be information loss. Document B is a subset
00046 /// of Document A but still conforms to Schema A. Errors are issued if 
00047 /// this cannot be guaranteed. Any Document A elements, not recognized by
00048 /// FDO, are discarded on read.
00049 /// <li>ErrorLevel_VeryLow: FDO does a best effort read of Document A and write of
00050 /// Document B. There is no guarantee that Document B will look anything like 
00051 /// Document A or that Document B will conform to Schema A.
00052 /// </ul>
00053 /// 
00054 /// The above assumes that FDO is not provided the GML form of Schema A when writing
00055 /// Document B. For example, supposed that FDO can write a Schema A conformant 
00056 /// Document B only when supplied the GML version of Schema A. FDO will still generate 
00057 /// errors and fail to read Document A under ErrorLevel_Low.
00058 public __gc class XmlFeatureFlags : public NAMESPACE_OSGEO_FDO_XML::XmlFlags
00059 {
00060 public:
00061     /// \brief
00062     /// The XmlFeatureFlags::ConflictOption specifies how to handle features that 
00063     /// are already in the DataStore, when Deserializing:
00064     /// 
00065     /// \param ConflictOption_Add 
00066     /// just add new features to the FDO DataStore. If a feature already exists, an 
00067     /// exception is thrown.
00068     /// \param ConflictOption_Update 
00069     /// Update the feature if it already exists, add it if it doesn't exist. This is 
00070     /// the slowest option, since the feature must be queried from the DataStore before
00071     /// it is inserted or updated.
00072     /// \param ConflictOption_Skip 
00073     /// just add new features. Silently skip features already in the DataStore.
00074     /// 
00075     __value enum ConflictOption 
00076     {
00077         ConflictOption_Add = FdoXmlFeatureFlags::ConflictOption_Add,
00078         ConflictOption_Update = FdoXmlFeatureFlags::ConflictOption_Update,
00079         ConflictOption_Skip = FdoXmlFeatureFlags::ConflictOption_Skip
00080     };
00081 
00082     /// \brief
00083     /// Constructs an XmlFeatureFlags object.
00084     /// 
00085     XmlFeatureFlags();
00086 
00087     /// \brief
00088     /// Constructs an XmlFeatureFlags object.
00089     /// 
00090     /// \param location 
00091     /// See XmlFlags::Create()
00092     /// 
00093     XmlFeatureFlags(System::String* location);
00094 
00095     /// \brief
00096     /// Constructs an XmlFeatureFlags object.
00097     /// 
00098     /// \param location 
00099     /// See XmlFlags::Create()
00100     /// \param errorLevel 
00101     /// See XmlFlags::Create()
00102     /// 
00103     XmlFeatureFlags(System::String* location, NAMESPACE_OSGEO_FDO_XML::XmlFlags::ErrorLevel errorLevel);
00104 
00105     /// \brief
00106     /// Constructs an XmlFeatureFlags object.
00107     /// 
00108     /// \param location 
00109     /// See XmlFlags::Create()
00110     /// \param errorLevel 
00111     /// See XmlFlags::Create()
00112     /// \param nameAdjust 
00113     /// See XmlFlags::Create()
00114     /// 
00115     XmlFeatureFlags(System::String* location, NAMESPACE_OSGEO_FDO_XML::XmlFlags::ErrorLevel errorLevel, System::Boolean nameAdjust);
00116 
00117     /// \brief
00118     /// Constructs an XmlFeatureFlags object.
00119     /// 
00120     /// \param location 
00121     /// See XmlFlags::Create()
00122     /// \param errorLevel 
00123     /// See XmlFlags::Create()
00124     /// \param nameAdjust 
00125     /// See XmlFlags::Create()
00126     /// \param conflictOption 
00127     /// Conflict option to apply to pre-existing features, when deserializing features
00128     /// into an FDO datastore.
00129     /// 
00130     XmlFeatureFlags(System::String* location, NAMESPACE_OSGEO_FDO_XML::XmlFlags::ErrorLevel errorLevel, System::Boolean nameAdjust, NAMESPACE_OSGEO_FDO_XML::XmlFeatureFlags::ConflictOption conflictOption);
00131 
00132     /// \brief
00133     /// Sets the current option for handling features already in the connection 
00134     /// datastore.
00135     /// 
00136     /// \param conflictOption 
00137     /// Specifies how feaures, already in the datastore, are handled.
00138     /// 
00139     __property System::Void set_Conflictoption(NAMESPACE_OSGEO_FDO_XML::XmlFeatureFlags::ConflictOption conflictOption);
00140 
00141     /// \brief
00142     /// Get the current option for handling feature already in the connection datastore.
00143     ///
00144     /// \return
00145     /// Returns the current conflict option.
00146     __property NAMESPACE_OSGEO_FDO_XML::XmlFeatureFlags::ConflictOption get_Conflictoption();
00147 
00148     /// \brief
00149     /// Sets the write feature collection flag. This flag is initially set to true.
00150     /// 
00151     /// \param writeMember 
00152     /// Input 
00153     /// true: The serialized features are wrapped in a GML FeatureCollection element.
00154     /// false: features are serialize without a wrapping collection element.
00155     /// 
00156     __property System::Void set_WriteCollection(System::Boolean writeMember);
00157 
00158     /// \brief
00159     /// Gets the write feature collection flag.
00160     /// 
00161     /// \return
00162     /// Returns the write feature collection flag.
00163     /// 
00164     __property System::Boolean get_WriteCollection();
00165 
00166     /// \brief
00167     /// Sets the write feature member flag. This flag is initially set to true.
00168     /// 
00169     /// \param writeMember 
00170     /// Input 
00171     /// true: Each serialized feature is wrapped in a GML featureMember element.
00172     /// false: features are serialized without a wrapping member element. Normally,
00173     /// writeMember would only be set to false when writing values to a collection
00174     /// object property.
00175     /// 
00176     __property System::Void set_WriteMember( System::Boolean writeMember );
00177 
00178     /// \brief
00179     /// Gets the write feature member flag.
00180     /// 
00181     /// \return
00182     /// Returns the write feature member flag.
00183     /// 
00184     __property System::Boolean get_WriteMember();
00185 
00186     /// \brief
00187     /// Sets the URI for the feature collection element to wrap around serialized 
00188     /// features. The initial value is 'http://www.opengis.net/gml'
00189     /// 
00190     /// \param uri 
00191     /// Input the URI. If NULL or blank, the URI reverts back to the initial value.
00192     /// 
00193     __property System::Void set_CollectionUri(System::String* uri);
00194 
00195     /// \brief
00196     /// Gets the feature collection element URI.
00197     /// 
00198     /// \return
00199     /// Returns the URI.
00200     /// 
00201     __property System::String* get_CollectionUri();
00202 
00203     /// \brief
00204     /// Sets the name for the feature collection element to wrap around serialized 
00205     /// features. The initial value is 'FeatureCollection'
00206     /// 
00207     /// \param name 
00208     /// Input the name. If NULL or blank, the name reverts back to the initial value.
00209     /// 
00210     __property System::Void set_CollectionName(System::String* name);
00211 
00212     /// \brief
00213     /// Gets the feature collection element name.
00214     /// 
00215     /// \return
00216     /// Returns System::String*.
00217     /// 
00218     __property System::String* get_CollectionName();
00219 
00220     /// \brief
00221     /// Sets the URI for the feature member element to wrap around each serialized 
00222     /// feature. The initial value is 'http://www.opengis.net/gml'
00223     /// 
00224     /// \param uri 
00225     /// Input the URI. If NULL or blank, the URI defaults to the URI of the feature 
00226     /// collection element's sub-element. If this sub-element cannot be determined 
00227     /// then the URI defaults to the initial value
00228     /// 
00229     __property System::Void set_MemberUri(System::String* uri);
00230 
00231     /// \brief
00232     /// Gets the feature member element URI.
00233     /// 
00234     /// \return
00235     /// Returns System::String*
00236     /// 
00237     __property System::String* get_MemberUri();
00238 
00239     /// \brief
00240     /// Sets the name for the feature member element to wrap around each serialized 
00241     /// feature. The initial value is 'featureMember'
00242     /// 
00243     /// \param name 
00244     /// Input the name. If NULL or blank, the URI defaults to the name of the feature 
00245     /// collection element's sub-element. If this sub-element cannot be determined then
00246     /// the name defaults to the initial value
00247     /// 
00248     __property System::Void set_MemberName(System::String* name);
00249 
00250     /// \brief
00251     /// Gets the feature member element name.
00252     /// 
00253     /// \return
00254     /// Returns System::String*.
00255     /// 
00256     __property System::String* get_MemberName();
00257 
00258     /// \brief
00259     /// Sets the GML ID prefix for writing features. This prefix is prepended to the 
00260     /// gml:id value for each feature. When features from different FDO Datastores are
00261     /// serialized to the same GML document, it is recommended that a different GML ID 
00262     /// prefix be used for each Datastore, to ensure that the gml:id values in the GML
00263     /// document are unique. The initial value is L"" (no prefix).
00264     /// 
00265     /// \param prefix 
00266     /// Input the GML ID Prefix
00267     /// 
00268     __property System::Void set_GmlIdPrefix(System::String* prefix);
00269 
00270     /// \brief
00271     /// Gets the current GML ID prefix.
00272     /// 
00273     /// \return
00274     /// Returns System::String
00275     /// 
00276     __property System::String* get_GmlIdPrefix();
00277 
00278     /// \brief
00279     /// Sets the schema locations for writing features. The output GML must have schema
00280     /// definition for all its referenced namespaces, e.g, gml namespace, wfs namespace, 
00281     /// user defined namespace. There are default values for gml namespace schema location
00282     /// and wfs namespace schema location, so the user doesn't need to set locations for those
00283     /// two namespaces. But the user can still set values to override the default values. The
00284     /// user could call this function multiple times to set schema location for multiple namespace. 
00285     /// 
00286     /// \param schemaNamespace 
00287     /// Namespace of which the schema location is to be set. Like "http://www.opengis.net/wfs" 
00288     /// for wfs namespace.
00289     /// \param schemaLocation 
00290     /// Standard URL indicating the schema location, like "http://schemas.opengeospatial.net/wfs/1.0.0/WFS-basic.xsd"
00291     /// for wfs namespace.
00292     /// 
00293     __property System::Void set_SchemaLocation(System::String* schemaNamespace, System::String* schemaLocation);
00294 
00295     /// \brief
00296     /// Gets the schema location for the specified namespace.
00297     /// 
00298     /// \param schemaNamespace 
00299     /// Namespace of which the schema location is to be retrieved. Like "http://www.opengis.net/wfs"
00300     /// 
00301     /// \return
00302     /// Returns the URL indicating the schema location. 
00303     /// 
00304     __property System::String* get_SchemaLocation(System::String* schemaNamespace);
00305 
00306     /// \brief
00307     /// Gets all namespaces that have been set for schemaLocation by SetSchemaLocation().
00308     /// 
00309     /// \return
00310     /// Returns all namespaces that have been set for schemaLocation.
00311     /// 
00312     __property NAMESPACE_OSGEO_COMMON::StringCollection* get_Namespaces();
00313 
00314     /// \brief
00315     /// Sets the default namespace which defines all feature/object types found in the input
00316     /// feature reader which is to be serialized. The user is also supposed to set the schema
00317     /// location for this namespace.
00318     /// 
00319     /// \param defaultNamespace 
00320     /// Default namespace.
00321     /// 
00322     __property System::Void set_DefaultNamespace(System::String* defaultNamespace);
00323 
00324     /// \brief
00325     /// Gets the default namespace.
00326     /// 
00327     /// \return
00328     /// Returns the default namespace.
00329     /// 
00330     __property System::String* get_DefaultNamespace();
00331 
00332 public private:
00333     XmlFeatureFlags(System::IntPtr unmanaged, System::Boolean autoDelete) : NAMESPACE_OSGEO_FDO_XML::XmlFlags(unmanaged, autoDelete)
00334     {
00335         
00336     }
00337 
00338     inline FdoXmlFeatureFlags* GetImpObj();
00339     
00340 /// \cond DOXYGEN-IGNORE
00341 protected:
00342     virtual System::Void ReleaseUnmanagedObject();
00343 /// \endcond
00344 };
00345 
00346 END_NAMESPACE_OSGEO_FDO_XML
00347 
00348 

Comments or suggestions? Send us feedback.