OpenLayers. Format. Filter.v1

Superclass for Filter version 1 parsers.

Inherits from

Summary
OpenLayers. Format. Filter.v1Superclass for Filter version 1 parsers.
Properties
namespaces{Object} Mapping of namespace aliases to namespace URIs.
defaultPrefix
schemaLocation{String} Schema location for a particular minor version.
Constructor
OpenLayers. Format. Filter.v1Instances of this class are not created directly.
Functions and Properties
read
readersContains public functions, grouped by namespace prefix, that will be applied when a namespaced node is found matching the function name.
readOgcExpressionLimited support for OGC expressions.
write
writersAs a compliment to the readers property, this structure contains public writing functions grouped by namespace alias and named like the node names they produce.
getFilterType
filterMap{Object} Contains a member for each filter type.
getNamespacePrefixGet the namespace prefix for a given uri from the namespaces object.
readChildNodes
writeNodeShorthand for applying one of the named writers and appending the results to a node.
createElementNSPlusShorthand for creating namespaced elements with optional attributes and child text nodes.
setAttributesSet multiple attributes given key value pairs from an object.

Properties

namespaces

{Object} Mapping of namespace aliases to namespace URIs.

defaultPrefix

schemaLocation

{String} Schema location for a particular minor version.

Constructor

OpenLayers. Format. Filter.v1

Instances of this class are not created directly.  Use the OpenLayers.Format.Filter constructor instead.

Parameters

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

Functions and Properties

read

read: function(data)

Parameters

data{DOMElement} A Filter document element.

Returns

{OpenLayers.Filter} A filter object.

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.

readOgcExpression

readOgcExpression: function(node)

Limited support for OGC expressions.

Parameters

node{DOMElement} A DOM element that contains an ogc:expression.

Returns

{String} A value to be used in a symbolizer.

write

write: function(filter)

Parameters

filter{OpenLayers.Filter} A filter object.

Returns

{DOMElement} An ogc:Filter element.

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.

getFilterType

getFilterType: function(filter)

filterMap

{Object} Contains a member for each filter type.  Values are node names for corresponding OGC Filter child elements.

getNamespacePrefix

getNamespacePrefix: function(uri)

Get the namespace prefix for a given uri from the namespaces object.

Returns

{String} A namespace prefix or null if none found.

readChildNodes

readChildNodes: function(node,
obj)

writeNode

writeNode: function(parent,
name,
obj)

Shorthand for applying one of the named writers and appending the results to a node.  If a qualified name is not provided for the second argument (and a local name is used instead), the namespace of the parent node will be assumed.

Parameters

parent{DOMElement} Result will be appended to this node.
name{String} The name of a node to generate.  If a qualified name (e.g.  “pre:Name”) is used, the namespace prefix is assumed to be in the writers group.  If a local name is used (e.g.  “Name”) then the namespace of the parent is assumed.
obj{Object} Structure containing data for the writer.

Returns

{DOMElement} The child node.

createElementNSPlus

createElementNSPlus: function(name,
options)

Shorthand for creating namespaced elements with optional attributes and child text nodes.

Parameters

name{String} The qualified node name.
options{Object} Optional object for node configuration.

Returns

{Element} An element node.

setAttributes

setAttributes: function(node,
obj)

Set multiple attributes given key value pairs from an object.

Parameters

node{Element} An element node.
obj{Object || Array} An object whose properties represent attribute names and values represent attribute values.  If an attribute name is a qualified name (“prefix:local”), the prefix will be looked up in the parsers {namespaces} object.  If the prefix is found, setAttributeNS will be used instead of setAttribute.
read: function(data)
readOgcExpression: function(node)
Limited support for OGC expressions.
write: function(filter)
getFilterType: function(filter)
getNamespacePrefix: function(uri)
Get the namespace prefix for a given uri from the namespaces object.
{Object} Mapping of namespace aliases to namespace URIs.
readChildNodes: function(node,
obj)
writeNode: function(parent,
name,
obj)
Shorthand for applying one of the named writers and appending the results to a node.
createElementNSPlus: function(name,
options)
Shorthand for creating namespaced elements with optional attributes and child text nodes.
setAttributes: function(node,
obj)
Set multiple attributes given key value pairs from an object.
Read and write XML.
Read/Wite ogc:Filter.
This class represents an OGC Filter.
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.
Close