net.sf.joost.stx
Class BufferReader

java.lang.Object
  extended bynet.sf.joost.stx.BufferReader
All Implemented Interfaces:
Constants, XMLReader

public class BufferReader
extends Object
implements XMLReader, Constants

An XMLReader object that uses the events from a buffer.

Version:
$Revision: 1.5 $ $Date: 2005/05/04 07:43:16 $
Author:
Oliver Becker

Field Summary
private  ContentHandler contH
          the content handler object
private  SAXEvent[] events
          the array of events to be feed into the external SAX processor
private  LexicalHandler lexH
          the lexical handler object
 
Fields inherited from interface net.sf.joost.Constants
DEBUG, DEFAULT_ENCODING, FEAT_NS, FEAT_NSPREFIX, FEATURE_URI_PREFIX, FUNC_NS, JOOST_EXT_NS, PR_ATTRIBUTES, PR_BUFFER, PR_CHILDREN, PR_CONTINUE, PR_ERROR, PR_SELF, PR_SIBLINGS, STX_NS
 
Constructor Summary
BufferReader(Context context, String bufQName, String bufExpName, String publicId, String systemId, int lineNo, int colNo)
          Constructs a new BufferReader object.
 
Method Summary
 ContentHandler getContentHandler()
           
 DTDHandler getDTDHandler()
           
 EntityResolver getEntityResolver()
           
 ErrorHandler getErrorHandler()
           
 boolean getFeature(String name)
           
 Object getProperty(String name)
           
 void parse(ContentHandler contH, LexicalHandler lexH)
          Do the real work: emit SAX events to the handler objects.
 void parse(InputSource dummy)
           
 void parse(String dummy)
           
 void setContentHandler(ContentHandler handler)
           
 void setDTDHandler(DTDHandler handler)
          does nothing
 void setEntityResolver(EntityResolver resolver)
          does nothing
 void setErrorHandler(ErrorHandler handler)
          does nothing
 void setFeature(String name, boolean state)
           
 void setProperty(String name, Object value)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

lexH

private LexicalHandler lexH
the lexical handler object


contH

private ContentHandler contH
the content handler object


events

private SAXEvent[] events
the array of events to be feed into the external SAX processor

Constructor Detail

BufferReader

public BufferReader(Context context,
                    String bufQName,
                    String bufExpName,
                    String publicId,
                    String systemId,
                    int lineNo,
                    int colNo)
             throws SAXException
Constructs a new BufferReader object.

Parameters:
context - the current context
bufQName - the qualified name of the buffer as used in the transformation sheet (only needed for creating an error message)
bufExpName - the internal expanded name
publicId - public id of the calling instruction
systemId - system id of the calling instruction
lineNo - line number of the calling instruction
colNo - column number of the calling instruction
Throws:
SAXException - if there's no such buffer
Method Detail

setFeature

public void setFeature(String name,
                       boolean state)
                throws SAXNotRecognizedException,
                       SAXNotSupportedException
Specified by:
setFeature in interface XMLReader
Throws:
SAXNotRecognizedException
SAXNotSupportedException

getFeature

public boolean getFeature(String name)
                   throws SAXNotRecognizedException
Specified by:
getFeature in interface XMLReader
Throws:
SAXNotRecognizedException

setProperty

public void setProperty(String name,
                        Object value)
                 throws SAXNotRecognizedException,
                        SAXNotSupportedException
Specified by:
setProperty in interface XMLReader
Throws:
SAXNotRecognizedException
SAXNotSupportedException

getProperty

public Object getProperty(String name)
                   throws SAXNotRecognizedException
Specified by:
getProperty in interface XMLReader
Throws:
SAXNotRecognizedException

setEntityResolver

public void setEntityResolver(EntityResolver resolver)
does nothing

Specified by:
setEntityResolver in interface XMLReader

getEntityResolver

public EntityResolver getEntityResolver()
Specified by:
getEntityResolver in interface XMLReader
Returns:
null

setDTDHandler

public void setDTDHandler(DTDHandler handler)
does nothing

Specified by:
setDTDHandler in interface XMLReader

getDTDHandler

public DTDHandler getDTDHandler()
Specified by:
getDTDHandler in interface XMLReader
Returns:
null

setContentHandler

public void setContentHandler(ContentHandler handler)
Specified by:
setContentHandler in interface XMLReader

getContentHandler

public ContentHandler getContentHandler()
Specified by:
getContentHandler in interface XMLReader

setErrorHandler

public void setErrorHandler(ErrorHandler handler)
does nothing

Specified by:
setErrorHandler in interface XMLReader

getErrorHandler

public ErrorHandler getErrorHandler()
Specified by:
getErrorHandler in interface XMLReader

parse

public void parse(InputSource dummy)
           throws SAXException
Specified by:
parse in interface XMLReader
Throws:
SAXException

parse

public void parse(String dummy)
           throws SAXException
Specified by:
parse in interface XMLReader
Throws:
SAXException

parse

public void parse(ContentHandler contH,
                  LexicalHandler lexH)
           throws SAXException
Do the real work: emit SAX events to the handler objects.

Throws:
SAXException