edu.sc.seis.sod.process.waveform

## Class AbstractFileWriter

- java.lang.Object
- - edu.sc.seis.sod.process.waveform.AbstractFileWriter

- Direct Known Subclasses:
    AbstractSeismogramWriter, ParticleMotionPlot

      public abstract class AbstractFileWriter
      extends java.lang.Object

- - ### Field Summary

    Fields
    Modifier and Type | Field and Description
    --- | ---
    `static java.lang.String` | `DEFAULT_FILE_TEMPLATE_WO_EXT`
    `static java.lang.String` | `DEFAULT_PREFIX`
    `static java.lang.String` | `DEFAULT_WORKING_DIR`
    `protected static java.util.regex.Pattern` | `INDEX_VAR`
    `protected java.lang.String` | `origTemplate`
    `protected java.lang.String` | `prefix`
    `protected java.lang.String` | `template`
    `protected SimpleVelocitizer` | `velocitizer`
    `protected java.lang.String` | `workingDir`

  - ### Constructor Summary

    Constructors
    Constructor and Description
    `AbstractFileWriter()`
    `AbstractFileWriter(java.lang.String workingDir, java.lang.String fileTemplate, java.lang.String prefix)`

  - ### Method Summary

    All Methods Static Methods Instance Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `StringTree` | `checkParentDirs(java.lang.String filename)`
    `protected static java.lang.String` | `extractFileTemplate(org.w3c.dom.Element el, java.lang.String def)`
    `protected static java.lang.String` | `extractPrefix(org.w3c.dom.Element el)`
    `static java.lang.String` | `extractWorkingDir(org.w3c.dom.Element el)`
    `java.lang.String` | `generate(edu.sc.seis.fissuresUtil.cache.CacheEvent event, edu.sc.seis.fissuresUtil.hibernate.ChannelGroup channelGroup, int index, java.util.Map<java.lang.String,java.lang.Object> extras)`
    `java.lang.String` | `generate(edu.sc.seis.fissuresUtil.cache.CacheEvent event, edu.iris.Fissures.network.ChannelImpl channel, edu.iris.Fissures.network.ChannelImpl otherChannel, int index, java.util.Map<java.lang.String,java.lang.Object> extras)`
    `java.lang.String` | `generate(edu.sc.seis.fissuresUtil.cache.CacheEvent event, edu.iris.Fissures.network.ChannelImpl channel, edu.iris.Fissures.seismogramDC.LocalSeismogramImpl representativeSeismogram, int index, int numSeismograms)`
    `java.lang.String` | `getTemplate()`
    `void` | `removeExisting(edu.sc.seis.fissuresUtil.cache.CacheEvent event, edu.sc.seis.fissuresUtil.hibernate.ChannelGroup channelGroup, java.util.Map<java.lang.String,java.lang.Object> extras)`
    `void` | `removeExisting(edu.sc.seis.fissuresUtil.cache.CacheEvent event, edu.iris.Fissures.network.ChannelImpl channel, edu.iris.Fissures.network.ChannelImpl otherChannel, java.util.Map<java.lang.String,java.lang.Object> extras)`
    `void` | `removeExisting(edu.sc.seis.fissuresUtil.cache.CacheEvent event, edu.iris.Fissures.network.ChannelImpl channel, edu.iris.Fissures.seismogramDC.LocalSeismogramImpl representativeSeismogram, int numSeismograms)`

    - ### Methods inherited from class java.lang.Object

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

- - ### Field Detail

    - #### DEFAULT_FILE_TEMPLATE_WO_EXT

          public static final java.lang.String DEFAULT_FILE_TEMPLATE_WO_EXT

      See Also:
        Constant Field Values

    - #### DEFAULT_PREFIX

          public static final java.lang.String DEFAULT_PREFIX

      See Also:
        Constant Field Values

    - #### DEFAULT_WORKING_DIR

          public static final java.lang.String DEFAULT_WORKING_DIR

      See Also:
        Constant Field Values

    - #### workingDir

          protected java.lang.String workingDir

    - #### origTemplate

          protected java.lang.String origTemplate

    - #### template

          protected java.lang.String template

    - #### prefix

          protected java.lang.String prefix

    - #### velocitizer

          protected SimpleVelocitizer velocitizer

    - #### INDEX_VAR

          protected static final java.util.regex.Pattern INDEX_VAR

  - ### Constructor Detail

    - #### AbstractFileWriter

          public AbstractFileWriter(java.lang.String workingDir,
                                    java.lang.String fileTemplate,
                                    java.lang.String prefix)

    - #### AbstractFileWriter

          public AbstractFileWriter()

  - ### Method Detail

    - #### generate

          public java.lang.String generate(edu.sc.seis.fissuresUtil.cache.CacheEvent event,
                                           edu.iris.Fissures.network.ChannelImpl channel,
                                           edu.iris.Fissures.seismogramDC.LocalSeismogramImpl representativeSeismogram,
                                           int index,
                                           int numSeismograms)

    - #### generate

          public java.lang.String generate(edu.sc.seis.fissuresUtil.cache.CacheEvent event,
                                           edu.iris.Fissures.network.ChannelImpl channel,
                                           edu.iris.Fissures.network.ChannelImpl otherChannel,
                                           int index,
                                           java.util.Map<java.lang.String,java.lang.Object> extras)

    - #### generate

          public java.lang.String generate(edu.sc.seis.fissuresUtil.cache.CacheEvent event,
                                           edu.sc.seis.fissuresUtil.hibernate.ChannelGroup channelGroup,
                                           int index,
                                           java.util.Map<java.lang.String,java.lang.Object> extras)

    - #### checkParentDirs

          public StringTree checkParentDirs(java.lang.String filename)

    - #### removeExisting

          public void removeExisting(edu.sc.seis.fissuresUtil.cache.CacheEvent event,
                                     edu.iris.Fissures.network.ChannelImpl channel,
                                     edu.iris.Fissures.seismogramDC.LocalSeismogramImpl representativeSeismogram,
                                     int numSeismograms)

    - #### removeExisting

          public void removeExisting(edu.sc.seis.fissuresUtil.cache.CacheEvent event,
                                     edu.iris.Fissures.network.ChannelImpl channel,
                                     edu.iris.Fissures.network.ChannelImpl otherChannel,
                                     java.util.Map<java.lang.String,java.lang.Object> extras)

    - #### removeExisting

          public void removeExisting(edu.sc.seis.fissuresUtil.cache.CacheEvent event,
                                     edu.sc.seis.fissuresUtil.hibernate.ChannelGroup channelGroup,
                                     java.util.Map<java.lang.String,java.lang.Object> extras)

    - #### getTemplate

          public java.lang.String getTemplate()

    - #### extractFileTemplate

          protected static java.lang.String extractFileTemplate(org.w3c.dom.Element el,
                                                                java.lang.String def)

    - #### extractPrefix

          protected static java.lang.String extractPrefix(org.w3c.dom.Element el)

    - #### extractWorkingDir

          public static java.lang.String extractWorkingDir(org.w3c.dom.Element el)