OpenLayers.Format.XML.VersionedOGC

Base class for versioned formats, i.e. a format which supports multiple versions.

Inherits from

Summary
OpenLayers.Format.XML.VersionedOGCBase class for versioned formats, i.e.
Properties
defaultVersion{String} Version number to assume if none found.
version{String} Specify a version string if one is known.
profile{String} If provided, use a custom profile.
errorProperty{String} Which property of the returned object to check for in order to determine whether or not parsing has failed.
name{String} The name of this parser, this is the part of the CLASS_NAME except for “OpenLayers.Format.”
stringifyOutput{Boolean} If true, write will return a string otherwise a DOMElement.
parser{Object} Instance of the versioned parser.
Constructor
OpenLayers.Format.XML.VersionedOGC.Constructor.
Functions
getVersionReturns the version to use.
getParserGet an instance of the cached parser if available, otherwise create one.
writeWrite a document.
readRead a doc and return an object representing the document.

Properties

defaultVersion

{String} Version number to assume if none found.

version

{String} Specify a version string if one is known.

profile

{String} If provided, use a custom profile.

errorProperty

{String} Which property of the returned object to check for in order to determine whether or not parsing has failed.  In the case that the errorProperty is undefined on the returned object, the document will be run through an OGCExceptionReport parser.

name

{String} The name of this parser, this is the part of the CLASS_NAME except for “OpenLayers.Format.”

stringifyOutput

{Boolean} If true, write will return a string otherwise a DOMElement.  Default is false.

parser

{Object} Instance of the versioned parser.  Cached for multiple read and write calls of the same version.

Constructor

OpenLayers.Format.XML.VersionedOGC.

Constructor.

Parameters

options{Object} Optional object whose properties will be set on the object.

Functions

getVersion

getVersion: function(root,
options)

Returns the version to use.  Subclasses can override this function if a different version detection is needed.

Parameters

root{DOMElement}
options{Object} Optional configuration object.

Returns

{String} The version to use.

getParser

getParser: function(version)

Get an instance of the cached parser if available, otherwise create one.

Parameters

version{String}

Returns

{OpenLayers.Format}

write

write: function(obj,
options)

Write a document.

Parameters

obj{Object} An object representing the document.
options{Object} Optional configuration object.

Returns

{String} The document as a string

read

read: function(data,
options)

Read a doc and return an object representing the document.

Parameters

data{String | DOMElement} Data to read.
options{Object} Options for the reader.

Returns

{Object} An object representing the document.

getVersion: function(root,
options)
Returns the version to use.
getParser: function(version)
Get an instance of the cached parser if available, otherwise create one.
write: function(obj,
options)
Write a document.
read: function(data,
options)
Read a doc and return an object representing the document.
Base class for format reading/writing a variety of formats.
Close