edu.sc.seis.sod.status
Class Template
java.lang.Object
edu.sc.seis.sod.status.Template
- Direct Known Subclasses:
- ChannelFormatter, ChannelGroupTemplate, EventFormatter, EventGroupTemplate, EventStationGroupTemplate, FileWritingTemplate, LocalSeismogramTemplate, MenuTemplate, MicroSecondTimeRangeFormatter, NetworkFormatter, NetworkGroupTemplate, SiteFormatter, SiteGroupTemplate, StationFormatter, StationGroupTemplate, WaveformEventTemplate
public abstract class Template
- extends java.lang.Object
Field Summary |
protected java.util.List |
templates
|
Method Summary |
protected java.lang.Object |
getCommonTemplate(java.lang.String tag,
org.w3c.dom.Element el)
actually return Templates for common tags. |
protected java.lang.Object |
getTemplate(java.lang.String tag,
org.w3c.dom.Element el)
if this class has an template for this tag, it creates it using the
passed in element and returns it. |
protected void |
parse(org.w3c.dom.Element el)
|
protected void |
parse(org.w3c.dom.Element el,
boolean trim)
|
void |
setUp()
|
protected abstract java.lang.Object |
textTemplate(java.lang.String text)
returns an object of the template type that this class uses, and returns
the passed in text when the getResult method of that template type is
called |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
templates
protected java.util.List templates
Template
public Template()
textTemplate
protected abstract java.lang.Object textTemplate(java.lang.String text)
- returns an object of the template type that this class uses, and returns
the passed in text when the getResult method of that template type is
called
getTemplate
protected java.lang.Object getTemplate(java.lang.String tag,
org.w3c.dom.Element el)
throws ConfigurationException
- if this class has an template for this tag, it creates it using the
passed in element and returns it. Otherwise it should return
the superclass implementation of the getCommonTemplate method. Though no harm will come
from merely returning null, they won't benefit from the wisdom and extra
tags provided by their elder classes.
- Throws:
ConfigurationException
getCommonTemplate
protected java.lang.Object getCommonTemplate(java.lang.String tag,
org.w3c.dom.Element el)
- actually return Templates for common tags. This is to allow subclasses to
avoid throwing ConfigurationException if it can never really happen.
parse
protected void parse(org.w3c.dom.Element el)
throws ConfigurationException
- Throws:
ConfigurationException
parse
protected void parse(org.w3c.dom.Element el,
boolean trim)
throws ConfigurationException
- Parameters:
trim
- Removes all whitespace from TEXT_NODEs.
- Throws:
ConfigurationException
setUp
public void setUp()