/* // $Id: //guest/julian_hyde/mondrian/src/main/mondrian/olap/Dot.java#1 $ // This software is subject to the terms of the Common Public License // Agreement, available at the following URL: // http://www.opensource.org/licenses/cpl.html. // (C) Copyright 1998-2002 Kana Software, Inc. and others. // All Rights Reserved. // You must accept the terms of that agreement to use this software. // // jhyde, 20 January, 1999 */ package mondrian.olap; import java.util.*; import java.io.*; /** * Named property of an MDX expression. todo: Maybe obsolete this class... * implement x.y as x.GetProp("y"), where "GetProp" is a special method. **/ public class Dot extends ExpBase { public Exp exp; public String prop; Dot(Exp exp, String prop) { this.exp = exp; this.prop = prop; } public Object clone() { return new Dot((Exp) exp.clone(), prop); } public int getCategory() { return CatUnknown; } public boolean usesDimension(Dimension dimension) { return exp.usesDimension(dimension); } public Exp resolve(Query q) { OlapElement mdxElement = (OlapElement) exp.resolve(q); return q.lookupChild(mdxElement, prop, true); } public void unparse(PrintWriter pw, ElementCallback callback) { exp.unparse(pw, callback); pw.print("." + prop); } // implement Exp public Object evaluate(Evaluator evaluator) { return evaluator.xx(this); } } // End Dot.java
# | Change | User | Description | Committed | |
---|---|---|---|---|---|
#2 | 1499 | Julian Hyde |
Mondrian: Re-organize functions and type-checking Add mondrian.olap.fun package |
||
#1 | 1453 | Julian Hyde | mondrian: first source check-in |