- Main Page
- Related Pages
- Modules
- Classes
- Files

# FeatureSchemaCollection.h

Go to the documentation of this file.

    00001 #ifndef _FEATURESCHEMACOLLECTION_H_
    00002 #define _FEATURESCHEMACOLLECTION_H_
    00003
    00004 //
    00005 // Copyright (C) 2004-2006  Autodesk, Inc.
    00006 //
    00007 // This library is free software; you can redistribute it and/or
    00008 // modify it under the terms of version 2.1 of the GNU Lesser
    00009 // General Public License as published by the Free Software Foundation.
    00010 //
    00011 // This library is distributed in the hope that it will be useful,
    00012 // but WITHOUT ANY WARRANTY; without even the implied warranty of
    00013 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
    00014 // Lesser General Public License for more details.
    00015 //
    00016 // You should have received a copy of the GNU Lesser General Public
    00017 // License along with this library; if not, write to the Free Software
    00018 // Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA
    00019 //
    00020
    00021 #ifdef _WIN32
    00022 #pragma once
    00023 #endif
    00024
    00025 #include <Fdo/Schema/FeatureSchema.h>
    00026 #include <Fdo/Schema/FeatureClassCollection.h>
    00027 #include <Fdo/Schema/SchemaCollection.h>
    00028 #include <Fdo/Xml/Deserializable.h>
    00029 #include <Fdo/Xml/Serializable.h>
    00030 #include <Fdo/Commands/Schema/PhysicalSchemaMappingCollection.h>
    00031
    00032 class FdoSchemaXmlContext;
    00033
    00034 /// \brief
    00035 /// The FdoFeatureSchemaCollection class represents a collection of FdoFeatureSchema objects.
    00036 class FdoFeatureSchemaCollection :
    00037     public FdoSchemaCollection<FdoFeatureSchema>,
    00038     public FdoXmlDeserializable,
    00039     public FdoXmlSerializable
    00040 {
    00041 /// \cond DOXYGEN-IGNORE
    00042 protected:
    00043     FdoFeatureSchemaCollection()
    00044     {
    00045     }
    00046     /// Constructs an instance of a FeatureSchemaCollection using the specified argument.
    00047     FdoFeatureSchemaCollection(FdoSchemaElement* parent) :
    00048         FdoSchemaCollection<FdoFeatureSchema>(parent),
    00049         m_XmlContext(NULL)
    00050     {
    00051         m_setItemParent = true;
    00052     }
    00053
    00054     virtual ~FdoFeatureSchemaCollection();
    00055
    00056     virtual void Dispose()
    00057     {
    00058         delete this;
    00059     }
    00060
    00061     /// FdoXmlSerializable override that serializes a Feature Schema collection to XML.
    00062     virtual void _writeXml( FdoXmlWriter* xmlWriter, const FdoXmlFlags* flags );
    00063 /// \endcond
    00064
    00065 public:
    00066     /// \brief
    00067     /// Constructs an instance of an FdoFeatureSchemaCollection using the specified argument.
    00068     ///
    00069     /// \param parent
    00070     /// Input parent
    00071     ///
    00072     /// \return
    00073     /// Returns FdoFeatureSchemaCollection
    00074     ///
    00075     FDO_API static FdoFeatureSchemaCollection* Create(FdoSchemaElement* parent);
    00076
    00077     /// \brief
    00078     /// Gets the stylesheet for converting a Feature Schema collection from
    00079     /// internal to external XML format. The internal format is very similar to
    00080     /// the Feature Schema class hierarchy. The external format is OGC GML.
    00081     ///
    00082     /// \return
    00083     /// Returns the stylesheet
    00084     ///
    00085     FDO_API virtual FdoXmlReader* GetFromInternalStylesheet();
    00086
    00087     /// \brief
    00088     /// Gets the stylesheet for converting a Feature Schema collection from
    00089     /// external to internal XML format. The internal format is very similar to
    00090     /// the Feature Schema class hierarchy. The external format is OGC GML.
    00091     ///
    00092     /// \return
    00093     /// Returns the stylesheet
    00094     ///
    00095     FDO_API virtual FdoXmlReader* GetFromExternalStylesheet();
    00096
    00097     /// \brief
    00098     /// Takes a qualified or unqualified class name and return a collection of class definitions
    00099     /// that match the class name. For qualified name, the collection contains at most one class definition.
    00100     ///
    00101     /// \param className
    00102     /// The class name
    00103     ///
    00104     /// \return
    00105     /// Returns a collection of classes
    00106     ///
    00107     FDO_API virtual FdoIDisposableCollection* FindClass(const wchar_t* className);
    00108
    00109     /// \brief
    00110     /// Gets a Schema Mapping Collection
    00111     /// that describes the mappings between the elements in the GML Schema that were read
    00112     /// and the FDO Feature Schema Elements that were created. This function returns the
    00113     /// Schema Mapping Collection generated by the last call to ReadXml(). The collection
    00114     /// contains one FdoXmlSchemaMapping per schema that was read.
    00115     ///
    00116     /// \return
    00117     /// Returns FdoPhysicalSchemaMappingCollection*. Returns NULL if ReadXml() has not been
    00118     /// called on this object.
    00119     ///
    00120     FDO_API FdoPhysicalSchemaMappingCollection* GetXmlSchemaMappings();
    00121
    00122 /// \cond DOXYGEN-IGNORE
    00123
    00124     /// FdoXmlDeserializable override for getting the SAX Context for reading
    00125     /// Feature Schemas. Not exposed via the FDO API.
    00126     virtual FdoXmlSaxContext* GetSaxContext();
    00127
    00128     /// FdoXmlDeserializable overrides for deserializing a Feature Schema collection
    00129     /// from XML. These are not exposed via the FDO API.
    00130
    00131     virtual void XmlEndDocument(FdoXmlSaxContext* context);
    00132     virtual FdoXmlSaxHandler* XmlStartElement(
    00133         FdoXmlSaxContext* context,
    00134         FdoString* uri,
    00135         FdoString* name,
    00136         FdoString* qname,
    00137         FdoXmlAttributeCollection* atts
    00138     );
    00139 /// \endcond
    00140
    00141 private:
    00142     /// Current deserialization context.
    00143     FdoSchemaXmlContext*     m_XmlContext;
    00144     FdoSchemaMappingsP     m_XmlSchemaMappings;
    00145
    00146
    00147 };
    00148
    00149 /// \ingroup (typedefs)
    00150 /// \brief
    00151 /// FdoFeatureSchemasP is a FdoPtr on FdoFeatureSchemaCollection, provided for convenience.
    00152 typedef FdoPtr<FdoFeatureSchemaCollection> FdoFeatureSchemasP;
    00153
    00154 #endif
    00155
    00156

Please send us your comment about this page