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.xml.xpath.ext;
021:
022: import javax.xml.namespace.QName;
023:
024: /**
025: * XPathModel helper class.
026: *
027: * @author Enrico Lelina
028: * @version
029: */
030: public interface XPathModelFactory {
031:
032: /**
033: * Instantiates a new XPathStringLiteral object.
034: * @param value the value
035: * @return a new XPathStringLiteral object instance
036: */
037: XPathStringLiteral newXPathStringLiteral(String value);
038:
039: /**
040: * Instantiates a new XPathNumericLiteral object.
041: * @param value the value
042: * @return a new XPathNumericLiteral object instance
043: */
044: XPathNumericLiteral newXPathNumericLiteral(Number value);
045:
046: /**
047: * Instantiates a new XPathCoreFunction object.
048: * @param function the function code
049: * @return a new XPathCoreFunction object instance
050: */
051: XPathCoreFunction newXPathCoreFunction(CoreFunctionType functionType);
052:
053: /**
054: * Instantiates a new XPathExtension Function object.
055: * @param name the function name. It can contain a prefix.
056: * @return a new XPathExtensionFunction object instance
057: */
058: XPathExtensionFunction newXPathExtensionFunction(QName name);
059:
060: /**
061: * Instantiates a new XPathCoreOperation object.
062: * @param code the operation code
063: * @return a new XPathCoreOperatoin object instance
064: */
065: XPathCoreOperation newXPathCoreOperation(CoreOperationType code);
066:
067: /**
068: * Instantiates a new XPathLocationPath object.
069: * @param steps the steps
070: * @return a new XPathLocationPath object instance
071: */
072: XPathLocationPath newXPathLocationPath(LocationStep[] steps);
073:
074: /**
075: * Instantiates a new XPathExpressionPath object.
076: * @param rootExpression root expression if any
077: * @param steps the steps
078: * @return a new XPathLocationPath object instance
079: */
080: XPathExpressionPath newXPathExpressionPath(
081: XPathExpression rootExpression, LocationStep[] steps);
082:
083: /**
084: * Instantiates a new XPathStringLiteral object of the variable type.
085: * @param steps the steps
086: * @return a new XPathStringLiteral object instance
087: */
088: XPathVariableReference newXPathVariableReference(QName varQName);
089:
090: /**
091: * Instantiates a new XPathPredicateExpression object for given expression.
092: * @param expression which is a predicate expression
093: * @return a new XPathPredicateExpression object instance
094: */
095: XPathPredicateExpression newXPathPredicateExpression(
096: XPathExpression expression);
097:
098: LocationStep newLocationStep(XPathAxis axis, StepNodeTest nodeTest,
099: XPathPredicateExpression[] predicates);
100:
101: }
|