marg
Class XMLParsePluginTemplate

java.lang.Object
  extended by marg.XMLParsePluginTemplate
All Implemented Interfaces:
XMLParsePlugin

public class XMLParsePluginTemplate
extends java.lang.Object
implements XMLParsePlugin


Constructor Summary
XMLParsePluginTemplate()
           
 
Method Summary
 void endElement(java.lang.String tagName)
          Called when the endtag of an element is received
 void setPropertyChangeSupport(java.beans.PropertyChangeSupport prop)
          Sets the PropertyChangeSupport object of the parent XMLParser.
 void startElement(java.lang.String tagName, org.xml.sax.Attributes atts)
          Called when the starttag of an element is received
 void tagContents(java.lang.String parentTag, char[] ch, int start, int length)
          Called when contents of an element is received.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

XMLParsePluginTemplate

public XMLParsePluginTemplate()
Method Detail

setPropertyChangeSupport

public void setPropertyChangeSupport(java.beans.PropertyChangeSupport prop)
Description copied from interface: XMLParsePlugin
Sets the PropertyChangeSupport object of the parent XMLParser. By contract this method will be called as the first thing when an XMLParsePlugin is added. This is a central callback hub that should be used to fire PropertyChangeEvents. This is the standard way to make callbacks when new data is received. Data can be sent as the new value when you fire a callback, but feel free to make your own data access methods as well

Specified by:
setPropertyChangeSupport in interface XMLParsePlugin
Parameters:
prop - the PropertyChangeSupport object sent from parent XMLParser

startElement

public void startElement(java.lang.String tagName,
                         org.xml.sax.Attributes atts)
Called when the starttag of an element is received

Specified by:
startElement in interface XMLParsePlugin
Parameters:
tagName - name of the element/tag
atts - attributes of the element

endElement

public void endElement(java.lang.String tagName)
Called when the endtag of an element is received

Specified by:
endElement in interface XMLParsePlugin
Parameters:
tagName - name of the element/tag

tagContents

public void tagContents(java.lang.String parentTag,
                        char[] ch,
                        int start,
                        int length)
Called when contents of an element is received. Data can be of any kind

Specified by:
tagContents in interface XMLParsePlugin
Parameters:
parentTag - name of the first parent tag this content was wrapped in
ch - character buffer
start - start offset for the content in character buffer
length - length of content