Statistics
| Revision:

root / trunk / extensions / extWCS / src / es / uji / lsi / wcs / client / OperationDescribeCoverage.java @ 1877

History | View | Annotate | Download (1.57 KB)

1
package es.uji.lsi.wcs.client;
2
/*
3
 * OperationDescribeCoverage.java
4
 *
5
 * Created on 18 de enero de 2005, 14:23
6
 */
7
import java.util.*;
8
/**
9
 *
10
 * @author  jaume
11
 */
12
public class OperationDescribeCoverage extends Operation{
13
    private Hashtable parameters;
14
    
15
    /** Creates a new instance of OperationDescribeCoverage */
16
    public OperationDescribeCoverage() {
17
        parameters = new Hashtable();
18
        initParams();
19
    }
20
        
21
    private void initParams(){
22
        parameters.put("service", "WCS");
23
        parameters.put("request", "DescribeCoverage");
24
        parameters.put("version", "1.0.0");
25
    }
26

    
27
    public void setParam(String param_name, String value) throws Exception{
28
        super.setParam(super.DESCRIBE_COVERAGE, param_name, value, parameters);
29
    }
30
    
31
    public String getParamsString(){
32
        try {
33
            return super.getParamsString(parameters);
34
        } catch (Exception e){
35
            new Error("Failed to build DescribeCoverage param string.");
36
            return null;
37
        }
38
    }
39
    
40
    private boolean isValidRequest(){
41
        // checking mandatory parameters
42
        if (!parameters.containsKey("coverage")) return false;
43
        return true;
44
    }
45
    
46
/*    private void setCoverageParam(ArrayList names, String name){
47
        // sets and ensures that coverage param obtains a valid coverage name given
48
        // in the names list. You should use ContentMetadata.getLayerNames() method
49
        // to pass this method's first argument;
50
        
51
        if (names.contains(name)){
52
            setParam("coverage", name);
53
        }
54
    }*/
55
    
56
}