http://www.jpicedt.org

jpicedt.graphic.io.parser
Class JPICXmlHandler

java.lang.Object
  extended by org.xml.sax.helpers.DefaultHandler
      extended by jpicedt.graphic.io.parser.JPICXmlHandler
All Implemented Interfaces:
ContentHandler, DTDHandler, EntityResolver, ErrorHandler

public class JPICXmlHandler
extends DefaultHandler

Content-handler and error-handler for the JPICParser class.

Since:
jPicEdt 1.3.3
Version:
$Id: JPICXmlHandler.java,v 1.36 2013/08/05 19:21:47 vincentb1 Exp $
Author:
Sylvain Reynal

Constructor Summary
JPICXmlHandler()
           
 
Method Summary
 void characters(char[] ch, int start, int length)
           
 void endDocument()
           
 void endElement(String uri, String localName, String qName)
           
 void error(SAXParseException e)
          Receive notification of a recoverable parser error.
 void fatalError(SAXParseException e)
          Report a fatal XML parsing error.
 Drawing fetchParsedDrawing()
           
 void setDocumentLocator(Locator locator)
           
 void startDocument()
           
 void startElement(String uri, String localName, String qName, Attributes attributes)
          Receive notification of the start of an element.
 void warning(SAXParseException e)
           
 
Methods inherited from class org.xml.sax.helpers.DefaultHandler
endPrefixMapping, ignorableWhitespace, notationDecl, processingInstruction, resolveEntity, skippedEntity, startPrefixMapping, unparsedEntityDecl
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

JPICXmlHandler

public JPICXmlHandler()
Method Detail

fetchParsedDrawing

public Drawing fetchParsedDrawing()
Returns:
un nouvel exemplaire de Drawing peuplé par les éléments obtenus par l'analyse des balises JPIC-XML.

setDocumentLocator

public void setDocumentLocator(Locator locator)
Specified by:
setDocumentLocator in interface ContentHandler
Overrides:
setDocumentLocator in class DefaultHandler

startDocument

public void startDocument()
Specified by:
startDocument in interface ContentHandler
Overrides:
startDocument in class DefaultHandler

endDocument

public void endDocument()
Specified by:
endDocument in interface ContentHandler
Overrides:
endDocument in class DefaultHandler

startElement

public void startElement(String uri,
                         String localName,
                         String qName,
                         Attributes attributes)
                  throws SAXException
Receive notification of the start of an element. Since we don't make use of any XML-namespace capability, only qName and attributes matter for out purpose.

Specified by:
startElement in interface ContentHandler
Overrides:
startElement in class DefaultHandler
Parameters:
qName - the qName of the processed tag, e.g. "rect", "g",...
Throws:
SAXException

characters

public void characters(char[] ch,
                       int start,
                       int length)
Specified by:
characters in interface ContentHandler
Overrides:
characters in class DefaultHandler

endElement

public void endElement(String uri,
                       String localName,
                       String qName)
                throws SAXException
Specified by:
endElement in interface ContentHandler
Overrides:
endElement in class DefaultHandler
Throws:
SAXException

warning

public void warning(SAXParseException e)
             throws SAXException
Specified by:
warning in interface ErrorHandler
Overrides:
warning in class DefaultHandler
Throws:
SAXException

error

public void error(SAXParseException e)
           throws SAXException
Receive notification of a recoverable parser error.

Specified by:
error in interface ErrorHandler
Overrides:
error in class DefaultHandler
Throws:
SAXException

fatalError

public void fatalError(SAXParseException e)
                throws SAXException
Report a fatal XML parsing error.

Specified by:
fatalError in interface ErrorHandler
Overrides:
fatalError in class DefaultHandler
Throws:
SAXException

http://www.jpicedt.org

Submit a bug : syd@jpicedt.org