|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectnet.sf.saxon.xqj.SaxonXQDataSource
public class SaxonXQDataSource
Saxon implementation of the XQJ XQDataSource interface. The first action of a client application is to instantiate a SaxonXQDataSource. This is done directly: there is no factory class as with JAXP. An application that does not want compile-time references to the Saxon XQJ implementation can instantiate this class dynamically using the reflection API (class.newInstance()).
For full Javadoc descriptions of the public methods, see the XQJ specification.
Constructor Summary | |
---|---|
SaxonXQDataSource()
Create a SaxonXQDataSource using a default configuration. |
|
SaxonXQDataSource(Configuration config)
Create a Saxon XQDataSource with a specific configuration |
Method Summary | |
---|---|
(package private) static void |
checkNotNull(java.lang.Object arg,
java.lang.String name)
|
java.lang.String |
getAllowExternalFunctions()
Ask whether queries are allowed to call external functions. |
Configuration |
getConfiguration()
Get the Saxon Configuration in use. |
javax.xml.xquery.XQConnection |
getConnection()
|
javax.xml.xquery.XQConnection |
getConnection(java.sql.Connection con)
Get a connection based on an underlying JDBC connection |
javax.xml.xquery.XQConnection |
getConnection(java.lang.String username,
java.lang.String password)
Get a connection, by supplying a username and password. |
java.lang.String |
getDtdValidation()
Ask whether source documents are to be parsed with DTD validation enabled |
java.lang.String |
getExpandAttributeDefaults()
Ask whether fixed or default values defined in a schema or DTD will be expanded |
java.lang.String |
getExpandXInclude()
Ask whether XInclude processing is to be applied to source documents |
int |
getLoginTimeout()
|
java.io.PrintWriter |
getLogWriter()
|
java.lang.String |
getProperty(java.lang.String name)
Get a configuration property setting. |
java.lang.String |
getRetainLineNumbers()
Ask whether line and column information will be retained for source documents |
java.lang.String |
getSchemaValidationMode()
Ask whether source documents will be validated against a schema |
java.lang.String |
getStripWhitespace()
Ask whether whitespace will be stripped when loading source documents |
java.lang.String[] |
getSupportedPropertyNames()
|
java.lang.String |
getUseXsiSchemaLocation()
Ask whether the schema processor is to take account of xsi:schemaLocation and xsi:noNamespaceSchemaLocation attributes encountered in an instance document being validated |
java.lang.String |
getXmlVersion()
Ask whether XML 1.0 or XML 1.1 rules for XML names are to be followed |
java.lang.String |
getXsdVersion()
Ask whether XML Schema 1.0 syntax must be used or whether XML Schema 1.1 features are allowed |
void |
setAllowExternalFunctions(java.lang.String value)
Say whether queries are allowed to call external functions. |
void |
setDtdValidation(java.lang.String value)
Say whether source documents are to be parsed with DTD validation enabled |
void |
setExpandAttributeDefaults(java.lang.String value)
Say whether whether fixed and default values defined in a schema or DTD will be expanded. |
void |
setExpandXInclude(java.lang.String value)
Say whether XInclude processing is to be applied to source documents |
void |
setLoginTimeout(int seconds)
|
void |
setLogWriter(java.io.PrintWriter out)
|
void |
setProperties(java.util.Properties props)
|
void |
setProperty(java.lang.String name,
java.lang.String value)
Set a configuration property. |
void |
setRetainLineNumbers(java.lang.String value)
Say whether source documents should have line and column information retained. |
void |
setSchemaValidationMode(java.lang.String value)
Say whether source documents should be validated against a schema |
void |
setStripWhitespace(java.lang.String value)
Say whether whitespace should be stripped when loading source documents |
void |
setUseXsiSchemaLocation(java.lang.String value)
Say whether the schema processor is to take account of xsi:schemaLocation and xsi:noNamespaceSchemaLocation attributes encountered in an instance document being validated |
void |
setXmlVersion(java.lang.String value)
Say whether XML 1.0 or XML 1.1 rules for XML names are to be followed |
void |
setXsdVersion(java.lang.String value)
Say whether XML Schema 1.0 syntax must be used or whether XML Schema 1.1 features are allowed |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public SaxonXQDataSource()
public SaxonXQDataSource(Configuration config)
config
- The Saxon configuration to be usedMethod Detail |
---|
public Configuration getConfiguration()
public javax.xml.xquery.XQConnection getConnection() throws javax.xml.xquery.XQException
getConnection
in interface javax.xml.xquery.XQDataSource
javax.xml.xquery.XQException
public javax.xml.xquery.XQConnection getConnection(java.sql.Connection con) throws javax.xml.xquery.XQException
getConnection
in interface javax.xml.xquery.XQDataSource
con
- the JDBC connection
javax.xml.xquery.XQException
- The Saxon implementation of this method always throws
an XQException, indicating that Saxon does not support connection to a JDBC data source.public javax.xml.xquery.XQConnection getConnection(java.lang.String username, java.lang.String password) throws javax.xml.xquery.XQException
getConnection
in interface javax.xml.xquery.XQDataSource
username
- the user namepassword
- the password
javax.xml.xquery.XQException
public int getLoginTimeout()
getLoginTimeout
in interface javax.xml.xquery.XQDataSource
public java.io.PrintWriter getLogWriter()
getLogWriter
in interface javax.xml.xquery.XQDataSource
public java.lang.String getProperty(java.lang.String name) throws javax.xml.xquery.XQException
getProperty("dtdValidation")
returns the same result as getDtdValidation()
.
Further Saxon configuration properties are available via the Saxon Configuration
object,
which can be obtained using the getConfiguration()
method.
getProperty
in interface javax.xml.xquery.XQDataSource
name
- the name of the configuration property
javax.xml.xquery.XQException
public java.lang.String[] getSupportedPropertyNames()
getSupportedPropertyNames
in interface javax.xml.xquery.XQDataSource
public void setLoginTimeout(int seconds) throws javax.xml.xquery.XQException
setLoginTimeout
in interface javax.xml.xquery.XQDataSource
javax.xml.xquery.XQException
public void setLogWriter(java.io.PrintWriter out) throws javax.xml.xquery.XQException
setLogWriter
in interface javax.xml.xquery.XQDataSource
javax.xml.xquery.XQException
public void setProperties(java.util.Properties props) throws javax.xml.xquery.XQException
setProperties
in interface javax.xml.xquery.XQDataSource
javax.xml.xquery.XQException
public void setProperty(java.lang.String name, java.lang.String value) throws javax.xml.xquery.XQException
setProperty("dtdValidation", "true")
has the same effect as
setDtdValidation("true")
.
Further Saxon configuration properties can be set via the Saxon Configuration
object,
which can be obtained using the getConfiguration()
method.
setProperty
in interface javax.xml.xquery.XQDataSource
name
- the name of the configuration propertyvalue
- the value of the configuration property
javax.xml.xquery.XQException
static void checkNotNull(java.lang.Object arg, java.lang.String name) throws javax.xml.xquery.XQException
javax.xml.xquery.XQException
public void setAllowExternalFunctions(java.lang.String value)
value
- set to "true" if external function calls are allowed (default) or "false" otherwisepublic java.lang.String getAllowExternalFunctions()
public void setDtdValidation(java.lang.String value)
value
- "true" if DTD validation is to be enabled, otherwise "false". Default is "false".public java.lang.String getDtdValidation()
public void setExpandAttributeDefaults(java.lang.String value)
value
- "true" if default values are to be expanded, otherwise "false". Default is "true".public java.lang.String getExpandAttributeDefaults()
public void setExpandXInclude(java.lang.String value)
value
- "true" if XInclude directives are to expanded, otherwise "false". Default is "false".public java.lang.String getExpandXInclude()
public void setRetainLineNumbers(java.lang.String value)
saxon:line-number()
and
saxon:column-number()
value
- "true" if line and column information is to be retained, otherwise "false". Default is "false".public java.lang.String getRetainLineNumbers()
public void setSchemaValidationMode(java.lang.String value)
value
- set to "strict" if source documents are to be subjected to strict validation,
"lax" if source documents are to be subjected to lax validation, "skip" if source documents
are not to be subjected to schema validationpublic java.lang.String getSchemaValidationMode()
public void setStripWhitespace(java.lang.String value)
value
- "all" if all whitespace text nodes are to be stripped, "ignorable" if
only whitespace text nodes in elements defined in a schema or DTD as having element-only
content are to be stripped, "none" if no whitespace text nodes are to be strippedpublic java.lang.String getStripWhitespace()
public void setUseXsiSchemaLocation(java.lang.String value)
value
- set to "true" if these attributes are to be recognized (default) or "false" otherwisepublic java.lang.String getUseXsiSchemaLocation()
public void setXmlVersion(java.lang.String value)
value
- "1.0" (default) if XML 1.0 rules are to be used, "1.1" if XML 1.1
rules applypublic java.lang.String getXmlVersion()
public void setXsdVersion(java.lang.String value)
value
- "1.0" (default) if XML Schema 1.0 rules are to be followed, "1.1" if XML Schema 1.1
features may be usedpublic java.lang.String getXsdVersion()
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |