|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--java.awt.Component | +--java.awt.Container | +--javax.swing.JComponent | +--javax.swing.JPanel | +--oracle.xml.dbviewer.DBViewer
Java bean that can be used to display database queries or any XML by applying XSL stylesheets and visualizing the resulted HTML in scrollable swing panel. This bean has tree buffers: XML, XSL and result buffer. The bean API allow 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 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.
Inner classes inherited from class javax.swing.JPanel |
javax.swing.JPanel.AccessibleJPanel |
Inner classes inherited from class javax.swing.JComponent |
javax.swing.JComponent.AccessibleJComponent |
Fields inherited from class javax.swing.JComponent |
accessibleContext,
listenerList,
TOOL_TIP_TEXT_KEY,
ui,
UNDEFINED_CONDITION,
WHEN_ANCESTOR_OF_FOCUSED_COMPONENT,
WHEN_FOCUSED,
WHEN_IN_FOCUSED_WINDOW |
Fields inherited from class java.awt.Component |
BOTTOM_ALIGNMENT,
CENTER_ALIGNMENT,
LEFT_ALIGNMENT,
RIGHT_ALIGNMENT,
TOP_ALIGNMENT |
Constructor Summary | |
DBViewer()
Constructs a new instance. |
Method Summary | |
java.lang.String |
getHostname()
Get database host name |
java.lang.String |
getInstancename()
Get database instance name |
java.lang.String |
getPassword()
Get user password |
java.lang.String |
getPort()
Get database port number |
java.lang.String |
getResBuffer()
Get the content of the result buffer |
java.lang.String |
getResCLOBFileName()
Get result CLOB file name |
java.lang.String |
getResCLOBTableName()
Get result CLOB table name |
java.lang.String |
getResFileName()
Get Result file name |
java.lang.String |
getUsername()
Get user name |
java.lang.String |
getXmlBuffer()
Get the content of the XML buffer |
java.lang.String |
getXmlCLOBFileName()
Get XML CLOB file name |
java.lang.String |
getXmlCLOBTableName()
Get XML CLOB table name |
java.lang.String |
getXmlFileName()
Get XML file name |
java.lang.String |
getXMLStringFromSQL(java.lang.String sqlText)
Get XML presentation of result set from SQL query |
java.lang.String |
getXslBuffer()
Get the content of the XSL buffer |
java.lang.String |
getXslCLOBFileName()
Get the XSL CLOB file name |
java.lang.String |
getXslCLOBTableName()
Get XSL CLOB table name |
java.lang.String |
getXslFileName()
Get XSL file name |
void |
loadResBuffer(java.lang.String filename)
Load the result buffer from file |
void |
loadResBuffer(java.lang.String tablename,
java.lang.String filename)
Load the result buffer from CLOB file |
void |
loadResBuffer(XMLDocument resdoc)
Load the result buffer from XMLDocument |
void |
loadResBufferFromClob()
Load the result buffer from CLOB file |
void |
loadResBufferFromFile()
Load the result buffer from file |
void |
loadXmlBuffer(java.lang.String filename)
Load the XML buffer from file |
void |
loadXmlBuffer(java.lang.String tablename,
java.lang.String filename)
Load the XML buffer from CLOB file |
void |
loadXmlBuffer(XMLDocument xmldoc)
Load the XML buffer from XMLDocument |
void |
loadXmlBufferFromClob()
Load the XML buffer from CLOB file |
void |
loadXmlBufferFromFile()
Load the XML buffer from file |
void |
loadXMLBufferFromSQL(java.lang.String sqltext)
Load the XML buffer from SQL result set |
void |
loadXslBuffer(java.lang.String filename)
Load the XSL buffer from file |
void |
loadXslBuffer(java.lang.String tablename,
java.lang.String filename)
Load the XSL buffer from CLOB file |
void |
loadXslBuffer(XMLDocument xsldoc)
Load the XSL buffer from XMLDocument |
void |
loadXslBufferFromClob()
Load the XSL buffer from CLOB file |
void |
loadXslBufferFromFile()
Load the XSL buffer from file |
XMLDocument |
parseResBuffer()
Parse the result buffer and refresh the tree view and source view |
XMLDocument |
parseXmlBuffer()
Parse the XML buffer and refresh the tree view and source view |
XMLDocument |
parseXslBuffer()
Parse the XSL buffer and refresh the tree view and source view |
void |
saveResBuffer(java.lang.String filename)
Save the result buffer to file |
void |
saveResBuffer(java.lang.String tablename,
java.lang.String filename)
Save the result buffer to CLOB file |
void |
saveResBufferToClob()
Save the result buffer to CLOB file |
void |
saveResBufferToFile()
Save the result buffer to file |
void |
saveXmlBuffer(java.lang.String filename)
Save the XML buffer to file |
void |
saveXmlBuffer(java.lang.String tablename,
java.lang.String filename)
Save the XML buffer to CLOB file |
void |
saveXmlBufferToClob()
Save the XML buffer to CLOB file |
void |
saveXmlBufferToFile()
Save the XML buffer to file |
void |
saveXslBuffer(java.lang.String filename)
Save the XSL buffer to file |
void |
saveXslBuffer(java.lang.String tablename,
java.lang.String filename)
Save the XSL buffer to CLOB file |
void |
saveXslBufferToClob()
Save the XSL buffer to CLOB file |
void |
saveXslBufferToFile()
Save the XSL buffer to file |
void |
setHostname(java.lang.String hostname)
Set database host name |
void |
setInstancename(java.lang.String instancename)
Set database instance name |
void |
setPassword(java.lang.String password)
Set user password |
void |
setPort(java.lang.String port)
Set database port number |
void |
setResBuffer(java.lang.String text)
Set new text in the result buffer |
void |
setResCLOBFileName(java.lang.String name)
Set Result CLOB file name |
void |
setResCLOBTableName(java.lang.String name)
Set Result CLOB table name |
void |
setResFileName(java.lang.String name)
Set Result file name |
void |
setResHtmlView(boolean on)
Show the result buffer as rendered HTML |
void |
setResSourceEditView(boolean on)
Show the result buffer as XML source and enter edit mode |
void |
setResSourceView(boolean on)
Show the result buffer as XML source |
void |
setResTreeView(boolean on)
Show the result buffer as XML tree view |
void |
setUsername(java.lang.String username)
Set user name |
void |
setXmlBuffer(java.lang.String text)
Set new text in the XML buffer |
void |
setXmlCLOBFileName(java.lang.String name)
Set XML CLOB table name |
void |
setXmlCLOBTableName(java.lang.String name)
Set XML CLOB table name |
void |
setXmlFileName(java.lang.String name)
Set XML file name |
void |
setXmlSourceEditView(boolean on)
Show the XML buffer as XML source and enter edit mode |
void |
setXmlSourceView(boolean on)
Show the XML buffer as XML source |
void |
setXmlTreeView(boolean on)
Show the XML buffer as tree |
void |
setXslBuffer(java.lang.String text)
Set new text in the XSL buffer |
void |
setXslCLOBFileName(java.lang.String name)
Set XSL CLOB file name |
void |
setXslCLOBTableName(java.lang.String name)
Set XSL CLOB table name |
void |
setXslFileName(java.lang.String name)
Set XSL file name |
void |
setXslSourceEditView(boolean on)
Show the XSL buffer as XML source and enter edit mode |
void |
setXslSourceView(boolean on)
Show the XSL buffer as XML source |
void |
setXslTreeView(boolean on)
Show the XSL buffer as tree |
XMLDocument |
transformToDoc()
Transfroms the content of the XML buffer by applying the stylesheet from the XSL buffer. |
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 |
java.lang.String |
transformToString()
Transfroms the content of the XML buffer by applying the stylesheet from the XSL buffer. |
Methods inherited from class javax.swing.JPanel |
getAccessibleContext,
getUIClassID,
paramString,
updateUI |
Methods inherited from class javax.swing.JComponent |
addAncestorListener,
addNotify,
addPropertyChangeListener,
addPropertyChangeListener,
addVetoableChangeListener,
computeVisibleRect,
contains,
createToolTip,
firePropertyChange,
firePropertyChange,
firePropertyChange,
firePropertyChange,
firePropertyChange,
firePropertyChange,
firePropertyChange,
firePropertyChange,
firePropertyChange,
fireVetoableChange,
getActionForKeyStroke,
getAlignmentX,
getAlignmentY,
getAutoscrolls,
getBorder,
getBounds,
getClientProperty,
getComponentGraphics,
getConditionForKeyStroke,
getDebugGraphicsOptions,
getGraphics,
getHeight,
getInsets,
getInsets,
getLocation,
getMaximumSize,
getMinimumSize,
getNextFocusableComponent,
getPreferredSize,
getRegisteredKeyStrokes,
getRootPane,
getSize,
getToolTipLocation,
getToolTipText,
getToolTipText,
getTopLevelAncestor,
getVisibleRect,
getWidth,
getX,
getY,
grabFocus,
hasFocus,
isDoubleBuffered,
isFocusCycleRoot,
isFocusTraversable,
isLightweightComponent,
isManagingFocus,
isOpaque,
isOptimizedDrawingEnabled,
isPaintingTile,
isRequestFocusEnabled,
isValidateRoot,
paint,
paintBorder,
paintChildren,
paintComponent,
paintImmediately,
paintImmediately,
print,
printAll,
processComponentKeyEvent,
processFocusEvent,
processKeyEvent,
processMouseMotionEvent,
putClientProperty,
registerKeyboardAction,
registerKeyboardAction,
removeAncestorListener,
removeNotify,
removePropertyChangeListener,
removePropertyChangeListener,
removeVetoableChangeListener,
repaint,
repaint,
requestDefaultFocus,
requestFocus,
resetKeyboardActions,
reshape,
revalidate,
scrollRectToVisible,
setAlignmentX,
setAlignmentY,
setAutoscrolls,
setBackground,
setBorder,
setDebugGraphicsOptions,
setDoubleBuffered,
setEnabled,
setFont,
setForeground,
setMaximumSize,
setMinimumSize,
setNextFocusableComponent,
setOpaque,
setPreferredSize,
setRequestFocusEnabled,
setToolTipText,
setUI,
setVisible,
unregisterKeyboardAction,
update |
Methods inherited from class java.awt.Container |
add,
add,
add,
add,
add,
addContainerListener,
addImpl,
countComponents,
deliverEvent,
doLayout,
findComponentAt,
findComponentAt,
getComponent,
getComponentAt,
getComponentAt,
getComponentCount,
getComponents,
getLayout,
insets,
invalidate,
isAncestorOf,
layout,
list,
list,
locate,
minimumSize,
paintComponents,
preferredSize,
printComponents,
processContainerEvent,
processEvent,
remove,
remove,
removeAll,
removeContainerListener,
setCursor,
setLayout,
validate,
validateTree |
Methods inherited from class java.awt.Component |
action,
add,
addComponentListener,
addFocusListener,
addInputMethodListener,
addKeyListener,
addMouseListener,
addMouseMotionListener,
bounds,
checkImage,
checkImage,
coalesceEvents,
contains,
createImage,
createImage,
disable,
disableEvents,
dispatchEvent,
enable,
enable,
enableEvents,
enableInputMethods,
getBackground,
getBounds,
getColorModel,
getComponentOrientation,
getCursor,
getDropTarget,
getFont,
getFontMetrics,
getForeground,
getInputContext,
getInputMethodRequests,
getLocale,
getLocation,
getLocationOnScreen,
getName,
getParent,
getPeer,
getSize,
getToolkit,
getTreeLock,
gotFocus,
handleEvent,
hide,
imageUpdate,
inside,
isDisplayable,
isEnabled,
isLightweight,
isShowing,
isValid,
isVisible,
keyDown,
keyUp,
list,
list,
list,
location,
lostFocus,
mouseDown,
mouseDrag,
mouseEnter,
mouseExit,
mouseMove,
mouseUp,
move,
nextFocus,
paintAll,
postEvent,
prepareImage,
prepareImage,
processComponentEvent,
processInputMethodEvent,
processMouseEvent,
remove,
removeComponentListener,
removeFocusListener,
removeInputMethodListener,
removeKeyListener,
removeMouseListener,
removeMouseMotionListener,
repaint,
repaint,
repaint,
resize,
resize,
setBounds,
setBounds,
setComponentOrientation,
setDropTarget,
setLocale,
setLocation,
setLocation,
setName,
setSize,
setSize,
show,
show,
size,
toString,
transferFocus |
Methods inherited from class java.lang.Object |
clone,
equals,
finalize,
getClass,
hashCode,
notify,
notifyAll,
wait,
wait,
wait |
Constructor Detail |
public DBViewer()
Method Detail |
public void setUsername(java.lang.String username)
username
- the user namepublic java.lang.String getUsername()
public void setPassword(java.lang.String password)
password
- the user passwordpublic java.lang.String getPassword()
public void setHostname(java.lang.String hostname)
hostname
- the host namepublic java.lang.String getHostname()
public void setPort(java.lang.String port)
port
- String containing the port numberpublic java.lang.String getPort()
public void setInstancename(java.lang.String instancename)
instancename
- the database instance namepublic java.lang.String getInstancename()
public void setXmlFileName(java.lang.String name)
name
- XML file namepublic void setXmlCLOBTableName(java.lang.String name)
name
- XML CLOB table namepublic void setXmlCLOBFileName(java.lang.String name)
name
- XML CLOB table namepublic java.lang.String getXmlFileName()
public java.lang.String getXmlCLOBTableName()
public java.lang.String getXmlCLOBFileName()
public void setXslFileName(java.lang.String name)
name
- XSL file namepublic void setXslCLOBTableName(java.lang.String name)
name
- XSL CLOB table namepublic void setXslCLOBFileName(java.lang.String name)
name
- XSL CLOB file namepublic java.lang.String getXslFileName()
public java.lang.String getXslCLOBTableName()
public java.lang.String getXslCLOBFileName()
public void setResFileName(java.lang.String name)
name
- Result file namepublic void setResCLOBTableName(java.lang.String name)
name
- Result CLOB table namepublic void setResCLOBFileName(java.lang.String name)
name
- Result CLOB file namepublic java.lang.String getResFileName()
public java.lang.String getResCLOBTableName()
public java.lang.String getResCLOBFileName()
public void loadXmlBuffer(java.lang.String tablename, java.lang.String filename) throws java.lang.Exception
tablename
- CLOB table namefilename
- CLOB file namepublic void loadXmlBuffer(XMLDocument xmldoc) throws java.lang.Exception
filename
- file namepublic void loadXmlBuffer(java.lang.String filename) throws java.lang.Exception
filename
- file namepublic void loadXmlBufferFromClob() throws java.lang.Exception
public void loadXmlBufferFromFile() throws java.lang.Exception
public void loadXMLBufferFromSQL(java.lang.String sqltext) throws java.lang.Exception
sqltext
- SQL textpublic void saveXmlBufferToClob() throws java.lang.Exception
public void saveXmlBufferToFile() throws java.lang.Exception
public void saveXmlBuffer(java.lang.String tablename, java.lang.String filename) throws java.lang.Exception
tablename
- CLOB table namefilename
- CLOB file namepublic void saveXmlBuffer(java.lang.String filename) throws java.lang.Exception
filename
- file namepublic XMLDocument parseXmlBuffer() throws java.lang.Exception
public void setXmlBuffer(java.lang.String text)
text
- XML textpublic java.lang.String getXmlBuffer()
public java.lang.String getXMLStringFromSQL(java.lang.String sqlText) throws java.lang.Exception
public void loadXslBuffer(java.lang.String tablename, java.lang.String filename) throws java.lang.Exception
tablename
- CLOB table namefilename
- CLOB file namepublic void loadXslBuffer(java.lang.String filename) throws java.lang.Exception
filename
- file namepublic void loadXslBuffer(XMLDocument xsldoc) throws java.lang.Exception
xsldoc
- - the XML Documentpublic void loadXslBufferFromClob() throws java.lang.Exception
public void loadXslBufferFromFile() throws java.lang.Exception
public void saveXslBufferToClob() throws java.lang.Exception
public void saveXslBufferToFile() throws java.lang.Exception
public void saveXslBuffer(java.lang.String tablename, java.lang.String filename) throws java.lang.Exception
tablename
- CLOB table namefilename
- CLOB file namepublic void saveXslBuffer(java.lang.String filename) throws java.lang.Exception
filename
- file namepublic XMLDocument parseXslBuffer() throws java.lang.Exception
public void setXslBuffer(java.lang.String text)
text
- XSL textpublic java.lang.String getXslBuffer()
public void loadResBuffer(java.lang.String tablename, java.lang.String filename) throws java.lang.Exception
tablename
- CLOB table namefilename
- CLOB file namepublic void loadResBuffer(java.lang.String filename) throws java.lang.Exception
filename
- file namepublic void loadResBuffer(XMLDocument resdoc) throws java.lang.Exception
resdoc
- - the XMLDocumentpublic void loadResBufferFromClob() throws java.lang.Exception
public void loadResBufferFromFile() throws java.lang.Exception
public void saveResBufferToClob() throws java.lang.Exception
public void saveResBufferToFile() throws java.lang.Exception
public void saveResBuffer(java.lang.String tablename, java.lang.String filename) throws java.lang.Exception
tablename
- CLOB table namefilename
- CLOB file namepublic void saveResBuffer(java.lang.String filename) throws java.lang.Exception
filename
- CLOB file namepublic XMLDocument parseResBuffer() throws java.lang.Exception
public void setResBuffer(java.lang.String text)
text
- the new textpublic java.lang.String getResBuffer()
public void transformToRes()
public XMLDocument transformToDoc()
public java.lang.String transformToString()
public void setXmlSourceView(boolean on)
public void setXmlSourceEditView(boolean on)
public void setXmlTreeView(boolean on)
public void setXslSourceView(boolean on)
public void setXslSourceEditView(boolean on)
public void setXslTreeView(boolean on)
public void setResHtmlView(boolean on)
public void setResSourceView(boolean on)
public void setResSourceEditView(boolean on)
public void setResTreeView(boolean on)
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |