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 Object
  • Field Details

    • templates

      protected List templates
  • Constructor Details

    • Template

      public Template()
  • Method Details

    • textTemplate

      protected abstract Object textTemplate(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 Object getTemplate(String tag, 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 Object getCommonTemplate(String tag, 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(Element el) throws ConfigurationException
      Throws:
      ConfigurationException
    • parse

      protected void parse(Element el, boolean trim) throws ConfigurationException
      Parameters:
      trim - Removes all whitespace from TEXT_NODEs.
      Throws:
      ConfigurationException
    • setUp

      public void setUp()