Package javax.xml.xquery
Interface XQMetaData
-
- All Known Implementing Classes:
SaxonXQMetaData
public interface XQMetaDataXQMetaDatainterface 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 implementing this interface is obtained from the connection object by calling thegetMetaData()method, for example:
XQMetaData 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.- See Also:
XQConnection
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description intgetMaxExpressionLength()Gets the maximum number of characters allowed in an expression in this data source.intgetMaxUserNameLength()Gets the maximum number of characters allowed in a user name.intgetProductMajorVersion()Gets the major version of this product.intgetProductMinorVersion()Gets the minor version of this product.java.lang.StringgetProductName()Gets the name of this product.java.lang.StringgetProductVersion()Gets the full version of this product.java.util.SetgetSupportedXQueryEncodings()Returns a set ofjava.lang.String, each of which specifies a character encoding method the XQJ implmentation supports to parse the XQuery query text.java.lang.StringgetUserName()Gets the user name associated with this connection.intgetXQJMajorVersion()Gets the major version number of XQJ specification supported by this implementation.intgetXQJMinorVersion()Gets the minor version number of XQJ specification supported by this implementation.java.lang.StringgetXQJVersion()Gets the full version of XQJ specification supported by this implementation.booleanisFullAxisFeatureSupported()Query if XQuery full axis feature is supported in this connection.booleanisModuleFeatureSupported()Query if XQuery module feature is supported in this connection.booleanisReadOnly()Query if the associated conection is restricted for read only use.booleanisSchemaImportFeatureSupported()Query if XQuery schema import feature is supported in this connection.booleanisSchemaValidationFeatureSupported()Query if XQuery schema validation feature is supported in this connection.booleanisSerializationFeatureSupported()Query if XQuery serialization feature is supported in this connection.booleanisStaticTypingExtensionsSupported()Query if XQuery static typing extensions are supported in this connection.booleanisStaticTypingFeatureSupported()Query if XQuery static typing feature is supported in this data source.booleanisTransactionSupported()Query if transaction is supported in this data source.booleanisUserDefinedXMLSchemaTypeSupported()Check if the user defined XML schema type is supported in this connection.booleanisXQueryEncodingDeclSupported()Query if the XQuery encoding declaration is supported by the XQJ implementation.booleanisXQueryEncodingSupported(java.lang.String encoding)Query if a character encoding method of the XQuery query text is supported by the XQJ implmentation.booleanisXQueryXSupported()Query if XQueryX format is supported in this data source.booleanwasCreatedFromJDBCConnection()Query if this connection was created from a JDBC connection.
-
-
-
Method Detail
-
getProductMajorVersion
int getProductMajorVersion() throws XQExceptionGets the major version of this product.- Returns:
- a integer indicating the major version of this product
- Throws:
XQException- if the connection is no longer valid
-
getProductMinorVersion
int getProductMinorVersion() throws XQExceptionGets the minor version of this product.- Returns:
- a integer indicating the minor version of this product
- Throws:
XQException- if the connection is no longer valid
-
getProductName
java.lang.String getProductName() throws XQExceptionGets the name of this product. The value of string returned by this method is implementation-defined.- Returns:
- a string indicating the product name
- Throws:
XQException- if the connection is no longer valid
-
getProductVersion
java.lang.String getProductVersion() throws XQExceptionGets the full version of this product. The format and value of the string returned by this method is implementation-defined.- Returns:
- a string indicating the product version
- Throws:
XQException- if the connection is no longer valid
-
getXQJMajorVersion
int getXQJMajorVersion() throws XQExceptionGets the major version number of XQJ specification supported by this implementation.- Returns:
- an integer indicating the XQJ major version
- Throws:
XQException- if the connection is no longer valid
-
getXQJMinorVersion
int getXQJMinorVersion() throws XQExceptionGets the minor version number of XQJ specification supported by this implementation.- Returns:
- an integer indicating the XQJ minor version
- Throws:
XQException- if the connection is no longer valid
-
getXQJVersion
java.lang.String getXQJVersion() throws XQExceptionGets the full version of XQJ specification supported by this implementation.- Returns:
- a string indicating the version of XQJ specification
- Throws:
XQException- if the connection is no longer valid
-
isReadOnly
boolean isReadOnly() throws XQExceptionQuery if the associated conection is restricted for read only use.- Returns:
trueif the associated connection is for read-only;falseotherwise- Throws:
XQException- if the connection is no longer valid
-
isXQueryXSupported
boolean isXQueryXSupported() throws XQExceptionQuery if XQueryX format is supported in this data source.- Returns:
trueif so; otherwisefalse- Throws:
XQException- if the connection is no longer valid
-
isTransactionSupported
boolean isTransactionSupported() throws XQExceptionQuery if transaction is supported in this data source.- Returns:
trueif so; otherwisefalse- Throws:
XQException- if the connection is no longer valid
-
isStaticTypingFeatureSupported
boolean isStaticTypingFeatureSupported() throws XQExceptionQuery if XQuery static typing feature is supported in this data source.- Returns:
trueif so; otherwisefalse- Throws:
XQException- if the connection is no longer valid
-
isSchemaImportFeatureSupported
boolean isSchemaImportFeatureSupported() throws XQExceptionQuery if XQuery schema import feature is supported in this connection.- Returns:
trueif so; otherwisefalse- Throws:
XQException- if the connection is no longer valid
-
isSchemaValidationFeatureSupported
boolean isSchemaValidationFeatureSupported() throws XQExceptionQuery if XQuery schema validation feature is supported in this connection.- Returns:
trueif so; otherwisefalse- Throws:
XQException- if the connection is no longer valid
-
isFullAxisFeatureSupported
boolean isFullAxisFeatureSupported() throws XQExceptionQuery if XQuery full axis feature is supported in this connection.- Returns:
trueif so; otherwisefalse- Throws:
XQException- if the connection is no longer valid
-
isModuleFeatureSupported
boolean isModuleFeatureSupported() throws XQExceptionQuery if XQuery module feature is supported in this connection.- Returns:
trueif so; otherwisefalse- Throws:
XQException- if the connection is no longer valid
-
isSerializationFeatureSupported
boolean isSerializationFeatureSupported() throws XQExceptionQuery if XQuery serialization feature is supported in this connection.- Returns:
trueif so; otherwisefalse- Throws:
XQException- if the connection is no longer valid
-
isStaticTypingExtensionsSupported
boolean isStaticTypingExtensionsSupported() throws XQExceptionQuery if XQuery static typing extensions are supported in this connection.- Returns:
trueif so; otherwisefalse- Throws:
XQException- if the connection is no longer valid
-
getUserName
java.lang.String getUserName() throws XQExceptionGets the user name associated with this connection.- Returns:
- the user's name
- Throws:
XQException- if the connection is no longer valid
-
getMaxExpressionLength
int getMaxExpressionLength() throws XQExceptionGets 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
- Throws:
XQException- if the connection is no longer valid
-
getMaxUserNameLength
int getMaxUserNameLength() throws XQExceptionGets 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
- Throws:
XQException- if the connection is no longer valid
-
wasCreatedFromJDBCConnection
boolean wasCreatedFromJDBCConnection() throws XQExceptionQuery if this connection was created from a JDBC connection.- Returns:
true, if this connection was created from a JDBC connection,falseotherwise.- Throws:
XQException- if the connection is no longer valid
-
isXQueryEncodingDeclSupported
boolean isXQueryEncodingDeclSupported() throws XQExceptionQuery if the XQuery encoding declaration is supported by the XQJ implementation.- Returns:
trueif the XQuery encoding declaration is supported;falseotherwise- Throws:
XQException- if the connection is no longer valid
-
getSupportedXQueryEncodings
java.util.Set getSupportedXQueryEncodings() throws XQExceptionReturns a set ofjava.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 ajava.util.Setof "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.Setofjava.lang.String, each of which is an XQuery query text encoding method - Throws:
XQException- if the connection is no longer valid
-
isXQueryEncodingSupported
boolean isXQueryEncodingSupported(java.lang.String encoding) throws XQExceptionQuery if a character encoding method of the XQuery query text is supported by the XQJ implmentation.- Parameters:
encoding-Stringrepresenting the character encoding method of the XQuery query text.- Returns:
trueif an XQuery query character encoding method is supported,falseotherwise- Throws:
XQException- if (1) the connection is no longer valid, or (2) the specifiedencodingparameter isnull
-
isUserDefinedXMLSchemaTypeSupported
boolean isUserDefinedXMLSchemaTypeSupported() throws XQExceptionCheck if the user defined XML schema type is supported in this connection. If this method returnstrue, thenXQItemAccessor.instanceOf(XQItemType)must be able to determine if the type of anXQItemAccessoris an instance of theXQItemTypeeven 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:
trueif the user defined XML schema type is supported in this connection,falseotherwise.- Throws:
XQException- if the connection is no longer valid
-
-