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::XmlFlags Class Reference

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

Inherited by OSGeo::FDO::Xml::XmlFeatureFlags, and OSGeo::FDO::Xml::XmlSpatialContextFlags.

Inheritance diagram for OSGeo::FDO::Xml::XmlFlags:

[legend]
List of all members.

Detailed Description

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


Public Types

enum  ErrorLevel {
  ErrorLevel_High = FdoXmlFlags::ErrorLevel_High,
  ErrorLevel_Normal = FdoXmlFlags::ErrorLevel_Normal,
  ErrorLevel_Low = FdoXmlFlags::ErrorLevel_Low,
  ErrorLevel_VeryLow = FdoXmlFlags::ErrorLevel_VeryLow
}
 The XmlFlags::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

__property OSGeo::FDO::Xml::XmlFlags::ErrorLevel get_Errorlevel ()
 Gets the current error level, see XmlFlags::Create().
__property System::Boolean get_NameAdjust ()
 Gets the name adjustment flag, see XmlFlags::Create().
__property OSGeo::FDO::Commands::Schema::PhysicalSchemaMappingCollectionget_SchemaMappings ()
 Gets the current Schema Mapping Overrides.
__property System::Boolean get_SchemaNameAsPrefix ()
 Gets the Schema Name as Prefix flag.
__property System::String * get_Url ()
 Gets the target namespace prefix, see XmlFlags::Create().
__property System::Boolean get_UseGmlId ()
 Gets the Use GML ID flag.
__property System::Void set_Errorlevel (OSGeo::FDO::Xml::XmlFlags::ErrorLevel value)
 Sets the error level, see XmlFlags::Create().
__property System::Void set_NameAdjust (System::Boolean nameAdjust)
 Sets the name adjustment flag, see XmlFlags::Create().
__property System::Void set_SchemaMappings (OSGeo::FDO::Commands::Schema::PhysicalSchemaMappingCollection *mappings)
 Sets the Schema Mapping Overrides for translating schemas between GML and FDO.
__property System::Void set_SchemaNameAsPrefix (System::Boolean 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.
__property System::Void set_Url (System::String *location)
 Sets the target namespace prefix, see XmlFlags::Create().
__property System::Void set_UseGmlId (System::Boolean id)
 Sets the Use GML ID flag.
 XmlFlags (System::String *location, OSGeo::FDO::Xml::XmlFlags::ErrorLevel errorLevel, System::Boolean nameAdjust)
 Constructs an XmlFlags object.
 XmlFlags (System::String *location, OSGeo::FDO::Xml::XmlFlags::ErrorLevel errorLevel)
 Constructs an XmlFlags object.
 XmlFlags (System::String *location)
 Constructs an XmlFlags object.
 XmlFlags ()
 Constructs an XmlFlags object.

Protected Member Functions

System::Void ReleaseUnmanagedObject ()
 DOXYGEN-IGNORE

Member Enumeration Documentation

enum OSGeo::FDO::Xml::XmlFlags::ErrorLevel
 

The XmlFlags::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_High the read fails with an exception when the Feature Schema cannot be read without alteration. If the Feature Schema is read successfully from document A and then written to document B, documents A and B are guaranteed to be identical. This errorLevel should be used when no alterations to the Feature Schema can be tolerated
ErrorLevel_Normal fails if the Feature Schema cannot be read without changing the domain of its conforming instance documents. 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 will also conform to the document B schema. 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 similar to ErrorLevel_Normal except that the instance document domain is allowed to grow. 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 will also conform to the document B schema. However a document that does not conform to the A schema may or may not conform to the B schema.
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 
ErrorLevel_Normal 
ErrorLevel_Low 
ErrorLevel_VeryLow 

Constructor & Destructor Documentation

OSGeo::FDO::Xml::XmlFlags::XmlFlags  ) 
 

Constructs an XmlFlags object.

OSGeo::FDO::Xml::XmlFlags::XmlFlags System::String *  location  ) 
 

Constructs an XmlFlags object.

Parameters:
location 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].

OSGeo::FDO::Xml::XmlFlags::XmlFlags System::String *  location,
OSGeo::FDO::Xml::XmlFlags::ErrorLevel  errorLevel
 

Constructs an XmlFlags object.

Parameters:
location 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.

OSGeo::FDO::Xml::XmlFlags::XmlFlags System::String *  location,
OSGeo::FDO::Xml::XmlFlags::ErrorLevel  errorLevel,
System::Boolean  nameAdjust
 

Constructs an XmlFlags object.

Parameters:
location 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"

Member Function Documentation

__property OSGeo ::FDO ::Xml ::XmlFlags::ErrorLevel OSGeo::FDO::Xml::XmlFlags::get_Errorlevel  ) 
 

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

Returns:
Returns the error level.

__property System::Boolean OSGeo::FDO::Xml::XmlFlags::get_NameAdjust  ) 
 

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

Returns:
Returns the name adjustment flag.

__property OSGeo ::FDO ::Commands ::Schema ::PhysicalSchemaMappingCollection* OSGeo::FDO::Xml::XmlFlags::get_SchemaMappings  ) 
 

Gets the current Schema Mapping Overrides.

Returns:
Returns XmlSchemaMappingCollection*.

__property System::Boolean OSGeo::FDO::Xml::XmlFlags::get_SchemaNameAsPrefix  ) 
 

Gets the Schema Name as Prefix flag.

Returns:
Returns the Schema Name as Prefix flag.

__property System::String* OSGeo::FDO::Xml::XmlFlags::get_Url  ) 
 

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

Returns:
Returns the target namespace prefix.

__property System::Boolean OSGeo::FDO::Xml::XmlFlags::get_UseGmlId  ) 
 

Gets the Use GML ID flag.

Returns:
Returns the Use GML ID flag.

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

DOXYGEN-IGNORE

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

Reimplemented in OSGeo::FDO::Xml::XmlFeatureFlags.

__property System::Void OSGeo::FDO::Xml::XmlFlags::set_Errorlevel OSGeo::FDO::Xml::XmlFlags::ErrorLevel  value  ) 
 

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

Parameters:
value Input the error level.

__property System::Void OSGeo::FDO::Xml::XmlFlags::set_NameAdjust System::Boolean  nameAdjust  ) 
 

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

Parameters:
nameAdjust Input the name adjustment flag.

__property System::Void OSGeo::FDO::Xml::XmlFlags::set_SchemaMappings OSGeo::FDO::Commands::Schema::PhysicalSchemaMappingCollection 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 XmlSchemaMapping 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 XmlSchemaMapping 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.

__property System::Void OSGeo::FDO::Xml::XmlFlags::set_SchemaNameAsPrefix System::Boolean  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.

__property System::Void OSGeo::FDO::Xml::XmlFlags::set_Url System::String *  location  ) 
 

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

Parameters:
location Input the target namespace prefix.

__property System::Void OSGeo::FDO::Xml::XmlFlags::set_UseGmlId System::Boolean  id  ) 
 

Sets the Use GML ID flag.

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

Comments or suggestions? Send us feedback.