![]() |
MapLink Pro 11.1.1.0.
Envitia MapLink Pro: The Ultimate Mapping Application Toolkit
|
This class is used for loading GML application schemas from a file path or a buffer. A file path may either be local or a URL.
GML application schemas should be loaded via one of the loadSchema methods of this class.
Public Member Functions | |
TSLGMLApplicationSchemaLoader () | |
void | destroy () |
void | gmlSFValidationLevel (TSLGMLSFValidationLevel level) |
TSLGMLSFValidationLevel | gmlSFValidationLevel () const |
TSLGMLApplicationSchema * | loadSchema (const char *location) |
TSLGMLApplicationSchema * | loadSchema (const char *buffer, unsigned int bufferLen, const char *location=0) |
void | strictValidation (bool isStrict) |
bool | strictValidation () const |
void | unhandledFeatureDefinitionCallback (TSLGMLUnhandledFeatureDefinitionCallback *callback) |
const TSLGMLUnhandledFeatureDefinitionCallback * | unhandledFeatureDefinitionCallback () const |
void | urlLoaderCallback (TSLGMLURLLoaderCallback *callback) |
const TSLGMLURLLoaderCallback * | urlLoaderCallback () const |
void * | operator new (size_t size) |
void * | operator new (size_t size, char *filename, int line) |
TSLGMLApplicationSchemaLoader::TSLGMLApplicationSchemaLoader | ( | ) |
Default constructor.
void TSLGMLApplicationSchemaLoader::destroy | ( | ) |
Destroy this object.
This method must be used instead of delete.
TSLGMLSFValidationLevel TSLGMLApplicationSchemaLoader::gmlSFValidationLevel | ( | ) | const |
Queries the current GML SF profile validation level that loaded schemas will be checked against.
The default is not to perform any validation (TSLGMLSFValidationNone)
Should the schema being loaded fail the validation rules, then the loading will fail and an error will be placed on the error stack.
void TSLGMLApplicationSchemaLoader::gmlSFValidationLevel | ( | TSLGMLSFValidationLevel | level | ) |
Sets the GML SF validation level to check schemas that have been loaded against.
The default is not to perform any validation (TSLGMLSFValidationNone)
Should the schema being loaded fail the validation rules, then the loading will fail and an error will be placed on the error stack.
TSLGMLApplicationSchema * TSLGMLApplicationSchemaLoader::loadSchema | ( | const char * | buffer, |
unsigned int | bufferLen, | ||
const char * | location = 0 ) |
Loads a GML application schema from a user provided buffer.
Schema loading requires access to all schemas that the target schema depends upon, including the base GML schemas. Through the use of the urlLoader Callback method of this class, the location that this dependent schemas are loaded from can be redirected to local copies.
An additional location parameter can optionally be provided. This is used to form the path of dependent schema files that are referenced by relative path names.
buffer | The buffer containing the schema |
bufferLen | The length of the buffer |
location | The source location of the schema for relative path resolution. |
If the schema loads successfully then a TSLGMLApplicationSchema instance will be returned. On error, null will be returned.
TSLGMLApplicationSchema * TSLGMLApplicationSchemaLoader::loadSchema | ( | const char * | location | ) |
Loads a GML application schema from the location provided. This location may either be a local file path or a URL.
Schema loading requires access to all schemas that the target schema depends upon, including the base GML schemas. Through the use of the urlLoader Callback method of this class, the location that this dependent schemas are loaded from can be redirected to local copies.
location | The location to load the GML application schema from. |
void * TSLGMLApplicationSchemaLoader::operator new | ( | size_t | size | ) |
void * TSLGMLApplicationSchemaLoader::operator new | ( | size_t | size, |
char * | filename, | ||
int | line ) |
When included in an MFC application in debug mode, the debug new expects this to be here. Override it and return the same as the normal one. The library must include it when compiled in release mode, since the user's application may be in debug mode.
bool TSLGMLApplicationSchemaLoader::strictValidation | ( | ) | const |
Queries whether strict schema validation will be used during loading. By default this setting is off.
This validation refers to whether the schema is strictly valid according to the W3 definition of a schema, rather than its use of GML or whether it is supported by MapLink.
void TSLGMLApplicationSchemaLoader::strictValidation | ( | bool | isStrict | ) |
Sets whether strict schema validation will be used. By default this setting is off.
This validation refers to whether the schema is strictly valid according to the W3 definition of a schema, rather than its use of GML or whether it is supported by MapLink.
isStrict | Sets whether strict validation should be used. |
const TSLGMLUnhandledFeatureDefinitionCallback * TSLGMLApplicationSchemaLoader::unhandledFeatureDefinitionCallback | ( | ) | const |
Get the unhandled feature definition callback used by the schema loader.
The callback instance's method will be called whenever the schema loader finds an feature definition that it doesn't support. This maybe due to the feature being more complex than GML SF-0 permits or because it failed to fully understand the feature.
void TSLGMLApplicationSchemaLoader::unhandledFeatureDefinitionCallback | ( | TSLGMLUnhandledFeatureDefinitionCallback * | callback | ) |
Set the unhandled feature definition callback used by the schema loader.
The callback instance's method will be called whenever the schema loader finds an feature definition that it doesn't support. This maybe due to the feature being more complex than GML SF-0 permits or because it failed to fully understand the feature.
NOTE: The user retains ownership of the callback instance.
callback | The new callback to set. Pass null to clear the existing callback. |
const TSLGMLURLLoaderCallback * TSLGMLApplicationSchemaLoader::urlLoaderCallback | ( | ) | const |
Get the url loader callback used by the schema loader.
The callback instance's method will be called whenever the schema loader finds an schema include or import directive that refers to a URL in a schema file being loaded. It gives the opportunity for the user to redirect that location that the schema will be loaded from to a local file.
void TSLGMLApplicationSchemaLoader::urlLoaderCallback | ( | TSLGMLURLLoaderCallback * | callback | ) |
Set the url loader callback used by the schema loader.
The callback instance's method will be called whenever the schema loader finds an schema include or import directive that refers to a URL in a schema file being loaded. It gives the opportunity for the user to redirect that location that the schema will be loaded from to a local file.
NOTE: The user retains ownership of the callback instance.
callback | The new callback to set. Pass null to clear the existing callback. |