edu.iris.dmc.criteria
Class WaveformCriteria

java.lang.Object
  extended by edu.iris.dmc.criteria.WaveformCriteria
All Implemented Interfaces:
Criteria

public class WaveformCriteria
extends Object
implements Criteria

WaveFormCriteria is a simple criteria builder to retrieve timeseries list


Constructor Summary
WaveformCriteria()
           
 
Method Summary
 WaveformCriteria add(String net, String sta, String loc, String cha, Date start, Date end)
          Add a search entry to constrain the result to be retrieved
 Integer getMinimumSegmentLength()
          return the minimum segment length in seconds
 Quality getQuality()
          Returns the Quality type
 boolean isDistinctRequests()
           
 boolean isLongestSegmentOnly()
          Returns whether longestSegmentOnly is true or false
 WaveformCriteria makeDistinctRequests(boolean distinctRequests)
          Will trigger separate requests for every entry.
 void reset()
          Will reset the criteria to its defaults
 WaveformCriteria setLongestSegmentOnly(boolean longestOnly)
          Limit to longest segment only.
 WaveformCriteria setMinimumSegmentLength(int seconds)
          Enforce minimum segment length in seconds.
 WaveformCriteria setQuality(Quality quality)
          Default is B (best).
 String toString()
           
 List<String> toUrlParams()
          Constructs url's parameters
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

WaveformCriteria

public WaveformCriteria()
Method Detail

toUrlParams

public List<String> toUrlParams()
                         throws CriteriaException,
                                UnsupportedEncodingException
Description copied from interface: Criteria
Constructs url's parameters

Specified by:
toUrlParams in interface Criteria
Returns:
Throws:
CriteriaException
UnsupportedEncodingException

add

public WaveformCriteria add(String net,
                            String sta,
                            String loc,
                            String cha,
                            Date start,
                            Date end)
Add a search entry to constrain the result to be retrieved

Parameters:
net -
sta -
loc -
cha -
start -
end -
Returns:

setQuality

public WaveformCriteria setQuality(Quality quality)
Default is B (best). E indicates everything/all qualities. M is the same as B.

Parameters:
quality -
Returns:

setMinimumSegmentLength

public WaveformCriteria setMinimumSegmentLength(int seconds)
Enforce minimum segment length in seconds. Only time-series segments of this length or longer will be returned. No minimum segment length specified by default

Parameters:
seconds -
Returns:

setLongestSegmentOnly

public WaveformCriteria setLongestSegmentOnly(boolean longestOnly)
Limit to longest segment only. For each time-series selection, only the longest segment is returned. Default=true

Parameters:
longestOnly -
Returns:

makeDistinctRequests

public WaveformCriteria makeDistinctRequests(boolean distinctRequests)
Will trigger separate requests for every entry. Segments will not be merged. Default=false

Parameters:
distinctRequests -
Returns:

isDistinctRequests

public boolean isDistinctRequests()

toString

public String toString()
Overrides:
toString in class Object

reset

public void reset()
Will reset the criteria to its defaults

Specified by:
reset in interface Criteria

getQuality

public Quality getQuality()
Returns the Quality type

Returns:

isLongestSegmentOnly

public boolean isLongestSegmentOnly()
Returns whether longestSegmentOnly is true or false

Returns:

getMinimumSegmentLength

public Integer getMinimumSegmentLength()
return the minimum segment length in seconds

Returns:


Copyright © 2013. All Rights Reserved.