Package javax.xml.xquery

Examples of javax.xml.xquery.XQException


                return node;
            } else {
                throw new XPathException("Java object cannot be converted to an XQuery value");
            }
        } catch (XPathException e) {
            XQException xqe = new XQException(e.getMessage());
            xqe.initCause(e);
            throw xqe;
        }
    }
View Full Code Here


    public Item convertToItem(Object value, XQItemType type) throws XQException {
        if (((SaxonXQItemType)type).getSaxonItemType() instanceof ExternalObjectType) {
            return new ObjectValue(value, ((ExternalObjectType)((SaxonXQItemType)type).getSaxonItemType()));
        } else {
            throw new XQException("Supplied Java object cannot be converted to an XQItem");
        }
    }
View Full Code Here

        //
    }

    public void executeCommand(Reader command) throws XQException {
        checkNotClosed();
        throw new XQException("Saxon does not recognize any non-XQuery commands");
    }
View Full Code Here

        throw new XQException("Saxon does not recognize any non-XQuery commands");
    }

    public void executeCommand(String command) throws XQException {
        checkNotClosed();
        throw new XQException("Saxon does not recognize any non-XQuery commands");
    }
View Full Code Here

            StaticQueryContext env = sqc.getSaxonStaticQueryContext();
            XQueryExpression exp = env.compileQuery(query, null);
            SaxonXQPreparedExpression pe = new SaxonXQPreparedExpression(connection, exp, sqc, context);
            return pe.executeQuery();
        } catch (XPathException e) {
            XQException xqe = new XQException(e.getMessage());
            xqe.initCause(e);
            throw xqe;
        } catch (IOException e) {
            XQException xqe = new XQException(e.getMessage());
            xqe.initCause(e);
            throw xqe;
        }
    }
View Full Code Here

            StaticQueryContext env = sqc.getSaxonStaticQueryContext();
            XQueryExpression exp = env.compileQuery(query);
            SaxonXQPreparedExpression pe = new SaxonXQPreparedExpression(connection, exp, sqc, context);
            return pe.executeQuery();
        } catch (XPathException e) {
            XQException xqe = new XQException(e.getMessage());
            xqe.initCause(e);
            throw xqe;
        } catch (IOException e) {
            XQException xqe = new XQException(e.getMessage());
            xqe.initCause(e);
            throw xqe;
        }
    }
View Full Code Here

            SaxonXQPreparedExpression pe = new SaxonXQPreparedExpression(connection, exp, sqc, context);
            XQResultSequence result = pe.executeQuery();
            ((Closable)result).setClosableContainer(this);
            return result;
        } catch (XPathException e) {
            XQException xqe = new XQException(e.getMessage());
            xqe.initCause(e);
            throw xqe;
        }
    }
View Full Code Here

     * @throws XQException The Saxon implementation of this method always throws
     * an XQException, indicating that Saxon does not support connection to a JDBC data source.
     */

    public XQConnection getConnection(Connection con) throws XQException {
        throw new XQException("Saxon cannot connect to a SQL data source");
    }
View Full Code Here

        } else if ("xmlVersion".equals(name)) {
            return getXmlVersion();
        } else if ("xsdVersion".equals(name)) {
            return getXsdVersion();
        }
        throw new XQException("Property " + name + " is not recognized");
    }
View Full Code Here

            } else if ("xmlVersion".equals(name)) {
                setXmlVersion(value);
            } else if ("xsdVersion".equals(name)) {
                setXsdVersion(value);
            } else {
                throw new XQException("Property " + name + " is not recognized");
            }
        } catch (IllegalArgumentException err) {
            throw new XQException("Invalid value for " + name + ": " + err.getMessage());
        }
    }
View Full Code Here

TOP

Related Classes of javax.xml.xquery.XQException

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.