edu.iris.dmc.service
Class WaveformService

java.lang.Object
  extended by edu.iris.dmc.service.BaseService
      extended by edu.iris.dmc.service.WaveformService

public class WaveformService
extends BaseService

WaveFormService service is the main class for querying the Bulkdataselect service


Field Summary
 
Fields inherited from class edu.iris.dmc.service.BaseService
appName, baseUrl, DEFAULT_READ_TIMEOUT_IN_MS, password, userAgent, username
 
Constructor Summary
WaveformService(String baseUrl, String version, String compatabilityVersion, String userAgent)
           
 
Method Summary
 List<Timeseries> fetch(WaveformCriteria criteria)
          Find timeseries based on the criteria provided.
 List<Timeseries> load(InputStream inputStream)
          Load timeseries from inputStream like local file
 void setAuth(String username, String password)
           
 void stream(OutputStream out, Criteria criteria)
          Stream result into output stream, can be used to save result to a local file.
 
Methods inherited from class edu.iris.dmc.service.BaseService
authenticate, getAppName, getBaseUrl, getConnection, setAppName, setBaseUrl
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

WaveformService

public WaveformService(String baseUrl,
                       String version,
                       String compatabilityVersion,
                       String userAgent)
Method Detail

setAuth

public void setAuth(String username,
                    String password)

fetch

public List<Timeseries> fetch(WaveformCriteria criteria)
                       throws NoDataFoundException,
                              IOException,
                              CriteriaException,
                              ServiceNotSupportedException
Find timeseries based on the criteria provided. This will download data from IRIS bulkdataselect service (http://www.iris.edu/ws/bulkdataselect).

Parameters:
criteria -
Returns:
a list of timeseries containing segments
Throws:
NoDataFoundException
IOException
CriteriaException
ServiceNotSupportedException

stream

public void stream(OutputStream out,
                   Criteria criteria)
            throws NoDataFoundException,
                   CriteriaException,
                   IOException,
                   ServiceNotSupportedException,
                   UnauthorizedAccessException
Description copied from class: BaseService
Stream result into output stream, can be used to save result to a local file.

Overrides:
stream in class BaseService
Throws:
NoDataFoundException - (404)
CriteriaException - (400)
IOException
ServiceNotSupportedException
UnauthorizedAccessException

load

public List<Timeseries> load(InputStream inputStream)
                      throws IOException
Load timeseries from inputStream like local file

Parameters:
inputStream -
Returns:
a list of timeseries containing segments
Throws:
IOException


Copyright © 2013. All Rights Reserved.