Oracle9i XML Reference Release 1 (9.0.1) Part Number A88899-01 |
|
public class DOMBuilder extends java.lang.Object implements java.io.Serializable, oracle.xml.async.DOMBuilderConstants, java.lang.Runnable java.lang.Object | +--oracle.xml.async.DOMBuilder
oracle.xml.async.DOMBuilderConstants, java.lang.Runnable, java.io.Serializable
This class encapsulates an eXtensible Markup Language (XML) 1.0 parser to parse an XML document and build a DOM tree. The parsing is done in a separate thread and DOMBuilderListener interface must be used for notification when the tree is built.
protected org.xml.sax.InputSource inSource
InputSource containing XML data to parse
protected java.io.InputStream inStream
InputStream containing XML data to parse
protected java.lang.String inString
String containing the URL to parse XML data from
protected int methodToCall
XML Parser method to call based on input types
protected java.io.Reader reader
java.io.Reader containing XML data to be parsed
protected oracle.xml.async.XMLDocument result
XML Document being parsed
protected java.lang.String rootName
Name of the XML element to be treated as root
protected java.net.URL url
URL to parse XML data from
public DOMBuilder()
Creates a new parser object.
public DOMBuilder(int id)
Creates a new parser object with a given id.
id - The DOMBuilder id.
public void addDOMBuilderErrorListener(DOMBuilderErrorListener p0)
Adds DOMBuilderErrorListener
p1 - The DOMBuilderErrorListener to add
public void addDOMBuilderListener(DOMBuilderListener p0)
Adds DOMBuilderListener
p1 - The DOMBuilderListener to add
public synchronized oracle.xml.async.DTD getDoctype()
Get the DTD
The DTD
public synchronized oracle.xml.async.XMLDocument getDocument()
Gets the document
The document being parsed
public int getId()
Returns the parser object id.
The DOMBuilder id
public synchronized java.lang.String getReleaseVersion()
Returns the release version of the Oracle XML Parser
the release version string
public synchronized org.w3c.dom.Document getResult()
Gets the document
The document being parsed
public synchronized boolean getValidationMode()
Returns the validation mode
true if the XML parser is validating false if not
public final synchronized void parse(org.xml.sax.InputSource in)
Parses the XML from given input source
in - the org.xml.sax.InputSouce to parse
XMLParseException - if syntax or other error encountered.
SAXException - Any SAX exception, possibly wrapping another exception.
IOException - IO Error.
public final synchronized void parse(java.io.InputStream in)
Parses the XML from given input stream. The base URL should be set for resolving external entities and DTD.
in - the InputStream containing XML data to parse.
XMLParseException - if syntax or other error encountered.
SAXException - Any SAX exception, possibly wrapping another exception.
IOException - IO Error.
oracle.xml.parser.v2.XMLParser
public final synchronized void parse(java.io.Reader r)
Parses the XML from given input stream. The base URL should be set for resolving external entities and DTD.
r - the Reader containing XML data to parse.
XMLParseException - if syntax or other error encountered.
SAXException - Any SAX exception, possibly wrapping another exception.
IOException - IO Error.
oracle.xml.parser.v2.XMLParser
public final synchronized void parse(java.lang.String in)
Parses the XML from the URL indicated
in - the String containing the URL to parse from
XMLParseException - if syntax or other error encountered.
SAXException - Any SAX exception, possibly wrapping another exception.
IOException - IO Error.
public final synchronized void parse(java.net.URL url)
Parses the XML document pointed to by the given URL and creates the corresponding XML document hierarchy.
url - the url points to the XML document to parse.
XMLParseException - if syntax or other error encountered.
SAXException - Any SAX exception, possibly wrapping another exception.
IOException - IO Error.
public final synchronized void parseDTD(org.xml.sax.InputSource in, java.lang.String rootName)
Parses the XML External DTD from given input source
in - the org.xml.sax.InputSouce to parse
rootName - the element to be used as root Element
XMLParseException - if syntax or other error encountered.
SAXException - Any SAX exception, possibly wrapping another exception.
IOException - IO Error.
public final synchronized void parseDTD(java.io.InputStream in, java.lang.String rootName)
Parses the XML External DTD from given input stream. The base URL should be set for resolving external entities and DTD.
in - the InputStream containing XML data to parse.
rootName - the element to be used as root Element
XMLParseException - if syntax or other error encountered.
SAXException - Any SAX exception, possibly wrapping another exception.
IOException - IO Error.
oracle.xml.parser.v2.XMLParser
public final synchronized void parseDTD(java.io.Reader r, java.lang.String rootName)
Parses the XML External DTD from given input stream. The base URL should be set for resolving external entities and DTD.
r - the Reader containing XML data to parse.
rootName - the element to be used as root Element
XMLParseException - if syntax or other error encountered.
SAXException - Any SAX exception, possibly wrapping another exception.
IOException - IO Error.
oracle.xml.parser.v2.XMLParser
public final synchronized void parseDTD(java.lang.String in, java.lang.String rootName)
Parses the XML External DTD from the URL indicated
in - the String containing the URL to parse from
rootName - the element to be used as root Element
XMLParseException - if syntax or other error encountered.
SAXException - Any SAX exception, possibly wrapping another exception.
IOException - IO Error.
public final synchronized void parseDTD(java.net.URL url, java.lang.String rootName)
Parses the XML External DTD document pointed to by the given URL and creates the corresponding XML document hierarchy.
url - the url points to the XML document to parse.
rootName - the element to be used as root Element
XMLParseException - if syntax or other error encountered.
SAXException - Any SAX exception, possibly wrapping another exception.
IOException - IO Error.
public synchronized void removeDOMBuilderErrorListener(DOMBuilderErrorListener p0)
Remove DOMBuilderErrorListener
p1 - The DOMBuilderErrorListener to remove
public synchronized void removeDOMBuilderListener(DOMBuilderListener p0)
Remove DOMBuilderListener
p1 - The DOMBuilderListener to remove
public void run()
This method runs in a thread
java.lang.Runnable.run() in interface java.lang.Runnable
public synchronized void setBaseURL(java.net.URL url)
Set the base URL for loading external enitites and DTDs. This method should to be called if the parse(InputStream) is used to parse the XML Document
url - The base URL
public void setDebugMode(boolean flag)
Sets a flag to turn on debug information in the document
flag - determines whether debug info is stored
public synchronized void setDoctype(oracle.xml.async.DTD dtd)
Set the DTD
dtd - DTD to set and used while parsing
public final synchronized void setErrorStream(java.io.OutputStream out)
Creates an output stream for the output of errors and warnings. If an output stream for errors is not specified, the parser will use the standard error output stream System.err for outputting errors and warnings.
out - The output stream to use for errors and warnings
public final synchronized void setErrorStream(java.io.OutputStream out, java.lang.String enc)
Creates an output stream for the output of errors and warnings. If an output stream for errors is not specified, the parser will use the standard error output stream System.err for outputting errors and warnings. Additionally, an .exception is thrown if the encoding specified is unsupported.
out - The output stream to use for errors and warnings
enc - the encoding to use
IOException - if an unsupported encoding is specified
public final synchronized void setErrorStream(java.io.PrintWriter out)
Creates an output stream for the output of errors and warnings. If an output stream for errors is not specified, the parser will use the standard error output stream System.err for outputting errors and warnings.
out - The PrintWriter to use for errors and warnings
public synchronized void setNodeFactory(oracle.xml.async.NodeFactory factory)
Set the node factory. Applications can extend the NodeFactory and register it through this method. The parser will then use the user supplied NodeFactory to create nodes of the DOM tree.
factory - The NodeFactory to set
XMLParseException - if an invalid factory is set
NodeFactory
public synchronized void setPreserveWhitespace(boolean flag)
Set the white space preserving mode
flag - preserving mode
public synchronized void setValidationMode(boolean yes)
Set the validation mode
yes - determines whether the XML parser should be validating
public synchronized void showWarnings(boolean yes)
Switch to determine whether to print warnings
yes - determines whether warnings should be shown
public class DOMBuilderBeanInfo extends java.beans.SimpleBeanInfo java.lang.Object | +--java.beans.SimpleBeanInfo | +--oracle.xml.async.DOMBuilderBeanInfo
java.beans.BeanInfo
This class provides information about the DOMBuilder Bean.
public DOMBuilderBeanInfo()
The default Constructor
public java.awt.Image getIcon(int iconKind)
Gets an image object that can be used to represent DOMBuilder bean in toolbars, toolboxes, etc.
java.beans.SimpleBeanInfo.getIcon(int) in class java.beans.SimpleBeanInfo
iconKind - The kind of icon requested.
An image object representing the requested icon type for DOMBuilder bean.
public java.beans.PropertyDescriptor[] getPropertyDescriptors()
Gets the DOMBuilder bean's PropertyDescriptors
java.beans.SimpleBeanInfo.getPropertyDescriptors() in class java.beans.SimpleBeanInfo
An array of PropertyDescriptors describing the editable properties supported by DOMBuilder bean.
public class DOMBuilderErrorEvent extends java.util.EventObject java.lang.Object | +--java.util.EventObject | +--oracle.xml.async.DOMBuilderErrorEvent
java.io.Serializable
This class defines the error event which is sent when parse exception occurs.
protected java.lang.Exception e
The exception being raised.
public DOMBuilderErrorEvent(java.lang.Object p0, java.lang.Exception e)
Constructor for DOMBuilderErrorEvent.
p0 - The Object that created this event.
e - The Exception raised.
public java.lang.Exception getException()
Gets the Exception
The Exception beind raised
public java.lang.String getMessage()
Returns the error message generated by the parser
The error message string
public interface DOMBuilderErrorListener extends java.util.EventListener
java.util.EventListener
This interface must be implemented in order to receive notifications when error is found during parsing. The class implementing this interface must be added to the DOMBuilder using addDOMBuilderErrorListener method.
public void domBuilderErrorCalled(DOMBuilderErrorEvent p0)
This method is called when a parse error occurs.
p0 - The DOMBuilderErrorEvent object produced by the DOMBuilder as result of parsing error
public class DOMBuilderEvent extends java.util.EventObject java.lang.Object | +--java.util.EventObject | +--oracle.xml.async.DOMBuilderEvent
java.io.Serializable
The event object that DOMBuilder uses to notify all registered listeners about parse events.
protected int id
ID of the source DOMBuilder object
public DOMBuilderEvent(java.lang.Object p0, int p1)
Creates a new DOMBuilderEvent
p0 - The Object creating this event.
p1 - Id of the DOMBuilder creating this event.
public int getID()
Returns unique id of the DOMBuilder object which can be used to identify which instance of the DOMBuilder generated this event in cases where multiple instances of DOMBuilder may be working in background.
The unique id of the source DOMBuilder for this event.
public interface DOMBuilderListener extends java.util.EventListener
java.util.EventListener
This interface must be implemented in order to receive notifications about events during the asyncronous parsing. The class implementing this interface must be added to the DOMBuilder using addDOMBuilderListener method.
public void domBuilderError(DOMBuilderEvent p0)
This method is called when parse error occur.
p0 - - The DOMBuilderEvent object produced by the DOMBuilder
public void domBuilderOver(DOMBuilderEvent p0)
This method is called when the parse is complete
p0 - - The DOMBuilderEvent object produced by the DOMBuilder
public void domBuilderStarted(DOMBuilderEvent p0)
This method is called when parse starts
p0 - - The DOMBuilderEvent object produced by the DOMBuilder
public class ResourceManager extends java.lang.Object java.lang.Object | +--oracle.xml.async.ResourceManager
public ResourceManager(int i)
The ResourceManager constructor
<code>i</code> - - the number of resources to manage
public boolean activeFound()
Checks if any of the logical resources being managed are in active use
true - if one or more resource is in use false - if none of the resources are in use
public synchronized void getResource()
If the number of resources available for use is nonzero, the method decreases the number of resources by one. Otherwise, it waits until a resource is released & it becomes available for use.
public void releaseResource()
Releases a resource. When this method is called, the number of resources avialable is increased by one.
public void sleep(int i)
Allows usage of Thread.sleep() without try/catch
public class XSLTransformer extends java.lang.Object implements java.io.Serializable, oracle.xml.async.XSLTransformerConstants, java.lang.Runnable java.lang.Object | +--oracle.xml.async.XSLTransformer
java.lang.Runnable, java.io.Serializable, oracle.xml.async.XSLTransformerConstants
Applies XSL transformation in a background thread.
protected int methodToCall
The XSL transformation method to call based on input types.
protected oracle.xml.async.DocumentFragment result
Transformation result document.
public XSLTransformer()
XSLTransformer constructor
public XSLTransformer(int id)
XSLTransformer constructor accepting an identifier
id - - A unique integer that can be used to identify the XSLTransformer instance during event processing
public void addXSLTransformerErrorListener(XSLTransformerErrorListener p0)
Adds an XSLTransformer error event listener
p0 - XSLTransformerErrorListener to be added
public void addXSLTransformerListener(XSLTransformerListener p0)
Adds a XSLTransformer listener
p0 - XSLTransformerListener to be added
public int getId()
Returns the unique XSLTransformer id
The id of this XSLTransformer.
public synchronized oracle.xml.async.DocumentFragment getResult()
Returns the document fragment for the resulting document. Call this method only after receiving notification that the transformation is complete. Since the transformation occurs in background and asyncronously, calling this method immediately after processXSL will result in holding the control until the result is avialable.
The resulting document fragment of the XSL transformation.
public void processXSL(oracle.xml.async.XSLStylesheet xsl, java.io.InputStream xml, java.net.URL ref)
Initiates XSL Transformation in the background. The control is returned immediately.
xsl - The stylesheet to be used for XSL transformation
xml - The XML document to be used (as a java.io.InputStream)
ref - Reference URL to resolve external entities in input XML
XSLException - if an error occurs during XSL transformation
public void processXSL(oracle.xml.async.XSLStylesheet xsl, java.io.Reader xml, java.net.URL ref)
Initiates XSL Transformation in the background. The control is returned immediately.
xsl - The stylesheet to be used for XSL transformation
xml - The XML document to be used (as a java.io.Reader)
ref - Reference URL to resolve external entities in input XML
XSLException - if an error occurs during XSL transformation
public void processXSL(oracle.xml.async.XSLStylesheet xsl, java.net.URL xml, java.net.URL ref)
Initiates XSL Transformation in the background. The control is returned immediately.
xsl - The stylesheet to be used for XSL transformation
xml - The XML document to be used (as a java.net.URL)
ref - Reference URL to resolve external entities in input XML
XSLException - if an error occurs during XSL transformation
public void processXSL(oracle.xml.async.XSLStylesheet xsl, oracle.xml.async.XMLDocument xml)
Initiates XSL Transformation in the background. The control is returned immediately.
xsl - The stylesheet to be used for XSL transformation
xml - The XML document to be used (as a DOM Tree)
XSLException - if an error occurs during XSL transformation
public void processXSL(oracle.xml.async.XSLStylesheet xsl, oracle.xml.async.XMLDocument xml, java.io.OutputStream os)
Initiates XSL Transformation in the background. The control is returned immediately.
xsl - The stylesheet to be used for XSL transformation
xml - The XML document to be used (as a DOM Tree)
os - Outputstream to which the XSL transformation result is written
XSLException - if an error occurs during XSL transformation
public synchronized void removeDOMTransformerErrorListener(XSLTransformerErrorListener p0)
Removes an XSLTransformer error event listener
p0 - XSLTransformerErrorListener to be removed
public synchronized void removeXSLTransformerListener(XSLTransformerListener p0)
Removes a XSLTransformer listener
p0 - XSLTransformerListener to be removed
public void run()
Starts a separate thread to do the XSL Transformation.
java.lang.Runnable.run() in interface java.lang.Runnable
public final void setErrorStream(java.io.OutputStream out)
Sets the error stream used by the XSL processor
out - The error output stream for the XSL processor
public final void showWarnings(boolean yes)
Sets the showWarnings flag used by the XSL processor
yes - Boolean indicating if XSL processor warnings to be shown or not.
public class XSLTransformerBeanInfo extends java.beans.SimpleBeanInfo java.lang.Object | +--java.beans.SimpleBeanInfo | +--oracle.xml.async.XSLTransformerBeanInfo
java.beans.BeanInfo
This class provides information about the XSLTransformer Bean.
public XSLTransformerBeanInfo()
The default Constructor
public java.awt.Image getIcon(int iconKind)
Gets an image object that can be used to represent XSLTransformer bean in toolbars, toolboxes, etc.
java.beans.SimpleBeanInfo.getIcon(int) in class java.beans.SimpleBeanInfo
iconKind - The kind of icon requested.
An image object representing the requested icon type for XSLTransformer bean.
public java.beans.PropertyDescriptor[] getPropertyDescriptors()
Gets the XSLTransformer bean's PropertyDescriptors
java.beans.SimpleBeanInfo.getPropertyDescriptors() in class java.beans.SimpleBeanInfo
An array of PropertyDescriptors describing the editable properties supported by XSLTransformer bean.
public class XSLTransformerErrorEvent extends java.util.EventObject java.lang.Object | +--java.util.EventObject | +--oracle.xml.async.XSLTransformerErrorEvent
java.io.Serializable
The error event object that XSLTransformer uses to notify all registered listeners about transformation error events.
protected java.lang.Exception e
The exception being raised.
public XSLTransformerErrorEvent(java.lang.Object p0, java.lang.Exception e)
Constructor for XSLTransformerErrorEvent.
p0 - The Object that created this event
e - The Exception raised.
public java.lang.Exception getException()
Returns the exception that XSLTransformer encountered object unique id. Can be used to
The transformation exception
public java.lang.String getMessage()
Returns the error message that describes the error that XSLTransformer encountered
The error message
public interface XSLTransformerErrorListener extends java.util.EventListener
java.util.EventListener
This interface must be implemented in order to receive notifications about error events during the asynchronous transformation. The class implementing this interface must be added to the XSLTransformer using addXSLTransformerListener method.
public void xslTransformerErrorCalled(XSLTransformerErrorEvent p0)
This method is called when parse or transformation error occurs.
p0 - - The XSLTransformerErrorEvent object produced by the XSLTransformer
public class XSLTransformerEvent extends java.util.EventObject java.lang.Object | +--java.util.EventObject | +--oracle.xml.async.XSLTransformerEvent
java.io.Serializable
protected int id
ID of the source XSLTransformer object
public XSLTransformerEvent(java.lang.Object p0, int p1)
Constructs the XSLTransformerEvent object using the XSLTransformer source object and its unique id.
<code>p0</code> - The source XSLTransformer object that will fire the events
<code>p1</code> - Unique id identifying the source object
public int getID()
Returns unique id of the XSLTransformer object which can be used to identify which instance of the XSLTransformer generated this event in cases where multiple instances of XSLTransformer may be working in background.
The unique id of the source XSLTransformer object for this event object.
public interface XSLTransformerListener extends java.util.EventListener
java.util.EventListener
This interface must be implemented in order to receive notifications about events during the asynchronous transformation. The class implementing this interface must be added to the XSLTransformer using addXSLTransformerListener method.
public void xslTransformerError(XSLTransformerEvent p0)
This method is called when parse or transformation error occur.
p0 - - The XSLTransformerEvent object produced by the XSLTransformer
public void xslTransformerOver(XSLTransformerEvent p0)
This method is called when the transformation is complete
p0 - - The XSLTransformerEvent object produced by the XSLTransformer
public void xslTransformerStarted(XSLTransformerEvent p0)
This method is called when the transformation starts
p0 - - The XSLTransformerEvent object produced by the XSLTransformer
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 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.
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
public class XMLSourceView 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.srcviewer.XMLSourceView
javax.accessibility.Accessible, java.awt.image.ImageObserver, java.awt.MenuContainer, java.io.Serializable
Shows an XML document. Recognizes the following XML token types: Tag, Attribute Name, Attribute Value, Comment, CDATA, PCDATA, PI Data, PI Name and NOTATION Symbol. Each token type has a foreground color and font. The default color/font settings can be changed by the user. Takes as input an org.w3c.dom.Document object.
protected org.w3c.dom.Document inputDOMDocument
protected javax.swing.JScrollPane jScrollPane
protected javax.swing.JTextPane jTextPane
protected oracle.xml.srcviewer.XMLStyledDocument xmlStyledDocument
public XMLSourceView()
The class constructor. Creates an object of type XMLSourceView.
public static java.awt.Font fontGet(javax.swing.text.AttributeSet attributeset)
Extracts and returns the font from a given attributeset.
attributeset - The source Attributeset.
The extracted Font.
public static void fontSet(javax.swing.text.MutableAttributeSet mutableattributeset, java.awt.Font font)
Sets the mutableattributeset font.
mutableattributeset - The mutableattributeset to update.
font - The new Font for the mutableattributeset.
public java.awt.Font getAttributeNameFont()
Returns the Attribute Value font.
The Font object.
public java.awt.Color getAttributeNameForeground()
Returns the Attribute Name foreground color.
The Color object.
public java.awt.Font getAttributeValueFont()
Returns the Attribute Value font.
The Font object.
public java.awt.Color getAttributeValueForeground()
Returns the Attribute Value foreground color.
The Color object.
public java.awt.Color getBackground()
Returns the background color.
java.awt.Component.getBackground() in class java.awt.Component
The Color object.
public java.awt.Font getCDATAFont()
Returns the CDATA font.
The Font object.
public java.awt.Color getCDATAForeground()
Returns the CDATA foreground color.
The Color object.
public java.awt.Font getCommentDataFont()
Returns the Comment Data font.
The Font object.
public java.awt.Color getCommentDataForeground()
Returns the Comment Data foreground color.
The Color object.
public java.lang.String getEditedText()
Returns the edited text.
The String object containing the edited text.
public javax.swing.JTextPane getJTextPane()
Returns the viewer JTextPane component.
The JTextPane object used by XMLSourceViewer
public java.awt.Dimension getMinimumSize()
Returns the XMLSourceView minimal size.
javax.swing.JComponent.getMinimumSize() in class javax.swing.JComponent
The Dimension object containing the XMLSourceView minimum size.
public org.w3c.dom.Node getNodeAtOffset(int i)
Returns the XML node at a given offset.
i - The node offset.
The Node object from offset i.
public java.awt.Font getPCDATAFont()
Returns the PCDATA font.
The Font object.
public java.awt.Color getPCDATAForeground()
Returns the PCDATA foreground color.
The Color object.
public java.awt.Font getPIDataFont()
Returns the PI Data font.
The Font object
public java.awt.Color getPIDataForeground()
Returns the PI Data foreground color.
The Color object.
public java.awt.Font getPINameFont()
Returns the PI Name font.
The Font object.
public java.awt.Color getPINameForeground()
Returns the PI Data foreground color.
The Color object.
public java.awt.Font getSymbolFont()
Returns the NOTATION Symbol font.
The Font object.
public java.awt.Color getSymbolForeground()
Returns the NOTATION Symbol foreground color.
The Color object.
public java.awt.Font getTagFont()
Returns the Tag font.
The Font object.
public java.awt.Color getTagForeground()
Returns the Tag foreground color.
The Color object.
public java.lang.String getText()
Returns the XML document as a String.
The String object containing the XML document.
public boolean isEditable()
Returns boolean to indicate whether this object is editable.
public void selectNodeAt(int i)
Moves the cursor to XML Node at offset i.
i - The node offset.
public void setAttributeNameFont(java.awt.Font font)
Sets the Attribute Name font.
font - The new Font for Attribute Name.
public void setAttributeNameForeground(java.awt.Color color)
Sets the Attribute Name foreground color.
color - The new Color for Attribute Name.
public void setAttributeValueFont(java.awt.Font font)
Sets the Attribute Value font.
font - The new Font for Attribute Value.
public void setAttributeValueForeground(java.awt.Color color)
Sets the Attribute Value foreground color.
color - The new Color for Attribute Value.
public void setBackground(java.awt.Color color)
Sets the background color.
javax.swing.JComponent.setBackground(java.awt.Color) in class javax.swing.JComponent
color - The new background Color.
public void setCDATAFont(java.awt.Font font)
Sets the CDATA font.
font - The new Font for CDATA.
public void setCDATAForeground(java.awt.Color color)
Sets the CDATA foreground color.
color - The new Color for CDATA.
public void setCommentDataFont(java.awt.Font font)
Sets the Comment font.
font - The new Font for the XML Comments.
public void setCommentDataForeground(java.awt.Color color)
Sets the Comment foreground color.
color - The new Color for Comment.
public void setEditable(boolean edit)
Sets the specified boolean to indicate whether this object should be editable.
doc - The new boolean value.
public void setPCDATAFont(java.awt.Font font)
Sets the PCDATA font.
font - The new Font for PCDATA.
public void setPCDATAForeground(java.awt.Color color)
Sets the PCDATA foreground color.
color - The new Color for PCDATA.
public void setPIDataFont(java.awt.Font font)
Sets the PI Data font.
font - The new Font for PI Data.
public void setPIDataForeground(java.awt.Color color)
Sets the PI Data foreground color.
color - The new Color for PI Data.
public void setPINameFont(java.awt.Font font)
Sets the PI Name font.
font - The new Font for the PI Names.
public void setPINameForeground(java.awt.Color color)
Sets the PI Name foreground color.
color - The new Color for PI Name.
public void setSelectedNode(org.w3c.dom.Node node)
Sets the cursor position at the selected XML node.
node - The selected node.
public void setSymbolFont(java.awt.Font font)
Sets the NOTATION Symbol font.
color - The new Font for NOTATION Symbol.
public void setSymbolForeground(java.awt.Color color)
Sets the NOTATION Symbol foreground color.
color - The new Color for NOTATION Symbol.
public void setTagFont(java.awt.Font font)
Sets the Tag font.
font - The new Font for the XML Tags.
public void setTagForeground(java.awt.Color color)
Sets the Tag foreground color.
color - The new Color for the XML Tags.
public void setXMLDocument(org.w3c.dom.Document document)
Associates the XMLviewer with a XML document.
doc - The Document document to display.
public class XMLSourceViewBeanInfo extends java.beans.SimpleBeanInfo java.lang.Object | +--java.beans.SimpleBeanInfo | +--oracle.xml.srcviewer.XMLSourceViewBeanInfo
java.beans.BeanInfo
public XMLSourceViewBeanInfo()
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 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 that is a CLOB object. This 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, list a CLOB table content and also add, replace or delete text documents in this CLOB tables.
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 8i 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)
public class XMLTreeView extends javax.swing.JPanel java.lang.Object | +--java.awt.Component | +--java.awt.Container | +--javax.swing.JComponent | +--javax.swing.JPanel | +--oracle.xml.treeviewer.XMLTreeView
javax.accessibility.Accessible, java.awt.image.ImageObserver, java.awt.MenuContainer, java.io.Serializable
Shows an XML document as a tree. Recognizes the following XML DOM nodes: Tag, Attribute Name, Attribute Value, Comment, CDATA, PCDATA, PI Data, PI Name and NOTATION Symbol. Takes as input an org.w3c.dom.Document object.
protected oracle.xml.treeviewer.XMLTreeModel model
protected transient javax.swing.JScrollPane scrollPane
protected transient javax.swing.JTree theTree
public XMLTreeView()
The class constructor. Creates an object of type XMLTreeView.
public java.awt.Dimension getPreferredSize()
Returns the XMLTreeView preffered size.
javax.swing.JComponent.getPreferredSize() in class javax.swing.JComponent
The Dimension object containing the XMLTreeView prefered size.
protected javax.swing.JTree getTree()
protected oracle.xml.treeviewer.XMLTreeModel getXMLTreeModel()
public void setXMLDocument(org.w3c.dom.Document document)
Associates the XMLTreeViewer with a XML document.
doc - The Document document to display.
public void updateUI()
Forces the XMLTreeView to update/refresh UI.
javax.swing.JPanel.updateUI() in class javax.swing.JPanel
public class XMLTreeViewBeanInfo extends java.beans.SimpleBeanInfo java.lang.Object | +--java.beans.SimpleBeanInfo | +--oracle.xml.treeviewer.XMLTreeViewBeanInfo
java.beans.BeanInfo
public XMLTreeViewBeanInfo()
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-2001, Oracle Corporation. All Rights Reserved. |
|