edu.sc.seis.sod.source.network

## Class CSVNetworkSource

- java.lang.Object
- - edu.sc.seis.sod.source.AbstractSource
  - - edu.sc.seis.sod.source.AbstractCSVSource
    - - edu.sc.seis.sod.source.network.CSVNetworkSource

- All Implemented Interfaces:
    NetworkSource, Source
  Direct Known Subclasses:
    WinstonNetworkSource

      public class CSVNetworkSource
      extends AbstractCSVSource
      implements NetworkSource

- - ### Field Summary

    Fields
    Modifier and Type | Field and Description
    --- | ---
    `static java.lang.String` | `AZIMUTH`
    `protected java.util.List<edu.iris.Fissures.network.ChannelImpl>` | `channels`
    `static java.lang.String` | `CODE`
    `static java.lang.String` | `COMMENT`
    `static java.lang.String` | `DESCRIPTION`
    `static java.lang.String` | `DIP`
    `static java.lang.String` | `END`
    `static java.lang.String` | `NET_CODE`
    `static java.lang.String` | `NET_END`
    `static java.lang.String` | `NET_START`
    `protected java.util.List<edu.iris.Fissures.network.NetworkAttrImpl>` | `networks`
    `static java.lang.String` | `OPERATOR`
    `static java.lang.String` | `SAMPLE_FREQUENCY`
    `static java.lang.String` | `SAMPLE_PERIOD`
    `static java.lang.String` | `SITE_CODE`
    `static java.lang.String` | `START`
    `static java.lang.String` | `STATION_CODE`
    `protected java.util.List<edu.iris.Fissures.network.StationImpl>` | `stations`

    - ### Fields inherited from class edu.sc.seis.sod.source.AbstractCSVSource

      `csvFilename, DEFAULT_END, DEFAULT_TIME, DEPTH, DEPTH_UNITS, ELEVATION, ELEVATION_UNITS, FE_GEO_REGION, FE_REGION, FE_REGION_TYPE, FE_SEIS_REGION, LATITUDE, LONGITUDE, NAME, UNKNOWN`

    - ### Fields inherited from class edu.sc.seis.sod.source.AbstractSource

      `name, NAME_ELEMENT, RETRIES_ELEMENT`

  - ### Constructor Summary

    Constructors
    Constructor and Description
    `CSVNetworkSource(org.w3c.dom.Element config)`
    `CSVNetworkSource(java.lang.String stationFile, java.lang.String channelFile)`

  - ### Method Summary

    All Methods Instance Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `java.util.List<? extends edu.iris.Fissures.network.ChannelImpl>` | `getChannels(edu.iris.Fissures.network.StationImpl station)`
    `java.util.List<edu.iris.Fissures.network.ChannelImpl>` | `getChannelsFromReader(java.io.Reader reader, java.util.List<edu.iris.Fissures.network.StationImpl> stations)`
    `java.lang.String` | `getDescription()`
    `java.lang.String[]` | `getFields()`
    `edu.iris.Fissures.IfNetwork.Instrumentation` | `getInstrumentation(edu.iris.Fissures.network.ChannelImpl chanId)`
    `java.lang.String` | `getName()` returns the name of the server.
    `edu.sc.seis.fissuresUtil.cache.CacheNetworkAccess` | `getNetwork(edu.iris.Fissures.network.NetworkAttrImpl attr)`
    `java.util.List<? extends edu.sc.seis.fissuresUtil.cache.CacheNetworkAccess>` | `getNetworkByName(java.lang.String name)`
    `java.util.List<? extends edu.iris.Fissures.network.NetworkAttrImpl>` | `getNetworks()`
    `java.util.List<edu.iris.Fissures.network.NetworkAttrImpl>` | `getNetworksFromStations(java.util.List<edu.iris.Fissures.network.StationImpl> staList)`
    `edu.iris.Fissures.model.TimeInterval` | `getRefreshInterval()`
    `edu.iris.Fissures.model.QuantityImpl` | `getSensitivity(edu.iris.Fissures.network.ChannelImpl chanId)`
    `protected edu.iris.Fissures.network.StationImpl` | `getStationForChannel(java.lang.String netCode, java.lang.String staCode)`
    `java.util.List<? extends edu.iris.Fissures.network.StationImpl>` | `getStations(edu.iris.Fissures.network.NetworkAttrImpl net)`
    `java.util.List<edu.iris.Fissures.network.StationImpl>` | `getStationsFromReader(java.io.Reader reader)`
    `protected void` | `initChannels(org.w3c.dom.Element config)`
    `protected void` | `initStations(org.w3c.dom.Element config)`
    `void` | `setConstraints(NetworkQueryConstraints constraints)`
    `java.lang.String` | `toString()`

    - ### Methods inherited from class edu.sc.seis.sod.source.AbstractCSVSource

      `concatenateValidFields, isValidField, loadDouble, loadFloat, loadString, loadTime, loadUnit, validateHeaders`

    - ### Methods inherited from class edu.sc.seis.sod.source.AbstractSource

      `appendToName, getFissuresNamingService, getRetries, getRetryStrategy, setRetryStrategy`

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

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

    - ### Methods inherited from interface edu.sc.seis.sod.source.network.NetworkSource

      `getRetries, getRetryStrategy`

    - ### Methods inherited from interface edu.sc.seis.sod.source.Source

      `appendToName`

- - ### Field Detail

    - #### networks

          protected java.util.List<edu.iris.Fissures.network.NetworkAttrImpl> networks

    - #### stations

          protected java.util.List<edu.iris.Fissures.network.StationImpl> stations

    - #### channels

          protected java.util.List<edu.iris.Fissures.network.ChannelImpl> channels

    - #### NET_CODE

          public static final java.lang.String NET_CODE

      See Also:
        Constant Field Values

    - #### STATION_CODE

          public static final java.lang.String STATION_CODE

      See Also:
        Constant Field Values

    - #### SITE_CODE

          public static final java.lang.String SITE_CODE

      See Also:
        Constant Field Values

    - #### CODE

          public static final java.lang.String CODE

      See Also:
        Constant Field Values

    - #### NET_START

          public static final java.lang.String NET_START

      See Also:
        Constant Field Values

    - #### NET_END

          public static final java.lang.String NET_END

      See Also:
        Constant Field Values

    - #### SAMPLE_PERIOD

          public static final java.lang.String SAMPLE_PERIOD

      See Also:
        Constant Field Values

    - #### SAMPLE_FREQUENCY

          public static final java.lang.String SAMPLE_FREQUENCY

      See Also:
        Constant Field Values

    - #### START

          public static final java.lang.String START

      See Also:
        Constant Field Values

    - #### END

          public static final java.lang.String END

      See Also:
        Constant Field Values

    - #### OPERATOR

          public static final java.lang.String OPERATOR

      See Also:
        Constant Field Values

    - #### COMMENT

          public static final java.lang.String COMMENT

      See Also:
        Constant Field Values

    - #### DESCRIPTION

          public static final java.lang.String DESCRIPTION

      See Also:
        Constant Field Values

    - #### AZIMUTH

          public static final java.lang.String AZIMUTH

      See Also:
        Constant Field Values

    - #### DIP

          public static final java.lang.String DIP

      See Also:
        Constant Field Values

  - ### Constructor Detail

    - #### CSVNetworkSource

          public CSVNetworkSource(org.w3c.dom.Element config)
                           throws ConfigurationException

      Throws:
        `ConfigurationException`

    - #### CSVNetworkSource

          public CSVNetworkSource(java.lang.String stationFile,
                                  java.lang.String channelFile)
                           throws ConfigurationException,
                                  java.io.FileNotFoundException,
                                  java.io.IOException

      Throws:
        `ConfigurationException`
        `java.io.FileNotFoundException`
        `java.io.IOException`

  - ### Method Detail

    - #### initStations

          protected void initStations(org.w3c.dom.Element config)
                               throws ConfigurationException

      Throws:
        `ConfigurationException`

    - #### initChannels

          protected void initChannels(org.w3c.dom.Element config)
                               throws ConfigurationException

      Throws:
        `ConfigurationException`

    - #### getDescription

          public java.lang.String getDescription()

    - #### getNetworksFromStations

          public java.util.List<edu.iris.Fissures.network.NetworkAttrImpl> getNetworksFromStations(java.util.List<edu.iris.Fissures.network.StationImpl> staList)

    - #### getStationsFromReader

          public java.util.List<edu.iris.Fissures.network.StationImpl> getStationsFromReader(java.io.Reader reader)
                                                                                      throws java.io.IOException,
                                                                                             java.io.FileNotFoundException,
                                                                                             ConfigurationException

      Throws:
        `java.io.IOException`
        `java.io.FileNotFoundException`
        `ConfigurationException`

    - #### getStationForChannel

          protected edu.iris.Fissures.network.StationImpl getStationForChannel(java.lang.String netCode,
                                                                               java.lang.String staCode)

    - #### getChannelsFromReader

          public java.util.List<edu.iris.Fissures.network.ChannelImpl> getChannelsFromReader(java.io.Reader reader,
                                                                                             java.util.List<edu.iris.Fissures.network.StationImpl> stations)
                                                                                      throws java.io.IOException,
                                                                                             java.io.FileNotFoundException,
                                                                                             ConfigurationException

      Throws:
        `java.io.IOException`
        `java.io.FileNotFoundException`
        `ConfigurationException`

    - #### setConstraints

          public void setConstraints(NetworkQueryConstraints constraints)

      Specified by:
        `setConstraints` in interface `NetworkSource`

    - #### toString

          public java.lang.String toString()

      Overrides:
        `toString` in class `java.lang.Object`

    - #### getChannels

          public java.util.List<? extends edu.iris.Fissures.network.ChannelImpl> getChannels(edu.iris.Fissures.network.StationImpl station)

      Specified by:
        `getChannels` in interface `NetworkSource`

    - #### getInstrumentation

          public edu.iris.Fissures.IfNetwork.Instrumentation getInstrumentation(edu.iris.Fissures.network.ChannelImpl chanId)
                                                                         throws edu.iris.Fissures.IfNetwork.ChannelNotFound,
                                                                                edu.sc.seis.fissuresUtil.sac.InvalidResponse

      Specified by:
        `getInstrumentation` in interface `NetworkSource`
      Throws:
        `edu.iris.Fissures.IfNetwork.ChannelNotFound`
        `edu.sc.seis.fissuresUtil.sac.InvalidResponse`

    - #### getNetwork

          public edu.sc.seis.fissuresUtil.cache.CacheNetworkAccess getNetwork(edu.iris.Fissures.network.NetworkAttrImpl attr)

      Specified by:
        `getNetwork` in interface `NetworkSource`

    - #### getNetworkByName

          public java.util.List<? extends edu.sc.seis.fissuresUtil.cache.CacheNetworkAccess> getNetworkByName(java.lang.String name)
                                                                                                       throws edu.iris.Fissures.IfNetwork.NetworkNotFound

      Specified by:
        `getNetworkByName` in interface `NetworkSource`
      Throws:
        `edu.iris.Fissures.IfNetwork.NetworkNotFound`

    - #### getNetworks

          public java.util.List<? extends edu.iris.Fissures.network.NetworkAttrImpl> getNetworks()

      Specified by:
        `getNetworks` in interface `NetworkSource`

    - #### getSensitivity

          public edu.iris.Fissures.model.QuantityImpl getSensitivity(edu.iris.Fissures.network.ChannelImpl chanId)
                                                              throws edu.iris.Fissures.IfNetwork.ChannelNotFound,
                                                                     edu.sc.seis.fissuresUtil.sac.InvalidResponse

      Specified by:
        `getSensitivity` in interface `NetworkSource`
      Throws:
        `edu.iris.Fissures.IfNetwork.ChannelNotFound`
        `edu.sc.seis.fissuresUtil.sac.InvalidResponse`

    - #### getStations

          public java.util.List<? extends edu.iris.Fissures.network.StationImpl> getStations(edu.iris.Fissures.network.NetworkAttrImpl net)

      Specified by:
        `getStations` in interface `NetworkSource`

    - #### getFields

          public java.lang.String[] getFields()

      Specified by:
        `getFields` in class `AbstractCSVSource`

    - #### getRefreshInterval

          public edu.iris.Fissures.model.TimeInterval getRefreshInterval()

      Specified by:
        `getRefreshInterval` in interface `NetworkSource`

    - #### getName

          public java.lang.String getName()

      Description copied from interface: `Source`
      returns the name of the server. The name to which the server's servant instance is bound in the CORBA naming service. For non-corba servers, this string can be anything that seems reasonable and is relatively unique
      Specified by:
        `getName` in interface `Source`
      Overrides:
        `getName` in class `AbstractSource`
      Returns:
        a `String` value