|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectedu.iris.dmc.service.BaseService
edu.iris.dmc.service.EventService
public class EventService
Event service is the main class for querying the Event service
Field Summary |
---|
Fields inherited from class edu.iris.dmc.service.BaseService |
---|
appName, baseUrl, DEFAULT_READ_TIMEOUT_IN_MS, password, userAgent, username |
Constructor Summary | |
---|---|
EventService(String baseUrl,
String version,
String compatabilityVersion,
String userAgent)
|
Method Summary | |
---|---|
List<Event> |
fetch(EventCriteria criteria)
fetch events from IRIS event service |
List<Event> |
fetch(String url)
fetch events from IRIS event service |
Event |
get(Long id,
boolean includeMagnitudes)
A convenient method to retrieve a single event when the id is provided. |
List<Event> |
load(InputStream inputStream)
Load events from inputstream, example local file |
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 |
---|
public EventService(String baseUrl, String version, String compatabilityVersion, String userAgent)
Method Detail |
---|
public Event get(Long id, boolean includeMagnitudes) throws NoDataFoundException, IOException
id
- includeMagnitudes
-
IOException
NoDataFoundException
public void stream(OutputStream out, Criteria criteria) throws NoDataFoundException, CriteriaException, IOException, ServiceNotSupportedException, UnauthorizedAccessException
stream
in class BaseService
out
- criteria
-
NoDataFoundException
- (404)
CriteriaException
- (400)
IOException
ServiceNotSupportedException
UnauthorizedAccessException
public List<Event> fetch(EventCriteria criteria) throws NoDataFoundException, CriteriaException, IOException, ServiceNotSupportedException
criteria
-
NoDataFoundException
CriteriaException
ServiceNotSupportedException
IOException
public List<Event> fetch(String url) throws NoDataFoundException, CriteriaException, IOException, ServiceNotSupportedException
criteria
-
NoDataFoundException
CriteriaException
ServiceNotSupportedException
IOException
public List<Event> load(InputStream inputStream) throws IOException
inputStream
-
IOException
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |