001 /* 002 // $Id: //open/mondrian/src/main/mondrian/olap/QueryPart.java#11 $ 003 // This software is subject to the terms of the Common Public License 004 // Agreement, available at the following URL: 005 // http://www.opensource.org/licenses/cpl.html. 006 // Copyright (C) 1998-2002 Kana Software, Inc. 007 // Copyright (C) 2001-2006 Julian Hyde and others 008 // All Rights Reserved. 009 // You must accept the terms of that agreement to use this software. 010 // 011 // jhyde, 23 January, 1999 012 */ 013 014 package mondrian.olap; 015 import java.io.PrintWriter; 016 017 /** 018 * Component of an MDX query (derived classes include Query, Axis, Exp, Level). 019 * 020 * @version $Id: //open/mondrian/src/main/mondrian/olap/QueryPart.java#11 $ 021 * @author jhyde 022 */ 023 public abstract class QueryPart implements Walkable { 024 /** 025 * Creates a QueryPart. 026 */ 027 QueryPart() { 028 } 029 030 /** 031 * Writes a string representation of this parse tree 032 * node to the given writer. 033 * 034 * @param pw writer 035 */ 036 public void unparse(PrintWriter pw) { 037 pw.print(toString()); 038 } 039 040 // implement Walkable 041 public Object[] getChildren() { 042 // By default, a QueryPart is atomic (has no children). 043 return null; 044 } 045 } 046 047 // End QueryPart.java