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

FdoXmlFeatureFlags Class Reference

#include <FeatureFlags.h>

Inherits FdoXmlFlags.

Inheritance diagram for FdoXmlFeatureFlags:

[legend]
List of all members.

Detailed Description

FdoXmlFeatureFlags extends FdoXmlFlags to specify flags specific to feature serialization.

Remarks:
The Error Levels inherited from FdoXmlFlags take on the following meaning when applied to features. Suppose we have GML Document A that conforms to GML Schema A. If Document A is read into FDO and then written to Document B then the Error Levels applied to the Document A read have the following meaning:
The above assumes that FDO is not provided the GML form of Schema A when writing Document B. For example, supposed that FDO can write a Schema A conformant Document B only when supplied the GML version of Schema A. FDO will still generate errors and fail to read Document A under ErrorLevel_Low.

Definition at line 58 of file FeatureFlags.h.


Public Types

enum  ConflictOption {
  ConflictOption_Add,
  ConflictOption_Update,
  ConflictOption_Skip
}
 The FdoXmlFeatureFlags::ConflictOption specifies how to handle features that are already in the DataStore, when Deserializing:. More...

Public Member Functions

virtual FDO_API FdoStringGetCollectionName () const
 Gets the feature collection element name.
virtual FDO_API FdoStringGetCollectionUri () const
 Gets the feature collection element URI.
virtual FDO_API ConflictOption GetConflictOption () const
 Get the current option for handling feature already in the connection datastore.
virtual FDO_API FdoStringGetDefaultNamespace ()
 Gets the default namespace.
virtual FDO_API FdoStringGetGmlIdPrefix () const
 Gets the current GML ID prefix.
virtual FDO_API FdoStringGetMemberName () const
 Gets the feature member element name.
virtual FDO_API FdoStringGetMemberUri () const
 Gets the feature member element URI.
virtual FDO_API FdoStringCollectionGetNamespaces ()
 Gets all namespaces that have been set for schemaLocation by SetSchemaLocation().
virtual FDO_API FdoStringGetSchemaLocation (FdoString *nameSpace)
 Gets the schema location for the specified namespace.
virtual FDO_API FdoBoolean GetWriteCollection () const
 Gets the write feature collection flag.
virtual FDO_API FdoBoolean GetWriteMember () const
 Gets the write feature member flag.
virtual FDO_API void SetCollectionName (FdoString *name)
 Sets the name for the feature collection element to wrap around serialized features. The initial value is 'FeatureCollection'.
virtual FDO_API void SetCollectionUri (FdoString *uri)
 Sets the URI for the feature collection element to wrap around serialized features. The initial value is 'http://www.opengis.net/gml'.
virtual FDO_API void SetConflictOption (ConflictOption conflictOption)
 Sets the current option for handling features already in the connection datastore.
virtual FDO_API void SetDefaultNamespace (FdoString *defaultNamespace)
 Sets the default namespace which defines all feature/object types found in the input feature reader which is to be serialized. The user is also supposed to set the schema location for this namespace.
virtual FDO_API void SetGmlIdPrefix (FdoString *prefix)
 Sets the GML ID prefix for writing features. This prefix is prepended to the gml:id value for each feature. When features from different FDO Datastores are serialized to the same GML document, it is recommended that a different GML ID prefix be used for each Datastore, to ensure that the gml:id values in the GML document are unique. The initial value is L"" (no prefix).
virtual FDO_API void SetMemberName (FdoString *name)
 Sets the name for the feature member element to wrap around each serialized feature. The initial value is 'featureMember'.
virtual FDO_API void SetMemberUri (FdoString *uri)
 Sets the URI for the feature member element to wrap around each serialized feature. The initial value is 'http://www.opengis.net/gml'.
virtual FDO_API void SetSchemaLocation (FdoString *nameSpace, FdoString *schemaLocation)
 Sets the schema locations for writing features. The output GML must have schema definition for all its referenced namespaces, e.g, gml namespace, wfs namespace, user defined namespace. There are default values for gml namespace schema location and wfs namespace schema location, so the user doesn't need to set locations for those two namespaces. But the user can still set values to override the default values. The user could call this function multiple times to set schema location for multiple namespace.
virtual FDO_API void SetWriteCollection (FdoBoolean writeCollection)
 Sets the write feature collection flag. This flag is initially set to true.
virtual FDO_API void SetWriteMember (FdoBoolean writeMember)
 Sets the write feature member flag. This flag is initially set to true.

Static Public Member Functions

FDO_API FdoXmlFeatureFlagsCreate (FdoString *url=L"fdo.osgeo.org/schemas/feature", ErrorLevel errorLevel=ErrorLevel_Normal, FdoBoolean nameAdjust=true, ConflictOption conflictOption=ConflictOption_Add)
 Constructs an FdoXmlFeatureFlags object.

Protected Member Functions

 FdoXmlFeatureFlags (FdoString *url, ErrorLevel errorLevel, FdoBoolean nameAdjust, ConflictOption conflictOption)
 FdoXmlFeatureFlags ()
virtual ~FdoXmlFeatureFlags ()

Member Enumeration Documentation

enum FdoXmlFeatureFlags::ConflictOption
 

The FdoXmlFeatureFlags::ConflictOption specifies how to handle features that are already in the DataStore, when Deserializing:.

Enumeration values:
ConflictOption_Add  Add new features to the FDO DataStore and if a feature already exists, throw an exception.
ConflictOption_Update  before it is inserted or updated.

This is the slowest option, since the feature must be queried from the DataStore

ConflictOption_Skip  Add new features and silently skip features already in the DataStore.

Definition at line 64 of file FeatureFlags.h.


Constructor & Destructor Documentation

FdoXmlFeatureFlags::FdoXmlFeatureFlags  )  [protected]
 

FdoXmlFeatureFlags::FdoXmlFeatureFlags FdoString url,
ErrorLevel  errorLevel,
FdoBoolean  nameAdjust,
ConflictOption  conflictOption
[protected]
 

virtual FdoXmlFeatureFlags::~FdoXmlFeatureFlags  )  [protected, virtual]
 


Member Function Documentation

FDO_API FdoXmlFeatureFlags* FdoXmlFeatureFlags::Create FdoString url = L"fdo.osgeo.org/schemas/feature",
ErrorLevel  errorLevel = ErrorLevel_Normal,
FdoBoolean  nameAdjust = true,
ConflictOption  conflictOption = ConflictOption_Add
[static]
 

Constructs an FdoXmlFeatureFlags object.

Parameters:
url See FdoXmlFlags::Create()
errorLevel See FdoXmlFlags::Create()
nameAdjust See FdoXmlFlags::Create()
conflictOption Conflict option to apply to pre-existing features, when deserializing features into an FDO datastore.
Returns:
Returns FdoXmlFeatureFlags

virtual FDO_API FdoString* FdoXmlFeatureFlags::GetCollectionName  )  const [virtual]
 

Gets the feature collection element name.

Returns:
Returns FdoString*.

virtual FDO_API FdoString* FdoXmlFeatureFlags::GetCollectionUri  )  const [virtual]
 

Gets the feature collection element URI.

Returns:
Returns the URI.

virtual FDO_API ConflictOption FdoXmlFeatureFlags::GetConflictOption  )  const [virtual]
 

Get the current option for handling feature already in the connection datastore.

Returns:
Returns the current conflict option.

virtual FDO_API FdoString* FdoXmlFeatureFlags::GetDefaultNamespace  )  [virtual]
 

Gets the default namespace.

Returns:
Returns the default namespace.

virtual FDO_API FdoString* FdoXmlFeatureFlags::GetGmlIdPrefix  )  const [virtual]
 

Gets the current GML ID prefix.

Returns:
Returns FdoString

virtual FDO_API FdoString* FdoXmlFeatureFlags::GetMemberName  )  const [virtual]
 

Gets the feature member element name.

Returns:
Returns FdoString*.

virtual FDO_API FdoString* FdoXmlFeatureFlags::GetMemberUri  )  const [virtual]
 

Gets the feature member element URI.

Returns:
Returns FdoString*

virtual FDO_API FdoStringCollection* FdoXmlFeatureFlags::GetNamespaces  )  [virtual]
 

Gets all namespaces that have been set for schemaLocation by SetSchemaLocation().

Returns:
Returns all namespaces that have been set for schemaLocation.

virtual FDO_API FdoString* FdoXmlFeatureFlags::GetSchemaLocation FdoString nameSpace  )  [virtual]
 

Gets the schema location for the specified namespace.

Parameters:
nameSpace Namespace of which the schema location is to be retrieved. Like "http://www.opengis.net/wfs"
Returns:
Returns the URL indicating the schema location.

virtual FDO_API FdoBoolean FdoXmlFeatureFlags::GetWriteCollection  )  const [virtual]
 

Gets the write feature collection flag.

Returns:
Returns the write feature collection flag.

virtual FDO_API FdoBoolean FdoXmlFeatureFlags::GetWriteMember  )  const [virtual]
 

Gets the write feature member flag.

Returns:
Returns the write feature member flag.

virtual FDO_API void FdoXmlFeatureFlags::SetCollectionName FdoString name  )  [virtual]
 

Sets the name for the feature collection element to wrap around serialized features. The initial value is 'FeatureCollection'.

Parameters:
name Input the name. If NULL or blank, the name reverts back to the initial value.

virtual FDO_API void FdoXmlFeatureFlags::SetCollectionUri FdoString uri  )  [virtual]
 

Sets the URI for the feature collection element to wrap around serialized features. The initial value is 'http://www.opengis.net/gml'.

Parameters:
uri Input the URI. If NULL or blank, the URI reverts back to the initial value.

virtual FDO_API void FdoXmlFeatureFlags::SetConflictOption ConflictOption  conflictOption  )  [virtual]
 

Sets the current option for handling features already in the connection datastore.

Parameters:
conflictOption Specifies how feaures, already in the datastore, are handled.

virtual FDO_API void FdoXmlFeatureFlags::SetDefaultNamespace FdoString defaultNamespace  )  [virtual]
 

Sets the default namespace which defines all feature/object types found in the input feature reader which is to be serialized. The user is also supposed to set the schema location for this namespace.

Parameters:
defaultNamespace Default namespace.

virtual FDO_API void FdoXmlFeatureFlags::SetGmlIdPrefix FdoString prefix  )  [virtual]
 

Sets the GML ID prefix for writing features. This prefix is prepended to the gml:id value for each feature. When features from different FDO Datastores are serialized to the same GML document, it is recommended that a different GML ID prefix be used for each Datastore, to ensure that the gml:id values in the GML document are unique. The initial value is L"" (no prefix).

Parameters:
prefix Input the GML ID Prefix

virtual FDO_API void FdoXmlFeatureFlags::SetMemberName FdoString name  )  [virtual]
 

Sets the name for the feature member element to wrap around each serialized feature. The initial value is 'featureMember'.

Parameters:
name Input the name. If NULL or blank, the URI defaults to the name of the feature collection element's sub-element. If this sub-element cannot be determined then the name defaults to the initial value

virtual FDO_API void FdoXmlFeatureFlags::SetMemberUri FdoString uri  )  [virtual]
 

Sets the URI for the feature member element to wrap around each serialized feature. The initial value is 'http://www.opengis.net/gml'.

Parameters:
uri Input the URI. If NULL or blank, the URI defaults to the URI of the feature collection element's sub-element. If this sub-element cannot be determined then the URI defaults to the initial value

virtual FDO_API void FdoXmlFeatureFlags::SetSchemaLocation FdoString nameSpace,
FdoString schemaLocation
[virtual]
 

Sets the schema locations for writing features. The output GML must have schema definition for all its referenced namespaces, e.g, gml namespace, wfs namespace, user defined namespace. There are default values for gml namespace schema location and wfs namespace schema location, so the user doesn't need to set locations for those two namespaces. But the user can still set values to override the default values. The user could call this function multiple times to set schema location for multiple namespace.

Parameters:
nameSpace Namespace of which the schema location is to be set. Like "http://www.opengis.net/wfs" for wfs namespace.
schemaLocation Standard URL indicating the schema location, like "http://schemas.opengeospatial.net/wfs/1.0.0/WFS-basic.xsd" for wfs namespace.

virtual FDO_API void FdoXmlFeatureFlags::SetWriteCollection FdoBoolean  writeCollection  )  [virtual]
 

Sets the write feature collection flag. This flag is initially set to true.

Parameters:
writeCollection Input true: The serialized features are wrapped in a GML FeatureCollection element. false: features are serialize without a wrapping collection element.

virtual FDO_API void FdoXmlFeatureFlags::SetWriteMember FdoBoolean  writeMember  )  [virtual]
 

Sets the write feature member flag. This flag is initially set to true.

Parameters:
writeMember Input true: Each serialized feature is wrapped in a GML featureMember element. false: features are serialized without a wrapping member element. Normally, writeMember would only be set to false when writing values to a collection object property.

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