001: /*
002: * The contents of this file are subject to the terms of the Common Development
003: * and Distribution License (the License). You may not use this file except in
004: * compliance with the License.
005: *
006: * You can obtain a copy of the License at http://www.netbeans.org/cddl.html
007: * or http://www.netbeans.org/cddl.txt.
008: *
009: * When distributing Covered Code, include this CDDL Header Notice in each file
010: * and include the License file at http://www.netbeans.org/cddl.txt.
011: * If applicable, add the following below the CDDL Header, with the fields
012: * enclosed by brackets [] replaced by your own identifying information:
013: * "Portions Copyrighted [year] [name of copyright owner]"
014: *
015: * The Original Software is NetBeans. The Initial Developer of the Original
016: * Software is Sun Microsystems, Inc. Portions Copyright 1997-2007 Sun
017: * Microsystems, Inc. All Rights Reserved.
018: */
019:
020: package org.netbeans.modules.xslt.mapper.methoid;
021:
022: /**
023: *
024: * @author nk160297
025: */
026: public interface Constants {
027:
028: String XSLT_PALETTE_FOLDER = "XsltPalette"; // NOI18N
029: String XSLT_PALETTE_METAINFO = "XPathMetainfo"; // NOI18N
030: String METAINFO_REF = "metainfo"; // NOI18N
031:
032: String XPATH_OPERATOR = "Operator"; // NOI18N
033: String XPATH_MAXINPUT = "InputNum"; // NOI18N
034: String XPATH_FUNCTION = "Function"; // NOI18N
035: String XPATH_BOOLEAN = "Boolean"; // NOI18N
036: String XPATH_NUMBER = "Number"; // NOI18N
037: String XPATH_STRING = "String"; // NOI18N
038:
039: String CATEGORY_ICON = "Icon"; // NOI18N
040:
041: String LITERAL_FLAG = "EditableLiteral"; // NOI18N
042:
043: String INPUT_PARAM = "InputParam"; // NOI18N
044: String INPUT_TYPE = "InputType"; // NOI18N
045: String INPUT_TOOLTIP = "InputTooltip"; // NOI18N
046:
047: String INPUT_THIS = "InputThis"; // NOI18N
048: String THIS_CLASS = "Class"; // NOI18N
049: String THIS_TOOLTIP = "InputThisTooltip"; // NOI18N
050: // String = ""; // NOI18N
051:
052: String OUTPUT_PARAM = "OutputParam"; // NOI18N
053: String OUTPUT_TYPE = "OutputType"; // NOI18N
054: String OUTPUT_TOOLTIP = "OutputTooltip"; // NOI18N
055: String OUTPUT_NUM = "OutputNum"; // NOI18N
056:
057: String ACCUMULATIVE = "Accumulative"; // NOI18N
058: String TOOLTIP = "Tooltip"; // NOI18N
059: String LOCAL_NAME = "LocalName"; // NOI18N
060:
061: String BUNDLE_CLASS = "SystemFileSystem.localizingBundle"; // NOI18N
062: String FILE_ICON = "SystemFileSystem.icon"; // NOI18N
063:
064: String STRING_LITERAL = "string-literal";
065: String NUMBER_LITERAL = "number-literal";
066: String DURATION_LITERAL = "duration-literal";
067: String XPATH_LITERAL = "xpath_expression";
068:
069: /**
070: * The special constant to identify the Predicate element.
071: */
072: String IS_PREDICATE = "IsPredicate"; // NOI18N
073: String PREDICATE_MAIN_INPUT_TYPE = "node-set"; // NOI18N
074:
075: enum LiteralType {
076: NUMBER_LITERAL_TYPE("number"), STRING_LITERAL_TYPE("string"), XPATH_LITERAL_TYPE(
077: "xpath");
078:
079: private String myName;
080:
081: private LiteralType(String name) {
082: myName = name;
083: }
084:
085: public String getName() {
086: return myName;
087: }
088:
089: public static LiteralType findByName(String name) {
090: if (name == null || name.length() == 0) {
091: return null;
092: }
093: //
094: for (LiteralType type : values()) {
095: if (type.getName().equals(name)) {
096: return type;
097: }
098: }
099: //
100: return null;
101: }
102: }
103: }
|