edu.iris.dmc.service
Class StationService

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

public class StationService
extends BaseService

Station service is the main class for querying the Station service


Field Summary
 
Fields inherited from class edu.iris.dmc.service.BaseService
appName, baseUrl, DEFAULT_READ_TIMEOUT_IN_MS, password, userAgent, username
 
Constructor Summary
StationService(String baseUrl, String version, String compatabilityVersion, String userAgent)
           
 
Method Summary
 List<edu.iris.dmc.fdsn.station.model.Network> fetch(Criteria criteria, OutputLevel level)
           
 List<edu.iris.dmc.fdsn.station.model.Network> fetch(String url)
          Find stations based on the criteria provided.
 StationIterator iterate(Criteria criteria, OutputLevel level)
           
 StationIterator iterate(InputStream is)
           
 StationIterator iterate(String url)
           
 List<edu.iris.dmc.fdsn.station.model.Network> load(InputStream inputStream)
          Load Networks from inputstream, example local file
 
Methods inherited from class edu.iris.dmc.service.BaseService
authenticate, getAppName, getBaseUrl, getConnection, setAppName, setBaseUrl, stream
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

StationService

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

iterate

public StationIterator iterate(InputStream is)
                        throws FileNotFoundException,
                               javax.xml.stream.XMLStreamException,
                               javax.xml.bind.JAXBException
Throws:
FileNotFoundException
javax.xml.stream.XMLStreamException
javax.xml.bind.JAXBException

iterate

public StationIterator iterate(Criteria criteria,
                               OutputLevel level)
                        throws NoDataFoundException,
                               CriteriaException,
                               IOException,
                               ServiceNotSupportedException
Throws:
NoDataFoundException
CriteriaException
IOException
ServiceNotSupportedException

iterate

public StationIterator iterate(String url)
                        throws NoDataFoundException,
                               CriteriaException,
                               IOException,
                               ServiceNotSupportedException
Throws:
NoDataFoundException
CriteriaException
IOException
ServiceNotSupportedException

load

public List<edu.iris.dmc.fdsn.station.model.Network> load(InputStream inputStream)
                                                   throws IOException
Load Networks from inputstream, example local file

Parameters:
inputStream -
Returns:
the networks list from the file
Throws:
IOException

fetch

public List<edu.iris.dmc.fdsn.station.model.Network> fetch(Criteria criteria,
                                                           OutputLevel level)
                                                    throws NoDataFoundException,
                                                           CriteriaException,
                                                           IOException,
                                                           ServiceNotSupportedException
Throws:
NoDataFoundException
CriteriaException
IOException
ServiceNotSupportedException

fetch

public List<edu.iris.dmc.fdsn.station.model.Network> fetch(String url)
                                                    throws NoDataFoundException,
                                                           CriteriaException,
                                                           IOException,
                                                           ServiceNotSupportedException
Find stations based on the criteria provided. This will download data from IRIS station service (http://www.iris.edu/ws/station). The default level is station

Parameters:
criteria -
level -
Returns:
List of all stations meeting the criteria provided.
Throws:
NoDataFoundException
CriteriaException
ServiceNotSupportedException
IOException


Copyright © 2013. All Rights Reserved.