Package 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
,ContentHandler
,DTDHandler
,EntityResolver
,ErrorHandler
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
-
Method Summary
Modifier and TypeMethodDescriptionvoid
addItem
(Comparable key, Number value) Adds an item to the dataset under construction.void
endElement
(String namespaceURI, String localName, String qName) The end of an element.Returns the dataset.void
startElement
(String namespaceURI, String localName, String qName, 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
Methods inherited from interface org.xml.sax.ContentHandler
declaration
-
Constructor Details
-
PieDatasetHandler
public PieDatasetHandler()Default constructor.
-
-
Method Details
-
getDataset
Returns the dataset.- Returns:
- The dataset.
-
addItem
Adds an item to the dataset under construction.- Parameters:
key
- the key.value
- the value.
-
startElement
public void startElement(String namespaceURI, String localName, String qName, Attributes atts) throws SAXException Starts an element.- Specified by:
startElement
in interfaceContentHandler
- Overrides:
startElement
in classDefaultHandler
- Parameters:
namespaceURI
- the namespace.localName
- the element name.qName
- the element name.atts
- the element attributes.- Throws:
SAXException
- for errors.
-
endElement
The end of an element.- Specified by:
endElement
in interfaceContentHandler
- Overrides:
endElement
in classDefaultHandler
- Parameters:
namespaceURI
- the namespace.localName
- the element name.qName
- the element name.- Throws:
SAXException
- for errors.
-