KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > mondrian > olap > FunTable


1 /*
2 // $Id: //open/mondrian/src/main/mondrian/olap/FunTable.java#15 $
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) 2002-2002 Kana Software, Inc.
7 // Copyright (C) 2002-2006 Julian Hyde and others
8 // All Rights Reserved.
9 // You must accept the terms of that agreement to use this software.
10 //
11 // jhyde, 3 March, 2002
12  */

13 package mondrian.olap;
14 import mondrian.mdx.UnresolvedFunCall;
15 import mondrian.olap.fun.Resolver;
16 import mondrian.olap.fun.FunInfo;
17
18 import java.util.*;
19
20 /**
21  * List of all MDX functions.
22  *
23  * A function table can resolve a function call, using a particular
24  * {@link Syntax} and set of arguments, to a
25  * function definition ({@link FunDef}).
26  */

27 public interface FunTable {
28     /**
29      * Resolves a function call to a particular function. If the function is
30      * overloaded, returns as precise a match to the argument types as
31      * possible.
32      */

33     FunDef getDef(
34             Exp[] args, Validator validator, String JavaDoc funName, Syntax syntax);
35
36     /**
37      * Returns whether a string is a reserved word.
38      */

39     boolean isReserved(String JavaDoc s);
40
41     /**
42      * Returns whether a string is a property-style (postfix)
43      * operator. This is used during parsing to disambiguate
44      * functions from unquoted member names.
45      */

46     boolean isProperty(String JavaDoc s);
47
48     /**
49      * Returns whether the <code>k</code>th argument to a function call
50      * has to be an expression.
51      */

52     boolean requiresExpression(
53             UnresolvedFunCall funCall,
54             int k,
55             Validator validator);
56
57     /**
58      * Returns a list of words ({@link String}) which may not be used as
59      * identifiers.
60      */

61     List<String JavaDoc> getReservedWords();
62
63     /**
64      * Returns a list of {@link mondrian.olap.fun.Resolver} objects.
65      */

66     List<Resolver> getResolvers();
67
68     /**
69      * Returns a list of {@link mondrian.olap.fun.FunInfo} objects.
70      */

71     List<FunInfo> getFunInfoList();
72
73 }
74
75 // End FunTable.java
76
Popular Tags