edu.sc.seis.sod.source.network
Class CSVNetworkSource

java.lang.Object
  extended by edu.sc.seis.sod.source.AbstractCSVSource
      extended by 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
static java.lang.String AZIMUTH
           
protected  java.util.List<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<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<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
 
Constructor Summary
CSVNetworkSource(org.w3c.dom.Element config)
           
CSVNetworkSource(java.lang.String stationFile, java.lang.String channelFile)
           
 
Method Summary
 java.util.List<? extends ChannelImpl> getChannels(StationImpl station)
           
 java.util.List<ChannelImpl> getChannelsFromReader(java.io.Reader reader, java.util.List<StationImpl> stations)
           
 java.lang.String getDescription()
           
 java.lang.String getDNS()
          returns the DNSName of the server.
 java.lang.String[] getFields()
           
 Instrumentation getInstrumentation(ChannelId chanId)
           
 java.lang.String getName()
          returns the sourceName of the server.
 CacheNetworkAccess getNetwork(NetworkAttrImpl attr)
           
 java.util.List<? extends CacheNetworkAccess> getNetworkByName(java.lang.String name)
           
 java.util.List<? extends NetworkAttrImpl> getNetworks()
           
 java.util.List<NetworkAttrImpl> getNetworksFromStations(java.util.List<StationImpl> staList)
           
 TimeInterval getRefreshInterval()
           
 QuantityImpl getSensitivity(ChannelId chanId)
           
protected  StationImpl getStationForChannel(java.lang.String netCode, java.lang.String staCode)
           
 java.util.List<? extends StationImpl> getStations(NetworkId net)
           
 java.util.List<StationImpl> getStationsFromReader(java.io.Reader reader)
           
protected  void initChannels(org.w3c.dom.Element config)
           
protected  void initStations(org.w3c.dom.Element config)
           
 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 java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

networks

protected java.util.List<NetworkAttrImpl> networks

stations

protected java.util.List<StationImpl> stations

channels

protected java.util.List<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<NetworkAttrImpl> getNetworksFromStations(java.util.List<StationImpl> staList)

getStationsFromReader

public java.util.List<StationImpl> getStationsFromReader(java.io.Reader reader)
                                                  throws java.io.IOException,
                                                         java.io.FileNotFoundException,
                                                         ConfigurationException
Throws:
java.io.IOException
java.io.FileNotFoundException
ConfigurationException

getStationForChannel

protected StationImpl getStationForChannel(java.lang.String netCode,
                                           java.lang.String staCode)

getChannelsFromReader

public java.util.List<ChannelImpl> getChannelsFromReader(java.io.Reader reader,
                                                         java.util.List<StationImpl> stations)
                                                  throws java.io.IOException,
                                                         java.io.FileNotFoundException,
                                                         ConfigurationException
Throws:
java.io.IOException
java.io.FileNotFoundException
ConfigurationException

toString

public java.lang.String toString()
Overrides:
toString in class java.lang.Object

getChannels

public java.util.List<? extends ChannelImpl> getChannels(StationImpl station)
Specified by:
getChannels in interface NetworkSource

getInstrumentation

public Instrumentation getInstrumentation(ChannelId chanId)
                                   throws ChannelNotFound,
                                          InvalidResponse
Specified by:
getInstrumentation in interface NetworkSource
Throws:
ChannelNotFound
InvalidResponse

getNetwork

public CacheNetworkAccess getNetwork(NetworkAttrImpl attr)
Specified by:
getNetwork in interface NetworkSource

getNetworkByName

public java.util.List<? extends CacheNetworkAccess> getNetworkByName(java.lang.String name)
                                                              throws NetworkNotFound
Specified by:
getNetworkByName in interface NetworkSource
Throws:
NetworkNotFound

getNetworks

public java.util.List<? extends NetworkAttrImpl> getNetworks()
Specified by:
getNetworks in interface NetworkSource

getSensitivity

public QuantityImpl getSensitivity(ChannelId chanId)
                            throws ChannelNotFound,
                                   InvalidResponse
Specified by:
getSensitivity in interface NetworkSource
Throws:
ChannelNotFound
InvalidResponse

getStations

public java.util.List<? extends StationImpl> getStations(NetworkId net)
Specified by:
getStations in interface NetworkSource

getFields

public java.lang.String[] getFields()
Specified by:
getFields in class AbstractCSVSource

getRefreshInterval

public TimeInterval getRefreshInterval()
Specified by:
getRefreshInterval in interface NetworkSource

getDNS

public java.lang.String getDNS()
Description copied from interface: Source
returns the DNSName of the server. The context under which the objectName is registered in the CORBA naming service. For non-corba servers, this string can be anything that seems reasonable and is relatively unique

Specified by:
getDNS in interface Source
Returns:
a String value

getName

public java.lang.String getName()
Description copied from interface: Source
returns the sourceName 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