Oracle9i Supplied Java Packages Reference Release 2 (9.2) Part Number A96609-01 |
|
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 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.
public class DBAccess extends java.lang.Object java.lang.Object | +--oracle.xml.transviewer.DBAccess
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.
public DBAccess()
public boolean createBLOBTable(java.sql.Connection con, java.lang.String tablename)
Create BLOB table
con
- the Connection object
tablename
- the table name
true if successfull
public boolean createXMLTable(java.sql.Connection con, java.lang.String tablename)
Create XML table
con
- the Connection object
tablename
- the table name
true if successfull
public boolean deleteBLOBName(java.sql.Connection con, java.lang.String tablename, java.lang.String xmlname)
Delete binary file from BLOB table
con
- the Connection object
tablename
- the table name
xmlname
- the file name
true if successfull
public boolean deleteXMLName(java.sql.Connection con, java.lang.String tablename, java.lang.String xmlname)
Delete file from XML table
con
- the Connection object
tablename
- the table name
xmlname
- the file name
true if successfull
public boolean dropBLOBTable(java.sql.Connection con, java.lang.String tablename)
Delete BLOB table
con
- the Connection object
tablename
- the table name
true if successfull
public boolean dropXMLTable(java.sql.Connection con, java.lang.String tablename)
Delete XML table
con
- the Connection object
tablename
- the table name
true if successfull
public byte[] getBLOBData(java.sql.Connection con, java.lang.String tablename, java.lang.String xmlname)
Retrieve binary file from BLOB table
con
- the Connection object
tablename
- the table name
xmlname
- the file name
file as a byte array
public int getNameSize()
Returns the size of the field where the filename is kept.
filename size
public java.lang.String getXMLData(java.sql.Connection con, java.lang.String tablename, java.lang.String xmlname)
Retrieve text file from XML table
con
- the Connection object
tablename
- the table name
xmlname
- the file name
file as a string
public java.lang.String[] getXMLNames(java.sql.Connection con, java.lang.String tablename)
Returns all file names in XML table
con
- the Connection object
tablename
- the table name
String array with all file names in this table
public java.lang.String[] getXMLTableNames(java.sql.Connection con, java.lang.String tablePrefix)
Gets all XML tables with names starting with a given string
con
- the Connection object
tablePrefix
- table prefix string
array of all XML tables that begin with tablePrefix
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
con
- the Connection object
tablename
- the table name
xmlname
- the file name
xmldata
- byte array with file data
true if successfull
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
con
- the Connection object
tablename
- the table name
xmlname
- the file name
xmldata
- string with the file data
true if successfull
public boolean isXMLTable(java.sql.Connection con, java.lang.String tablename)
Check if the table is XML table.
con
- the Connection object
tableName
- the table name to test
true if this is XML table
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
con
- the Connection object
tablename
- the table name
xmlname
- the file name
xmldata
- string with the file data
true if successfull
public boolean xmlTableExists(java.sql.Connection con, java.lang.String tablename)
Checks if the XML table exists
con
- the Connection object
tablename
- the table name
true if the table exists
public class DBAccessBeanInfo extends java.beans.SimpleBeanInfo java.lang.Object | +--java.beans.SimpleBeanInfo | +--oracle.xml.transviewer.DBAccessBeanInfo
java.beans.BeanInfo
public DBAccessBeanInfo()
Constructor
public java.awt.Image getIcon(int iconKind)
java.beans.SimpleBeanInfo.getIcon(int) in class java.beans.SimpleBeanInfo
public java.beans.PropertyDescriptor[] getPropertyDescriptors()
java.beans.SimpleBeanInfo.getPropertyDescriptors() in class java.beans.SimpleBeanInfo
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
javax.accessibility.Accessible, java.awt.image.ImageObserver, java.awt.MenuContainer, java.io.Serializable
XMLTransformPanel visual bean. Applies XSL transformations on XML documents. Visualizes the result. Allows editing of input XML and XSL documents/files.
public XMLTransformPanel()
The class constructor. Creates an object of type XMLTransformPanel
.
public class XMLTransformPanelBeanInfo extends java.beans.SimpleBeanInfo java.lang.Object | +--java.beans.SimpleBeanInfo | +--oracle.xml.transviewer.XMLTransformPanelBeanInfo
java.beans.BeanInfo
public XMLTransformPanelBeanInfo()
public java.awt.Image getIcon(int iconKind)
java.beans.SimpleBeanInfo.getIcon(int) in class java.beans.SimpleBeanInfo
public java.beans.PropertyDescriptor[] getPropertyDescriptors()
java.beans.SimpleBeanInfo.getPropertyDescriptors() in class java.beans.SimpleBeanInfo
public class XMLTransViewer extends java.lang.Object java.lang.Object | +--oracle.xml.transviewer.XMLTransViewer
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.
public XMLTransViewer()
public static java.lang.String getReleaseVersion()
Returns the release version of the Oracle XML Transviewer
The release version string
public static void main(java.lang.String[] args)
|
Copyright © 1996, 2002 Oracle Corporation. All Rights Reserved. |
|