edu.iris.Fissures.seed.builder
Class SeedBuilderFilter

java.lang.Object
  extended by edu.iris.Fissures.seed.builder.BuilderFilter
      extended by edu.iris.Fissures.seed.builder.SeedBuilderFilter

public class SeedBuilderFilter
extends BuilderFilter

Concrete Builder Filter class for SEED volumes.

Version:
8/13/2008
Author:
Robert Casey, IRIS DMC, Sid Hellman, ISTI, Kevin Frechette, ISTI

Field Summary
 
Fields inherited from class edu.iris.Fissures.seed.builder.BuilderFilter
filterType, parameterMap, paramIterator
 
Constructor Summary
SeedBuilderFilter()
          Create new Seed Builder Filter.
 
Method Summary
 boolean qualify(java.lang.Object o)
          Perform filter test on the provided object.
 boolean testCompare(java.lang.String param1, java.lang.String param2, Blockette blk, int blkField)
          Test blockette field value against filter parameter.
 boolean testCompare(java.lang.String param1, java.lang.String param2, java.lang.String bValue)
          Test blockette field value against filter parameter.
 
Methods inherited from class edu.iris.Fissures.seed.builder.BuilderFilter
addParameter, getNext, getParameter, getType, globMatch, iterate, numCompare, reset
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

SeedBuilderFilter

public SeedBuilderFilter()
Create new Seed Builder Filter. Initializes starting constants.

Method Detail

qualify

public boolean qualify(java.lang.Object o)
                throws BuilderException
Perform filter test on the provided object. Comparative method that accepts a Blockette and compares its field values to the parameter list in this filter. Return TRUE if the Blockette fits the criteria, FALSE if not.
Current parameters implemented:
'station' -- station ID
'network' -- network code
'location' -- location ID
'channel' -- channel code
'quality' -- data quality flag
'start_time' -- start time
'end_time' -- end time
'min_lat' -- minimum latitude value
'max_lat' -- maximum latitude value
'min_lon' -- minimum longitude value
'max_lon' -- maximum longitude value
'min_elev' -- minimum elevation value
'max_elev' -- maximum elevation value
'min_sample' -- minimum number of samples
'max_sample' -- maximum number of samples

We will automatically reserve the following parameters IDs for internal use:
'TIME_ZERO' -- time value of zero
'TIME_INF' -- time value of infinite

Specified by:
qualify in class BuilderFilter
Throws:
BuilderException

testCompare

public boolean testCompare(java.lang.String param1,
                           java.lang.String param2,
                           Blockette blk,
                           int blkField)
Test blockette field value against filter parameter. Provide a method of comparsion between parameter identifier strings (the key values) and a blockette field, being provided the blockette object and the field number to compare with. If param1 has a value and param2 is null, then param1 points to a a wildcard string that is compared to the blockette field. If param1 and param2 are both present, then it is assumed that these parameters represent numbers and the value in the blockette field must fall between them in value. REMEMBER: param1 and param2 are not the values themselves, but the key names to the values to compare to. Many times, a key name will point to a list of values, all of which are included in the comparison here. Return true if the match is successful.


testCompare

public boolean testCompare(java.lang.String param1,
                           java.lang.String param2,
                           java.lang.String bValue)
Test blockette field value against filter parameter. Synonym of testCompare that accepts a String value bValue as the blockette field Value.