blob: a3f5c33e84f28526b9cf986cb59290131eea3392 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
|
package syntaxParser;
/**
* GetMetaDataExpr
* Creation date: (3/3/2003 2:28:43 AM)
* @author: mattia parigiani
*/
class GetMetaDataExpr implements IParseTreeNode {
CoverageExpr coverageExpr;
String function;
String field;
/**
* GetMetaDataExpr constructor comment.
*/
public GetMetaDataExpr() {
super();
}
public GetMetaDataExpr( String f, CoverageExpr ce){
coverageExpr = ce ;
function =f;
field = null;
}
public GetMetaDataExpr( String f, CoverageExpr exp, String field) {
coverageExpr = exp;
function = f;
this.field = field;
}
public String toXML() {
String op = "operationNotSet";
if (function.equals("identifier")) op = "getIdentifier";
if (function.equals("imageCrs")) op = "getImageCrs";
if (function.equals("imageCrsDomain")) op = "getImageCrsDomain"; //TODO(smsorin): The schema requires an extra parameter axis not documented in the protocol specfication
if (function.equals("crsSet")) op = "crsSet";
if (function.equals("generalDomain")) op = "getGeneralDomain"; //TODO(smsorin): The schema requires an extra parameter axis and optional* parameter crs
if (function.equals("nullDefault")) op = "getNullDefault";
if (function.equals("nullSet")) op = "getNullSet";
if (function.equals("interpolationDefault")) op = "getInterpolationDefault";
if (function.equals("interpolationSet")) op = "getInterpolationSet";
String result = "<" + op + ">";
result += coverageExpr.toXML();
if (field != null) {
result += "<field>" + field + "</field>";
}
result += "</" + op + ">";
return result;
}
}
|