FDO .NET API Reference Feature Data Objects

OSGeo::FDO::Xml::XmlFeatureWriter Class Reference
[OSGeo::FDO::Xml]

Inherits OSGeo::FDO::Runtime::Disposable.

Inheritance diagram for OSGeo::FDO::Xml::XmlFeatureWriter:

Inheritance graph
[legend]
List of all members.

Detailed Description

XmlFeatureWriter writes features to an XML document. The features are written in GML format. Each feature is written in 3 steps:.

()

  1. call SetClassDefintion() to define the feature's class name, schema name, and list of valid properties.
  2. call SetProperty() for each feature property value to set.
  3. call WriteFeature() to write the feature with the current property values. The feature's element name is derived from the class and schema name.
WriteFeature() ensures that the properties are written in their proper order. This may have slight performance implications since this writer has to accumulate the property values before writing them. If performance is a concern then XmlFeaturePropertyWriter should be used instead.

Definition at line 55 of file mgXmlFeatureWriter.h.


Public Member Functions

__property OSGeo::FDO::Xml::XmlFeatureWriterget_AssociationWriter (System::String *propertyName)
 Gets a reference to an XmlFeatureWriter to write the data contained in an association property. If the property is not an association property, an exception is thrown.
__property OSGeo::FDO::Schema::ClassDefinitionget_ClassDefinition ()
 Gets the class definition for the current feature being written.
__property OSGeo::FDO::Xml::XmlFeaturePropertyWriterget_FeaturePropertyWriter ()
 Gets the feature property writer that was passed to this object.
__property OSGeo::FDO::Xml::XmlFeatureWriterget_ObjectWriter (System::String *propertyName)
 Gets a reference to an XmlFeatureWriter to write the data contained in a collection object property. If the property is not an object property, an exception is thrown.
__property System::Void set_ClassDefinition (OSGeo::FDO::Schema::ClassDefinition *classDefinition)
 Sets the class definition for the current feature being written.
__property System::Void set_Property (OSGeo::FDO::Commands::PropertyValue *propertyValue)
 Sets a feature property.
System::Void WriteFeature ()
System::Void WriteFeature (System::String *elementTag)
 Writes the current feature to the XML document. If all features being written are of the same class then SetClassDefinition() can be called once and the WriteFeature() can be call repeatedly. In other words, the current class definition persists across WriteFeature() calls. Similarly, Property Values also persist across WriteFeature() calls. If the next feature to write has a property with different value from current feature, then SetProperty() must be called, to change the value, before next call to WriteFeature().
 XmlFeatureWriter (OSGeo::FDO::Common::Xml::XmlWriter *writer)
 XmlFeatureWriter (OSGeo::FDO::Common::Xml::XmlWriter *writer, OSGeo::FDO::Xml::XmlFeatureFlags *flags)
 Creates a Feature Writer for writing FDO features to XML.
 XmlFeatureWriter (OSGeo::FDO::Xml::XmlFeaturePropertyWriter *writer)
 XmlFeatureWriter (OSGeo::FDO::Xml::XmlFeaturePropertyWriter *writer, OSGeo::FDO::Xml::XmlFeatureFlags *flags)
 Creates a Feature Writer for writing FDO features to XML.

Comments or suggestions? Send us feedback.