- java.lang.Object
-
- org.xml.sax.helpers.DefaultHandler
-
- org.jfree.data.xml.RootHandler
-
- org.jfree.data.xml.CategoryDatasetHandler
-
- All Implemented Interfaces:
DatasetTags,ContentHandler,DTDHandler,EntityResolver,ErrorHandler
public class CategoryDatasetHandler extends RootHandler implements DatasetTags
A SAX handler for reading aCategoryDatasetfrom 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
Constructors Constructor Description CategoryDatasetHandler()Creates a new handler.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidaddItem(Comparable rowKey, Comparable columnKey, Number value)Adds an item to the dataset.voidendElement(String namespaceURI, String localName, String qName)The end of an element.CategoryDatasetgetDataset()Returns the dataset.voidstartElement(String namespaceURI, String localName, String qName, Attributes atts)The start of 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
-
-
-
-
Constructor Detail
-
CategoryDatasetHandler
public CategoryDatasetHandler()
Creates a new handler.
-
-
Method Detail
-
getDataset
public CategoryDataset getDataset()
Returns the dataset.- Returns:
- The dataset.
-
addItem
public void addItem(Comparable rowKey, Comparable columnKey, Number value)
Adds an item to the dataset.- Parameters:
rowKey- the row key.columnKey- the column key.value- the value.
-
startElement
public void startElement(String namespaceURI, String localName, String qName, Attributes atts) throws SAXException
The start of an element.- Specified by:
startElementin interfaceContentHandler- Overrides:
startElementin classDefaultHandler- Parameters:
namespaceURI- the namespace.localName- the element name.qName- the element name.atts- the element attributes.- Throws:
SAXException- for errors.
-
endElement
public void endElement(String namespaceURI, String localName, String qName) throws SAXException
The end of an element.- Specified by:
endElementin interfaceContentHandler- Overrides:
endElementin classDefaultHandler- Parameters:
namespaceURI- the namespace.localName- the element name.qName- the element name.- Throws:
SAXException- for errors.
-
-