FDO .NET API Reference Feature Data Objects
Main Page | Modules | Namespace List | Class Hierarchy | Alphabetical List | Class List | File List | Namespace Members | Class Members | File Members | Related Pages

OSGeo::FDO::Xml::XmlFeatureWriter Class Reference

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

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

[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.


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.

Protected Member Functions

System::Void ReleaseUnmanagedObject ()
 DOXYGEN-IGNORE

Constructor & Destructor Documentation

OSGeo::FDO::Xml::XmlFeatureWriter::XmlFeatureWriter OSGeo::FDO::Xml::XmlFeaturePropertyWriter writer,
OSGeo::FDO::Xml::XmlFeatureFlags flags
 

Creates a Feature Writer for writing FDO features to XML.

Parameters:
writer Input Feature Property Writer. Specifies the XML document that the features will be written to.
flags Input options for controlling the writing of the features. If NULL then the flags passed to the document writer are used.
Returns:
Returns XmlFeatureWriter

OSGeo::FDO::Xml::XmlFeatureWriter::XmlFeatureWriter OSGeo::FDO::Xml::XmlFeaturePropertyWriter writer  ) 
 

OSGeo::FDO::Xml::XmlFeatureWriter::XmlFeatureWriter OSGeo::FDO::Common::Xml::XmlWriter writer,
OSGeo::FDO::Xml::XmlFeatureFlags flags
 

Creates a Feature Writer for writing FDO features to XML.

Parameters:
writer Input XML document writer. Specifies the XML document that the features will be written to . An XmlFeaturePropertyWriter is automatically wrapped around this writer. This Feature Property Writer can be retrieved by calling GetFeaturePropertyWriter().
flags Input options for controlling the writing of the features. If NULL then the flags passed to the document writer are used.
Returns:
Returns XmlFeatureWriter

OSGeo::FDO::Xml::XmlFeatureWriter::XmlFeatureWriter OSGeo::FDO::Common::Xml::XmlWriter writer  ) 
 


Member Function Documentation

__property OSGeo ::FDO ::Xml ::XmlFeatureWriter* OSGeo::FDO::Xml::XmlFeatureWriter::get_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.

Parameters:
propertyName Input the association property name.
Returns:
Returns the nested XML feature writer

__property OSGeo ::FDO ::Schema ::ClassDefinition* OSGeo::FDO::Xml::XmlFeatureWriter::get_ClassDefinition  ) 
 

Gets the class definition for the current feature being written.

Returns:
Returns ClassDefinition

__property OSGeo ::FDO ::Xml ::XmlFeaturePropertyWriter* OSGeo::FDO::Xml::XmlFeatureWriter::get_FeaturePropertyWriter  ) 
 

Gets the feature property writer that was passed to this object.

Returns:
Returns XmlFeaturePropertyWriter

__property OSGeo ::FDO ::Xml ::XmlFeatureWriter* OSGeo::FDO::Xml::XmlFeatureWriter::get_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.

Parameters:
propertyName Input the object property name.
Returns:
Returns the nested XML feature writer

System::Void OSGeo::FDO::Xml::XmlFeatureWriter::ReleaseUnmanagedObject  )  [protected, virtual]
 

DOXYGEN-IGNORE

Reimplemented from OSGeo::FDO::Runtime::Disposable.

__property System::Void OSGeo::FDO::Xml::XmlFeatureWriter::set_ClassDefinition OSGeo::FDO::Schema::ClassDefinition classDefinition  ) 
 

Sets the class definition for the current feature being written.

Parameters:
classDefinition Input the class definition
Returns:
Returns nothing

__property System::Void OSGeo::FDO::Xml::XmlFeatureWriter::set_Property OSGeo::FDO::Commands::PropertyValue propertyValue  ) 
 

Sets a feature property.

Parameters:
propertyValue Input the property name and value
Returns:
Returns nothing

System::Void OSGeo::FDO::Xml::XmlFeatureWriter::WriteFeature  ) 
 

System::Void OSGeo::FDO::Xml::XmlFeatureWriter::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().

Parameters:
elementTag The tag for the output feature/object. If elementTag is null, the class name will be used as the element tag.

Comments or suggestions? Send us feedback.