it.eng.spago.base
Class SourceBeanContentHandler

java.lang.Object
  extended by org.xml.sax.helpers.DefaultHandler
      extended by it.eng.spago.base.SourceBeanContentHandler
All Implemented Interfaces:
org.xml.sax.ContentHandler, org.xml.sax.DTDHandler, org.xml.sax.EntityResolver, org.xml.sax.ErrorHandler

public class SourceBeanContentHandler
extends org.xml.sax.helpers.DefaultHandler

La classe SourceBeanContentHandler implementa l'interfaccia standard di un parser SAX. Questo parser ricostruisce un oggetto di tipo SourceBean da uno stream XML.

Version:
1.0, 11/03/2002
Author:
Luigi Bellio
See Also:
SourceBeanAttribute, SourceBean

Constructor Summary
SourceBeanContentHandler()
          Costruisce ed inizializza il parser.
SourceBeanContentHandler(boolean trim)
          Costruisce ed inizializza il parser.
 
Method Summary
 void characters(char[] ch, int start, int length)
          Gestisce il testo di un elemento XML.
 void endDocument()
          Gestisce l'evento di fine stream XML.
 void endElement(java.lang.String namespaceURI, java.lang.String localName, java.lang.String rawName)
          Gestisce l'evento di fine elemento XML.
 SourceBean getSourceBean()
          Ritorna il SourceBean costruito a partire dallo stream XML.
 void startDocument()
          Gestisce l'evento di inizio stream XML.
 void startElement(java.lang.String namespaceURI, java.lang.String localName, java.lang.String rawName, org.xml.sax.Attributes attributes)
          Gestisce l'evento di inizio elemento XML.
 
Methods inherited from class org.xml.sax.helpers.DefaultHandler
endPrefixMapping, error, fatalError, ignorableWhitespace, notationDecl, processingInstruction, resolveEntity, setDocumentLocator, skippedEntity, startPrefixMapping, unparsedEntityDecl, warning
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

SourceBeanContentHandler

public SourceBeanContentHandler()
Costruisce ed inizializza il parser.


SourceBeanContentHandler

public SourceBeanContentHandler(boolean trim)
Costruisce ed inizializza il parser.

Method Detail

startDocument

public void startDocument()
                   throws org.xml.sax.SAXException
Gestisce l'evento di inizio stream XML.

Specified by:
startDocument in interface org.xml.sax.ContentHandler
Overrides:
startDocument in class org.xml.sax.helpers.DefaultHandler
Throws:
org.xml.sax.SAXException

endDocument

public void endDocument()
                 throws org.xml.sax.SAXException
Gestisce l'evento di fine stream XML.

Specified by:
endDocument in interface org.xml.sax.ContentHandler
Overrides:
endDocument in class org.xml.sax.helpers.DefaultHandler
Throws:
org.xml.sax.SAXException

startElement

public void startElement(java.lang.String namespaceURI,
                         java.lang.String localName,
                         java.lang.String rawName,
                         org.xml.sax.Attributes attributes)
                  throws org.xml.sax.SAXException
Gestisce l'evento di inizio elemento XML.

Specified by:
startElement in interface org.xml.sax.ContentHandler
Overrides:
startElement in class org.xml.sax.helpers.DefaultHandler
Throws:
org.xml.sax.SAXException

endElement

public void endElement(java.lang.String namespaceURI,
                       java.lang.String localName,
                       java.lang.String rawName)
                throws org.xml.sax.SAXException
Gestisce l'evento di fine elemento XML.

Specified by:
endElement in interface org.xml.sax.ContentHandler
Overrides:
endElement in class org.xml.sax.helpers.DefaultHandler
Throws:
org.xml.sax.SAXException

characters

public void characters(char[] ch,
                       int start,
                       int length)
                throws org.xml.sax.SAXException
Gestisce il testo di un elemento XML.

Specified by:
characters in interface org.xml.sax.ContentHandler
Overrides:
characters in class org.xml.sax.helpers.DefaultHandler
Throws:
org.xml.sax.SAXException

getSourceBean

public SourceBean getSourceBean()
Ritorna il SourceBean costruito a partire dallo stream XML.