Project

General

Profile

Download (1.39 KB) Statistics
| Branch: | Tag: | Revision:
1
/* Copyright (c) 2006-2013 by OpenLayers Contributors (see authors.txt for
2
 * full list of contributors). Published under the 2-clause BSD license.
3
 * See license.txt in the OpenLayers distribution or repository for the
4
 * full text of the license. */
5

    
6
/**
7
 * @requires OpenLayers/Format/WCSCapabilities.js
8
 */
9

    
10
/**
11
 * Class: OpenLayers.Format.WCSCapabilities.v1
12
 * Abstract class not to be instantiated directly.
13
 * 
14
 * Inherits from:
15
 *  - <OpenLayers.Format.XML>
16
 */
17
OpenLayers.Format.WCSCapabilities.v1 = OpenLayers.Class(
18
    OpenLayers.Format.XML, {
19

    
20
    regExes: {
21
        trimSpace: (/^\s*|\s*$/g),
22
        splitSpace: (/\s+/)
23
    },
24

    
25
    /**
26
     * Property: defaultPrefix
27
     */
28
    defaultPrefix: "wcs",
29

    
30
    /**
31
     * APIMethod: read
32
     * Read capabilities data from a string, and return a list of coverages. 
33
     * 
34
     * Parameters: 
35
     * data - {String} or {DOMElement} data to read/parse.
36
     *
37
     * Returns:
38
     * {Array} List of named coverages.
39
     */
40
    read: function(data) {
41
        if(typeof data == "string") {
42
            data = OpenLayers.Format.XML.prototype.read.apply(this, [data]);
43
        }
44
        var raw = data;
45
        if(data && data.nodeType == 9) {
46
            data = data.documentElement;
47
        }
48
        var capabilities = {};
49
        this.readNode(data, capabilities);
50
        return capabilities;
51
    },
52

    
53
    CLASS_NAME: "OpenLayers.Format.WCSCapabilities.v1" 
54

    
55
});
(1-1/3)