Download Stylus Studio - The World's Best XML Development Environment!


com.ddtek.jxtr
Class JXTRSaxReader

java.lang.Object
  |
  +--com.ddtek.jxtr.JXTRSaxReader
All Implemented Interfaces:
org.xml.sax.XMLReader

public class JXTRSaxReader
extends java.lang.Object
implements org.xml.sax.XMLReader

JXTRSaxReader implements a SAX2 XMLReader interface to be used with a JXTRQuery, JXTRResultSetWrapper, or JXTRColInfo object.

More information about SAX2 can be found in most XML books or can be obtained from SAX 2.0: The Simple API for XML.

JXTRSaxReader supports the following features.

JXTRSaxReader supports the following property.

Because JXTRSaxReader must be used with JXTRQuery or JXTRResultSetWrapper, the following restrictions are imposed.


Field Summary
static java.lang.String lexicalHandlerURI1
          Lexical handler property URI.
static java.lang.String lexicalHandlerURI2
          Lexical handler property URI.
static java.lang.String nsPrefixURI
          Namespace prefix feature URI.
static java.lang.String nsURI
          Namespace feature URI.
static java.lang.String validationURI
          Validation feature URI.
 
Constructor Summary
JXTRSaxReader()
          Default constructor.
JXTRSaxReader(org.xml.sax.XMLReader xmlReader)
          Constructs a JXTRSaxReader from a standard SAX2 XMLReader by performing the following tasks.
 
Method Summary
 org.xml.sax.ContentHandler getContentHandler()
          Retrieves content handler for this XMLReader.
 org.xml.sax.DTDHandler getDTDHandler()
          Retrieves DTD handler for this XMLReader.
 org.xml.sax.EntityResolver getEntityResolver()
          Retrieves entity resolver for this XMLReader.
 org.xml.sax.ErrorHandler getErrorHandler()
          Retrieves error handler for this XMLReader.
 boolean getFeature(java.lang.String name)
          Gets the value for the specified feature.
 java.lang.Object getProperty(java.lang.String name)
          Gets the value for the specified property.
 void parse(org.xml.sax.InputSource input)
          Parses XML from the specified input source.
 void parse(JXTRColInfo jxtrColInfo)
          Parses XML from the specified JXTRColInfo object (for example, executes the jXTransformer query and invokes the registered SAX2 XMLReader callbacks as the jXTransformer query results are being retrieved).
 void parse(JXTRQueryBase jxtrQ)
          Parses XML from the specified JXTRQuery or JXTRResultSetWrapper object (for example, executes the jXTransformer query and invokes the registered SAX2 XMLReader callbacks as the jXTransformer query results are being retrieved).
 void parse(java.lang.String systemId)
          Parses XML from the specified System ID.
 void setContentHandler(org.xml.sax.ContentHandler handler)
          Registers the specified SAX2 content handler.
 void setDTDHandler(org.xml.sax.DTDHandler handler)
          Registers the specified DTD handler.
 void setEntityResolver(org.xml.sax.EntityResolver resolver)
          Registers the specified Entity resolver.
 void setErrorHandler(org.xml.sax.ErrorHandler handler)
          Registers the specified Entity resolver.
 void setFeature(java.lang.String name, boolean value)
          Sets the specified feature to the specified value.
 void setProperty(java.lang.String name, java.lang.Object value)
          Sets the specified property to the specified value.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

nsURI

public static java.lang.String nsURI
Namespace feature URI. Value is http://xml.org/sax/features/namespaces


nsPrefixURI

public static java.lang.String nsPrefixURI
Namespace prefix feature URI. Value is http://xml.org/sax/features/namespace-prefixes


validationURI

public static java.lang.String validationURI
Validation feature URI. Value is http://xml.org/sax/features/validation


lexicalHandlerURI1

public static java.lang.String lexicalHandlerURI1
Lexical handler property URI. Value is http://xml.org/sax/properties/lexical-handler


lexicalHandlerURI2

public static java.lang.String lexicalHandlerURI2
Lexical handler property URI. Value is http://xml.org/sax/handlers/LexicalHandler

Constructor Detail

JXTRSaxReader

public JXTRSaxReader()
Default constructor.


JXTRSaxReader

public JXTRSaxReader(org.xml.sax.XMLReader xmlReader)
              throws org.xml.sax.SAXException
Constructs a JXTRSaxReader from a standard SAX2 XMLReader by performing the following tasks.

Parameters:
xmlReader - XMLReader from which the settings will be copied.
Throws:
org.xml.sax.SAXNotRecognizedException - Required JXTRSaxReader setting is not recognized by the specified XMLReader object.
org.xml.sax.SAXNotSupportedException - One or multiple features of the specified XMLReader are not supported by the JXTRSaxReader object.
org.xml.sax.SAXException
Method Detail

getContentHandler

public org.xml.sax.ContentHandler getContentHandler()
Retrieves content handler for this XMLReader.

Specified by:
getContentHandler in interface org.xml.sax.XMLReader

getDTDHandler

public org.xml.sax.DTDHandler getDTDHandler()
Retrieves DTD handler for this XMLReader.

Specified by:
getDTDHandler in interface org.xml.sax.XMLReader

getEntityResolver

public org.xml.sax.EntityResolver getEntityResolver()
Retrieves entity resolver for this XMLReader.

Specified by:
getEntityResolver in interface org.xml.sax.XMLReader

getErrorHandler

public org.xml.sax.ErrorHandler getErrorHandler()
Retrieves error handler for this XMLReader.

Specified by:
getErrorHandler in interface org.xml.sax.XMLReader

getFeature

public boolean getFeature(java.lang.String name)
                   throws org.xml.sax.SAXNotRecognizedException,
                          org.xml.sax.SAXNotSupportedException
Gets the value for the specified feature.

Specified by:
getFeature in interface org.xml.sax.XMLReader
Parameters:
name - URI of feature for which the value is requested.
Throws:
SAXNotRecognizedException, - SAXNotSupportedException.
org.xml.sax.SAXNotRecognizedException
org.xml.sax.SAXNotSupportedException

getProperty

public java.lang.Object getProperty(java.lang.String name)
                             throws org.xml.sax.SAXNotRecognizedException,
                                    org.xml.sax.SAXNotSupportedException
Gets the value for the specified property.

Specified by:
getProperty in interface org.xml.sax.XMLReader
Parameters:
name - URI of property for which the value is requested.
Returns:
Property value.
Throws:
SAXNotRecognizedException, - SAXNotSupportedException.
org.xml.sax.SAXNotRecognizedException
org.xml.sax.SAXNotSupportedException

parse

public void parse(org.xml.sax.InputSource input)
           throws org.xml.sax.SAXException
Parses XML from the specified input source. The specified input source must be an instance of JXTRSaxInputSource.

Specified by:
parse in interface org.xml.sax.XMLReader
Parameters:
input - JXTRSaxInputSource object that was constructed using (com.ddtek.jxtr.JXTRQueryBase) or for which (@link JXTRSaxInputSource#setJXTRQuery (com.ddtek.jxtr.JXTRQueryBase jxtrQ)} has been invoked.
org.xml.sax.SAXException

parse

public void parse(java.lang.String systemId)
           throws org.xml.sax.SAXException
Parses XML from the specified System ID. Because JXTRSaxReader is intended for use with a JXTRQuery or JXTRResultSetWrapper object, this method always throws a SAXException.

Specified by:
parse in interface org.xml.sax.XMLReader
Throws:
SAXException.
org.xml.sax.SAXException

parse

public void parse(JXTRQueryBase jxtrQ)
           throws org.xml.sax.SAXException
Parses XML from the specified JXTRQuery or JXTRResultSetWrapper object (for example, executes the jXTransformer query and invokes the registered SAX2 XMLReader callbacks as the jXTransformer query results are being retrieved).

Parameters:
jxtrQ - JXTRQuery or JXTRResultSetWrapper object for which the SAX2 events will be generated.
Throws:
SAXException.
org.xml.sax.SAXException

parse

public void parse(JXTRColInfo jxtrColInfo)
           throws org.xml.sax.SAXException
Parses XML from the specified JXTRColInfo object (for example, executes the jXTransformer query and invokes the registered SAX2 XMLReader callbacks as the jXTransformer query results are being retrieved).

Throws:
SAXException.
org.xml.sax.SAXException

setContentHandler

public void setContentHandler(org.xml.sax.ContentHandler handler)
Registers the specified SAX2 content handler.

Specified by:
setContentHandler in interface org.xml.sax.XMLReader
Parameters:
handler - The SAX2 content handler to register.

setDTDHandler

public void setDTDHandler(org.xml.sax.DTDHandler handler)
Registers the specified DTD handler.

Specified by:
setDTDHandler in interface org.xml.sax.XMLReader
Parameters:
handler - The SAX2 DTD handler to register.

setEntityResolver

public void setEntityResolver(org.xml.sax.EntityResolver resolver)
Registers the specified Entity resolver.

Specified by:
setEntityResolver in interface org.xml.sax.XMLReader
Parameters:
resolver - The SAX2 entity resolver to register.

setErrorHandler

public void setErrorHandler(org.xml.sax.ErrorHandler handler)
Registers the specified Entity resolver.

Specified by:
setErrorHandler in interface org.xml.sax.XMLReader
Parameters:
handler - The SAX2 entity resolver to register.

setFeature

public void setFeature(java.lang.String name,
                       boolean value)
                throws org.xml.sax.SAXNotRecognizedException,
                       org.xml.sax.SAXNotSupportedException
Sets the specified feature to the specified value.

Specified by:
setFeature in interface org.xml.sax.XMLReader
Parameters:
name - URI of feature to set.
value - Value of feature.
Throws:
SAXNotRecognizedException, - SAXNotSupportedException.
org.xml.sax.SAXNotRecognizedException
org.xml.sax.SAXNotSupportedException

setProperty

public void setProperty(java.lang.String name,
                        java.lang.Object value)
                 throws org.xml.sax.SAXNotRecognizedException,
                        org.xml.sax.SAXNotSupportedException
Sets the specified property to the specified value.

Specified by:
setProperty in interface org.xml.sax.XMLReader
Parameters:
name - URI of property to set.
value - Value of property.
Throws:
SAXNotRecognizedException, - SAXNotSupportedException.
org.xml.sax.SAXNotRecognizedException
org.xml.sax.SAXNotSupportedException


Stylus Studio features SQL/XML tools for building XML views of relational data.