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

13
Package oracle.xml.dbviewer

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 Description

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.


Package oracle.xml.dbviewer Summary

Table 13-1  Class Summary for oracle.xml.dbviewer
Class Description

DBViewer

Java bean used to display database queries or any XML by applying XSL stylesheets and displaying the resulting HTML.

DBViewerBeanInfo

Provides information about the bean.


DBViewer

Syntax

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

All Implemented Interfaces

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

Description

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.


Constructors

DBViewer()

public  DBViewer()

Constructs a new instance.


Methods

getHostname()

public java.lang.String getHostname()

Get database host name

Returns

host name

getInstancename()

public java.lang.String getInstancename()

Get database instance name

Returns

database instance name

getPassword()

public java.lang.String getPassword()

Get user password

Returns

user password

getPort()

public java.lang.String getPort()

Get database port number

Returns

String with the database port number

getResBuffer()

public java.lang.String getResBuffer()

Get the content of the result buffer

Returns

the buffer content

getResCLOBFileName()

public java.lang.String getResCLOBFileName()

Get result CLOB file name

Returns

result CLOB file name

getResCLOBTableName()

public java.lang.String getResCLOBTableName()

Get result CLOB table name

Returns

result CLOB table name

getResFileName()

public java.lang.String getResFileName()

Get Result file name

Returns

XSL file name

getUsername()

public java.lang.String getUsername()

Get user name

Returns

user name

getXmlBuffer()

public java.lang.String getXmlBuffer()

Get the content of the XML buffer

Returns

the buffer content

getXmlCLOBFileName()

public java.lang.String getXmlCLOBFileName()

Get XML CLOB file name

Returns

XML CLOB file name

getXmlCLOBTableName()

public java.lang.String getXmlCLOBTableName()

Get XML CLOB table name

Returns

XML CLOB table name

getXmlFileName()

public java.lang.String getXmlFileName()

Get XML file name

Returns

XML file name

getXMLStringFromSQL(String)

public java.lang.String getXMLStringFromSQL(java.lang.String sqlText)

Get XML presentation of result set from SQL query

Returns

the query result set as XML string

getXslBuffer()

public java.lang.String getXslBuffer()

Get the content of the XSL buffer

Returns

the buffer content

getXslCLOBFileName()

public java.lang.String getXslCLOBFileName()

Get the XSL CLOB file name

Returns

XSL CLOB file name

getXslCLOBTableName()

public java.lang.String getXslCLOBTableName()

Get XSL CLOB table name

Returns

XSL CLOB table name

getXslFileName()

public java.lang.String getXslFileName()

Get XSL file name

Returns

XSL file name

loadResBuffer(String)

public void loadResBuffer(java.lang.String filename)

Load the result buffer from file

Parameters

filename - file name

loadResBuffer(String, String)

public void loadResBuffer(java.lang.String tablename, java.lang.String filename)

Load the result buffer from CLOB file

Parameters

tablename - CLOB table name

filename - CLOB file name

loadResBuffer(XMLDocument)

public void loadResBuffer(oracle.xml.parser.v2.XMLDocument resdoc)

Load the result buffer from XMLDocument

Parameters

resdoc - - the XMLDocument

loadResBufferFromClob()

public void loadResBufferFromClob()

Load the result buffer from CLOB file

loadResBufferFromFile()

public void loadResBufferFromFile()

Load the result buffer from file

loadXmlBuffer(String)

public void loadXmlBuffer(java.lang.String filename)

Load the XML buffer from file

Parameters

filename - file name

loadXmlBuffer(String, String)

public void loadXmlBuffer(java.lang.String tablename, java.lang.String filename)

Load the XML buffer from CLOB file

Parameters

tablename - CLOB table name

filename - CLOB file name

loadXmlBuffer(XMLDocument)

public void loadXmlBuffer(oracle.xml.parser.v2.XMLDocument xmldoc)

Load the XML buffer from XMLDocument

Parameters

filename - file name

loadXmlBufferFromClob()

public void loadXmlBufferFromClob()

Load the XML buffer from CLOB file

loadXmlBufferFromFile()

public void loadXmlBufferFromFile()

Load the XML buffer from file

loadXMLBufferFromSQL(String)

public void loadXMLBufferFromSQL(java.lang.String sqltext)

Load the XML buffer from SQL result set

Parameters

sqltext - SQL text

loadXslBuffer(String)

public void loadXslBuffer(java.lang.String filename)

Load the XSL buffer from file

Parameters

filename - file name

loadXslBuffer(String, String)

public void loadXslBuffer(java.lang.String tablename, java.lang.String filename)

Load the XSL buffer from CLOB file

Parameters

tablename - CLOB table name

filename - CLOB file name

loadXslBuffer(XMLDocument)

public void loadXslBuffer(oracle.xml.parser.v2.XMLDocument xsldoc)

Load the XSL buffer from XMLDocument

Parameters

xsldoc - - the XML Document

loadXslBufferFromClob()

public void loadXslBufferFromClob()

Load the XSL buffer from CLOB file

loadXslBufferFromFile()

public void loadXslBufferFromFile()

Load the XSL buffer from file

parseResBuffer()

public oracle.xml.parser.v2.XMLDocument parseResBuffer()

Parse the result buffer and refresh the tree view and source view

Returns

XMLDocument

parseXmlBuffer()

public oracle.xml.parser.v2.XMLDocument parseXmlBuffer()

Parse the XML buffer and refresh the tree view and source view

Returns

XMLDocument

parseXslBuffer()

public oracle.xml.parser.v2.XMLDocument parseXslBuffer()

Parse the XSL buffer and refresh the tree view and source view

Returns

XMLDocument

saveResBuffer(String)

public void saveResBuffer(java.lang.String filename)

Save the result buffer to file

Parameters

filename - CLOB file name

saveResBuffer(String, String)

public void saveResBuffer(java.lang.String tablename, java.lang.String filename)

Save the result buffer to CLOB file

Parameters

tablename - CLOB table name

filename - CLOB file name

saveResBufferToClob()

public void saveResBufferToClob()

Save the result buffer to CLOB file

saveResBufferToFile()

public void saveResBufferToFile()

Save the result buffer to file

saveXmlBuffer(String)

public void saveXmlBuffer(java.lang.String filename)

Save the XML buffer to file

Parameters

filename - file name

saveXmlBuffer(String, String)

public void saveXmlBuffer(java.lang.String tablename, java.lang.String filename)

Save the XML buffer to CLOB file

Parameters

tablename - CLOB table name

filename - CLOB file name

saveXmlBufferToClob()

public void saveXmlBufferToClob()

Save the XML buffer to CLOB file

saveXmlBufferToFile()

public void saveXmlBufferToFile()

Save the XML buffer to file

saveXslBuffer(String)

public void saveXslBuffer(java.lang.String filename)

Save the XSL buffer to file

Parameters

filename - file name

saveXslBuffer(String, String)

public void saveXslBuffer(java.lang.String tablename, java.lang.String filename)

Save the XSL buffer to CLOB file

Parameters

tablename - CLOB table name

filename - CLOB file name

saveXslBufferToClob()

public void saveXslBufferToClob()

Save the XSL buffer to CLOB file

saveXslBufferToFile()

public void saveXslBufferToFile()

Save the XSL buffer to file

setHostname(String)

public void setHostname(java.lang.String hostname)

Set database host name

Parameters

hostname - the host name

setInstancename(String)

public void setInstancename(java.lang.String instancename)

Set database instance name

Parameters

instancename - the database instance name

setPassword(String)

public void setPassword(java.lang.String password)

Set user password

Parameters

password - the user password

setPort(String)

public void setPort(java.lang.String port)

Set database port number

Parameters

port - String containing the port number

setResBuffer(String)

public void setResBuffer(java.lang.String text)

Set new text in the result buffer

Parameters

text - the new text

setResCLOBFileName(String)

public void setResCLOBFileName(java.lang.String name)

Set Result CLOB file name

Parameters

name - Result CLOB file name

setResCLOBTableName(String)

public void setResCLOBTableName(java.lang.String name)

Set Result CLOB table name

Parameters

name - Result CLOB table name

setResFileName(String)

public void setResFileName(java.lang.String name)

Set Result file name

Parameters

name - Result file name

setResHtmlView(boolean)

public void setResHtmlView(boolean on)

Show the result buffer as rendered HTML

setResSourceEditView(boolean)

public void setResSourceEditView(boolean on)

Show the result buffer as XML source and enter edit mode

setResSourceView(boolean)

public void setResSourceView(boolean on)

Show the result buffer as XML source

setResTreeView(boolean)

public void setResTreeView(boolean on)

Show the result buffer as XML tree view

setUsername(String)

public void setUsername(java.lang.String username)

Set user name

Parameters

username - the user name

setXmlBuffer(String)

public void setXmlBuffer(java.lang.String text)

Set new text in the XML buffer

Parameters

text - XML text

setXmlCLOBFileName(String)

public void setXmlCLOBFileName(java.lang.String name)

Set XML CLOB table name

Parameters

name - XML CLOB table name

setXmlCLOBTableName(String)

public void setXmlCLOBTableName(java.lang.String name)

Set XML CLOB table name

Parameters

name - XML CLOB table name

setXmlFileName(String)

public void setXmlFileName(java.lang.String name)

Set XML file name

Parameters

name - XML file name

setXmlSourceEditView(boolean)

public void setXmlSourceEditView(boolean on)

Show the XML buffer as XML source and enter edit mode

setXmlSourceView(boolean)

public void setXmlSourceView(boolean on)

Show the XML buffer as XML source

setXmlTreeView(boolean)

public void setXmlTreeView(boolean on)

Show the XML buffer as tree

setXslBuffer(String)

public void setXslBuffer(java.lang.String text)

Set new text in the XSL buffer

Parameters

text - XSL text

setXslCLOBFileName(String)

public void setXslCLOBFileName(java.lang.String name)

Set XSL CLOB file name

Parameters

name - XSL CLOB file name

setXslCLOBTableName(String)

public void setXslCLOBTableName(java.lang.String name)

Set XSL CLOB table name

Parameters

name - XSL CLOB table name

setXslFileName(String)

public void setXslFileName(java.lang.String name)

Set XSL file name

Parameters

name - XSL file name

setXslSourceEditView(boolean)

public void setXslSourceEditView(boolean on)

Show the XSL buffer as XML source and enter edit mode

setXslSourceView(boolean)

public void setXslSourceView(boolean on)

Show the XSL buffer as XML source

setXslTreeView(boolean)

public void setXslTreeView(boolean on)

Show the XSL buffer as tree

transformToDoc()

public oracle.xml.parser.v2.XMLDocument transformToDoc()

Transfroms the content of the XML buffer by applying the stylesheet from the XSL buffer.

transformToRes()

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

transformToString()

public java.lang.String transformToString()

Transfroms the content of the XML buffer by applying the stylesheet from the XSL buffer.


DBViewerBeanInfo

Syntax

public class DBViewerBeanInfo extends java.beans.SimpleBeanInfo
 
java.lang.Object
  |
  +--java.beans.SimpleBeanInfo
        |
        +--oracle.xml.dbviewer.DBViewerBeanInfo

All Implemented Interfaces

java.beans.BeanInfo

Constructors

DBViewerBeanInfo()

public  DBViewerBeanInfo()

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


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