
org.deri.xquery.XQueryEvaluator Maven / Gradle / Ivy
The newest version!
/**
*
* Copyright (C) 2011, NUI Galway.
* All rights reserved.
*
* The software in this package is published under the terms of the BSD style license a copy of which has been included
* with this distribution in the bsb_license.txt file and/or available on NUI Galway Server at
* http://xsparql.deri.ie/license/bsd_license.txt
*
* Created: 09 February 2011, Reasoning and Querying Unit (URQ), Digital Enterprise Research Institute (DERI) on behalf of
* NUI Galway.
*/
package org.deri.xquery;
import java.io.InputStream;
import java.io.OutputStream;
import java.io.Reader;
import java.io.Writer;
import java.util.Map;
import javax.xml.transform.Source;
import org.deri.sql.SQLQuery;
/**
* Evaluate an XQuery query.
*
* Usage: 1) use the setter methods to influence the evaluation 2) call one of
* the evaluate methods
*
*
* Created: Tue Sep 28 15:10:26 2010
*
* @author Nuno Lopes
* @version 1.0
*/
public interface XQueryEvaluator {
public void setExternalVariables(Map xqueryExternalVars);
/**
* Set to true
the XQuery engine is validating
*
* @param validatingXQuery
* true
to use a validating XQuery engine
*/
public void setValidatingXQuery(boolean validatingXQuery);
/**
* Set source for the query.
*
* @param source
* Source of the query.
*/
public void setSource(Source source);
/**
* Evaluate XQuery query query
and output the result to
* out
.
*
* @param query
* XQuery query
* @param out
* OutputStream for the query result
* @throws Exception
*/
public String evaluate(final String query) throws Exception;
public void evaluate(final InputStream query, OutputStream out)
throws Exception;
public void evaluate(final Reader query, Writer out) throws Exception;
/**
* Set to true
to omit XML declaration in the beginning of the
* result
*
* @param xmloutput
*/
public void setOmitXMLDecl(final boolean xmloutput);
/**
* Instanciate the output method of the specific xquery evaluator
*
*/
public void setOutputMethod(String outputMethod);
public void setDBconnection(SQLQuery q);
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy