01: /*
02: * ============================================================================
03: * GNU Lesser General Public License
04: * ============================================================================
05: *
06: * JasperReports - Free Java report-generating library.
07: * Copyright (C) 2001-2006 JasperSoft Corporation http://www.jaspersoft.com
08: *
09: * This library is free software; you can redistribute it and/or
10: * modify it under the terms of the GNU Lesser General Public
11: * License as published by the Free Software Foundation; either
12: * version 2.1 of the License, or (at your option) any later version.
13: *
14: * This library is distributed in the hope that it will be useful,
15: * but WITHOUT ANY WARRANTY; without even the implied warranty of
16: * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
17: * Lesser General Public License for more details.
18: *
19: * You should have received a copy of the GNU Lesser General Public
20: * License along with this library; if not, write to the Free Software
21: * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307, USA.
22: *
23: * JasperSoft Corporation
24: * 303 Second Street, Suite 450 North
25: * San Francisco, CA 94107
26: * http://www.jaspersoft.com
27: */
28: package net.sf.jasperreports.olap.xmla;
29:
30: import mondrian.olap.Member;
31: import net.sf.jasperreports.olap.result.JROlapMember;
32:
33: /**
34: * @author Lucian Chirita (lucianc@users.sourceforge.net)
35: * @version $Id: JRXmlaMember.java 1446 2006-10-25 09:00:05Z lucianc $
36: */
37: public class JRXmlaMember implements JROlapMember {
38:
39: private final String name;
40: private final String uniqueName;
41: private final String dimensionName;
42: private final String levelName;
43: private final int depth;
44:
45: public JRXmlaMember(String name, String uniqueName,
46: String dimensionName, String levelName, int depth) {
47: this .name = name;
48: this .uniqueName = uniqueName;
49: this .dimensionName = dimensionName;
50: this .levelName = levelName;
51: this .depth = depth;
52: }
53:
54: public int getDepth() {
55: return depth;
56: }
57:
58: public String getName() {
59: return name;
60: }
61:
62: public JROlapMember getParentMember() {
63: // not implemented
64: return null;
65: }
66:
67: public Object getPropertyValue(String propertyName) {
68: throw new UnsupportedOperationException(
69: "Member properties are not supported by the XML/A query executer");
70: }
71:
72: public String getUniqueName() {
73: return uniqueName;
74: }
75:
76: public String getLevelName() {
77: return levelName;
78: }
79:
80: public String getDimensionName() {
81: return dimensionName;
82: }
83:
84: public Member getMondrianMember() {
85: throw new UnsupportedOperationException(
86: "XML/A member cannot be converted to a mondrian.olap.Member");
87: }
88:
89: }
|