KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > com > tonbeller > jpivot > olap > mdxparse > MemberProperty


1 /*
2  * ====================================================================
3  * This software is subject to the terms of the Common Public License
4  * Agreement, available at the following URL:
5  * http://www.opensource.org/licenses/cpl.html .
6  * Copyright (C) 2003-2004 TONBELLER AG.
7  * All Rights Reserved.
8  * You must accept the terms of that agreement to use this software.
9  * ====================================================================
10  *
11  *
12  */

13 package com.tonbeller.jpivot.olap.mdxparse;
14
15 /**
16  * member property implementation
17  */

18 public class MemberProperty implements Exp {
19
20   private String JavaDoc name;
21   private Exp exp;
22
23   public MemberProperty(String JavaDoc name, Exp exp) {
24     this.name = name;
25     this.exp = exp;
26   }
27
28   /**
29    * format to MDX
30    */

31   public String JavaDoc toMdx() {
32     String JavaDoc str = name;
33     str += " = ";
34     str += exp.toMdx();
35     return str;
36   }
37
38   /**
39    *
40    * @see java.lang.Object#clone()
41    */

42   public Object JavaDoc clone() {
43     return new MemberProperty(name, (Exp) exp.clone());
44   }
45
46
47   /**
48    * @see com.tonbeller.jpivot.olap.mdxparse.Exp#accept
49    */

50   public void accept(ExpVisitor visitor) {
51     visitor.visitMemberProperty(this);
52   }
53   
54 } // End MemberProperty
55
Popular Tags