KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > org > netbeans > modules > xml > xpath > XPathCoreFunction


1 /*
2  * The contents of this file are subject to the terms of the Common Development
3  * and Distribution License (the License). You may not use this file except in
4  * compliance with the License.
5  *
6  * You can obtain a copy of the License at http://www.netbeans.org/cddl.html
7  * or http://www.netbeans.org/cddl.txt.
8  *
9  * When distributing Covered Code, include this CDDL Header Notice in each file
10  * and include the License file at http://www.netbeans.org/cddl.txt.
11  * If applicable, add the following below the CDDL Header, with the fields
12  * enclosed by brackets [] replaced by your own identifying information:
13  * "Portions Copyrighted [year] [name of copyright owner]"
14  *
15  * The Original Software is NetBeans. The Initial Developer of the Original
16  * Software is Sun Microsystems, Inc. Portions Copyright 1997-2007 Sun
17  * Microsystems, Inc. All Rights Reserved.
18  */

19
20 package org.netbeans.modules.xml.xpath;
21
22 import org.netbeans.modules.xml.xpath.function.core.visitor.XPathCoreFunctionVisitor;
23
24 /**
25  * Represents a core XPath function.
26  *
27  * @author Enrico Lelina
28  * @version $Revision: 1.4 $
29  */

30 public interface XPathCoreFunction extends XPathOperationOrFuntion {
31             
32     /** Function code: last */
33     public static final int FUNC_LAST = 1;
34     
35     /** Function code: position */
36     public static final int FUNC_POSITION = 2;
37     
38     /** Function code: count */
39     public static final int FUNC_COUNT = 3;
40     
41     /** Function code: id */
42     public static final int FUNC_ID = 4;
43     
44     /** Function code: local-name */
45     public static final int FUNC_LOCAL_NAME = 5;
46     
47     /** Function code: namespace-uri */
48     public static final int FUNC_NAMESPACE_URI = 6;
49     
50     /** Function code: name */
51     public static final int FUNC_NAME = 7;
52     
53     /** Function code: string */
54     public static final int FUNC_STRING = 8;
55     
56     /** Function code: concat */
57     public static final int FUNC_CONCAT = 9;
58     
59     /** Function code: starts-with */
60     public static final int FUNC_STARTS_WITH = 10;
61     
62     /** Function code: contains */
63     public static final int FUNC_CONTAINS = 11;
64     
65     /** Function code: substring-before */
66     public static final int FUNC_SUBSTRING_BEFORE = 12;
67     
68     /** Function code: substring-after */
69     public static final int FUNC_SUBSTRING_AFTER = 13;
70     
71     /** Function code: substring */
72     public static final int FUNC_SUBSTRING = 14;
73     
74     /** Function code: string-length */
75     public static final int FUNC_STRING_LENGTH = 15;
76     
77     /** Function code: normalize-space */
78     public static final int FUNC_NORMALIZE_SPACE = 16;
79     
80     /** Function code: translate */
81     public static final int FUNC_TRANSLATE = 17;
82     
83     /** Function code: boolean */
84     public static final int FUNC_BOOLEAN = 18;
85     
86     /** Function code: not */
87     public static final int FUNC_NOT = 19;
88     
89     /** Function code: true */
90     public static final int FUNC_TRUE = 20;
91     
92     /** Function code: false */
93     public static final int FUNC_FALSE = 21;
94     
95     /** Function code: lang */
96     public static final int FUNC_LANG = 22;
97     
98     /** Function code: number */
99     public static final int FUNC_NUMBER = 23;
100     
101     /** Function code: sum */
102     public static final int FUNC_SUM = 24;
103     
104     /** Function code: floor */
105     public static final int FUNC_FLOOR = 25;
106     
107     /** Function code: ceiling */
108     public static final int FUNC_CEILING = 26;
109     
110     /** Function code: round */
111     public static final int FUNC_ROUND = 27;
112     
113     /** Function code: null */
114     public static final int FUNC_NULL = 28;
115     
116     /** Function code: key */
117     public static final int FUNC_KEY = 29;
118     
119     /** Function code: format-number */
120     public static final int FUNC_FORMAT_NUMBER = 30;
121     
122     /** Function code: exists */
123     public static final int FUNC_EXISTS = 31;
124     
125     
126     /**
127      * Gets the function code.
128      * @return the function code
129      */

130     int getFunction();
131     
132     
133     /**
134      * Sets the function code.
135      * @param function the function code
136      */

137     void setFunction(int function);
138     
139     
140     void accept(XPathCoreFunctionVisitor visitor);
141 }
142
Popular Tags