Oracle8i XML Reference Guide Release 3 (8.1.7) Part Number A83730-01 |
|
Class Summary |
|
---|---|
Interfaces |
|
DOMBuilderErrorListener |
This interface must be implemented in order to receive notifications when error is found during parsing. |
DOMBuilderListener |
This interface must be implemented in order to receive notifications about events during the asyncronous parsing. |
XSLTransformerErrorListener |
This interface must be implemented in order to receive notifications about error events during the asyncronous transformation. |
XSLTransformerListener |
This interface must be implemented in order to receive notifications about events during the asyncronous transformation. |
Classes |
|
DOMBuilder |
This class implements an eXtensible Markup Language (XML) 1.0 parser according to the World Wide Web Consortium (W3C) recommendation. |
DOMBuilderBeanInfo |
|
DOMBuilderErrorEvent |
This class defines the error event which is sent when parse exception occurs. |
DOMBuilderEvent |
The event object that DOMBuilder uses to notify all registered listeners about parse events. |
ResourceManager |
Simple semaphore that maintains access to fixed number of logical resources. |
XSLTransformer |
Applies XSL transformation in a background thread. |
XSLTransformerBeanInfo |
|
XSLTransformerErrorEvent |
The error event object that XSLTransformer uses to notify all registered listeners about transformation error events. |
XSLTransformerEvent |
The event object that XSLTransformer uses to notify all registered listeners about transformation events. |
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 implements an eXtensible Markup Language (XML) 1.0 parser according to the World Wide Web Consortium (W3C) recommendation. to parse a 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.
Member Summary |
|
---|---|
Constructors |
|
DOMBuilder() |
Creates a new parser object. |
Creates a new parser object. |
Creates a new parser object with a given id. |
Methods |
|
addDOMBuilderErrorListener(DOMBuilderErrorListener) |
Adds DOMBuilderErrorListener |
addDOMBuilderListener(DOMBuilderListener) |
Adds DOMBuilderListener |
|
Get the DTD |
getDocument() |
Gets the document |
getId() |
Returns the parser object id. |
getReleaseVersion() |
Returns the release version of the Oracle XML Parser |
|
Gets the document |
getValidationMode() |
Returns the validation mode |
parse(InputSource) |
Parses the XML from given input source |
|
Parses the XML from given input stream. |
parse(Reader) |
Parses the XML from given input stream. |
parse(String) |
Parses the XML from the URL indicated |
parse(URL) |
Parses the XML document pointed to by the given URL and creates the corresponding XML document hierarchy. |
parseDTD(InputSource, String) |
Parses the XML External DTD from given input source |
parseDTD(InputStream, String) |
Parses the XML External DTD from given input stream. |
|
Parses the XML External DTD from given input stream. |
parseDTD(String, String) |
Parses the XML External DTD from the URL indicated |
parseDTD(URL, String) |
Parses the XML External DTD document pointed to by the given URL and creates the corresponding XML document hierarchy. |
removeDOMBuilderErrorListener(DOMBuilderErrorListener) |
Remove DOMBuilderErrorListener |
removeDOMBuilderListener(DOMBuilderListener) |
Remove DOMBuilderListener |
run() |
This method runs in a thread |
setBaseURL(URL) |
Set the base URL for loading external enitites and DTDs. |
setDebugMode(boolean) |
Sets a flag to turn on debug information in the document |
setDoctype(DTD) |
Set the DTD |
setErrorStream(OutputStream) |
Creates an output stream for the output of errors and warnings. |
setErrorStream(OutputStream, String) |
Creates an output stream for the output of errors and warnings. |
setErrorStream(PrintWriter) |
Creates an output stream for the output of errors and warnings. |
setNodeFactory(NodeFactory) |
Set the node factory. |
setPreserveWhitespace(boolean) |
Set the white space preserving mode |
setValidationMode(boolean) |
Set the validation mode |
showWarnings(boolean) |
Switch to determine whether to print warnings |
public DOMBuilder()
Creates a new parser object.
public DOMBuilder(int id)
Creates a new parser object with a given id.
public void addDOMBuilderErrorListener(DOMBuilderErrorListener p0)
Adds DOMBuilderErrorListener
p1
- The DOMBuilderErrorListener
to add
public void addDOMBuilderListener(DOMBuilderListener p0)
Adds DOMBuilderListener
Parameters:
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.
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
Member Summary |
|
---|---|
Constructors |
|
DOMBuilderBeanInfo() |
|
Methods |
|
getIcon(int) |
|
getPropertyDescriptors() |
|
public DOMBuilderBeanInfo()
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
oracle.xml.asyncpublic 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.
public DOMBuilderErrorEvent(java.lang.Object p0, java.lang.Exception e)
Constructor for DOMBuilderErrorEvent.
p0
- the Object
that create this object
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
oracle.xml.asyncpublic 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.
Member Summary |
|
---|---|
Methods |
|
domBuilderErrorCalled(DOMBuilderErrorEvent) |
|
public void domBuilderErrorCalled(DOMBuilderErrorEvent p0)
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.
Member Summary |
|
---|---|
Constructors |
|
DOMBuilderEvent(Object, int) |
|
Methods |
|
getID() |
Returns the DOMBuilder object unique id. |
public DOMBuilderEvent(java.lang.Object p0, int p1)
public int getID()
Returns the DOMBuilder object unique id. Can be used to identify which instance of the DOMBuilder generated this event in case when multiple instances of DOMBuilder work in the background.
The event id
oracle.xml.asyncpublic 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
Simple semaphore that maintains access to fixed number of logical resources.
Inherited Member Summary |
---|
Methods inherited from class java.lang.Object |
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
public ResourceManager(int i)
The ResourceManager constructor
i
- - the number of resources to manage
public boolean activeFound()
Returns how many resources are avialable.
public synchronized void getResource()
If the number of resources avialable is nonzero, the method decreases the number of resources avialable by one and returns. Othervise, waits until resource is released.
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)
Let's you use Thread.sleep() without try/catch
oracle.xml.asyncpublic 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.
public XSLTransformer()
XSLTransformet constructor
public XSLTransformer(int id)
XSLTransformer constructor
id
- - A unique integer that can be used to identify the XSLTransformer instance during event processing
public void addXSLTransformerErrorListener(XSLTransformerErrorListener p0)
Adds an error event listener
p0
- - XSLTransformerErrorListener
public void addXSLTransformerListener(XSLTransformerListener p0)
Adds a listener
p0
- - XSLTransformerListener
public int getId()
Returns the unique XSLTransformer id
The id
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 tre result is avialable.
public void processXSL(oracle.xml.async.XSLStylesheet xsl, java.io.InputStream xml, java.net.URL ref)
Initiate XSL Transformation in the background. The control is returned immediately.
public void processXSL(oracle.xml.async.XSLStylesheet xsl, java.io.Reader xml, java.net.URL ref)
Initiate XSL Transformation in the background. The control is returned immediately.
public void processXSL(oracle.xml.async.XSLStylesheet xsl, java.net.URL xml, java.net.URL ref)
Initiate XSL Transformation in the background. The control is returned immediately.
public void processXSL(oracle.xml.async.XSLStylesheet xsl, oracle.xml.async.XMLDocument xml)
Initiate XSL Transformation in the background. The control is returned immediately.
public void processXSL(oracle.xml.async.XSLStylesheet xsl, oracle.xml.async.XMLDocument xml, java.io.OutputStream os)
Initiate XSL Transformation in the background. The control is returned immediately.
public synchronized void removeDOMTransformerErrorListener(XSLTransformerErrorListener p0)
Renmoves an error event listener
p0
- - XSLTransformerErrorListener
public synchronized void removeXSLTransformerListener(XSLTransformerListener p0)
Removes a listener
p0
- - XSLTransformerListener
public void run()
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
public final void showWarnings(boolean yes)
Sets the showWarnings flage used by the XSL processor
oracle.xml.asyncpublic class XSLTransformerBeanInfo extends java.beans.SimpleBeanInfo java.lang.Object | +--java.beans.SimpleBeanInfo | +--oracle.xml.async.XSLTransformerBeanInfo
java.beans.BeanInfo
Member Summary |
|
---|---|
Constructors |
|
XSLTransformerBeanInfo() |
|
Methods |
|
getIcon(int) |
|
getPropertyDescriptors() |
|
public XSLTransformerBeanInfo()
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
oracle.xml.asyncpublic 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.
public XSLTransformerErrorEvent(java.lang.Object p0, java.lang.Exception e)
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
oracle.xml.asyncpublic interface XSLTransformerErrorListener extends java.util.EventListener
java.util.EventListener
This interface must be implemented in order to receive notifications about error events during the asyncronous transformation. The class implementing this interface must be added to the XSLTransformet error event queue using addXSLTransformerListener method.
Member Summary |
|
---|---|
Methods |
|
xslTransformerErrorCalled(XSLTransformerErrorEvent) |
This method is called when parse or transformation error occur. |
public void xslTransformerErrorCalled(XSLTransformerErrorEvent p0)
This method is called when parse or transformation error occur.
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
The event object that XSLTransformer uses to notify all registered listeners about transformation events.
Member Summary |
|
---|---|
Constructors |
|
XSLTransformerEvent(Object, int) |
|
Methods |
|
getID() |
Returns the XSLTransformer object unique id. |
public XSLTransformerEvent(java.lang.Object p0, int p1)
public int getID()
Returns the XSLTransformer object unique id. Can be used to identify which instance of the XSLTransformer generated this event in case when multiple instances of XSLTransformer work in the background.
The event id
oracle.xml.asyncpublic interface XSLTransformerListener extends java.util.EventListener
java.util.EventListener
This interface must be implemented in order to receive notifications about events during the asyncronous transformation. The class implementing this interface must be added to the XSLTransformet event queue 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
Class Summary |
|
---|---|
Classes |
|
oracle.xml.srcviewer.XMLSourceView |
Shows an XML document. |
XMLSourceViewBeanInfo |
|
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.
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.
getText()
oracle.xml.srcviewerpublic class XMLSourceViewBeanInfo extends java.beans.SimpleBeanInfo java.lang.Object | +--java.beans.SimpleBeanInfo | +--oracle.xml.srcviewer.XMLSourceViewBeanInfo
java.beans.BeanInfo
Member Summary |
|
---|---|
Constructors |
|
XMLSourceViewBeanInfo() |
|
Methods |
|
getIcon(int) |
|
getPropertyDescriptors() |
|
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 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 implements an eXtensible Markup Language (XML) 1.0 parser according to the World Wide Web Consortium (W3C) recommendation. to parse a 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.
public DOMBuilder()
Creates a new parser object.
public DOMBuilder(int id)
Creates a new parser object with a given 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.
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
Member Summary |
|
---|---|
Constructors |
|
DOMBuilderBeanInfo() |
|
Methods |
|
getIcon(int) |
|
getPropertyDescriptors() |
|
public DOMBuilderBeanInfo()
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
oracle.xml.asyncpublic 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.
public DOMBuilderErrorEvent(java.lang.Object p0, java.lang.Exception e)
Constructor for DOMBuilderErrorEvent.
p0
- the Object
that create this object
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
oracle.xml.asyncpublic 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.
Member Summary |
|
---|---|
Methods |
|
domBuilderErrorCalled(DOMBuilderErrorEvent) |
|
public void domBuilderErrorCalled(DOMBuilderErrorEvent p0)
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.
Member Summary |
|
---|---|
Constructors |
|
DOMBuilderEvent(Object, int) |
|
Methods |
|
getID() |
Returns the DOMBuilder object unique id. |
public DOMBuilderEvent(java.lang.Object p0, int p1)
public int getID()
Returns the DOMBuilder object unique id. Can be used to identify which instance of the DOMBuilder generated this event in case when multiple instances of DOMBuilder work in the background.
The event id
oracle.xml.asyncpublic 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
Simple semaphore that maintains access to fixed number of logical resources.
Inherited Member Summary |
---|
Methods inherited from class java.lang.Object |
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
public ResourceManager(int i)
The ResourceManager constructor
i
- - the number of resources to manage
public boolean activeFound()
Returns how many resources are avialable.
public synchronized void getResource()
If the number of resources avialable is nonzero, the method decreases the number of resources avialable by one and returns. Othervise, waits until resource is released.
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)
Let's you use Thread.sleep() without try/catch
oracle.xml.asyncpublic 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.
public XSLTransformer()
XSLTransformet constructor
public XSLTransformer(int id)
XSLTransformer constructor
id
- - A unique integer that can be used to identify the XSLTransformer instance during event processing
public void addXSLTransformerErrorListener(XSLTransformerErrorListener p0)
Adds an error event listener
p0
- - XSLTransformerErrorListener
public void addXSLTransformerListener(XSLTransformerListener p0)
Adds a listener
p0
- - XSLTransformerListener
public int getId()
Returns the unique XSLTransformer id
The id
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 tre result is avialable.
public void processXSL(oracle.xml.async.XSLStylesheet xsl, java.io.InputStream xml, java.net.URL ref)
Initiate XSL Transformation in the background. The control is returned immediately.
public void processXSL(oracle.xml.async.XSLStylesheet xsl, java.io.Reader xml, java.net.URL ref)
Initiate XSL Transformation in the background. The control is returned immediately.
public void processXSL(oracle.xml.async.XSLStylesheet xsl, java.net.URL xml, java.net.URL ref)
Initiate XSL Transformation in the background. The control is returned immediately.
public void processXSL(oracle.xml.async.XSLStylesheet xsl, oracle.xml.async.XMLDocument xml)
Initiate XSL Transformation in the background. The control is returned immediately.
public void processXSL(oracle.xml.async.XSLStylesheet xsl, oracle.xml.async.XMLDocument xml, java.io.OutputStream os)
Initiate XSL Transformation in the background. The control is returned immediately.
public synchronized void removeDOMTransformerErrorListener(XSLTransformerErrorListener p0)
Renmoves an error event listener
p0
- - XSLTransformerErrorListener
public synchronized void removeXSLTransformerListener(XSLTransformerListener p0)
Removes a listener
p0
- - XSLTransformerListener
public void run()
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
public final void showWarnings(boolean yes)
Sets the showWarnings flage used by the XSL processor
oracle.xml.asyncpublic class XSLTransformerBeanInfo extends java.beans.SimpleBeanInfo java.lang.Object | +--java.beans.SimpleBeanInfo | +--oracle.xml.async.XSLTransformerBeanInfo
java.beans.BeanInfo
Member Summary |
|
---|---|
Constructors |
|
XSLTransformerBeanInfo() |
|
Methods |
|
getIcon(int) |
|
getPropertyDescriptors() |
|
public XSLTransformerBeanInfo()
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
oracle.xml.asyncpublic 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.
public XSLTransformerErrorEvent(java.lang.Object p0, java.lang.Exception e)
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
oracle.xml.asyncpublic interface XSLTransformerErrorListener extends java.util.EventListener
java.util.EventListener
This interface must be implemented in order to receive notifications about error events during the asyncronous transformation. The class implementing this interface must be added to the XSLTransformet error event queue using addXSLTransformerListener method.
Member Summary |
|
---|---|
Methods |
|
xslTransformerErrorCalled(XSLTransformerErrorEvent) |
This method is called when parse or transformation error occur. |
public void xslTransformerErrorCalled(XSLTransformerErrorEvent p0)
This method is called when parse or transformation error occur.
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
The event object that XSLTransformer uses to notify all registered listeners about transformation events.
Member Summary |
|
---|---|
Constructors |
|
XSLTransformerEvent(Object, int) |
|
Methods |
|
getID() |
Returns the XSLTransformer object unique id. |
public XSLTransformerEvent(java.lang.Object p0, int p1)
public int getID()
Returns the XSLTransformer object unique id. Can be used to identify which instance of the XSLTransformer generated this event in case when multiple instances of XSLTransformer work in the background.
The event id
oracle.xml.asyncpublic interface XSLTransformerListener extends java.util.EventListener
java.util.EventListener
This interface must be implemented in order to receive notifications about events during the asyncronous transformation. The class implementing this interface must be added to the XSLTransformet event queue 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 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.
Inherited Member Summary |
---|
Methods inherited from class java.lang.Object |
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
public DBAccess()
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 deleteXMLName(java.sql.Connection con, java.lang.String tablename, java.lang.String xmlname)
Delete text file from XML table
con
- - the Connection object
tablename
- - the table name
xmlname
- - the file 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 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 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
oracle.xml.transviewerpublic 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.
Member Summary |
|
---|---|
Constructors |
|
XMLTransformPanel() |
The class constructor. |
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
Member Summary |
|
---|---|
Constructors |
|
XMLTransformPanelBeanInfo() |
|
Methods |
|
getIcon(int) |
|
getPropertyDescriptors() |
|
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
oracle.xml.transviewerpublic 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
Member Summary |
|
---|---|
Constructors |
|
XMLTransViewer() |
|
Methods |
|
main(String) |
|
Inherited Member Summary |
---|
Methods inherited from class java.lang.Object |
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
public XMLTransViewer()
public static void main(java.lang.String[] args)
Class Summary |
|
---|---|
Classes |
|
XMLTreeView |
Shows an XML document as a tree. |
XMLTreeViewBeanInfo |
|
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.
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.
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
oracle.xml.treeviewerpublic class XMLTreeViewBeanInfo extends java.beans.SimpleBeanInfo java.lang.Object | +--java.beans.SimpleBeanInfo | +--oracle.xml.treeviewer.XMLTreeViewBeanInfo
java.beans.BeanInfo
Member Summary |
|
---|---|
Constructors |
|
XMLTreeViewBeanInfo() |
|
Methods |
|
getIcon(int) |
|
getPropertyDescriptors() |
|
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
Class Summary |
|
---|---|
Classes |
|
oracle.xml.srcviewer.XMLSourceView |
Shows an XML document. |
XMLSourceViewBeanInfo |
|
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.
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.
getText()
public class XMLSourceViewBeanInfo extends java.beans.SimpleBeanInfo java.lang.Object | +--java.beans.SimpleBeanInfo | +--oracle.xml.srcviewer.XMLSourceViewBeanInfo
java.beans.BeanInfo
Member Summary |
|
---|---|
Constructors |
|
XMLSourceViewBeanInfo() |
|
Methods |
|
getIcon(int) |
|
getPropertyDescriptors() |
|
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 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 implements an eXtensible Markup Language (XML) 1.0 parser according to the World Wide Web Consortium (W3C) recommendation. to parse a 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.
public DOMBuilder()
Creates a new parser object.
public DOMBuilder(int id)
Creates a new parser object with a given 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.
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
Member Summary |
|
---|---|
Constructors |
|
DOMBuilderBeanInfo() |
|
Methods |
|
getIcon(int) |
|
getPropertyDescriptors() |
|
public DOMBuilderBeanInfo()
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
oracle.xml.asyncpublic 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.
public DOMBuilderErrorEvent(java.lang.Object p0, java.lang.Exception e)
Constructor for DOMBuilderErrorEvent.
p0
- the Object
that create this object
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
oracle.xml.asyncpublic 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.
Member Summary |
|
---|---|
Methods |
|
domBuilderErrorCalled(DOMBuilderErrorEvent) |
|
public void domBuilderErrorCalled(DOMBuilderErrorEvent p0)
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.
Member Summary |
|
---|---|
Constructors |
|
DOMBuilderEvent(Object, int) |
|
Methods |
|
getID() |
Returns the DOMBuilder object unique id. |
public DOMBuilderEvent(java.lang.Object p0, int p1)
public int getID()
Returns the DOMBuilder object unique id. Can be used to identify which instance of the DOMBuilder generated this event in case when multiple instances of DOMBuilder work in the background.
The event id
oracle.xml.asyncpublic 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
Simple semaphore that maintains access to fixed number of logical resources.
Inherited Member Summary |
---|
Methods inherited from class java.lang.Object |
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
public ResourceManager(int i)
The ResourceManager constructor
i
- - the number of resources to manage
public boolean activeFound()
Returns how many resources are avialable.
public synchronized void getResource()
If the number of resources avialable is nonzero, the method decreases the number of resources avialable by one and returns. Othervise, waits until resource is released.
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)
Let's you use Thread.sleep() without try/catch
oracle.xml.asyncpublic 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.
public XSLTransformer()
XSLTransformet constructor
public XSLTransformer(int id)
XSLTransformer constructor
id
- - A unique integer that can be used to identify the XSLTransformer instance during event processing
public void addXSLTransformerErrorListener(XSLTransformerErrorListener p0)
Adds an error event listener
p0
- - XSLTransformerErrorListener
public void addXSLTransformerListener(XSLTransformerListener p0)
Adds a listener
p0
- - XSLTransformerListener
public int getId()
Returns the unique XSLTransformer id
The id
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 tre result is avialable.
public void processXSL(oracle.xml.async.XSLStylesheet xsl, java.io.InputStream xml, java.net.URL ref)
Initiate XSL Transformation in the background. The control is returned immediately.
public void processXSL(oracle.xml.async.XSLStylesheet xsl, java.io.Reader xml, java.net.URL ref)
Initiate XSL Transformation in the background. The control is returned immediately.
public void processXSL(oracle.xml.async.XSLStylesheet xsl, java.net.URL xml, java.net.URL ref)
Initiate XSL Transformation in the background. The control is returned immediately.
public void processXSL(oracle.xml.async.XSLStylesheet xsl, oracle.xml.async.XMLDocument xml)
Initiate XSL Transformation in the background. The control is returned immediately.
public void processXSL(oracle.xml.async.XSLStylesheet xsl, oracle.xml.async.XMLDocument xml, java.io.OutputStream os)
Initiate XSL Transformation in the background. The control is returned immediately.
public synchronized void removeDOMTransformerErrorListener(XSLTransformerErrorListener p0)
Renmoves an error event listener
p0
- - XSLTransformerErrorListener
public synchronized void removeXSLTransformerListener(XSLTransformerListener p0)
Removes a listener
p0
- - XSLTransformerListener
public void run()
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
public final void showWarnings(boolean yes)
Sets the showWarnings flage used by the XSL processor
oracle.xml.asyncpublic class XSLTransformerBeanInfo extends java.beans.SimpleBeanInfo java.lang.Object | +--java.beans.SimpleBeanInfo | +--oracle.xml.async.XSLTransformerBeanInfo
java.beans.BeanInfo
Member Summary |
|
---|---|
Constructors |
|
XSLTransformerBeanInfo() |
|
Methods |
|
getIcon(int) |
|
getPropertyDescriptors() |
|
public XSLTransformerBeanInfo()
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
oracle.xml.asyncpublic 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.
public XSLTransformerErrorEvent(java.lang.Object p0, java.lang.Exception e)
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
oracle.xml.asyncpublic interface XSLTransformerErrorListener extends java.util.EventListener
java.util.EventListener
This interface must be implemented in order to receive notifications about error events during the asyncronous transformation. The class implementing this interface must be added to the XSLTransformet error event queue using addXSLTransformerListener method.
Member Summary |
|
---|---|
Methods |
|
xslTransformerErrorCalled(XSLTransformerErrorEvent) |
This method is called when parse or transformation error occur. |
public void xslTransformerErrorCalled(XSLTransformerErrorEvent p0)
This method is called when parse or transformation error occur.
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
The event object that XSLTransformer uses to notify all registered listeners about transformation events.
Member Summary |
|
---|---|
Constructors |
|
XSLTransformerEvent(Object, int) |
|
Methods |
|
getID() |
Returns the XSLTransformer object unique id. |
public XSLTransformerEvent(java.lang.Object p0, int p1)
public int getID()
Returns the XSLTransformer object unique id. Can be used to identify which instance of the XSLTransformer generated this event in case when multiple instances of XSLTransformer work in the background.
The event id
oracle.xml.asyncpublic interface XSLTransformerListener extends java.util.EventListener
java.util.EventListener
This interface must be implemented in order to receive notifications about events during the asyncronous transformation. The class implementing this interface must be added to the XSLTransformet event queue 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 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.
Inherited Member Summary |
---|
Methods inherited from class java.lang.Object |
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
public DBAccess()
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 deleteXMLName(java.sql.Connection con, java.lang.String tablename, java.lang.String xmlname)
Delete text file from XML table
con
- - the Connection object
tablename
- - the table name
xmlname
- - the file 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 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 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
oracle.xml.transviewerpublic 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.
Member Summary |
|
---|---|
Constructors |
|
XMLTransformPanel() |
The class constructor. |
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
Member Summary |
|
---|---|
Constructors |
|
XMLTransformPanelBeanInfo() |
|
Methods |
|
getIcon(int) |
|
getPropertyDescriptors() |
|
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
oracle.xml.transviewerpublic 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
Member Summary |
|
---|---|
Constructors |
|
XMLTransViewer() |
|
Methods |
|
main(String) |
|
Inherited Member Summary |
---|
Methods inherited from class java.lang.Object |
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
public XMLTransViewer()
public static void main(java.lang.String[] args)
Class Summary |
|
---|---|
Classes |
|
XMLTreeView |
Shows an XML document as a tree. |
XMLTreeViewBeanInfo |
|
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.
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.
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
oracle.xml.treeviewerpublic class XMLTreeViewBeanInfo extends java.beans.SimpleBeanInfo java.lang.Object | +--java.beans.SimpleBeanInfo | +--oracle.xml.treeviewer.XMLTreeViewBeanInfo
java.beans.BeanInfo
Member Summary |
|
---|---|
Constructors |
|
XMLTreeViewBeanInfo() |
|
Methods |
|
getIcon(int) |
|
getPropertyDescriptors() |
|
public XMLTreeViewBeanInfo()
public java.awt.Image getIcon(int iconKind)
java.beans.SimpleBeanInfo.getIcon(int) in class java.beans.SimpleBeanInfo
public java.beans.PropertyDescriptor[] getPropertyDescriptors()
Class Summary |
|
---|---|
Classes |
|
XMLTreeView |
Shows an XML document as a tree. |
XMLTreeViewBeanInfo |
|
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.
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.
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
oracle.xml.treeviewerpublic class XMLTreeViewBeanInfo extends java.beans.SimpleBeanInfo java.lang.Object | +--java.beans.SimpleBeanInfo | +--oracle.xml.treeviewer.XMLTreeViewBeanInfo
java.beans.BeanInfo
Member Summary |
|
---|---|
Constructors |
|
XMLTreeViewBeanInfo() |
|
Methods |
|
getIcon(int) |
|
getPropertyDescriptors() |
|
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-2000, Oracle Corporation. All Rights Reserved. |
|