net.sf.saxon.xqj
Class SaxonXQMetaData

java.lang.Object
  extended by net.sf.saxon.xqj.SaxonXQMetaData
All Implemented Interfaces:
javax.xml.xquery.XQMetaData

public class SaxonXQMetaData
extends Object
implements javax.xml.xquery.XQMetaData

Saxon implementation of the XQMetaData interface


Constructor Summary
SaxonXQMetaData(SaxonXQConnection connection)
          Create the metadata for a given Saxon configuration
 
Method Summary
 int getMaxExpressionLength()
          Gets the maximum number of characters allowed in an expression in this data source.
 int getMaxUserNameLength()
          Gets the maximum number of characters allowed in a user name.
 int getProductMajorVersion()
          Gets the major version of this product.
 int getProductMinorVersion()
          Gets the minor version of this product.
 String getProductName()
          Gets the name of this product.
 String getProductVersion()
          Gets the full version of this product.
 Set getSupportedXQueryEncodings()
          Returns a set of java.lang.String, each of which specifies a character encoding method the XQJ implmentation supports to parse the XQuery query text.
 String getUserName()
          Gets the user name associated with this connection.
 int getXQJMajorVersion()
          Gets the major version number of XQJ specification supported by this implementation.
 int getXQJMinorVersion()
          Gets the minor version number of XQJ specification supported by this implementation.
 String getXQJVersion()
          Gets the full version of XQJ specification supported by this implementation.
 boolean isFullAxisFeatureSupported()
          Query if XQuery full axis feature is supported in this connection.
 boolean isModuleFeatureSupported()
          Query if XQuery module feature is supported in this connection.
 boolean isReadOnly()
          Query if the associated conection is restricted for read only use.
 boolean isSchemaImportFeatureSupported()
          Query if XQuery schema import feature is supported in this connection.
 boolean isSchemaValidationFeatureSupported()
          Query if XQuery schema validation feature is supported in this connection.
 boolean isSerializationFeatureSupported()
          Query if XQuery serialization feature is supported in this connection.
 boolean isStaticTypingExtensionsSupported()
          Query if XQuery static typing extensions are supported in this connection.
 boolean isStaticTypingFeatureSupported()
          Query if XQuery static typing feature is supported in this data source.
 boolean isTransactionSupported()
          Query if transaction is supported in this data source.
 boolean isUserDefinedXMLSchemaTypeSupported()
          Check if the user defined XML schema type is supported in this connection.
 boolean isXQueryEncodingDeclSupported()
          Query if the XQuery encoding declaration is supported by the XQJ implementation.
 boolean isXQueryEncodingSupported(String encoding)
          Query if a character encoding method of the XQuery query text is supported by the XQJ implmentation.
 boolean isXQueryXSupported()
          Query if XQueryX format is supported in this data source.
 boolean wasCreatedFromJDBCConnection()
          Query if this connection was created from a JDBC connection.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

SaxonXQMetaData

public SaxonXQMetaData(SaxonXQConnection connection)
Create the metadata for a given Saxon configuration

Parameters:
connection - the Saxon connection
Method Detail

getMaxExpressionLength

public int getMaxExpressionLength()
                           throws javax.xml.xquery.XQException
Description copied from interface: javax.xml.xquery.XQMetaData
Gets the maximum number of characters allowed in an expression in this data source.

Specified by:
getMaxExpressionLength in interface javax.xml.xquery.XQMetaData
Returns:
the maximum length of expression as an integer. A zero value means that there is no limit or the limit is unknown
Throws:
javax.xml.xquery.XQException - if the connection is no longer valid

getMaxUserNameLength

public int getMaxUserNameLength()
                         throws javax.xml.xquery.XQException
Description copied from interface: javax.xml.xquery.XQMetaData
Gets the maximum number of characters allowed in a user name.

Specified by:
getMaxUserNameLength in interface javax.xml.xquery.XQMetaData
Returns:
the maximum length of user name as an integer. A zero value means that there is no limit or the limit is unknown
Throws:
javax.xml.xquery.XQException - if the connection is no longer valid

getProductMajorVersion

public int getProductMajorVersion()
                           throws javax.xml.xquery.XQException
Description copied from interface: javax.xml.xquery.XQMetaData
Gets the major version of this product.

Specified by:
getProductMajorVersion in interface javax.xml.xquery.XQMetaData
Returns:
a integer indicating the major version of this product
Throws:
javax.xml.xquery.XQException - if the connection is no longer valid

getProductMinorVersion

public int getProductMinorVersion()
                           throws javax.xml.xquery.XQException
Description copied from interface: javax.xml.xquery.XQMetaData
Gets the minor version of this product.

Specified by:
getProductMinorVersion in interface javax.xml.xquery.XQMetaData
Returns:
a integer indicating the minor version of this product
Throws:
javax.xml.xquery.XQException - if the connection is no longer valid

getProductName

public String getProductName()
                      throws javax.xml.xquery.XQException
Description copied from interface: javax.xml.xquery.XQMetaData
Gets the name of this product. The value of string returned by this method is implementation-defined.

Specified by:
getProductName in interface javax.xml.xquery.XQMetaData
Returns:
a string indicating the product name
Throws:
javax.xml.xquery.XQException - if the connection is no longer valid

getProductVersion

public String getProductVersion()
                         throws javax.xml.xquery.XQException
Description copied from interface: javax.xml.xquery.XQMetaData
Gets the full version of this product. The format and value of the string returned by this method is implementation-defined.

Specified by:
getProductVersion in interface javax.xml.xquery.XQMetaData
Returns:
a string indicating the product version
Throws:
javax.xml.xquery.XQException - if the connection is no longer valid

getSupportedXQueryEncodings

public Set getSupportedXQueryEncodings()
                                throws javax.xml.xquery.XQException
Description copied from interface: javax.xml.xquery.XQMetaData
Returns a set of java.lang.String, each of which specifies a character encoding method the XQJ implmentation supports to parse the XQuery query text.
For an example, for an XQJ impmentation which is able to parse the XQuery encoded in "UTF-8" or "UTF-16", it returns a java.util.Set of "UTF-8" and "UTF-16". If the implemetation is not able to generate a list of encodings supported, an empty set is returned. If a non-empty set is returned, the encodings returned in this set are guaranteed to be supported. Note that encodings not in the returned set might also be supported. For example, if the set has two encoding methods: 'UTF-8' and 'UTF-16', they are supported by the implementation. However, this does not mean 'Shift-Js' is not supported. It might be supported.

Specified by:
getSupportedXQueryEncodings in interface javax.xml.xquery.XQMetaData
Returns:
a java.util.Set of java.lang.String, each of which is an XQuery query text encoding method
Throws:
javax.xml.xquery.XQException - if the connection is no longer valid

getUserName

public String getUserName()
                   throws javax.xml.xquery.XQException
Description copied from interface: javax.xml.xquery.XQMetaData
Gets the user name associated with this connection.

Specified by:
getUserName in interface javax.xml.xquery.XQMetaData
Returns:
the user's name
Throws:
javax.xml.xquery.XQException - if the connection is no longer valid

getXQJMajorVersion

public int getXQJMajorVersion()
                       throws javax.xml.xquery.XQException
Description copied from interface: javax.xml.xquery.XQMetaData
Gets the major version number of XQJ specification supported by this implementation.

Specified by:
getXQJMajorVersion in interface javax.xml.xquery.XQMetaData
Returns:
an integer indicating the XQJ major version
Throws:
javax.xml.xquery.XQException - if the connection is no longer valid

getXQJMinorVersion

public int getXQJMinorVersion()
                       throws javax.xml.xquery.XQException
Description copied from interface: javax.xml.xquery.XQMetaData
Gets the minor version number of XQJ specification supported by this implementation.

Specified by:
getXQJMinorVersion in interface javax.xml.xquery.XQMetaData
Returns:
an integer indicating the XQJ minor version
Throws:
javax.xml.xquery.XQException - if the connection is no longer valid

getXQJVersion

public String getXQJVersion()
                     throws javax.xml.xquery.XQException
Description copied from interface: javax.xml.xquery.XQMetaData
Gets the full version of XQJ specification supported by this implementation.

Specified by:
getXQJVersion in interface javax.xml.xquery.XQMetaData
Returns:
a string indicating the version of XQJ specification
Throws:
javax.xml.xquery.XQException - if the connection is no longer valid

isFullAxisFeatureSupported

public boolean isFullAxisFeatureSupported()
                                   throws javax.xml.xquery.XQException
Description copied from interface: javax.xml.xquery.XQMetaData
Query if XQuery full axis feature is supported in this connection.

Specified by:
isFullAxisFeatureSupported in interface javax.xml.xquery.XQMetaData
Returns:
true if so; otherwise false
Throws:
javax.xml.xquery.XQException - if the connection is no longer valid

isModuleFeatureSupported

public boolean isModuleFeatureSupported()
                                 throws javax.xml.xquery.XQException
Description copied from interface: javax.xml.xquery.XQMetaData
Query if XQuery module feature is supported in this connection.

Specified by:
isModuleFeatureSupported in interface javax.xml.xquery.XQMetaData
Returns:
true if so; otherwise false
Throws:
javax.xml.xquery.XQException - if the connection is no longer valid

isReadOnly

public boolean isReadOnly()
                   throws javax.xml.xquery.XQException
Description copied from interface: javax.xml.xquery.XQMetaData
Query if the associated conection is restricted for read only use.

Specified by:
isReadOnly in interface javax.xml.xquery.XQMetaData
Returns:
true if the associated connection is for read-only; false otherwise
Throws:
javax.xml.xquery.XQException - if the connection is no longer valid

isSchemaImportFeatureSupported

public boolean isSchemaImportFeatureSupported()
                                       throws javax.xml.xquery.XQException
Description copied from interface: javax.xml.xquery.XQMetaData
Query if XQuery schema import feature is supported in this connection.

Specified by:
isSchemaImportFeatureSupported in interface javax.xml.xquery.XQMetaData
Returns:
true if so; otherwise false
Throws:
javax.xml.xquery.XQException - if the connection is no longer valid

isSchemaValidationFeatureSupported

public boolean isSchemaValidationFeatureSupported()
                                           throws javax.xml.xquery.XQException
Description copied from interface: javax.xml.xquery.XQMetaData
Query if XQuery schema validation feature is supported in this connection.

Specified by:
isSchemaValidationFeatureSupported in interface javax.xml.xquery.XQMetaData
Returns:
true if so; otherwise false
Throws:
javax.xml.xquery.XQException - if the connection is no longer valid

isSerializationFeatureSupported

public boolean isSerializationFeatureSupported()
                                        throws javax.xml.xquery.XQException
Description copied from interface: javax.xml.xquery.XQMetaData
Query if XQuery serialization feature is supported in this connection.

Specified by:
isSerializationFeatureSupported in interface javax.xml.xquery.XQMetaData
Returns:
true if so; otherwise false
Throws:
javax.xml.xquery.XQException - if the connection is no longer valid

isStaticTypingExtensionsSupported

public boolean isStaticTypingExtensionsSupported()
                                          throws javax.xml.xquery.XQException
Description copied from interface: javax.xml.xquery.XQMetaData
Query if XQuery static typing extensions are supported in this connection.

Specified by:
isStaticTypingExtensionsSupported in interface javax.xml.xquery.XQMetaData
Returns:
true if so; otherwise false
Throws:
javax.xml.xquery.XQException - if the connection is no longer valid

isStaticTypingFeatureSupported

public boolean isStaticTypingFeatureSupported()
                                       throws javax.xml.xquery.XQException
Description copied from interface: javax.xml.xquery.XQMetaData
Query if XQuery static typing feature is supported in this data source.

Specified by:
isStaticTypingFeatureSupported in interface javax.xml.xquery.XQMetaData
Returns:
true if so; otherwise false
Throws:
javax.xml.xquery.XQException - if the connection is no longer valid

isTransactionSupported

public boolean isTransactionSupported()
                               throws javax.xml.xquery.XQException
Description copied from interface: javax.xml.xquery.XQMetaData
Query if transaction is supported in this data source.

Specified by:
isTransactionSupported in interface javax.xml.xquery.XQMetaData
Returns:
true if so; otherwise false
Throws:
javax.xml.xquery.XQException - if the connection is no longer valid

isUserDefinedXMLSchemaTypeSupported

public boolean isUserDefinedXMLSchemaTypeSupported()
                                            throws javax.xml.xquery.XQException
Description copied from interface: javax.xml.xquery.XQMetaData
Check if the user defined XML schema type is supported in this connection. If this method returns true, then XQItemAccessor.instanceOf(XQItemType) must be able to determine if the type of an XQItemAccessor is an instance of the XQItemType even if either of them is a user defined XML schema type which is defined by the non-predefined XML schema. The pre-defined XML Schema refers to the XML schema whose schema URL is "http://www.w3.org/2001/XMLSchema"

Specified by:
isUserDefinedXMLSchemaTypeSupported in interface javax.xml.xquery.XQMetaData
Returns:
true if the user defined XML schema type is supported in this connection, false otherwise.
Throws:
javax.xml.xquery.XQException - if the connection is no longer valid

isXQueryEncodingDeclSupported

public boolean isXQueryEncodingDeclSupported()
                                      throws javax.xml.xquery.XQException
Description copied from interface: javax.xml.xquery.XQMetaData
Query if the XQuery encoding declaration is supported by the XQJ implementation.

Specified by:
isXQueryEncodingDeclSupported in interface javax.xml.xquery.XQMetaData
Returns:
true if the XQuery encoding declaration is supported; false otherwise
Throws:
javax.xml.xquery.XQException - if the connection is no longer valid

isXQueryEncodingSupported

public boolean isXQueryEncodingSupported(String encoding)
                                  throws javax.xml.xquery.XQException
Description copied from interface: javax.xml.xquery.XQMetaData
Query if a character encoding method of the XQuery query text is supported by the XQJ implmentation.

Specified by:
isXQueryEncodingSupported in interface javax.xml.xquery.XQMetaData
Parameters:
encoding - String representing the character encoding method of the XQuery query text.
Returns:
true if an XQuery query character encoding method is supported, false otherwise
Throws:
javax.xml.xquery.XQException - if (1) the connection is no longer valid, or (2) the specified encoding parameter is null

isXQueryXSupported

public boolean isXQueryXSupported()
                           throws javax.xml.xquery.XQException
Description copied from interface: javax.xml.xquery.XQMetaData
Query if XQueryX format is supported in this data source.

Specified by:
isXQueryXSupported in interface javax.xml.xquery.XQMetaData
Returns:
true if so; otherwise false
Throws:
javax.xml.xquery.XQException - if the connection is no longer valid

wasCreatedFromJDBCConnection

public boolean wasCreatedFromJDBCConnection()
                                     throws javax.xml.xquery.XQException
Description copied from interface: javax.xml.xquery.XQMetaData
Query if this connection was created from a JDBC connection.

Specified by:
wasCreatedFromJDBCConnection in interface javax.xml.xquery.XQMetaData
Returns:
true, if this connection was created from a JDBC connection, false otherwise.
Throws:
javax.xml.xquery.XQException - if the connection is no longer valid


Copyright (c) Saxonica Limited. All rights reserved.