Overview | Package | Class | Tree | Deprecated | Index | Help
| Oracle® Application Server XML Java API Reference 10g Release 2 (10.1.2) Part no. B12024-03 September 2004
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## oracle.xml.xmldbaccess
Class XMLDBAccess

    java.lang.Object
      |
      +--oracle.xml.transviewer.DBAccess
            |
            +--oracle.xml.xmldbaccess.XMLDBAccess

public class XMLDBAccess
extends DBAccess

This Bean is a simple extension of the DBAccess bean to support the XMLType Functionality that was introduced as a part of Oracle 9i database This bean lets user to create XMLType tables and store XML documents. The XMLDocuments are stored as rows in the database table as an XMLType type. This class also provides methods to list, delete or retrieve XMLtype tables and data. The table is created using the SQL statement CREATE TABLE (FILENAME CHAR( ) UNIQUE, FILEDATA sys.XMLType);

Field Summary

Fields inherited from class oracle.xml.transviewer.DBAccess
`nameSize`

Constructor Summary
`XMLDBAccess()`

Method Summary
`boolean` | `createXMLTypeTable(java.sql.Connection con, java.lang.String tablename)` Create an XMLType table
`java.lang.String` | `getXMLTypeData(java.sql.Connection con, java.lang.String tablename, java.lang.String xmlname)` Retrieve text file from an XMLType table
`java.lang.String[]` | `getXMLTypeTableNames(java.sql.Connection con, java.lang.String tablePrefix)` Get all XML tables with names starting with a given string
`java.lang.String` | `getXMLTypeXPathTextData(java.sql.Connection con, java.lang.String tablename, java.lang.String xmlname, java.lang.String xpathexp)` Retrieve the text data based on the XPATH expression from an XMLType table
`boolean` | `insertXMLTypeData(java.sql.Connection con, java.lang.String tablename, java.lang.String xmlname, java.lang.String xmldata)` Inserts text file as a row in an XMLType table
`boolean` | `isXMLTypeTable(java.sql.Connection con, java.lang.String tablename)` Check if the table is an XMLType table.
`boolean` | `replaceXMLTypeData(java.sql.Connection con, java.lang.String tablename, java.lang.String xmlname, java.lang.String xmldata)` Replace text file as a row in an XMLType table

Methods inherited from class oracle.xml.transviewer.DBAccess
`createBLOBTable, createXMLTable, deleteBLOBName, deleteXMLName, dropBLOBTable, dropXMLTable, getBLOBData, getNameSize, getXMLData, getXMLNames, getXMLTableNames, insertBLOBData, insertXMLData, isXMLTable, replaceXMLData, xmlTableExists`

Methods inherited from class java.lang.Object
`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

Constructor Detail

### XMLDBAccess

    public XMLDBAccess()

Method Detail

### isXMLTypeTable

    public boolean isXMLTypeTable(java.sql.Connection con,
                                  java.lang.String tablename)
                           throws java.lang.Exception

  Check if the table is an XMLType table.
  Parameters:
    `con` - - the Connection object
  Returns:
    true if this is an XMLType table
    `java.lang.Exception`

### getXMLTypeTableNames

    public java.lang.String[] getXMLTypeTableNames(java.sql.Connection con,
                                                   java.lang.String tablePrefix)
                                            throws java.lang.Exception

  Get all XML tables with names starting with a given string
  Parameters:
    `con` - - the Connection object
    `tablePrefix` - - table prefix string
  Returns:
    - array of all XMLType tables that begin with tablePrefix
    `java.lang.Exception`

### createXMLTypeTable

    public boolean createXMLTypeTable(java.sql.Connection con,
                                      java.lang.String tablename)
                               throws java.lang.Exception

  Create an XMLType table
  Parameters:
    `con` - - the Connection object
    `tablename` - - the table name
  Returns:
    true if successful
    `java.lang.Exception`

### insertXMLTypeData

    public boolean insertXMLTypeData(java.sql.Connection con,
                                     java.lang.String tablename,
                                     java.lang.String xmlname,
                                     java.lang.String xmldata)
                              throws java.sql.SQLException,
                                     java.io.IOException,
                                     java.lang.NoClassDefFoundError

  Inserts text file as a row in an XMLType table
  Parameters:
    `con` - - the Connection object
    `tablename` - - the table name
    `xmlname` - - the file name
    `xmldata` - - string with the file data
  Returns:
    true if successful
    `java.sql.SQLException`
    `java.io.IOException`
    `java.lang.NoClassDefFoundError`

### replaceXMLTypeData

    public boolean replaceXMLTypeData(java.sql.Connection con,
                                      java.lang.String tablename,
                                      java.lang.String xmlname,
                                      java.lang.String xmldata)
                               throws java.lang.Exception,
                                      java.lang.NoClassDefFoundError

  Replace text file as a row in an XMLType table
  Parameters:
    `con` - - the Connection object
    `tablename` - - the table name
    `xmlname` - - the file name
    `xmldata` - - string with the file data
  Returns:
    true if successful
    `java.lang.Exception`
    `java.lang.NoClassDefFoundError`

### getXMLTypeData

    public java.lang.String getXMLTypeData(java.sql.Connection con,
                                           java.lang.String tablename,
                                           java.lang.String xmlname)
                                    throws java.sql.SQLException

  Retrieve text file from an XMLType table
  Parameters:
    `con` - - the Connection object
    `tablename` - - the table name
    `xmlname` - - the file name
  Returns:
    file as a string
    `java.sql.SQLException`

### getXMLTypeXPathTextData

    public java.lang.String getXMLTypeXPathTextData(java.sql.Connection con,
                                                    java.lang.String tablename,
                                                    java.lang.String xmlname,
                                                    java.lang.String xpathexp)
                                             throws java.sql.SQLException

  Retrieve the text data based on the XPATH expression from an XMLType table
  Parameters:
    `con` - - the Connection object
    `tablename` - - the table name
    `xmlname` - - the file name
    `xpathexp` - - XPATH expression to search the XML document
  Returns:
    the data as a string
    `java.sql.SQLException`

Overview | Package | Class | Tree | Deprecated | Index | Help
| Oracle® Application Server XML Java API Reference 10g Release 2 (10.1.2) Part no. B12024-03 September 2004
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

Copyright © 2003, 2004, Oracle. All rights reserved.