edu.iris.dmc.service
Class EventService
java.lang.Object
edu.iris.dmc.service.BaseService
edu.iris.dmc.service.EventService
public class EventService
- extends BaseService
Event service is the main class for querying the Event service
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
EventService
public EventService(String baseUrl,
String version,
String compatabilityVersion,
String userAgent)
get
public Event get(Long id,
boolean includeMagnitudes)
throws NoDataFoundException,
IOException
- A convenient method to retrieve a single event when the id is provided.
The id is data center specific.
- Parameters:
id
- includeMagnitudes
-
- Returns:
- the Event
- Throws:
IOException
NoDataFoundException
stream
public void stream(OutputStream out,
Criteria criteria)
throws NoDataFoundException,
CriteriaException,
IOException,
ServiceNotSupportedException,
UnauthorizedAccessException
- Stream result into output stream, can be used to save result to a local
file.
- Overrides:
stream
in class BaseService
- Parameters:
out
- criteria
-
- Throws:
NoDataFoundException
- (404)
CriteriaException
- (400)
IOException
ServiceNotSupportedException
UnauthorizedAccessException
fetch
public List<Event> fetch(EventCriteria criteria)
throws NoDataFoundException,
CriteriaException,
IOException,
ServiceNotSupportedException
- fetch events from IRIS event service
- Parameters:
criteria
-
- Returns:
- list of events
- Throws:
NoDataFoundException
CriteriaException
ServiceNotSupportedException
IOException
load
public List<Event> load(InputStream inputStream)
throws IOException
- Load events from inputstream, example local file
- Parameters:
inputStream
-
- Returns:
- list of events
- Throws:
IOException
Copyright © 2013. All Rights Reserved.