ptolemy.plot.plotml
Class PlotMLParser
- java.lang.Object
-
- com.microstar.xml.HandlerBase
-
- ptolemy.plot.plotml.PlotBoxMLParser
-
- ptolemy.plot.plotml.PlotMLParser
-
- All Implemented Interfaces:
- com.microstar.xml.XmlHandler
- Direct Known Subclasses:
- HistogramMLParser
public class PlotMLParser extends PlotBoxMLParser
This class constructs a plot from specifications in PlotML (Plot Markup Language), which is an XML language. This class supports extends the base class to support the subset that applies to the Plot class. It ignores unrecognized elements in the DTD. The class contains an instance of the Microstar Ælfred XML parser and implements callback methods to interpret the parsed XML. The way to use this class is to construct it with a reference to a Plot object and then call its parse() method.- Since:
- Ptolemy II 0.4
-
-
Field Summary
-
Fields inherited from class ptolemy.plot.plotml.PlotBoxMLParser
PlotML_DTD_1
-
-
Constructor Summary
Constructors Constructor and Description PlotMLParser(Plot plot)Construct an parser to parse commands for the specified plot object.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method and Description voidendElement(java.lang.String elementName)End an element.voidstartDocument()Start a document.voidstartElement(java.lang.String elementName)Start an element.-
Methods inherited from class ptolemy.plot.plotml.PlotBoxMLParser
attribute, charData, endDocument, error, parse, parse, parse, resolveEntity, startExternalEntity
-
-
-
-
Constructor Detail
-
PlotMLParser
public PlotMLParser(Plot plot)
Construct an parser to parse commands for the specified plot object.- Parameters:
plot- The plot object to which to apply the commands.
-
-
Method Detail
-
endElement
public void endElement(java.lang.String elementName) throws java.lang.ExceptionEnd an element. This method calls the appropriate Plot methods. Ælfred will call this method at the end of each element (including EMPTY elements).- Specified by:
endElementin interfacecom.microstar.xml.XmlHandler- Overrides:
endElementin classPlotBoxMLParser- Parameters:
elementName- The element type name.- Throws:
java.lang.Exception- If thrown by the superclass or while calling setConnected().- See Also:
XmlHandler.endElement(java.lang.String)
-
startDocument
public void startDocument()
Start a document. This method is called just before the parser attempts to read the first entity (the root of the document). It is guaranteed that this will be the first method called.- Specified by:
startDocumentin interfacecom.microstar.xml.XmlHandler- Overrides:
startDocumentin classPlotBoxMLParser- See Also:
XmlHandler.startDocument()
-
startElement
public void startElement(java.lang.String elementName) throws com.microstar.xml.XmlExceptionStart an element. This is called at the beginning of each XML element. By the time it is called, all of the attributes for the element will already have been reported using the attribute() method. Unrecognized elements are ignored.- Specified by:
startElementin interfacecom.microstar.xml.XmlHandler- Overrides:
startElementin classPlotBoxMLParser- Parameters:
elementName- The element type name.- Throws:
com.microstar.xml.XmlException- If the element produces an error in constructing the model.- See Also:
XmlHandler.startElement(java.lang.String)
-
-
DMelt 3.0 © DataMelt by jWork.ORG