FDO API Reference Feature Data Objects
Main Page | Modules | Class Hierarchy | Alphabetical List | Class List | File List | Class Members | File Members

FdoXmlFeaturePropertyReader Class Reference

#include <FeaturePropertyReader.h>

Inherits FdoXmlSaxHandler, and FdoIDisposable.

Inheritance diagram for FdoXmlFeaturePropertyReader:

[legend]
List of all members.

Detailed Description

FdoXmlFeaturePropertyReader reads features from an XML document. The reading is event driven. As features and properties within features are encountered, the invoker is notified through the FdoXmlFeatureHandler interface. This class is similar to FdoXmlFeatureReader except that it provides better performance.

Definition at line 38 of file FeaturePropertyReader.h.


Public Member Functions

virtual FDO_API FdoBoolean GetEOF ()=0
 Indicates whether all features have been read.
virtual FDO_API FdoFeatureSchemaCollectionGetFeatureSchemas ()=0
 Gets the feature schemas describing the features being read.
virtual FDO_API FdoXmlReaderGetXmlReader ()=0
 Gets the Xml document reader that was passed to this object.
virtual FDO_API FdoBoolean Parse (FdoXmlFeatureHandler *featureHandler=NULL, FdoXmlFeatureContext *featureContext=NULL, FdoBoolean incremental=false)=0
 Parses the XML document.
virtual FDO_API void SetFeatureSchemas (FdoFeatureSchemaCollection *schemas)=0
 Sets the feature schemas describing the features being read.

Static Public Member Functions

FDO_API FdoXmlFeaturePropertyReaderCreate (FdoXmlReader *reader, FdoXmlFeatureFlags *flags=NULL)
 creates a Feature Property Reader.

Member Function Documentation

FDO_API FdoXmlFeaturePropertyReader* FdoXmlFeaturePropertyReader::Create FdoXmlReader reader,
FdoXmlFeatureFlags flags = NULL
[static]
 

creates a Feature Property Reader.

Remarks:
The XML element, at the document reader's current position, is recognized as a feature collection if it is one or more of the following:
  • GML FeatureCollection element
  • the element specified by flags->collectionUri and flags->collectionName
  • it has a corresponding class definition, in the given schemas, that derives from the GML AbstractFeatureCollectionType.
Parameters:
reader Input XML document reader. If this reader is currently positioned at a feature collection type element then all features in this element are read. Otherwise, it processes all Feature Collection type sub-elements of the current element and reads their features. Therefore, if the reader is at the start of the XML document, all top-level feature collections in the document are read.
flags Input options for controlling the deserializing of the features. If NULL then the default flags are used.
Returns:
Returns FdoXmlFeaturePropertyReader

virtual FDO_API FdoBoolean FdoXmlFeaturePropertyReader::GetEOF  )  [pure virtual]
 

Indicates whether all features have been read.

Returns:
Returns true if there are no more features to read , false otherwise

virtual FDO_API FdoFeatureSchemaCollection* FdoXmlFeaturePropertyReader::GetFeatureSchemas  )  [pure virtual]
 

Gets the feature schemas describing the features being read.

Returns:
Returns FdoFeatureSchemaCollection

virtual FDO_API FdoXmlReader* FdoXmlFeaturePropertyReader::GetXmlReader  )  [pure virtual]
 

Gets the Xml document reader that was passed to this object.

Returns:
Returns FdoXmlReader.

virtual FDO_API FdoBoolean FdoXmlFeaturePropertyReader::Parse FdoXmlFeatureHandler featureHandler = NULL,
FdoXmlFeatureContext featureContext = NULL,
FdoBoolean  incremental = false
[pure virtual]
 

Parses the XML document.

Parameters:
featureHandler Input handler to receive events. Parse() fires various events as features and properties are encountered.
featureContext Input Caller-specific contextual information that is pass to the feature handler event callbacks.
incremental Input true: an incremental (progressive) parse is performed. This function returns after the next feature is read. false: this function keeps going until all features have been read.
Returns:
Returns false if no feature(s) were read.

virtual FDO_API void FdoXmlFeaturePropertyReader::SetFeatureSchemas FdoFeatureSchemaCollection schemas  )  [pure virtual]
 

Sets the feature schemas describing the features being read.

Remarks:
The feature schemas provide directions to this class on how to deserialize the features and convert their property values from the strings in the XML document to their proper types. If any feature, whose class definition is not present in these schemas, is encountered then one of the following is done:
  • an exception is thrown when flags->errorLevel is Normal or higher. The exception reports all such features.
  • the feature is read according to a best default translation when the flags->errorLevel is below Normal.
Parameters:
schemas Input the feature schemas
Returns:
Returns nothing

The documentation for this class was generated from the following file:
Comments or suggestions? Send us feedback.