io::zorba::api::xqj::ZorbaXQMetaData

ZorbaXQMetaData class provides information about the data source, in various aspects, such as the product name and version identification, supported features, specific behaviors, user information, product limits and so forth. An object from this class is obtained from the connection object by calling the getMetaData() method, for example:
 {.java}
   ZorbaXQMetaData metaData = connection.getMetaData();
   String productVersion = metaData.getProductVersion();
     ...
Since the metadata object depends on the connection, all its methods would raise an exception if the connection it is created from is no longer valid.

Private Attributes

XQConnection

connection

int

XQJ_MAJOR

int

XQJ_MINOR

Zorba

zorba

Public Functions

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 string)

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.

ZorbaXQMetaData(XQConnection conn)

Private Functions

void

isClosedXQException()

void

isNullXQException(Object value)

Private Attributes

connection

XQConnection connection

XQJ_MAJOR

int XQJ_MAJOR

XQJ_MINOR

int XQJ_MINOR

zorba

Zorba zorba

Public Functions

getMaxExpressionLength

int getMaxExpressionLength()

Gets the maximum number of characters allowed in an expression in this data source.

Returns

the maximum length of expression as an integer. A zero value means that there is no limit or the limit is unknown.

Parameters

XQException - if the connection is no longer valid

getMaxUserNameLength

int getMaxUserNameLength()

Gets the maximum number of characters allowed in a user name.

Returns

the maximum length of user name as an integer. A zero value means that there is no limit or the limit is unknown.

Parameters

XQException - if the connection is no longer valid

getProductMajorVersion

int getProductMajorVersion()

Gets the major version of this product.

Returns

a integer indicating the major version of this product

Parameters

XQException - if the connection is no longer valid

getProductMinorVersion

int getProductMinorVersion()

Gets the minor version of this product.

Returns

a integer indicating the minor version of this product

Parameters

XQException - if the connection is no longer valid

getProductName

String getProductName()

Gets the name of this product.

Returns

a string indicating the product name

Parameters

XQException - if the connection is no longer valid

getProductVersion

String getProductVersion()

Gets the full version of this product.

Returns

a string indicating the product version

Parameters

XQException - if the connection is no longer valid

getSupportedXQueryEncodings

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.

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.

Returns

a java.util.Set of java.lang.String, each of which is an XQuery query text encoding method

Parameters

XQException - if the connection is no longer valid

getUserName

String getUserName()

Gets the user name associated with this connection.

Returns

the user's name

Parameters

XQException - if the connection is no longer valid

getXQJMajorVersion

int getXQJMajorVersion()

Gets the major version number of XQJ specification supported by this implementation.

Returns

an integer indicating the XQJ major version

Parameters

XQException - if the connection is no longer valid

getXQJMinorVersion

int getXQJMinorVersion()

Gets the minor version number of XQJ specification supported by this implementation.

Returns

an integer indicating the XQJ minor version

Parameters

XQException - if the connection is no longer valid

getXQJVersion

String getXQJVersion()

Gets the full version of XQJ specification supported by this implementation.

Returns

a string indicating the version of XQJ specification

Parameters

XQException - if the connection is no longer valid

isFullAxisFeatureSupported

boolean isFullAxisFeatureSupported()

Query if XQuery full axis feature is supported in this connection.

Returns

true if so; otherwise false

Parameters

XQException - if the connection is no longer valid

isModuleFeatureSupported

boolean isModuleFeatureSupported()

Query if XQuery module feature is supported in this connection.

Returns

true if so; otherwise false

Parameters

XQException - if the connection is no longer valid

isReadOnly

boolean isReadOnly()

Query if the associated conection is restricted for read only use.

Returns

true if the associated connection is for read-only; false otherwise

Parameters

XQException - if the connection is no longer valid

isSchemaImportFeatureSupported

boolean isSchemaImportFeatureSupported()

Query if XQuery schema import feature is supported in this connection.

Returns

true if so; otherwise false

Parameters

XQException - if the connection is no longer valid

isSchemaValidationFeatureSupported

boolean isSchemaValidationFeatureSupported()

Query if XQuery schema validation feature is supported in this connection.

Returns

true if so; otherwise false

Parameters

XQException - if the connection is no longer valid

isSerializationFeatureSupported

boolean isSerializationFeatureSupported()

Query if XQuery serialization feature is supported in this connection.

Returns

true if so; otherwise false

Parameters

XQException - if the connection is no longer valid

isStaticTypingExtensionsSupported

boolean isStaticTypingExtensionsSupported()

Query if XQuery static typing extensions are supported in this connection.

Returns

true if so; otherwise false

Parameters

XQException - if the connection is no longer valid

isStaticTypingFeatureSupported

boolean isStaticTypingFeatureSupported()

Query if XQuery static typing feature is supported in this data source.

Returns

true if so; otherwise false

Parameters

XQException - if the connection is no longer valid

isTransactionSupported

boolean isTransactionSupported()

Query if transaction is supported in this data source.

Returns

true if so; otherwise false

Parameters

XQException - if the connection is no longer valid

isUserDefinedXMLSchemaTypeSupported

boolean isUserDefinedXMLSchemaTypeSupported()

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"

Returns

true if the user defined XML schema type is supported in this connection, false otherwise.

Parameters

XQException - if the connection is no longer valid

isXQueryEncodingDeclSupported

boolean isXQueryEncodingDeclSupported()

Query if the XQuery encoding declaration is supported by the XQJ implementation.

Returns

true if the XQuery encoding declaration is supported; false otherwise

Parameters

XQException - if the connection is no longer valid

isXQueryEncodingSupported

boolean isXQueryEncodingSupported(String string)

Query if a character encoding method of the XQuery query text is supported by the XQJ implmentation.

Parameters

string - String representing the character encoding method of the XQuery query text.

Returns

true if an XQuery query character encoding method is supported, false otherwise

Parameters

XQException - if (1) the connection is no longer valid, or (2) the specified encoding parameter is null

isXQueryXSupported

boolean isXQueryXSupported()

Query if XQueryX format is supported in this data source.

Returns

true if so; otherwise false

Parameters

XQException - if the connection is no longer valid

wasCreatedFromJDBCConnection

boolean wasCreatedFromJDBCConnection()

Query if this connection was created from a JDBC connection.

Returns

true, if this connection was created from a JDBC connection, false otherwise.

Parameters

XQException - if the connection is no longer valid

ZorbaXQMetaData

 ZorbaXQMetaData(XQConnection conn)

Private Functions

isClosedXQException

void isClosedXQException()

isNullXQException

void isNullXQException(Object value)