OpenLayers.Format.WFST.v1 - OpenLayers

# OpenLayers.Format.WFST.v1

Superclass for WFST parsers.

#### Inherits from

- OpenLayers.Format.XML

Summary

OpenLayers.Format.WFST.v1 | Superclass for WFST parsers.
Properties |
namespaces | {Object} Mapping of namespace aliases to namespace URIs.
defaultPrefix |
version | {String} WFS version number.
schemaLocation | {String} Schema location for a particular minor version.
srsName | {String} URI for spatial reference system.
extractAttributes | {Boolean} Extract attributes from GML.
xy | {Boolean} Order of the GML coordinate true:(x,y) or false:(y,x) Changing is not recommended, a new Format should be instantiated.
stateName | {Object} Maps feature states to node names.
Constructor |
OpenLayers.Format.WFST.v1 | Instances of this class are not created directly.
Functions and Properties |
getSrsName |
read | Parse the response from a transaction.
readers | Contains public functions, grouped by namespace prefix, that will be applied when a namespaced node is found matching the function name.
write | Given an array of features, write a WFS transaction.
writers | As a compliment to the readers property, this structure contains public writing functions grouped by namespace alias and named like the node names they produce.
schemaLocationAttr | Generate the xsi:schemaLocation attribute value.
setFilterProperty | Set the property of each spatial filter.

### Properties

### namespaces

{Object} Mapping of namespace aliases to namespace URIs.

### defaultPrefix

### version

{String} WFS version number.

### schemaLocation

{String} Schema location for a particular minor version.

### srsName

{String} URI for spatial reference system.

### extractAttributes

{Boolean} Extract attributes from GML. Default is true.

### xy

{Boolean} Order of the GML coordinate true:(x,y) or false:(y,x) Changing is not recommended, a new Format should be instantiated.

### stateName

{Object} Maps feature states to node names.

### Constructor

### OpenLayers.Format.WFST.v1

Instances of this class are not created directly. Use the OpenLayers.Format.WFST.v1_0_0 or OpenLayers.Format.WFST.v1_1_0 constructor instead.

#### Parameters

options | {Object} An optional object whose properties will be set on this instance.

### Functions and Properties

### getSrsName

> getSrsName: function( | feature,
> | options | )

### read

> read: function( | data,
> | options | )

Parse the response from a transaction. Because WFS is split into Transaction requests (create, update, and delete) and GetFeature requests (read), this method handles parsing of both types of responses.

#### Parameters

data | {String | Document} The WFST document to read
options | {Object} Options for the reader

#### Valid options properties

output | {String} either “features” or “object”. The default is “features”, which means that the method will return an array of features. If set to “object”, an object with a “features” property and other properties read by the parser will be returned.

#### Returns

{Array | Object} Output depending on the output option.

### readers

Contains public functions, grouped by namespace prefix, that will be applied when a namespaced node is found matching the function name. The function will be applied in the scope of this parser with two arguments: the node being read and a context object passed from the parent.

### write

> write: function( | features,
> | options | )

Given an array of features, write a WFS transaction. This assumes the features have a state property that determines the operation type - insert, update, or delete.

#### Parameters

features | {Array(OpenLayers.Feature.Vector)} A list of features. See below for a more detailed description of the influence of the feature’s modified property.
options | {Object}

#### feature.modified rules

If a feature has a modified property set, the following checks will be made before a feature’s geometry or attribute is included in an Update transaction:

- modified is not set at all: The geometry and all attributes will be included.
- modified.geometry is set (null or a geometry): The geometry will be included. If modified.attributes is not set, all attributes will be included.
- modified.attributes is set: Only the attributes set (i.e. to null or a value) in modified.attributes will be included. If modified.geometry is not set, the geometry will not be included.

#### Valid options include

- multi {Boolean} If set to true, geometries will be casted to Multi geometries before writing.

#### Returns

{String} A serialized WFS transaction.

### writers

As a compliment to the readers property, this structure contains public writing functions grouped by namespace alias and named like the node names they produce.

### schemaLocationAttr

> schemaLocationAttr: function( | options | )

Generate the xsi:schemaLocation attribute value.

#### Returns

{String} The xsi:schemaLocation attribute or undefined if none.

### setFilterProperty

> setFilterProperty: function( | filter | )

Set the property of each spatial filter.

#### Parameters

filter | {OpenLayers.Filter}

> getSrsName: function( | feature,
> | options | )

> read: function( | data,
> | options | )

Parse the response from a transaction.

> write: function( | features,
> | options | )

Given an array of features, write a WFS transaction.

> schemaLocationAttr: function( | options | )

Generate the xsi:schemaLocation attribute value.

> setFilterProperty: function( | filter | )

Set the property of each spatial filter.
Read and write XML.
A format for creating WFS v1.0.0 transactions.
A format for creating WFS v1.1.0 transactions.
Vector features use the OpenLayers.Geometry classes as geometry description.
This class represents an OGC Filter.
Close