Class AbstractVelocityStatus

java.lang.Object
edu.sc.seis.sod.status.AbstractVelocityStatus
All Implemented Interfaces:
SodElement, NetworkMonitor, WaveformMonitor
Direct Known Subclasses:
WaveformNetworkStatus, WaveformStationStatus

public abstract class AbstractVelocityStatus
extends java.lang.Object
implements WaveformMonitor, NetworkMonitor
  • Constructor Summary

    Constructors 
    Constructor Description
    AbstractVelocityStatus​(java.lang.String fileDir, java.lang.String templateName)  
    AbstractVelocityStatus​(org.w3c.dom.Element config)  
  • Method Summary

    Modifier and Type Method Description
    static java.lang.String getNestedTextForElement​(java.lang.String elementName, org.w3c.dom.Element config)  
    abstract int getNumDirDeep()
    Method getNumDirDeep returns how many directories below the base status directory this template will write
    static java.lang.String getTemplateName​(org.w3c.dom.Element config)  
    protected java.lang.String loadTemplate()
    loads the default template, given by the <template> tag in the config.
    protected java.lang.String loadTemplate​(java.lang.String templateName)
    loads the named template.
    void scheduleOutput​(java.lang.String filename, org.apache.velocity.context.Context context)
    Schedules the default template, from the <template> element in the config, for output.
    void scheduleOutput​(java.lang.String filename, org.apache.velocity.context.Context context, java.lang.String template)
    Schedules the given template for output.

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

    Methods inherited from interface edu.sc.seis.sod.status.networkArm.NetworkMonitor

    change, change, change, change, setArmStatus

    Methods inherited from interface edu.sc.seis.sod.status.waveformArm.WaveformMonitor

    update, update, update, update
  • Constructor Details

    • AbstractVelocityStatus

      public AbstractVelocityStatus​(org.w3c.dom.Element config) throws java.sql.SQLException, java.net.MalformedURLException, java.io.IOException
      Throws:
      java.sql.SQLException
      java.net.MalformedURLException
      java.io.IOException
    • AbstractVelocityStatus

      public AbstractVelocityStatus​(java.lang.String fileDir, java.lang.String templateName) throws java.sql.SQLException, java.io.IOException
      Throws:
      java.sql.SQLException
      java.io.IOException
  • Method Details

    • getTemplateName

      public static java.lang.String getTemplateName​(org.w3c.dom.Element config) throws java.net.MalformedURLException
      Throws:
      java.net.MalformedURLException
    • getNestedTextForElement

      public static java.lang.String getNestedTextForElement​(java.lang.String elementName, org.w3c.dom.Element config)
    • getNumDirDeep

      public abstract int getNumDirDeep()
      Method getNumDirDeep returns how many directories below the base status directory this template will write
    • loadTemplate

      protected java.lang.String loadTemplate() throws java.io.IOException
      loads the default template, given by the <template> tag in the config.
      Throws:
      java.io.IOException
    • loadTemplate

      protected java.lang.String loadTemplate​(java.lang.String templateName) throws java.io.IOException
      loads the named template. This method is in case a velocity processor has more than one template generated by the same java class.
      Throws:
      java.io.IOException
    • scheduleOutput

      public void scheduleOutput​(java.lang.String filename, org.apache.velocity.context.Context context)
      Schedules the default template, from the <template> element in the config, for output.
    • scheduleOutput

      public void scheduleOutput​(java.lang.String filename, org.apache.velocity.context.Context context, java.lang.String template)
      Schedules the given template for output.