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

FdoXmlFlags Class Reference

#include <Flags.h>

Inherits FdoIDisposable.

Inherited by FdoXmlFeatureFlags, and FdoXmlSpatialContextFlags.

Inheritance diagram for FdoXmlFlags:

[legend]
List of all members.

Detailed Description

FdoXmlFlags defines various options for serializing and deserializing FDO element to and from XML Documents.

Definition at line 28 of file Flags.h.


Public Types

enum  ErrorLevel {
  ErrorLevel_High,
  ErrorLevel_Normal,
  ErrorLevel_Low,
  ErrorLevel_VeryLow
}
 The FdoXmlFlags::ErrorLevel determines how strict the error reporting is when a Feature Schema is read from an XML Document. For each errorLevel a certain level of round-trip fidelity is guaranteed if the read succeeds. More...

Public Member Functions

FdoBoolean GetElementDefaultNullability () const
FDO_API ErrorLevel GetErrorLevel () const
 Gets the current error level, see FdoXmlFlags::Create().
FDO_API FdoBoolean GetNameAdjust () const
 Gets the name adjustment flag, see FdoXmlFlags::Create().
FDO_API FdoPhysicalSchemaMappingCollectionGetSchemaMappings () const
 Gets the current Schema Mapping Overrides.
FDO_API FdoBoolean GetSchemaNameAsPrefix () const
 Gets the Schema Name as Prefix flag.
FDO_API FdoStringGetUrl () const
 Gets the target namespace prefix, see FdoXmlFlags::Create().
FDO_API FdoBoolean GetUseGmlId () const
 Gets the Use GML ID flag.
void SetElementDefaultNullability (FdoBoolean pValue)
FDO_API void SetErrorLevel (ErrorLevel errorLevel)
 Sets the error level, see FdoXmlFlags::Create().
FDO_API void SetNameAdjust (FdoBoolean nameAdjust)
 Sets the name adjustment flag, see FdoXmlFlags::Create().
FDO_API void SetSchemaMappings (FdoPhysicalSchemaMappingCollection *mappings)
 Sets the Schema Mapping Overrides for translating schemas between GML and FDO.
FDO_API void SetSchemaNameAsPrefix (FdoBoolean schemaNameAsPrefix)
 Sets the Schema Name as Prefix flag. This flag controls how an FDO Feature Schema name is generated when the schema is read from GML.
FDO_API void SetUrl (FdoString *url)
 Sets the target namespace prefix, see FdoXmlFlags::Create().
FDO_API void SetUseGmlId (FdoBoolean schemaNameAsPrefix)
 Sets the Use GML ID flag.

Static Public Member Functions

FDO_API FdoXmlFlagsCreate (FdoString *url=L"fdo.osgeo.org/schemas/feature", ErrorLevel errorLevel=ErrorLevel_Normal, FdoBoolean nameAdjust=true)
 Constructs an FdoXmlFlags object.

Protected Member Functions

virtual FDO_API void Dispose ()
 DOXYGEN-IGNORE
FDO_API FdoXmlFlags (FdoString *url, ErrorLevel errorLevel, FdoBoolean nameAdjust)
 FdoXmlFlags ()
 default constructor to keep linux from complaining
virtual FDO_API ~FdoXmlFlags ()

Member Enumeration Documentation

enum FdoXmlFlags::ErrorLevel
 

The FdoXmlFlags::ErrorLevel determines how strict the error reporting is when a Feature Schema is read from an XML Document. For each errorLevel a certain level of round-trip fidelity is guaranteed if the read succeeds.

Parameters:
ErrorLevel_VeryLow the read succeeds even if no level of round-trip fidelity is maintained. If the Feature Schema is read successfully from document A and then written to document B, any instance document that conforms to the document A schema may or may not conform to the document B schema. A document that does not conform to the A schema may or may not conform to the B schema. This errorLevel is useful for reading schemas from external sources into FDO when it doesn’t matter how much the schemas are altered during the read.
Enumeration values:
ErrorLevel_High  This errorLevel should be used when no alterations to the Feature Schema can be tolerated.

documents A and B are guaranteed to be identical.

ErrorLevel_Normal  Any instance document that does not conform to A does not conform to B. However, documents A and B will not necessarily be identical.
ErrorLevel_Low  may or may not conform to the B schema.

any instance document that conforms to the document A schema will also conform to the document B schema. However a document that does not conform to the A schema

ErrorLevel_VeryLow  This errorLevel is useful for reading schemas from external sources into FDO when it doesn’t matter how much the schemas are altered during the read.

Definition at line 45 of file Flags.h.


Constructor & Destructor Documentation

FdoXmlFlags::FdoXmlFlags  )  [inline, protected]
 

default constructor to keep linux from complaining

Definition at line 221 of file Flags.h.

FDO_API FdoXmlFlags::FdoXmlFlags FdoString url,
ErrorLevel  errorLevel,
FdoBoolean  nameAdjust
[protected]
 

virtual FDO_API FdoXmlFlags::~FdoXmlFlags  )  [protected, virtual]
 


Member Function Documentation

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

Constructs an FdoXmlFlags object.

Parameters:
url Input When writing Feature Schemas, this specifies the prefix for the target namespace for any schemas that are written. The XML format for Feature Schemas is OGC GML, so a targetNamespace for the xs:schema element is required. This namespace will be http://[url]/[schema_name].
errorLevel Input The error level for reading feature schemas.
nameAdjust Input true: apply name adjustment to all elements. false: apply name adjustment only to elements with fdo:nameAdjust="true"
Returns:
Returns FdoXmlFlags

virtual FDO_API void FdoXmlFlags::Dispose  )  [protected, virtual]
 

DOXYGEN-IGNORE

Implements FdoIDisposable.

FdoBoolean FdoXmlFlags::GetElementDefaultNullability  )  const [inline]
 

Definition at line 247 of file Flags.h.

References FdoBoolean.

FDO_API ErrorLevel FdoXmlFlags::GetErrorLevel  )  const
 

Gets the current error level, see FdoXmlFlags::Create().

Returns:
Returns the error level.

FDO_API FdoBoolean FdoXmlFlags::GetNameAdjust  )  const
 

Gets the name adjustment flag, see FdoXmlFlags::Create().

Returns:
Returns the name adjustment flag.

FDO_API FdoPhysicalSchemaMappingCollection* FdoXmlFlags::GetSchemaMappings  )  const
 

Gets the current Schema Mapping Overrides.

Returns:
Returns FdoXmlSchemaMappingCollection*.

FDO_API FdoBoolean FdoXmlFlags::GetSchemaNameAsPrefix  )  const
 

Gets the Schema Name as Prefix flag.

Returns:
Returns the Schema Name as Prefix flag.

FDO_API FdoString* FdoXmlFlags::GetUrl  )  const
 

Gets the target namespace prefix, see FdoXmlFlags::Create().

Returns:
Returns the target namespace prefix.

FDO_API FdoBoolean FdoXmlFlags::GetUseGmlId  )  const
 

Gets the Use GML ID flag.

Returns:
Returns the Use GML ID flag.

void FdoXmlFlags::SetElementDefaultNullability FdoBoolean  pValue  )  [inline]
 

Definition at line 242 of file Flags.h.

FDO_API void FdoXmlFlags::SetErrorLevel ErrorLevel  errorLevel  ) 
 

Sets the error level, see FdoXmlFlags::Create().

Parameters:
errorLevel Input the error level.

FDO_API void FdoXmlFlags::SetNameAdjust FdoBoolean  nameAdjust  ) 
 

Sets the name adjustment flag, see FdoXmlFlags::Create().

Parameters:
nameAdjust Input the name adjustment flag.

FDO_API void FdoXmlFlags::SetSchemaMappings FdoPhysicalSchemaMappingCollection mappings  ) 
 

Sets the Schema Mapping Overrides for translating schemas between GML and FDO.

Parameters:
mappings Input the Schema Mapping Overrides. This collection can contain an FdoXmlSchemaMapping element for each Feature Schema that may be written or read. When a Feature Schema is read or written to or from GML, this collection is checked for an FdoXmlSchemaMapping item named the same as the feature schema. If present, the hints in this item affect how the feature schema is read or written. The Schema Mapping Overrides also control how features are read since they can override the default correspondences between feature class names and their GML element names.

FDO_API void FdoXmlFlags::SetSchemaNameAsPrefix FdoBoolean  schemaNameAsPrefix  ) 
 

Sets the Schema Name as Prefix flag. This flag controls how an FDO Feature Schema name is generated when the schema is read from GML.

Parameters:
schemaNameAsPrefix Input when true, the Feature Schema name is set to the prefix from the xmlns namespace declaration for the schema's targetNamespace. The target namespace prefix flag on this object is ignored in this case. If no suitable namespace declaration can be found, the Feature Schema name is set as if this flag were false. Schemas cannot be round-tripped when this flag is true. Therefore, it may only be set to true when the current ErrorLevel is VeryLow. Caution must be observed when using this flag. Unpredictable results can occur if a GML Schema uses different prefixes for its targetNamespace in different parts of the schema.

FDO_API void FdoXmlFlags::SetUrl FdoString url  ) 
 

Sets the target namespace prefix, see FdoXmlFlags::Create().

Parameters:
url Input the target namespace prefix.

FDO_API void FdoXmlFlags::SetUseGmlId FdoBoolean  schemaNameAsPrefix  ) 
 

Sets the Use GML ID flag.

Parameters:
schemaNameAsPrefix Input when true, the feature id ( fid in GML 2, gml:id in GML 3) becomes the identity property of all feature classes.

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