org.deegree.observation.persistence
Class ContinuousFilterConverter

java.lang.Object
  extended by org.deegree.observation.persistence.GenericFilterConverter
      extended by org.deegree.observation.persistence.ContinuousFilterConverter
All Implemented Interfaces:
SQLFilterConverter

public class ContinuousFilterConverter
extends GenericFilterConverter

This is a filter converter for datastores that does not store the time of each observation. The observations are stored in a fixed interval, the start time of the offering is known. The observations need a uniqe id that incerements with each new observation.

Version:
$Revision$, $Date$
Author:
Oliver Tonnhofer, last edited by: $Author$

Constructor Summary
ContinuousFilterConverter(Map<String,String> columnMap, String idField, Date begin, long interval, int firstID)
           
 
Method Summary
 void buildTimeClause(QueryBuilder q, List<TimeFilter> filters)
          Add time filter to the sql QueryBuilder.
 Date dateForRowID(int id)
          Calculates the date of the given row number.
 
Methods inherited from class org.deegree.observation.persistence.GenericFilterConverter
buildProcedureClause, buildResultClause
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ContinuousFilterConverter

public ContinuousFilterConverter(Map<String,String> columnMap,
                                 String idField,
                                 Date begin,
                                 long interval,
                                 int firstID)
Parameters:
dsConf -
idField - the column name of the id field
begin - the date of the first observation
firstID - the time span between two observations in ms
interval - the id of the first observation (with begin date)
Method Detail

buildTimeClause

public void buildTimeClause(QueryBuilder q,
                            List<TimeFilter> filters)
Description copied from interface: SQLFilterConverter
Add time filter to the sql QueryBuilder.

Specified by:
buildTimeClause in interface SQLFilterConverter
Overrides:
buildTimeClause in class GenericFilterConverter
Parameters:
q - the query builder
filters - a list of time filter

dateForRowID

public Date dateForRowID(int id)
Calculates the date of the given row number.

Parameters:
id - the row id
Returns:
the date


Copyright © 2011. All Rights Reserved.