org.deegree.observation.persistence.simple
Class SimpleObservationDatastore

java.lang.Object
  extended by org.deegree.observation.persistence.SQLObservationDatastore
      extended by org.deegree.observation.persistence.simple.SimpleObservationDatastore
All Implemented Interfaces:
ObservationDatastore
Direct Known Subclasses:
BinarySQLDatastore, ContinuousObservationDatastore

public class SimpleObservationDatastore
extends SQLObservationDatastore

Simple ObservationDatastore that stores all measurements with time.

Version:
$Revision: 26739 $, $Date: 2010-09-14 16:30:04 +0200 (Tue, 14 Sep 2010) $
Author:
Oliver Tonnhofer, last edited by: $Author: aionita $

Field Summary
protected  String procColumn
          the name of the database column that contains the procedure id
protected  String timeColumn
          the name of the database column that contains the timestamp
 
Fields inherited from class org.deegree.observation.persistence.SQLObservationDatastore
columnMap, jdbcId, optionMap, properties, tableName
 
Constructor Summary
SimpleObservationDatastore(String jdbcId, String tableName, Map<String,String> columnMap, Map<String,String> optionMap, List<Property> properties)
           
 
Method Summary
protected  SQLFilterConverter getFilterConverter()
           
 Observation getObservation(FilterCollection filter, Offering offering)
          Get measurements from the datastore.
protected  Procedure getProcedure(ResultSet resultSet, Offering offering)
           
protected  List<Property> getPropertyMap(FilterCollection filter)
          Create a map with all requested properties.
 SamplingTime getSamplingTime()
          Get the time span (sampling time) of all observations in this datastore.
protected  PreparedStatement getStatement(FilterCollection filter, Collection<String> collection, Connection conn, Offering offering)
          Create the sql statement.
 
Methods inherited from class org.deegree.observation.persistence.SQLObservationDatastore
getJdbcId, getProperties
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

procColumn

protected final String procColumn
the name of the database column that contains the procedure id


timeColumn

protected final String timeColumn
the name of the database column that contains the timestamp

Constructor Detail

SimpleObservationDatastore

public SimpleObservationDatastore(String jdbcId,
                                  String tableName,
                                  Map<String,String> columnMap,
                                  Map<String,String> optionMap,
                                  List<Property> properties)
Parameters:
jdbcId -
tableName -
columnMap -
optionMap -
properties -
Method Detail

getObservation

public Observation getObservation(FilterCollection filter,
                                  Offering offering)
                           throws ObservationDatastoreException
Description copied from interface: ObservationDatastore
Get measurements from the datastore.

Returns:
the resulting measurements
Throws:
ObservationDatastoreException

getProcedure

protected Procedure getProcedure(ResultSet resultSet,
                                 Offering offering)
                          throws SQLException
Parameters:
resultSet -
Returns:
the procedure of this result
Throws:
SQLException

getSamplingTime

public SamplingTime getSamplingTime()
Description copied from interface: ObservationDatastore
Get the time span (sampling time) of all observations in this datastore.

Returns:
the sampling time of the datastore

getFilterConverter

protected SQLFilterConverter getFilterConverter()
Returns:
the sql filter converter

getStatement

protected PreparedStatement getStatement(FilterCollection filter,
                                         Collection<String> collection,
                                         Connection conn,
                                         Offering offering)
                                  throws FilterException,
                                         SQLException
Create the sql statement.

Parameters:
filter -
collection -
conn -
offering -
Returns:
the sql select statement with where clauses
Throws:
FilterException
SQLException

getPropertyMap

protected List<Property> getPropertyMap(FilterCollection filter)
                                 throws ObservationDatastoreException
Create a map with all requested properties.

Parameters:
filter -
Returns:
a map with properties and the corresponding column names
Throws:
SOServiceException
ObservationDatastoreException


Copyright © 2011. All Rights Reserved.