001: /*
002: * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER.
003: *
004: * Copyright 1997-2007 Sun Microsystems, Inc. All rights reserved.
005: *
006: * The contents of this file are subject to the terms of either the GNU
007: * General Public License Version 2 only ("GPL") or the Common
008: * Development and Distribution License("CDDL") (collectively, the
009: * "License"). You may not use this file except in compliance with the
010: * License. You can obtain a copy of the License at
011: * http://www.netbeans.org/cddl-gplv2.html
012: * or nbbuild/licenses/CDDL-GPL-2-CP. See the License for the
013: * specific language governing permissions and limitations under the
014: * License. When distributing the software, include this License Header
015: * Notice in each file and include the License file at
016: * nbbuild/licenses/CDDL-GPL-2-CP. Sun designates this
017: * particular file as subject to the "Classpath" exception as provided
018: * by Sun in the GPL Version 2 section of the License file that
019: * accompanied this code. If applicable, add the following below the
020: * License Header, with the fields enclosed by brackets [] replaced by
021: * your own identifying information:
022: * "Portions Copyrighted [year] [name of copyright owner]"
023: *
024: * Contributor(s):
025: *
026: * The Original Software is NetBeans. The Initial Developer of the Original
027: * Software is Sun Microsystems, Inc. Portions Copyright 1997-2007 Sun
028: * Microsystems, Inc. All Rights Reserved.
029: *
030: * If you wish your version of this file to be governed by only the CDDL
031: * or only the GPL Version 2, indicate your decision by adding
032: * "[Contributor] elects to include this software in this distribution
033: * under the [CDDL or GPL Version 2] license." If you do not indicate a
034: * single choice of license, a recipient has the option to distribute
035: * your version of this file under either the CDDL, the GPL Version 2 or
036: * to extend the choice of license to its licensees as provided above.
037: * However, if you add GPL Version 2 code and therefore, elected the GPL
038: * Version 2 license, then the option applies only if the new code is
039: * made subject to such option by the copyright holder.
040: */
041:
042: package org.netbeans.modules.xml.xpath;
043:
044: import org.netbeans.modules.xml.xpath.function.core.visitor.XPathCoreFunctionVisitor;
045:
046: /**
047: * Represents a core XPath function.
048: *
049: * @author Enrico Lelina
050: * @version
051: */
052: public interface XPathCoreFunction extends XPathOperationOrFuntion {
053:
054: /** Function code: last */
055: public static final int FUNC_LAST = 1;
056:
057: /** Function code: position */
058: public static final int FUNC_POSITION = 2;
059:
060: /** Function code: count */
061: public static final int FUNC_COUNT = 3;
062:
063: /** Function code: id */
064: public static final int FUNC_ID = 4;
065:
066: /** Function code: local-name */
067: public static final int FUNC_LOCAL_NAME = 5;
068:
069: /** Function code: namespace-uri */
070: public static final int FUNC_NAMESPACE_URI = 6;
071:
072: /** Function code: name */
073: public static final int FUNC_NAME = 7;
074:
075: /** Function code: string */
076: public static final int FUNC_STRING = 8;
077:
078: /** Function code: concat */
079: public static final int FUNC_CONCAT = 9;
080:
081: /** Function code: starts-with */
082: public static final int FUNC_STARTS_WITH = 10;
083:
084: /** Function code: contains */
085: public static final int FUNC_CONTAINS = 11;
086:
087: /** Function code: substring-before */
088: public static final int FUNC_SUBSTRING_BEFORE = 12;
089:
090: /** Function code: substring-after */
091: public static final int FUNC_SUBSTRING_AFTER = 13;
092:
093: /** Function code: substring */
094: public static final int FUNC_SUBSTRING = 14;
095:
096: /** Function code: string-length */
097: public static final int FUNC_STRING_LENGTH = 15;
098:
099: /** Function code: normalize-space */
100: public static final int FUNC_NORMALIZE_SPACE = 16;
101:
102: /** Function code: translate */
103: public static final int FUNC_TRANSLATE = 17;
104:
105: /** Function code: boolean */
106: public static final int FUNC_BOOLEAN = 18;
107:
108: /** Function code: not */
109: public static final int FUNC_NOT = 19;
110:
111: /** Function code: true */
112: public static final int FUNC_TRUE = 20;
113:
114: /** Function code: false */
115: public static final int FUNC_FALSE = 21;
116:
117: /** Function code: lang */
118: public static final int FUNC_LANG = 22;
119:
120: /** Function code: number */
121: public static final int FUNC_NUMBER = 23;
122:
123: /** Function code: sum */
124: public static final int FUNC_SUM = 24;
125:
126: /** Function code: floor */
127: public static final int FUNC_FLOOR = 25;
128:
129: /** Function code: ceiling */
130: public static final int FUNC_CEILING = 26;
131:
132: /** Function code: round */
133: public static final int FUNC_ROUND = 27;
134:
135: /** Function code: null */
136: public static final int FUNC_NULL = 28;
137:
138: /** Function code: key */
139: public static final int FUNC_KEY = 29;
140:
141: /** Function code: format-number */
142: public static final int FUNC_FORMAT_NUMBER = 30;
143:
144: /** Function code: exists */
145: public static final int FUNC_EXISTS = 31;
146:
147: /**
148: * Gets the function code.
149: * @return the function code
150: */
151: int getFunction();
152:
153: /**
154: * Sets the function code.
155: * @param function the function code
156: */
157: void setFunction(int function);
158:
159: void accept(XPathCoreFunctionVisitor visitor);
160: }
|