Package 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
Fields Modifier and Type Field Description protected java.util.List
templates
-
Constructor Summary
Constructors Constructor Description Template()
-
Method Summary
All Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description 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
-
-
-
Method Detail
-
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()
-
-