summaryrefslogtreecommitdiffstats
path: root/src/grammar/DimensionPointElement.java
blob: d37f22b24a0f3685b1facb8c3a098e21a708c76c (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
package grammar;

/** DimensionPointElement
 *
 * @author Andrei Aiordachioaie
 */
public class DimensionPointElement implements IParseTreeNode
{
    String axis;
    String crs;
    ScalarExpr point;
    
    public DimensionPointElement(String a, ScalarExpr dp)
    {
        axis = a;
        point = dp;
    }

    public DimensionPointElement(String a, String c, ScalarExpr dp)
    {
        axis = a;
        crs = c;
        point = dp;
    }

    
    public String toXML()
    {
        String result = "";

        result += "<axis>" + axis + "</axis>";
        if (crs != null)
            result += "<crs>" + crs + "</crs>";
        result += "<slicingPoint>" + point.toXML() + "</slicingPoint>";
        
        return result;
    }
    
}