edu.sc.seis.sod.status
Class EventFormatter

java.lang.Object
  extended by edu.sc.seis.sod.status.Template
      extended by edu.sc.seis.sod.status.EventFormatter
All Implemented Interfaces:
EventTemplate

public class EventFormatter
extends Template
implements EventTemplate


Field Summary
 
Fields inherited from class edu.sc.seis.sod.status.Template
templates
 
Constructor Summary
EventFormatter(boolean filize)
           
EventFormatter(org.w3c.dom.Element config)
           
EventFormatter(org.w3c.dom.Element config, boolean filize)
           
 
Method Summary
static java.lang.String format(double d)
           
static EventFormatter getDefaultFormatter()
           
static java.lang.String getDefaultResult(CacheEvent event)
           
 java.lang.String getFilizedName(CacheEvent event)
           
static java.lang.String getMag(CacheEvent event)
           
static Origin getOrigin(CacheEvent event)
           
static java.lang.String getRegionName(CacheEvent event)
           
 java.lang.String getResult(CacheEvent event)
           
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.
static EventFormatter makeFilizer()
           
static EventFormatter makeTime()
           
protected  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
 void useDefaultConfig()
           
 
Methods inherited from class edu.sc.seis.sod.status.Template
getCommonTemplate, parse, parse, setUp
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

EventFormatter

public EventFormatter(boolean filize)
               throws ConfigurationException
Throws:
ConfigurationException

EventFormatter

public EventFormatter(org.w3c.dom.Element config)
               throws ConfigurationException
Throws:
ConfigurationException

EventFormatter

public EventFormatter(org.w3c.dom.Element config,
                      boolean filize)
               throws ConfigurationException
Throws:
ConfigurationException
Method Detail

makeTime

public static EventFormatter makeTime()

makeFilizer

public static EventFormatter makeFilizer()

getDefaultFormatter

public static EventFormatter getDefaultFormatter()

getDefaultResult

public static java.lang.String getDefaultResult(CacheEvent event)

textTemplate

protected java.lang.Object textTemplate(java.lang.String text)
Description copied from class: Template
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

Specified by:
textTemplate in class Template

getTemplate

protected java.lang.Object getTemplate(java.lang.String tag,
                                       org.w3c.dom.Element el)
Description copied from class: Template
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.

Overrides:
getTemplate in class Template

format

public static java.lang.String format(double d)

useDefaultConfig

public void useDefaultConfig()

getResult

public java.lang.String getResult(CacheEvent event)
Specified by:
getResult in interface EventTemplate

getFilizedName

public java.lang.String getFilizedName(CacheEvent event)

getMag

public static java.lang.String getMag(CacheEvent event)

getOrigin

public static Origin getOrigin(CacheEvent event)

getRegionName

public static java.lang.String getRegionName(CacheEvent event)