Package org.jfree.data.xml
Class KeyHandler
java.lang.Object
org.xml.sax.helpers.DefaultHandler
org.jfree.data.xml.KeyHandler
- All Implemented Interfaces:
DatasetTags,ContentHandler,DTDHandler,EntityResolver,ErrorHandler
A SAX handler for reading a key.
-
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
ConstructorsConstructorDescriptionKeyHandler(RootHandler rootHandler, ItemHandler itemHandler) Creates a new handler. -
Method Summary
Modifier and TypeMethodDescriptionvoidcharacters(char[] ch, int start, int length) Receives some (or all) of the text in the current element.protected voidRemoves all text from the textbuffer at the end of a CDATA section.voidendElement(String namespaceURI, String localName, String qName) The end of an element.protected StringReturns the current text of the textbuffer.voidstartElement(String namespaceURI, String localName, String qName, Attributes atts) The start of an element.Methods inherited from class org.xml.sax.helpers.DefaultHandler
endDocument, endPrefixMapping, error, fatalError, ignorableWhitespace, notationDecl, processingInstruction, resolveEntity, setDocumentLocator, skippedEntity, startDocument, startPrefixMapping, unparsedEntityDecl, warningMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface org.xml.sax.ContentHandler
declaration
-
Constructor Details
-
KeyHandler
Creates a new handler.- Parameters:
rootHandler- the root handler.itemHandler- the item handler.
-
-
Method Details
-
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 attributes.- Throws:
SAXException- for errors.
-
endElement
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.
-
characters
Receives some (or all) of the text in the current element.- Specified by:
charactersin interfaceContentHandler- Overrides:
charactersin classDefaultHandler- Parameters:
ch- character buffer.start- the start index.length- the length of the valid character data.
-
getCurrentText
Returns the current text of the textbuffer.- Returns:
- The current text.
-
clearCurrentText
Removes all text from the textbuffer at the end of a CDATA section.
-