All Downloads are FREE. Search and download functionalities are using the official Maven repository.

org.exist.interpreter.IPathExpr Maven / Gradle / Ivy

There is a newer version: 6.3.0
Show newest version
/*
 * eXist-db Open Source Native XML Database
 * Copyright (C) 2001 The eXist-db Authors
 *
 * [email protected]
 * http://www.exist-db.org
 *
 * This library is free software; you can redistribute it and/or
 * modify it under the terms of the GNU Lesser General Public
 * License as published by the Free Software Foundation; either
 * version 2.1 of the License, or (at your option) any later version.
 *
 * This library is distributed in the hope that it will be useful,
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
 * Lesser General Public License for more details.
 *
 * You should have received a copy of the GNU Lesser General Public
 * License along with this library; if not, write to the Free Software
 * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301  USA
 */
package org.exist.interpreter;

import java.io.Writer;
import java.util.List;

import org.exist.dom.persistent.DocumentSet;
import org.exist.xquery.Expression;

public interface IPathExpr extends Expression {

	/**
	 * Add an arbitrary expression to this object's list of child-expressions.
	 * 
	 * @param expr the expression.
	 */
	public void add(Expression expr);

	/**
	 * Add all the child-expressions from another PathExpr to this object's
	 * child-expressions.
	 * 
	 * @param path the path expression.
	 */
	public void add(IPathExpr path);

	/**
	 * Add another PathExpr to this object's expression list.
	 *
	 * @param path the path expression.
	 */
	public void addPath(IPathExpr path);

	/**
	 * Add a predicate expression to the list of expressions. The predicate is
	 * added to the last expression in the list.
	 * 
	 * @param pred the predicate.
	 */
	public void addPredicate(IPredicate pred);

	/**
	 * Replace the given expression by a new expression.
	 *
	 * @param oldExpr the old expression
	 * @param newExpr the new expression to replace the old
	 */
	public void replaceExpression(Expression oldExpr, Expression newExpr);

	public Expression getParent();

	public DocumentSet getDocumentSet();

	/**
	 * @deprecated use {@link #getSubExpression(int)}
	 *
	 * @param pos the position of the expression.
	 *
	 * @return the expression
	 */
	@Deprecated
	public Expression getExpression(int pos);

	public Expression getLastExpression();

	/**
	 * @deprecated use {@link #getSubExpressionCount()}
	 *
	 * @return the length of the path expression
	 */
	@Deprecated
	public int getLength();

	public void setUseStaticContext(boolean staticContext);

	public void accept(ExpressionVisitor visitor);

	public void replaceLastExpression(Expression s);

	public String getLiteralValue();

	public void reset();

	public boolean isValid();

	public void dump(Writer writer);

	public void setContext(Context context);

	public List getSteps();

}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy