Skip Headers

Oracle9i Supplied Java Packages Reference
Release 2 (9.2)

Part Number A96609-01
Go To Documentation Library
Home
Go To Product List
Book List
Go To Table Of Contents
Contents
Go To Index
Index

Master Index

Feedback

Go to previous page Go to next page

16
Package oracle.xml.transviewer

This chapter describes package oracle.xml.transviewer for Oracle XML Transviewer Beans. The Oracle XML Transviewer Beans are provided as part of XDK for Java Beans. XML Transviewer Beans facilitate the addition of graphical or visual interfaces to your XML applications.

This chaper contains these sections:


Package oracle.xml.transviewer Description

Package oracle.xml.transviewer provides the bean that creates and deletes CLOB tables, lists the content of a CLOB table, and also adds, replaces, or deletes text documents in the specified CLOB table. This bean also includes a file interface to load XML documents and XSL stylesheets from the file system or from CLOB tables in the database and to edit the retrieved XML and XSL documents or files. Additionally, Database connectivity is included with the XML Transviewer beans. The beans can now connect directly to a JDBC-enabled database to retrieve and store XML and XSL files. Information about developing applications using Oracle XML Transviewer Java Beans can be found in Oracle9i XML Developer's Kits Guide - XDK.


Package oracle.xml.transviewer Summary

Table 16-1  Class Summary
Class Description

DBAccess

Maintains CLOB tables that can hold multiple XML and text documents.

DBAccessBeanInfo

Provides DB Access bean info.

XMLTransformPanel

Applies XSL transformations on XML documents.

XMLTransformPanelBeanInfo

Provides XMLTransormPanel bean info.

XMLTransViewer

Can be used from the command line to edit and parse XML files, edit and apply XSL transformations and retrieve and save XML, XSL and result files in the file system or in the Oracle 9i database.


DBAccess

Syntax

public class DBAccess extends java.lang.Object
 
java.lang.Object
  |
  +--oracle.xml.transviewer.DBAccess

Description

Maintains CLOB tables that can hold multiple XML and text documents. Each table is created using the statement: CREATE TABLE tablename FILENAME CHAR(16) (UNIQUE, FILEDATA CLOB) LOB(FILEDATA) STORE AS (DISABLE STORAGE IN ROW). Each XML (or text) document is stored as a row in the table and the FILENAME field holds a unique string that is used as a key to retrieve, update, or delete the row. The document text is stored in the FILEDATA field as a CLOB object. The CLOB tables are automatically maintained by the Transviewer bean. The CLOB tables maintained by this class can be later used by the Transviewer bean. The class creates and deletes CLOB tables, lists the content of a CLOB table and also adds, replaces, or deletes text documents in the specified CLOB table.


Constructors

DBAccess()

public  DBAccess()

Methods

createBLOBTable(Connection, String)

public boolean createBLOBTable(java.sql.Connection con, java.lang.String 
tablename)

Create BLOB table

Parameters

con - the Connection object

tablename - the table name

Returns

true if successfull

createXMLTable(Connection, String)

public boolean createXMLTable(java.sql.Connection con, java.lang.String 
tablename)

Create XML table

Parameters

con - the Connection object

tablename - the table name

Returns

true if successfull

deleteBLOBName(Connection, String, String)

public boolean deleteBLOBName(java.sql.Connection con, java.lang.String 
tablename, java.lang.String xmlname)

Delete binary file from BLOB table

Parameters

con - the Connection object

tablename - the table name

xmlname - the file name

Returns

true if successfull

deleteXMLName(Connection, String, String)

public boolean deleteXMLName(java.sql.Connection con, java.lang.String 
tablename, java.lang.String xmlname)

Delete file from XML table

Parameters

con - the Connection object

tablename - the table name

xmlname - the file name

Returns

true if successfull

dropBLOBTable(Connection, String)

public boolean dropBLOBTable(java.sql.Connection con, java.lang.String 
tablename)

Delete BLOB table

Parameters

con - the Connection object

tablename - the table name

Returns

true if successfull

dropXMLTable(Connection, String)

public boolean dropXMLTable(java.sql.Connection con, java.lang.String tablename)

Delete XML table

Parameters

con - the Connection object

tablename - the table name

Returns

true if successfull

getBLOBData(Connection, String, String)

public byte[] getBLOBData(java.sql.Connection con, java.lang.String tablename, 
java.lang.String xmlname)

Retrieve binary file from BLOB table

Parameters

con - the Connection object

tablename - the table name

xmlname - the file name

Returns

file as a byte array

getNameSize()

public int getNameSize()

Returns the size of the field where the filename is kept.

Returns

filename size

getXMLData(Connection, String, String)

public java.lang.String getXMLData(java.sql.Connection con, java.lang.String 
tablename, java.lang.String xmlname)

Retrieve text file from XML table

Parameters

con - the Connection object

tablename - the table name

xmlname - the file name

Returns

file as a string

getXMLNames(Connection, String)

public java.lang.String[] getXMLNames(java.sql.Connection con, java.lang.String 
tablename)

Returns all file names in XML table

Parameters

con - the Connection object

tablename - the table name

Returns

String array with all file names in this table

getXMLTableNames(Connection, String)

public java.lang.String[] getXMLTableNames(java.sql.Connection con, 
java.lang.String tablePrefix)

Gets all XML tables with names starting with a given string

Parameters

con - the Connection object

tablePrefix - table prefix string

Returns

array of all XML tables that begin with tablePrefix

insertBLOBData(Connection, String, String, byte[])

public boolean insertBLOBData(java.sql.Connection con, java.lang.String 
tablename, java.lang.String xmlname, byte[] xmldata)

Inserts binary file as a row in BLOB table

Parameters

con - the Connection object

tablename - the table name

xmlname - the file name

xmldata - byte array with file data

Returns

true if successfull

insertXMLData(Connection, String, String, String)

public boolean insertXMLData(java.sql.Connection con, java.lang.String 
tablename, java.lang.String xmlname, java.lang.String xmldata)

Inserts text file as a row in XML table

Parameters

con - the Connection object

tablename - the table name

xmlname - the file name

xmldata - string with the file data

Returns

true if successfull

isXMLTable(Connection, String)

public boolean isXMLTable(java.sql.Connection con, java.lang.String tablename)

Check if the table is XML table.

Parameters

con - the Connection object

tableName - the table name to test

Returns

true if this is XML table

replaceXMLData(Connection, String, String, String)

public boolean replaceXMLData(java.sql.Connection con, java.lang.String 
tablename, java.lang.String xmlname, java.lang.String xmldata)

Replace text file as a row in XML table

Parameters

con - the Connection object

tablename - the table name

xmlname - the file name

xmldata - string with the file data

Returns

true if successfull

xmlTableExists(Connection, String)

public boolean xmlTableExists(java.sql.Connection con, java.lang.String 
tablename)

Checks if the XML table exists

Parameters

con - the Connection object

tablename - the table name

Returns

true if the table exists


DBAccessBeanInfo

Syntax

public class DBAccessBeanInfo extends java.beans.SimpleBeanInfo
 
java.lang.Object
  |
  +--java.beans.SimpleBeanInfo
        |
        +--oracle.xml.transviewer.DBAccessBeanInfo

All Implemented Interfaces

java.beans.BeanInfo

Constructors

DBAccessBeanInfo()

public  DBAccessBeanInfo()

Constructor


Methods

getIcon(int)

public java.awt.Image getIcon(int iconKind)

Overrides

java.beans.SimpleBeanInfo.getIcon(int) in class java.beans.SimpleBeanInfo

getPropertyDescriptors()

public java.beans.PropertyDescriptor[] getPropertyDescriptors()

Overrides

java.beans.SimpleBeanInfo.getPropertyDescriptors() in class java.beans.SimpleBeanInfo


XMLTransformPanel

Syntax

public class XMLTransformPanel extends javax.swing.JPanel
 
java.lang.Object
  |
  +--java.awt.Component
        |
        +--java.awt.Container
              |
              +--javax.swing.JComponent
                    |
                    +--javax.swing.JPanel
                          |
                          +--oracle.xml.transviewer.XMLTransformPanel

All Implemented Interfaces:

javax.accessibility.Accessible, java.awt.image.ImageObserver, 
java.awt.MenuContainer, java.io.Serializable

Description

XMLTransformPanel visual bean. Applies XSL transformations on XML documents. Visualizes the result. Allows editing of input XML and XSL documents/files.


Constructors

XMLTransformPanel()

public  XMLTransformPanel()

The class constructor. Creates an object of type XMLTransformPanel.


XMLTransformPanelBeanInfo

Syntax

public class XMLTransformPanelBeanInfo extends java.beans.SimpleBeanInfo
 
java.lang.Object
  |
  +--java.beans.SimpleBeanInfo
        |
        +--oracle.xml.transviewer.XMLTransformPanelBeanInfo

All Implemented Interfaces:

java.beans.BeanInfo

Constructors

XMLTransformPanelBeanInfo()

public  XMLTransformPanelBeanInfo()

Methods

getIcon(int)

public java.awt.Image getIcon(int iconKind)

Overrides

java.beans.SimpleBeanInfo.getIcon(int) in class java.beans.SimpleBeanInfo

getPropertyDescriptors()

public java.beans.PropertyDescriptor[] getPropertyDescriptors()

Overrides

java.beans.SimpleBeanInfo.getPropertyDescriptors() in class java.beans.SimpleBeanInfo


XMLTransViewer

Syntax

public class XMLTransViewer extends java.lang.Object
 
java.lang.Object
  |
  +--oracle.xml.transviewer.XMLTransViewer

Description

Simple application that uses XMLTransformPanel. Can be used from the command line to edit and parse XML files, edit and apply XSL transformations and retrieve and save XML, XSL and result files in the file system or in the Oracle 9i database.


Constructors

XMLTransViewer()

public  XMLTransViewer()

Methods

getReleaseVersion()

public static java.lang.String getReleaseVersion()

Returns the release version of the Oracle XML Transviewer

Returns

The release version string

main(String[ ])

public static void main(java.lang.String[] args)

Go to previous page Go to next page
Oracle
Copyright © 1996, 2002 Oracle Corporation.

All Rights Reserved.
Go To Documentation Library
Home
Go To Product List
Book List
Go To Table Of Contents
Contents
Go To Index
Index

Master Index

Feedback