001    /*
002    // $Id: //open/mondrian/src/main/mondrian/olap/CellProperty.java#2 $
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-2007 Julian Hyde and others
008    // All Rights Reserved.
009    // You must accept the terms of that agreement to use this software.
010    //
011    //
012    */
013    package mondrian.olap;
014    
015    /**
016     * Represents Cell Property.
017     *
018     * @author Shishir
019     * @version $Id: //open/mondrian/src/main/mondrian/olap/CellProperty.java#2 $
020     * @since 08 May, 2007
021     */
022    
023    public class CellProperty extends QueryPart {
024        private String name;
025    
026        public CellProperty(Object name) {
027            this.name = name.toString();
028        }
029    
030        /**
031         * checks whether cell property is equals to passed parameter.
032         * It adds '[' and ']' before and after the propertyName before comparing.
033         * The comparison is case insensitive.
034         */
035        public boolean isNameEquals(String propertyName) {
036            return name.equalsIgnoreCase(Util.quoteMdxIdentifier(propertyName));
037        }
038    
039        public String toString() {
040            return name;
041        }
042    }
043    
044    // End CellProperty.java