org.bibop.xml.utils
Class XMLExtendedInterpreter

java.lang.Object
  |
  +--org.bibop.xml.utils.XMLExtendedInterpreter
All Implemented Interfaces:
org.xml.sax.XMLReader

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

Extended Interpreter class with Lexical events support.

Author:
Alberto Garoffolo

Field Summary
static int CHARACTERS
           
static int COMMENT
          Lexical Events
private  org.xml.sax.ContentHandler contentHandler
           
private  org.xml.sax.DTDHandler dtdHandler
           
static int END_CDATA
           
static int END_DOCUMENT
           
static int END_DTD
           
static int END_ELEMENT
           
static int END_ENTITY
           
static int END_PREFIX_MAPPING
           
private  org.xml.sax.EntityResolver entityResolver
           
private  org.xml.sax.ErrorHandler errorHandler
           
private  java.util.HashMap features
           
static int IGNORABLE_WHITESPACE
           
private  org.xml.sax.ext.LexicalHandler lexicalHandler
           
static int PROCESSING_INSTRUCTION
           
private  java.util.HashMap properties
           
static int START_CDATA
           
static int START_DOCUMENT
           
static int START_DTD
           
static int START_ELEMENT
           
static int START_ENTITY
           
static int START_PREFIX_MAPPING
           
 
Constructor Summary
XMLExtendedInterpreter()
           
 
Method Summary
private  void debug(java.lang.String str)
           
private  void error(java.lang.String str)
           
 org.xml.sax.ContentHandler getContentHandler()
          return the current content handler
 org.xml.sax.DTDHandler getDTDHandler()
          return dtdhandler
 org.xml.sax.EntityResolver getEntityResolver()
          return entity resolver
 org.xml.sax.ErrorHandler getErrorHandler()
          return error handler
 boolean getFeature(java.lang.String name)
          get feature
 org.xml.sax.ext.LexicalHandler getLexicalHandler()
          return lexical handler
 java.lang.Object getProperty(java.lang.String name)
          get property
 void parse(org.xml.sax.InputSource in)
          parse
 void parse(java.io.InputStream stream)
          parse
 void parse(java.lang.String systemId)
          parse
 void setContentHandler(org.xml.sax.ContentHandler handler)
          set the content handler
 void setDTDHandler(org.xml.sax.DTDHandler handler)
          set the dtd handler
 void setEntityResolver(org.xml.sax.EntityResolver resolver)
          set the entity resolver
 void setErrorHandler(org.xml.sax.ErrorHandler handler)
          set the error handler
 void setFeature(java.lang.String name, boolean value)
          set feature
 void setLexicalHandler(org.xml.sax.ext.LexicalHandler handler)
          set the lexical handler
 void setProperty(java.lang.String name, java.lang.Object value)
          set property
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

START_DOCUMENT

public static final int START_DOCUMENT
See Also:
Constant Field Values

END_DOCUMENT

public static final int END_DOCUMENT
See Also:
Constant Field Values

START_PREFIX_MAPPING

public static final int START_PREFIX_MAPPING
See Also:
Constant Field Values

END_PREFIX_MAPPING

public static final int END_PREFIX_MAPPING
See Also:
Constant Field Values

START_ELEMENT

public static final int START_ELEMENT
See Also:
Constant Field Values

END_ELEMENT

public static final int END_ELEMENT
See Also:
Constant Field Values

CHARACTERS

public static final int CHARACTERS
See Also:
Constant Field Values

IGNORABLE_WHITESPACE

public static final int IGNORABLE_WHITESPACE
See Also:
Constant Field Values

PROCESSING_INSTRUCTION

public static final int PROCESSING_INSTRUCTION
See Also:
Constant Field Values

COMMENT

public static final int COMMENT
Lexical Events

See Also:
Constant Field Values

START_CDATA

public static final int START_CDATA
See Also:
Constant Field Values

END_CDATA

public static final int END_CDATA
See Also:
Constant Field Values

START_DTD

public static final int START_DTD
See Also:
Constant Field Values

END_DTD

public static final int END_DTD
See Also:
Constant Field Values

START_ENTITY

public static final int START_ENTITY
See Also:
Constant Field Values

END_ENTITY

public static final int END_ENTITY
See Also:
Constant Field Values

contentHandler

private org.xml.sax.ContentHandler contentHandler

dtdHandler

private org.xml.sax.DTDHandler dtdHandler

entityResolver

private org.xml.sax.EntityResolver entityResolver

errorHandler

private org.xml.sax.ErrorHandler errorHandler

lexicalHandler

private org.xml.sax.ext.LexicalHandler lexicalHandler

features

private java.util.HashMap features

properties

private java.util.HashMap properties
Constructor Detail

XMLExtendedInterpreter

public XMLExtendedInterpreter()
Method Detail

getContentHandler

public org.xml.sax.ContentHandler getContentHandler()
return the current content handler

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

getDTDHandler

public org.xml.sax.DTDHandler getDTDHandler()
return dtdhandler

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

getEntityResolver

public org.xml.sax.EntityResolver getEntityResolver()
return entity resolver

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

getErrorHandler

public org.xml.sax.ErrorHandler getErrorHandler()
return error handler

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

getLexicalHandler

public org.xml.sax.ext.LexicalHandler getLexicalHandler()
return lexical handler

Returns:
lexicalhandler

setContentHandler

public void setContentHandler(org.xml.sax.ContentHandler handler)
set the content handler

Specified by:
setContentHandler in interface org.xml.sax.XMLReader
Parameters:
handler -

setDTDHandler

public void setDTDHandler(org.xml.sax.DTDHandler handler)
set the dtd handler

Specified by:
setDTDHandler in interface org.xml.sax.XMLReader
Parameters:
handler -

setEntityResolver

public void setEntityResolver(org.xml.sax.EntityResolver resolver)
set the entity resolver

Specified by:
setEntityResolver in interface org.xml.sax.XMLReader
Parameters:
resolver -

setErrorHandler

public void setErrorHandler(org.xml.sax.ErrorHandler handler)
set the error handler

Specified by:
setErrorHandler in interface org.xml.sax.XMLReader
Parameters:
handler -

setLexicalHandler

public void setLexicalHandler(org.xml.sax.ext.LexicalHandler handler)
set the lexical handler

Parameters:
handler -

getFeature

public boolean getFeature(java.lang.String name)
                   throws org.xml.sax.SAXNotRecognizedException,
                          org.xml.sax.SAXNotSupportedException
get feature

Specified by:
getFeature in interface org.xml.sax.XMLReader
Parameters:
name -
Returns:
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
get property

Specified by:
getProperty in interface org.xml.sax.XMLReader
Parameters:
name -
Returns:
the property
Throws:
SAXNotRecognizedException, - SAXNotSupportedException
org.xml.sax.SAXNotRecognizedException
org.xml.sax.SAXNotSupportedException

setFeature

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

Specified by:
setFeature in interface org.xml.sax.XMLReader
Parameters:
name -
value -
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
set property

Specified by:
setProperty in interface org.xml.sax.XMLReader
Parameters:
name -
value -
Throws:
SAXNotRecognizedException, - SAXNotSupportedException
org.xml.sax.SAXNotRecognizedException
org.xml.sax.SAXNotSupportedException

parse

public void parse(java.lang.String systemId)
           throws java.io.IOException,
                  org.xml.sax.SAXException
parse

Specified by:
parse in interface org.xml.sax.XMLReader
Parameters:
systemId -
Throws:
IOException, - SAXException
java.io.IOException
org.xml.sax.SAXException

parse

public void parse(org.xml.sax.InputSource in)
           throws java.io.IOException,
                  org.xml.sax.SAXException
parse

Specified by:
parse in interface org.xml.sax.XMLReader
Parameters:
in -
Throws:
IOException, - SAXException
java.io.IOException
org.xml.sax.SAXException

parse

public void parse(java.io.InputStream stream)
           throws java.io.IOException,
                  org.xml.sax.SAXException
parse

Parameters:
stream -
Throws:
IOException, - SAXException
java.io.IOException
org.xml.sax.SAXException

debug

private void debug(java.lang.String str)

error

private void error(java.lang.String str)


Copyright © 2003 Bibop Research International. All Rights Reserved.