public class CategoryDatasetHandler extends RootHandler implements DatasetTags
CategoryDataset
from an XML file.CATEGORYDATASET_TAG, ITEM_TAG, KEY_TAG, PIEDATASET_TAG, SERIES_TAG, VALUE_TAG
Constructor and Description |
---|
CategoryDatasetHandler()
Creates a new handler.
|
Modifier and Type | Method and Description |
---|---|
void |
addItem(java.lang.Comparable rowKey,
java.lang.Comparable columnKey,
java.lang.Number value)
Adds an item to the dataset.
|
void |
endElement(java.lang.String namespaceURI,
java.lang.String localName,
java.lang.String qName)
The end of an element.
|
CategoryDataset |
getDataset()
Returns the dataset.
|
void |
startElement(java.lang.String namespaceURI,
java.lang.String localName,
java.lang.String qName,
org.xml.sax.Attributes atts)
The start of an element.
|
characters, getCurrentHandler, getSubHandlers, popSubHandler, pushSubHandler
public CategoryDatasetHandler()
public CategoryDataset getDataset()
public void addItem(java.lang.Comparable rowKey, java.lang.Comparable columnKey, java.lang.Number value)
rowKey
- the row key.columnKey
- the column key.value
- the value.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
startElement
in interface org.xml.sax.ContentHandler
startElement
in class org.xml.sax.helpers.DefaultHandler
namespaceURI
- the namespace.localName
- the element name.qName
- the element name.atts
- the element attributes.org.xml.sax.SAXException
- for errors.public void endElement(java.lang.String namespaceURI, java.lang.String localName, java.lang.String qName) throws org.xml.sax.SAXException
endElement
in interface org.xml.sax.ContentHandler
endElement
in class org.xml.sax.helpers.DefaultHandler
namespaceURI
- the namespace.localName
- the element name.qName
- the element name.org.xml.sax.SAXException
- for errors.