KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > com > tonbeller > jpivot > olap > navi > ExpressionParser


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.navi;
14
15 import com.tonbeller.jpivot.core.Extension;
16 import com.tonbeller.jpivot.olap.model.Dimension;
17 import com.tonbeller.jpivot.olap.model.Expression;
18 import com.tonbeller.jpivot.olap.model.Hierarchy;
19 import com.tonbeller.jpivot.olap.model.Level;
20 import com.tonbeller.jpivot.olap.model.Member;
21
22 /**
23  * serialisiert expr. Wird zunaechst nur
24  * fuer unique names von Member, Hierarchy, Dimension, Level
25  * benutzt.
26  */

27
28 public interface ExpressionParser extends Extension {
29   public static final String JavaDoc ID = "expressionParser";
30
31   class InvalidSyntaxException extends Exception JavaDoc {
32     public InvalidSyntaxException() {
33     }
34
35     public InvalidSyntaxException(String JavaDoc message) {
36       super(message);
37     }
38
39     public InvalidSyntaxException(String JavaDoc message, Throwable JavaDoc cause) {
40       super(message, cause);
41     }
42
43     public InvalidSyntaxException(Throwable JavaDoc cause) {
44       super(cause);
45     }
46   }
47
48   String JavaDoc unparse(Expression expr);
49
50   Expression parse(String JavaDoc expr) throws InvalidSyntaxException;
51
52   /**
53    * typespecific lookup because Mondrians unique names are not unique.
54    * [Measures] is the unique name for both, Hierarchy and Dimension
55    */

56   Member lookupMember(String JavaDoc uniqueName) throws InvalidSyntaxException;
57
58   /**
59    * typespecific lookup because Mondrians unique names are not unique.
60    * [Measures] is the unique name for both, Hierarchy and Dimension.
61    * much faster than lookupMember or parse(uname) because it does not have to look into the DB.
62    */

63   Level lookupLevel(String JavaDoc uniqueName) throws InvalidSyntaxException;
64
65   /**
66    * typespecific lookup because Mondrians unique names are not unique.
67    * [Measures] is the unique name for both, Hierarchy and Dimension
68    * much faster than lookupMember or parse(uname) because it does not have to look into the DB.
69    */

70   Hierarchy lookupHierarchy(String JavaDoc uniqueName) throws InvalidSyntaxException;
71
72   /**
73    * typespecific lookup because Mondrians unique names are not unique.
74    * [Measures] is the unique name for both, Hierarchy and Dimension
75    * much faster than lookupMember or parse(uname) because it does not have to look into the DB.
76    */

77   Dimension lookupDimension(String JavaDoc uniqueName) throws InvalidSyntaxException;
78 }
Popular Tags