Oracle9i Supplied Java Packages Reference Release 2 (9.2) Part Number A96609-01 |
|
This chapter describes package oracle.xml.dbviewer, which contains the DBViewer bean for Oracle XML Transviewer Beans.
The Oracle XML Transviewer Beans are provided as part of Oracle9i XDK for Java Beans. XML Transviewer Beans facilitate the addition of graphical or visual interfaces to your XML applications.
The DBViewer bean displays database queries or any XML by applying XSL stylesheets and visually presenting the resulting HTML in a scrollable swing panel.
This chaper contains these sections:
Package oracle.xml.dbviewer implements the Java bean that can be used to display database queries or any XML by applying XSL stylesheets and presenting the resulting HTML in a scrollable swing panel.
This bean has three buffers:
The bean API allows the calling program to load and save the buffers from various sources and to apply stylesheet transformations to the XML buffer using the stylesheet in the XSL buffer. The result can be stored in the result buffer. The XML and XSL buffer content can be shown as source or as a tree structure. The result buffer content can be rendered as HTML and also shown as source or a tree structure. The XML buffer can be loaded from a database query. All buffers can load and save files from CLOB tables in the Oracle database or from the file system. This way, the bean can be used to move files between the file system and the user schema in the database.
Class | Description |
---|---|
Java bean used to display database queries or any XML by applying XSL stylesheets and displaying the resulting HTML. |
|
Provides information about the bean. |
public class DBViewer extends javax.swing.JPanel implements java.io.Serializable java.lang.Object | +--java.awt.Component | +--java.awt.Container | +--javax.swing.JComponent | +--javax.swing.JPanel | +--oracle.xml.dbviewer.DBViewer
javax.accessibility.Accessible, java.awt.image.ImageObserver, java.awt.MenuContainer, java.io.Serializable
Java bean that can be used to display database queries or any XML by applying XSL stylesheets and visualizing the resulting HTML in a scrollable swing panel. This bean has three buffers: XML, XSL, and result buffer. The bean API enables the calling program to load/save the buffers from various sources and to apply stylesheet transformation to the XML buffer using the stylesheet in the XSL buffer. The result can be stored in the result buffer. The XML and XSL buffers content can be shown as source or as a tree structure. The result buffer content can be rendered as HTML and also shown as source or tree structure. The XML buffer can be loaded from database query. All buffers can load and save files from CLOB tables in Oracle database and from the file system as well. Therefore, the control can be also used to move files between the file system and the user schema in the database.
public DBViewer()
Constructs a new instance.
public java.lang.String getHostname()
Get database host name
host name
public java.lang.String getInstancename()
Get database instance name
database instance name
public java.lang.String getPassword()
Get user password
user password
public java.lang.String getPort()
Get database port number
String with the database port number
public java.lang.String getResBuffer()
Get the content of the result buffer
the buffer content
public java.lang.String getResCLOBFileName()
Get result CLOB file name
result CLOB file name
public java.lang.String getResCLOBTableName()
Get result CLOB table name
result CLOB table name
public java.lang.String getResFileName()
Get Result file name
XSL file name
public java.lang.String getUsername()
Get user name
user name
public java.lang.String getXmlBuffer()
Get the content of the XML buffer
the buffer content
public java.lang.String getXmlCLOBFileName()
Get XML CLOB file name
XML CLOB file name
public java.lang.String getXmlCLOBTableName()
Get XML CLOB table name
XML CLOB table name
public java.lang.String getXmlFileName()
Get XML file name
XML file name
public java.lang.String getXMLStringFromSQL(java.lang.String sqlText)
Get XML presentation of result set from SQL query
the query result set as XML string
public java.lang.String getXslBuffer()
Get the content of the XSL buffer
the buffer content
public java.lang.String getXslCLOBFileName()
Get the XSL CLOB file name
XSL CLOB file name
public java.lang.String getXslCLOBTableName()
Get XSL CLOB table name
XSL CLOB table name
public java.lang.String getXslFileName()
Get XSL file name
XSL file name
public void loadResBuffer(java.lang.String filename)
Load the result buffer from file
filename
- file name
public void loadResBuffer(java.lang.String tablename, java.lang.String filename)
Load the result buffer from CLOB file
tablename
- CLOB table name
filename
- CLOB file name
public void loadResBuffer(oracle.xml.parser.v2.XMLDocument resdoc)
Load the result buffer from XMLDocument
resdoc
- - the XMLDocument
public void loadResBufferFromClob()
Load the result buffer from CLOB file
public void loadResBufferFromFile()
Load the result buffer from file
public void loadXmlBuffer(java.lang.String filename)
Load the XML buffer from file
filename
- file name
public void loadXmlBuffer(java.lang.String tablename, java.lang.String filename)
Load the XML buffer from CLOB file
tablename
- CLOB table name
filename
- CLOB file name
public void loadXmlBuffer(oracle.xml.parser.v2.XMLDocument xmldoc)
Load the XML buffer from XMLDocument
filename
- file name
public void loadXmlBufferFromClob()
Load the XML buffer from CLOB file
public void loadXmlBufferFromFile()
Load the XML buffer from file
public void loadXMLBufferFromSQL(java.lang.String sqltext)
Load the XML buffer from SQL result set
sqltext
- SQL text
public void loadXslBuffer(java.lang.String filename)
Load the XSL buffer from file
filename
- file name
public void loadXslBuffer(java.lang.String tablename, java.lang.String filename)
Load the XSL buffer from CLOB file
tablename
- CLOB table name
filename
- CLOB file name
public void loadXslBuffer(oracle.xml.parser.v2.XMLDocument xsldoc)
Load the XSL buffer from XMLDocument
xsldoc
- - the XML Document
public void loadXslBufferFromClob()
Load the XSL buffer from CLOB file
public void loadXslBufferFromFile()
Load the XSL buffer from file
public oracle.xml.parser.v2.XMLDocument parseResBuffer()
Parse the result buffer and refresh the tree view and source view
XMLDocument
public oracle.xml.parser.v2.XMLDocument parseXmlBuffer()
Parse the XML buffer and refresh the tree view and source view
XMLDocument
public oracle.xml.parser.v2.XMLDocument parseXslBuffer()
Parse the XSL buffer and refresh the tree view and source view
XMLDocument
public void saveResBuffer(java.lang.String filename)
Save the result buffer to file
filename
- CLOB file name
public void saveResBuffer(java.lang.String tablename, java.lang.String filename)
Save the result buffer to CLOB file
tablename
- CLOB table name
filename
- CLOB file name
public void saveResBufferToClob()
Save the result buffer to CLOB file
public void saveResBufferToFile()
Save the result buffer to file
public void saveXmlBuffer(java.lang.String filename)
Save the XML buffer to file
filename
- file name
public void saveXmlBuffer(java.lang.String tablename, java.lang.String filename)
Save the XML buffer to CLOB file
tablename
- CLOB table name
filename
- CLOB file name
public void saveXmlBufferToClob()
Save the XML buffer to CLOB file
public void saveXmlBufferToFile()
Save the XML buffer to file
public void saveXslBuffer(java.lang.String filename)
Save the XSL buffer to file
filename
- file name
public void saveXslBuffer(java.lang.String tablename, java.lang.String filename)
Save the XSL buffer to CLOB file
tablename
- CLOB table name
filename
- CLOB file name
public void saveXslBufferToClob()
Save the XSL buffer to CLOB file
public void saveXslBufferToFile()
Save the XSL buffer to file
public void setHostname(java.lang.String hostname)
Set database host name
hostname
- the host name
public void setInstancename(java.lang.String instancename)
Set database instance name
instancename
- the database instance name
public void setPassword(java.lang.String password)
Set user password
password
- the user password
public void setPort(java.lang.String port)
Set database port number
port
- String containing the port number
public void setResBuffer(java.lang.String text)
Set new text in the result buffer
text
- the new text
public void setResCLOBFileName(java.lang.String name)
Set Result CLOB file name
name
- Result CLOB file name
public void setResCLOBTableName(java.lang.String name)
Set Result CLOB table name
name
- Result CLOB table name
public void setResFileName(java.lang.String name)
Set Result file name
name
- Result file name
public void setResHtmlView(boolean on)
Show the result buffer as rendered HTML
public void setResSourceEditView(boolean on)
Show the result buffer as XML source and enter edit mode
public void setResSourceView(boolean on)
Show the result buffer as XML source
public void setResTreeView(boolean on)
Show the result buffer as XML tree view
public void setUsername(java.lang.String username)
Set user name
username
- the user name
public void setXmlBuffer(java.lang.String text)
Set new text in the XML buffer
text
- XML text
public void setXmlCLOBFileName(java.lang.String name)
Set XML CLOB table name
name
- XML CLOB table name
public void setXmlCLOBTableName(java.lang.String name)
Set XML CLOB table name
name
- XML CLOB table name
public void setXmlFileName(java.lang.String name)
Set XML file name
name
- XML file name
public void setXmlSourceEditView(boolean on)
Show the XML buffer as XML source and enter edit mode
public void setXmlSourceView(boolean on)
Show the XML buffer as XML source
public void setXmlTreeView(boolean on)
Show the XML buffer as tree
public void setXslBuffer(java.lang.String text)
Set new text in the XSL buffer
text
- XSL text
public void setXslCLOBFileName(java.lang.String name)
Set XSL CLOB file name
name
- XSL CLOB file name
public void setXslCLOBTableName(java.lang.String name)
Set XSL CLOB table name
name
- XSL CLOB table name
public void setXslFileName(java.lang.String name)
Set XSL file name
name
- XSL file name
public void setXslSourceEditView(boolean on)
Show the XSL buffer as XML source and enter edit mode
public void setXslSourceView(boolean on)
Show the XSL buffer as XML source
public void setXslTreeView(boolean on)
Show the XSL buffer as tree
public oracle.xml.parser.v2.XMLDocument transformToDoc()
Transfroms the content of the XML buffer by applying the stylesheet from the XSL buffer.
public void transformToRes()
Apply the stylesheet transformation from the XSL buffer to the XML in the XML buffer and stores the result into the result buffer
public java.lang.String transformToString()
Transfroms the content of the XML buffer by applying the stylesheet from the XSL buffer.
public class DBViewerBeanInfo extends java.beans.SimpleBeanInfo java.lang.Object | +--java.beans.SimpleBeanInfo | +--oracle.xml.dbviewer.DBViewerBeanInfo
java.beans.BeanInfo
public DBViewerBeanInfo()
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
|
Copyright © 1996, 2002 Oracle Corporation. All Rights Reserved. |
|