## org.jfree.data.xml
Class PieDatasetHandler

    java.lang.Object
      org.xml.sax.helpers.DefaultHandler
          org.jfree.data.xml.RootHandler
              org.jfree.data.xml.PieDatasetHandler

All Implemented Interfaces:
  DatasetTags, org.xml.sax.ContentHandler, org.xml.sax.DTDHandler, org.xml.sax.EntityResolver, org.xml.sax.ErrorHandler

    public class PieDatasetHandler

extends RootHandler
implements DatasetTags

A SAX handler for reading a `PieDataset` from an XML file.

Field Summary

Fields inherited from interface org.jfree.data.xml.DatasetTags
`CATEGORYDATASET_TAG, ITEM_TAG, KEY_TAG, PIEDATASET_TAG, SERIES_TAG, VALUE_TAG`

Constructor Summary
`PieDatasetHandler()` Default constructor.

Method Summary
`void` `addItem(java.lang.Comparable key, java.lang.Number value)` Adds an item to the dataset under construction.
`void` `endElement(java.lang.String namespaceURI, java.lang.String localName, java.lang.String qName)` The end of an element.
`PieDataset` `getDataset()` Returns the dataset.
`void` `startElement(java.lang.String namespaceURI, java.lang.String localName, java.lang.String qName, org.xml.sax.Attributes atts)` Starts an element.

Methods inherited from class org.jfree.data.xml.RootHandler
`characters, getCurrentHandler, getSubHandlers, popSubHandler, pushSubHandler`

Methods inherited from class org.xml.sax.helpers.DefaultHandler
`endDocument, endPrefixMapping, error, fatalError, ignorableWhitespace, notationDecl, processingInstruction, resolveEntity, setDocumentLocator, skippedEntity, startDocument, startPrefixMapping, unparsedEntityDecl, warning`

Methods inherited from class java.lang.Object
`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

Constructor Detail

### PieDatasetHandler

    public PieDatasetHandler()

  Default constructor.

Method Detail

### getDataset

    public PieDataset getDataset()

  Returns the dataset.

  Returns:
    The dataset.

### addItem

    public void addItem(java.lang.Comparable key,
                        java.lang.Number value)

  Adds an item to the dataset under construction.

  Parameters:
    `key` - the key.
    `value` - the value.

### startElement

    public void startElement(java.lang.String namespaceURI,
                             java.lang.String localName,
                             java.lang.String qName,
                             org.xml.sax.Attributes atts)
                      throws org.xml.sax.SAXException

  Starts an element.

  Specified by:
    `startElement` in interface `org.xml.sax.ContentHandler`
  Overrides:
    `startElement` in class `org.xml.sax.helpers.DefaultHandler`
  Parameters:
    `namespaceURI` - the namespace.
    `localName` - the element name.
    `qName` - the element name.
    `atts` - the element attributes.
  Throws:
    `org.xml.sax.SAXException` - for errors.

### endElement

    public void endElement(java.lang.String namespaceURI,
                           java.lang.String localName,
                           java.lang.String qName)
                    throws org.xml.sax.SAXException

  The end of an element.

  Specified by:
    `endElement` in interface `org.xml.sax.ContentHandler`
  Overrides:
    `endElement` in class `org.xml.sax.helpers.DefaultHandler`
  Parameters:
    `namespaceURI` - the namespace.
    `localName` - the element name.
    `qName` - the element name.
  Throws:
    `org.xml.sax.SAXException` - for errors.