16 package org.zorbaxquery.api.xqj;
18 import java.util.HashSet;
20 import javax.xml.xquery.XQConnection;
21 import javax.xml.xquery.XQException;
22 import org.zorbaxquery.api.Zorba;
38 private int XQJ_MAJOR = 1;
39 private int XQJ_MINOR = 1;
41 private XQConnection connection;
44 if (conn.isClosed()) {
45 throw new XQException(
"This connection is closed");
48 zorba = ((org.zorbaxquery.api.xqj.ZorbaXQConnection)connection).getZorbaInstance();
58 isClosedXQException();
59 return zorba.getMajorVersion();
69 isClosedXQException();
70 return zorba.getMinorVersion();
80 isClosedXQException();
81 return "Zorba - The XQuery Processor";
91 isClosedXQException();
92 return zorba.getVersion();
102 isClosedXQException();
113 isClosedXQException();
124 isClosedXQException();
125 return new String().concat(
new Integer(XQJ_MAJOR).toString()).concat(
".").concat(
new Integer(XQJ_MINOR).toString());
135 isClosedXQException();
146 isClosedXQException();
147 return zorba.isXQueryXSupported();
157 isClosedXQException();
168 isClosedXQException();
179 isClosedXQException();
190 isClosedXQException();
201 isClosedXQException();
212 isClosedXQException();
223 isClosedXQException();
234 isClosedXQException();
245 isClosedXQException();
256 isClosedXQException();
267 isClosedXQException();
278 isClosedXQException();
289 isClosedXQException();
302 isClosedXQException();
303 Set<String> set =
new HashSet<String>();
317 isClosedXQException();
318 isNullXQException(
string);
319 return string.equals(
"UTF8");
331 isClosedXQException();
335 private void isClosedXQException() throws XQException {
336 if (connection.isClosed()) {
337 throw new XQException(
"This connection is closed");
340 private void isNullXQException(Object value)
throws XQException {
342 throw new XQException(
"Parameter shouldn't be null");