public class XMLType
extends oracle.sql.OPAQUE
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, 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, 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(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.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, 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, 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.
|
public 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.SQLException
public 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.SQLException
public 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.SQLException
public 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.SQLException
public 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.SQLException
public XMLType(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.SQLException
public void setPicklePreference(int pref) throws java.sql.SQLException
pref
- XMLTYPE_PICKLE_AS_TEXT or XMLTYPE_PICKLE_AS_BINXMLjava.sql.SQLException
public void setMetadataConn(java.lang.Object metaconn) throws java.sql.SQLException
metaconn
- Metadata connection of type Connectionjava.sql.SQLException
public void setBinaryXML() throws java.sql.SQLException
java.sql.SQLException
public 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.SQLException
public 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.SQLException
public 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.SQLException
public 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.SQLException
public java.lang.String getStringVal() throws java.sql.SQLException
java.sql.SQLException
public java.lang.String getStringVal(int pflag, int indent) throws java.sql.SQLException
pflag
- flags to control printindent
- indent output by "indent" charactersjava.sql.SQLException
public oracle.sql.CLOB getClobVal() throws java.sql.SQLException
java.sql.SQLException
public oracle.sql.CLOB getClobVal(int pflag, int indent) throws java.sql.SQLException
pflag
- flags to control printindent
- indent output by "indent" charactersjava.sql.SQLException
public oracle.sql.BLOB getBlobVal(int csid) throws java.sql.SQLException
csid
- The character set ID.java.sql.SQLException
public 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.SQLException
public java.io.InputStream getInputStream() throws java.sql.SQLException
java.sql.SQLException
public java.io.InputStream getInputStream(int pflag, int indent) throws java.sql.SQLException
pflag
- flags to control printindent
- indent output by "indent" charactersjava.sql.SQLException
public void writeToOutputStream(java.io.OutputStream os) throws java.sql.SQLException
os
- The OutputStream to which the contents are written.java.sql.SQLException
public 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.SQLException
public 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.SQLException
public 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.SQLException
public 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.SQLException
public boolean isFragment() throws java.sql.SQLException
java.sql.SQLException
public XDBDocFragment getDocumentFragment() throws java.sql.SQLException
java.sql.SQLException
public 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.SQLException
public XMLType createSchemaBasedXML(java.lang.String schemaURL) throws java.sql.SQLException
schemaURL
- The schema URLjava.sql.SQLException
public java.lang.String getRootElement() throws java.sql.SQLException
java.sql.SQLException
public java.lang.String getSchemaURL() throws java.sql.SQLException
java.sql.SQLException
public void setSchemaURL(java.lang.String schemaURL) throws java.sql.SQLException
schemaURL
- the schema URL to be set.java.sql.SQLException
public boolean isSchemaBased() throws java.sql.SQLException
java.sql.SQLException
public boolean isBinXml() throws java.sql.SQLException
java.sql.SQLException
public java.lang.String getNamespace() throws java.sql.SQLException
java.sql.SQLException
public void schemaValidate() throws java.sql.SQLException
java.sql.SQLException
public boolean isSchemaValidated() throws java.sql.SQLException
java.sql.SQLException
public 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.SQLException
public Document getDOM() throws java.sql.SQLException
java.sql.SQLException
Document
public Document getDocument() throws java.sql.SQLException
java.sql.SQLException
Document
public void close()
public void setBinaryXMLEncoding(java.lang.String encoding) throws java.sql.SQLException
encoding
- The encoding.java.sql.SQLException
public 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
java.sql.SQLException
public java.io.InputStream getBinaryStream() throws java.sql.SQLException
java.sql.SQLException
public java.io.Reader getCharacterStream() throws java.sql.SQLException
java.sql.SQLException
public <T extends Source> T getSource(java.lang.Class<T> sourceClass) throws java.sql.SQLException
java.sql.SQLException
public void free() throws java.sql.SQLException
java.sql.SQLException
public java.io.OutputStream setBinaryStream() throws java.sql.SQLException
java.sql.SQLException
public <T extends Result> T setResult(java.lang.Class<T> resultClass) throws java.sql.SQLException
java.sql.SQLException
public java.io.Writer setCharacterStream() throws java.sql.SQLException
java.sql.SQLException
public void setString(java.lang.String str) throws java.sql.SQLException
java.sql.SQLException
public 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.SQLException
public 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.SQLException
public 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.SQLException
public oracle.jdbc.OracleClob toClob() throws java.sql.SQLException
java.sql.SQLException
public oracle.jdbc.OracleBlob toBlob(int csid) throws java.sql.SQLException
csid
- the character set idjava.sql.SQLException