public class XMLType
extends oracle.sql.OPAQUE
implements oracle.jdbc.internal.XMLTypeIntf
| Modifier and Type | Field and Description |
|---|---|
static int |
_SQL_TYPECODE
Deprecated.
|
static int |
CONNTYPE_KPRB
Deprecated.
|
static int |
CONNTYPE_OCI8
Deprecated.
|
static int |
CONNTYPE_THIN
Deprecated.
|
static java.lang.String |
DECODE_ON_CLIENT
Client-side binary XML decoding property name.
|
static int |
DEF_INDENT
Deprecated.
|
static java.lang.String |
ENCODE_ON_CLIENT
Client-side binary XML encoding property name.
|
static int |
MAX_INDENT
Deprecated.
|
static int |
MAX_PFLAG
Deprecated.
|
static int |
PRINT_DEFAULT_PROPERTY
Deprecated.
|
static int |
PRINT_NOPRETTY
Deprecated.
|
static int |
PRINT_PRETTY
Deprecated.
|
static int |
XMLTYPE_PICKLE_AS_BINXML |
static int |
XMLTYPE_PICKLE_AS_TEXT
Flags to specify pickle preference, used in setPicklePreference
|
| Constructor and Description |
|---|
XMLType(java.sql.Connection conn, oracle.sql.BLOB xmlval, int csid)
Deprecated.
use oracle.jdbc.OracleBlob someBlob; SQLXML newXML = someBlob.toSQLXML();
|
XMLType(java.sql.Connection conn, byte[] bytes)
Deprecated.
|
XMLType(java.sql.Connection conn, oracle.sql.CLOB xmlval)
Deprecated.
use createXML(Connection, OracleClob);
|
XMLType(java.sql.Connection conn, oracle.sql.CLOB xmlval, java.lang.String schemaURL, boolean wellformed, boolean valid)
Deprecated.
use oracle.jdbc.OracleClob someClob; SQLXML newXML = someClob.toSQLXML(); newXML.setSchemaURL(surl);
|
XMLType(java.sql.Connection conn, Document domdoc)
Deprecated.
use java.sql.Connection myconn; SQLXML newXML = myconn.createSQLXML(); DOMResult domResult = newXML.setResult(DOMResult.class); domResult.setNode(myNode);
|
XMLType(java.sql.Connection conn, java.io.InputStream is)
Construct an XMLType given a InputStream containing the XML data.
|
XMLType(java.sql.Connection conn, Node node)
Deprecated.
use java.sql.Connection myconn; SQLXML newXML = myconn.createSQLXML(); DOMResult domResult = newXML.setResult(DOMResult.class); domResult.setNode(myNode);
|
XMLType(java.sql.Connection conn, java.lang.String xmlval)
Deprecated.
use java.sql.Connection myconn; SQLXML newXML = myconn.createSQLXML(); newXML.setString(xmlval);
|
XMLType(java.sql.Connection conn, java.lang.String xmlval, java.lang.String schemaURL, boolean wellformed, boolean valid)
Deprecated.
use java.sql.Connection myconn; SQLXML newXML = myconn.createSQLXML(); newXML.setString(xmlval); newXML.setSchemaURL(surl);
|
XMLType(oracle.sql.OpaqueDescriptor type, java.sql.Connection conn, java.lang.Object value)
Deprecated.
|
| Modifier and Type | Method and Description |
|---|---|
static void |
cleanupCache(boolean forcemode)
Clean-up method for an internal cache used for Binary XML decoding.
|
void |
close()
Deprecated.
use SQLXML sqlxml; sqlxml.free();
|
XMLType |
createSchemaBasedXML(java.lang.String schemaURL)
Deprecated.
|
static XMLType |
createXML(java.sql.Connection conn, oracle.sql.CLOB xmlval)
Deprecated.
use createXML(Connection, OracleClob);
|
static XMLType |
createXML(java.sql.Connection conn, oracle.sql.CLOB xmlval, java.lang.String schemaURL, boolean wellformed, boolean valid)
Deprecated.
use oracle.jdbc.OracleClob someClob; SQLXML newXML = someClob.toSQLXML(); newXML.setSchemaURL(surl);
|
static XMLType |
createXML(java.sql.Connection conn, Document domdoc)
Deprecated.
use java.sql.Connection myconn; SQLXML newXML = myconn.createSQLXML(); DOMResult domResult = newXML.setResult(DOMResult.class); domResult.setNode(myNode);
|
static XMLType |
createXML(java.sql.Connection conn, java.io.InputStream is)
Create an XMLType given a InputStream containing the XML data.
|
static XMLType |
createXML(java.sql.Connection conn, oracle.jdbc.OracleBlob xmlval, int csid)
Create an XMLType given a OracleBlob containing the XML data
|
static XMLType |
createXML(java.sql.Connection conn, oracle.jdbc.OracleClob xmlval)
Create an XMLType given a OracleClob containing the XML data
|
static XMLType |
createXML(java.sql.Connection conn, oracle.jdbc.OracleClob xmlval, java.lang.String schemaURL)
Create an XMLType given a OracleClob containing the XML data
|
static XMLType |
createXML(java.sql.Connection conn, java.lang.String xmlval)
Deprecated.
use java.sql.Connection myconn; SQLXML newXML = myconn.createSQLXML(); newXML.setString(xmlval);
|
static XMLType |
createXML(java.sql.Connection conn, java.lang.String xmlval, java.lang.String schemaURL, boolean wellformed, boolean valid)
Deprecated.
use java.sql.Connection myconn; SQLXML newXML = myconn.createSQLXML(); newXML.setString(xmlval); newXML.setSchemaURL(surl);
|
static XMLType |
createXML(oracle.sql.OPAQUE opq)
Deprecated.
Use SQLXML newXML = resultSet.getSQLXML(columnNumber);
|
boolean |
existsNode(java.lang.String xpath, java.lang.String nsmap)
Deprecated.
|
XMLType |
extract(java.lang.String xpath, java.lang.String nsmap)
Deprecated.
|
void |
free() |
java.io.InputStream |
getBinaryStream() |
oracle.sql.BLOB |
getBlobVal(int csid)
Deprecated.
use toBlob(int csid)
|
oracle.sql.BLOB |
getBlobVal(int csid, int pflag, int indent)
Deprecated.
use toBlob(int csid)
|
java.io.Reader |
getCharacterStream() |
oracle.sql.CLOB |
getClobVal()
Deprecated.
- use toClob()
|
oracle.sql.CLOB |
getClobVal(int pflag, int indent)
Deprecated.
- use toClob()
|
Document |
getDocument()
Deprecated.
- use SQLXML sqlxml; DOMSource domSource = sqlxml.getSource(DOMSource.class); Document doc = (Document)domSource.getNode();
|
XDBDocFragment |
getDocumentFragment()
Deprecated.
- use SQLXML sqlxml; DOMSource domSource = sqlxml.getSource(DOMSource.class); Document doc = (Document)domSource.getNode();
|
Document |
getDOM()
Deprecated.
- use SQLXML sqlxml; DOMSource domSource = sqlxml.getSource(DOMSource.class); Document doc = (Document)domSource.getNode();
|
java.io.InputStream |
getInputStream()
Deprecated.
- use SQLXML sqlxml; InputStream is = sqlxml.getBinaryStream()
|
java.io.InputStream |
getInputStream(int pflag, int indent)
Deprecated.
- use SQLXML sqlxml; InputStream is = sqlxml.getBinaryStream()
|
java.lang.String |
getNamespace()
Deprecated.
|
java.lang.String |
getRootElement()
Deprecated.
|
java.lang.String |
getSchemaURL()
Return the schema URL (i.e. location of the schema to which this XMLType conforms)
|
<T extends Source> |
getSource(java.lang.Class<T> sourceClass) |
java.lang.String |
getString() |
java.lang.String |
getStringVal()
Deprecated.
- use SQLXML sqlxml; String s = sqlxml.getString()
|
java.lang.String |
getStringVal(int pflag, int indent)
Deprecated.
- use SQLXML sqlxml; String s = sqlxml.getString()
|
boolean |
isBinXml()
Function to check if the XMLType is schema based.
|
boolean |
isFragment()
Function to check if the XMLType is a regular document or a document fragment.
|
boolean |
isSchemaBased()
Function to check if the XMLType is schema based.
|
boolean |
isSchemaValid(java.lang.String schurl, java.lang.String elname)
Function to check if the XMLType is schema based.
|
boolean |
isSchemaValidated()
Return TRUE if the document has been validated against its schema
|
void |
schemaValidate()
Validate the schema-based document against its own schema.
|
java.io.OutputStream |
setBinaryStream() |
void |
setBinaryXML()
Function to mark the XML type as Binary XML
|
void |
setBinaryXMLEncoding(java.lang.String encoding)
Sets the client requested encoding for retrieving Binary XML.
|
java.io.Writer |
setCharacterStream() |
void |
setMetadataConn(java.lang.Object metaconn)
Function to set the metadata connection to be used for getting Binary XML token data
|
void |
setPicklePreference(int pref)
Function to set how the XMLType will be sent across the wire.
|
<T extends Result> |
setResult(java.lang.Class<T> resultClass) |
void |
setSchemaURL(java.lang.String schemaURL)
This function sets schema URL.
|
void |
setSchemaValidated(boolean validateFlag)
This function sets the VALIDATED flag to indicate that the XMLType has been validated or not.
|
void |
setString(java.lang.String str) |
oracle.jdbc.OracleBlob |
toBlob(int csid)
Get the OracleBlob value containing the XMLdata from the XMLType
|
oracle.jdbc.OracleClob |
toClob()
Get the OracleClob value containing the XMLdata from the XMLType
|
XMLType |
transform(XMLType xsldoc, java.lang.String parammap)
Function to transform the XMLType using the given XSL document.
|
void |
writeToOutputStream(java.io.OutputStream os)
Deprecated.
|
void |
writeToOutputStream(java.io.OutputStream os, int pflag, int indent)
Deprecated.
|
getACProxy, getBytesValue, getDescriptor, getImageLength, getImageOffset, getJavaSqlConnection, getMap, getOracleMetaData, getSQLTypeName, getValue, isConvertibleTo, makeJdbcArray, setACProxy, setDescriptor, setImage, setImageLength, setValue, stringValue, toBytes, toClass, toClass, toJdbc, toJdbcassertNotNull, assertNotNull, getConnection, getInternalConnection, getOracleConnection, getPhysicalConnection, setPhysicalConnectionOfasciiStreamValue, bigDecimalValue, binaryStreamValue, booleanValue, bytesHashCode, byteValue, characterStreamValue, compareBytes, dateValue, doubleValue, equals, floatValue, getBytes, getLength, getStream, intValue, isNull, longValue, setBytes, setShareBytes, shareBytes, stringValue, timestampValue, timestampValue, timeValue, timeValuegetClass, hashCode, notify, notifyAll, toString, wait, wait, waitgetBytesValue, getDescriptor, getImageLength, getImageOffset, getJavaSqlConnection, getMap, isConvertibleTo, makeJdbcArray, setDescriptor, setImage, setImageLength, setValue, toBytes, toClass, toClass, toJdbc, toJdbcasciiStreamValue, bigDecimalValue, binaryStreamValue, booleanValue, byteValue, characterStreamValue, dateValue, doubleValue, floatValue, getBytes, getConnection, getInternalConnection, getLength, getOracleConnection, getStream, intValue, longValue, setBytes, setPhysicalConnectionOf, setShareBytes, shareBytes, stringValue, stringValue, timestampValue, timestampValue, timeValue, timeValuepublic static final int _SQL_TYPECODE
public static final java.lang.String ENCODE_ON_CLIENT
public static final java.lang.String DECODE_ON_CLIENT
public static final int CONNTYPE_THIN
public static final int CONNTYPE_OCI8
public static final int CONNTYPE_KPRB
public static final int DEF_INDENT
public static final int MAX_INDENT
public static final int MAX_PFLAG
public static final int PRINT_DEFAULT_PROPERTY
public static final int PRINT_PRETTY
public static final int PRINT_NOPRETTY
public static final int XMLTYPE_PICKLE_AS_TEXT
public static final int XMLTYPE_PICKLE_AS_BINXML
public XMLType(java.sql.Connection conn,
java.lang.String xmlval)
throws java.sql.SQLException
conn - the connection object to be used.xmlval - the string containing the XML datajava.sql.SQLExceptionpublic XMLType(java.sql.Connection conn,
java.lang.String xmlval,
java.lang.String schemaURL,
boolean wellformed,
boolean valid)
throws java.sql.SQLException
conn - the connection object to be used.xmlval - the string containing the XML dataschemaURL - the schema URL for the XMLTypewellformed - XML document is well-formedvalid - XML document is validjava.sql.SQLExceptionpublic XMLType(java.sql.Connection conn,
oracle.sql.CLOB xmlval)
throws java.sql.SQLException
conn - the connection object to be used.xmlval - the CLOB containing the XML datajava.sql.SQLExceptionpublic XMLType(java.sql.Connection conn,
oracle.sql.CLOB xmlval,
java.lang.String schemaURL,
boolean wellformed,
boolean valid)
throws java.sql.SQLException
conn - the connection object to be used.xmlval - the CLOB containing the XML dataschemaURL - the schema URL for the XMLTypewellformed - XML document is well-formedvalid - XML document is validjava.sql.SQLExceptionpublic XMLType(java.sql.Connection conn,
oracle.sql.BLOB xmlval,
int csid)
throws java.sql.SQLException
conn - the connection object to be used.xmlval - the BLOB containing the XML datacsid - the charset id.java.sql.SQLExceptionpublic XMLType(java.sql.Connection conn,
java.io.InputStream is)
throws java.sql.SQLException
conn - the connection object to be used.is - the InputStream containing the XML data.java.sql.SQLExceptionpublic XMLType(oracle.sql.OpaqueDescriptor type,
java.sql.Connection conn,
java.lang.Object value)
throws java.sql.SQLException
type - the opaque type descriptor to be used.conn - the connection object to be used.value - the pickled image bytes.java.sql.SQLExceptionpublic XMLType(java.sql.Connection conn,
Document domdoc)
throws java.sql.SQLException
domdoc - the DOM Document which represents the DOM treeconn - the connection object to be used.java.sql.SQLExceptionpublic XMLType(java.sql.Connection conn,
Node node)
throws java.sql.SQLException
conn - the JDBC Connection (only THIN supported)node - the DOM nodejava.sql.SQLExceptionpublic XMLType(java.sql.Connection conn,
byte[] bytes)
throws java.sql.SQLException
conn - the JDBC Connection (only THIN supported)bytes - the image bytesjava.sql.SQLExceptionpublic void setPicklePreference(int pref)
throws java.sql.SQLException
pref - XMLTYPE_PICKLE_AS_TEXT or XMLTYPE_PICKLE_AS_BINXMLjava.sql.SQLExceptionpublic void setMetadataConn(java.lang.Object metaconn)
throws java.sql.SQLException
metaconn - Metadata connection of type Connectionjava.sql.SQLExceptionpublic void setBinaryXML()
throws java.sql.SQLException
java.sql.SQLExceptionpublic static XMLType createXML(oracle.sql.OPAQUE opq) throws java.sql.SQLException
opq - the opaque data object from which the XMLType is to be generatedjava.sql.SQLExceptionpublic static XMLType createXML(java.sql.Connection conn, java.lang.String xmlval) throws java.sql.SQLException
conn - the connection object to be used.xmlval - the string containing the XML datajava.sql.SQLExceptionpublic static XMLType createXML(java.sql.Connection conn, java.lang.String xmlval, java.lang.String schemaURL, boolean wellformed, boolean valid) throws java.sql.SQLException
conn - the connection object to be used.xmlval - the string containing the XML dataschemaURL - the schema URL for the XMLTypewellformed - XML document is well-formedvalid - XML document is validjava.sql.SQLExceptionpublic static XMLType createXML(java.sql.Connection conn, oracle.sql.CLOB xmlval) throws java.sql.SQLException
conn - the connection object to be used.xmlval - the CLOB containing the XML datajava.sql.SQLExceptionpublic static XMLType createXML(java.sql.Connection conn, oracle.sql.CLOB xmlval, java.lang.String schemaURL, boolean wellformed, boolean valid) throws java.sql.SQLException
conn - the connection object to be used.xmlval - the CLOB containing the XML dataschemaURL - the schema URL for the XMLTypewellformed - XML document is well-formedvalid - XML document is validjava.sql.SQLExceptionpublic static XMLType createXML(java.sql.Connection conn, java.io.InputStream is) throws java.sql.SQLException
conn - the connection object to be used.is - the InputStream containing the XML datajava.sql.SQLExceptionpublic java.lang.String getStringVal()
throws java.sql.SQLException
java.sql.SQLExceptionpublic java.lang.String getStringVal(int pflag,
int indent)
throws java.sql.SQLException
pflag - flags to control printindent - indent output by "indent" charactersjava.sql.SQLExceptionpublic oracle.sql.CLOB getClobVal()
throws java.sql.SQLException
java.sql.SQLExceptionpublic oracle.sql.CLOB getClobVal(int pflag,
int indent)
throws java.sql.SQLException
pflag - flags to control printindent - indent output by "indent" charactersjava.sql.SQLExceptionpublic oracle.sql.BLOB getBlobVal(int csid)
throws java.sql.SQLException
csid - The character set ID.java.sql.SQLExceptionpublic oracle.sql.BLOB getBlobVal(int csid,
int pflag,
int indent)
throws java.sql.SQLException
csid - The character set ID.pflag - flags to control printindent - indent output by "indent" charactersjava.sql.SQLExceptionpublic java.io.InputStream getInputStream()
throws java.sql.SQLException
java.sql.SQLExceptionpublic java.io.InputStream getInputStream(int pflag,
int indent)
throws java.sql.SQLException
pflag - flags to control printindent - indent output by "indent" charactersjava.sql.SQLExceptionpublic void writeToOutputStream(java.io.OutputStream os)
throws java.sql.SQLException
os - The OutputStream to which the contents are written.java.sql.SQLExceptionpublic void writeToOutputStream(java.io.OutputStream os,
int pflag,
int indent)
throws java.sql.SQLException
os - The OutputStream to which the contents are written.pflag - flags to control printindent - indent output by "indent" charactersjava.sql.SQLExceptionpublic static XMLType createXML(java.sql.Connection conn, Document domdoc) throws java.sql.SQLException
domdoc - the DOM Document which represents the DOM treeconn - the JDBC Connectionjava.sql.SQLExceptionpublic XMLType extract(java.lang.String xpath, java.lang.String nsmap) throws java.sql.SQLException
xpath - the xpath expression which specifies the nodes to search for.nsmap - the map of namespaces which resolves the prefixes in the xpath expression. format is "xmlns=a.com xmlns:b=b.com"java.sql.SQLExceptionpublic boolean existsNode(java.lang.String xpath,
java.lang.String nsmap)
throws java.sql.SQLException
xpath - the xpath expression which specifies the nodes to search for.nsmap - the map of namespaces which resolves the prefixes in the xpath expression. format is "xmlns=a.com xmlns:b=b.com"java.sql.SQLExceptionpublic XMLType transform(XMLType xsldoc, java.lang.String parammap) throws java.sql.SQLException
xsldoc - the XSL document to be applied to the XMLTypeparammap - the top level parameters to be passed to the XSL transformation. This should be of the format "a=b c=d e=f". This can be null.java.sql.SQLExceptionpublic boolean isFragment()
throws java.sql.SQLException
java.sql.SQLExceptionpublic XDBDocFragment getDocumentFragment() throws java.sql.SQLException
java.sql.SQLExceptionpublic boolean isSchemaValid(java.lang.String schurl,
java.lang.String elname)
throws java.sql.SQLException
schurl - the URL of the schema to be validated against; if this is null then the documents own schema URL is used (if one exists).elname - the name of the root element of the schemajava.sql.SQLExceptionpublic XMLType createSchemaBasedXML(java.lang.String schemaURL) throws java.sql.SQLException
schemaURL - The schema URLjava.sql.SQLExceptionpublic java.lang.String getRootElement()
throws java.sql.SQLException
java.sql.SQLExceptionpublic java.lang.String getSchemaURL()
throws java.sql.SQLException
java.sql.SQLExceptionpublic void setSchemaURL(java.lang.String schemaURL)
throws java.sql.SQLException
schemaURL - the schema URL to be set.java.sql.SQLExceptionpublic boolean isSchemaBased()
throws java.sql.SQLException
java.sql.SQLExceptionpublic boolean isBinXml()
throws java.sql.SQLException
java.sql.SQLExceptionpublic java.lang.String getNamespace()
throws java.sql.SQLException
java.sql.SQLExceptionpublic void schemaValidate()
throws java.sql.SQLException
java.sql.SQLExceptionpublic boolean isSchemaValidated()
throws java.sql.SQLException
java.sql.SQLExceptionpublic void setSchemaValidated(boolean validateFlag)
throws java.sql.SQLException
validateFlag - True indicates that the XMLType has been validated. False indicates that the XMLType has not been validated.java.sql.SQLExceptionpublic Document getDOM() throws java.sql.SQLException
java.sql.SQLExceptionDocumentpublic Document getDocument() throws java.sql.SQLException
java.sql.SQLExceptionDocumentpublic void close()
public void setBinaryXMLEncoding(java.lang.String encoding)
throws java.sql.SQLException
encoding - The encoding.java.sql.SQLExceptionpublic static void cleanupCache(boolean forcemode)
forcemode - If true, purges the entire cache; otherwise only mappings with values already garbage collected are removed from the cache.public java.lang.String getString()
throws java.sql.SQLException
getString in interface java.sql.SQLXMLjava.sql.SQLExceptionpublic java.io.InputStream getBinaryStream()
throws java.sql.SQLException
getBinaryStream in interface java.sql.SQLXMLjava.sql.SQLExceptionpublic java.io.Reader getCharacterStream()
throws java.sql.SQLException
getCharacterStream in interface java.sql.SQLXMLjava.sql.SQLExceptionpublic <T extends Source> T getSource(java.lang.Class<T> sourceClass) throws java.sql.SQLException
getSource in interface java.sql.SQLXMLjava.sql.SQLExceptionpublic void free()
throws java.sql.SQLException
free in interface java.sql.SQLXMLjava.sql.SQLExceptionpublic java.io.OutputStream setBinaryStream()
throws java.sql.SQLException
setBinaryStream in interface java.sql.SQLXMLjava.sql.SQLExceptionpublic <T extends Result> T setResult(java.lang.Class<T> resultClass) throws java.sql.SQLException
setResult in interface java.sql.SQLXMLjava.sql.SQLExceptionpublic java.io.Writer setCharacterStream()
throws java.sql.SQLException
setCharacterStream in interface java.sql.SQLXMLjava.sql.SQLExceptionpublic void setString(java.lang.String str)
throws java.sql.SQLException
setString in interface java.sql.SQLXMLjava.sql.SQLExceptionpublic static XMLType createXML(java.sql.Connection conn, oracle.jdbc.OracleClob xmlval) throws java.sql.SQLException
conn - the connection object to be usedxmlval - the OracleClob containing the XML datajava.sql.SQLExceptionpublic static XMLType createXML(java.sql.Connection conn, oracle.jdbc.OracleClob xmlval, java.lang.String schemaURL) throws java.sql.SQLException
conn - the connection object to be usedxmlval - the OracleClob containing the XML dataschemaURL - the schema URL for the XMLTypejava.sql.SQLExceptionpublic static XMLType createXML(java.sql.Connection conn, oracle.jdbc.OracleBlob xmlval, int csid) throws java.sql.SQLException
conn - the connection object to be usedxmlval - the OracleBlob containing the XML datacsid - the character set idjava.sql.SQLExceptionpublic oracle.jdbc.OracleClob toClob()
throws java.sql.SQLException
java.sql.SQLExceptionpublic oracle.jdbc.OracleBlob toBlob(int csid)
throws java.sql.SQLException
csid - the character set idjava.sql.SQLException