org.jfree.data.xml

Class ItemHandler

public class ItemHandler extends DefaultHandler implements DatasetTags

A handler for reading key-value items.
Constructor Summary
ItemHandler(RootHandler root, DefaultHandler parent)
Creates a new item handler.
Method Summary
voidendElement(String namespaceURI, String localName, String qName)
The end of an element.
ComparablegetKey()
Returns the key that has been read by the handler, or null.
NumbergetValue()
Returns the key that has been read by the handler, or null.
voidsetKey(Comparable key)
Sets the key.
voidsetValue(Number value)
Sets the value.
voidstartElement(String namespaceURI, String localName, String qName, Attributes atts)
The start of an element.

Constructor Detail

ItemHandler

public ItemHandler(RootHandler root, DefaultHandler parent)
Creates a new item handler.

Parameters: root the root handler. parent the parent handler.

Method Detail

endElement

public void endElement(String namespaceURI, String localName, String qName)
The end of an element.

Parameters: namespaceURI the namespace. localName the element name. qName the element name.

getKey

public Comparable getKey()
Returns the key that has been read by the handler, or null.

Returns: The key.

getValue

public Number getValue()
Returns the key that has been read by the handler, or null.

Returns: The value.

setKey

public void setKey(Comparable key)
Sets the key.

Parameters: key the key.

setValue

public void setValue(Number value)
Sets the value.

Parameters: value the value.

startElement

public void startElement(String namespaceURI, String localName, String qName, Attributes atts)
The start of an element.

Parameters: namespaceURI the namespace. localName the element name. qName the element name. atts the attributes.

Throws: SAXException for errors.