public class HibernateGetObservationHelper extends Object
Modifier and Type | Field and Description |
---|---|
private static org.slf4j.Logger |
LOGGER |
Constructor and Description |
---|
HibernateGetObservationHelper() |
Modifier and Type | Method and Description |
---|---|
static void |
addResultFilterToCriteria(org.hibernate.Criteria c,
Filter resultFilter)
Add a result filter to the Criteria
|
static boolean |
checkEncoderForMergeObservationValues(String responseFormat)
Check if the
ObservationEncoder demands for merging of
observations with the same timeseries. |
static void |
checkMaxNumberOfReturnedSeriesSize(int size)
Check if the size limit is exceeded
|
static void |
checkMaxNumberOfReturnedTimeSeries(Collection<SeriesObservation> seriesObservations,
int metadataObservationsCount)
Check if the max number of returned time series is exceeded
|
static void |
checkMaxNumberOfReturnedValues(int size)
Check if the max number of returned values is exceeded
|
static String |
checkValueForWildcardSingleCharAndEscape(ComparisonFilter resultFilter)
Check if the default SQL values for wildcard, single char or escape are
used.
|
static void |
checkValueReferenceForResultFilter(String valueReference)
Check if the requested value reference is supported.
|
static List<String> |
getAndCheckFeatureOfInterest(ObservationConstellation observationConstellation,
Set<String> featureIdentifier,
org.hibernate.Session session) |
static List<ObservationConstellation> |
getAndCheckObservationConstellationSize(GetObservationRequest request,
org.hibernate.Session session)
Get ObservationConstellations and check if size limit is exceeded
|
static org.hibernate.criterion.Criterion |
getCriterionForComparisonFilter(ComparisonFilter resultFilter)
Get the Hibernate Criterion for the requested result filter
|
static int |
getMaxNumberOfValuesPerSeries(int size) |
static List<ObservationConstellation> |
getObservationConstellations(org.hibernate.Session session,
GetObservationRequest request)
Get ObervationConstellation from requested parameters
|
static org.hibernate.criterion.Criterion |
getTemporalFilterCriterion(GetObservationRequest request)
Get Hibernate Criterion from requested temporal filters
|
static OmObservation |
toSosObservation(AbstractObservation observation,
AbstractObservationRequest request,
Locale language,
org.hibernate.Session session) |
static List<OmObservation> |
toSosObservation(Collection<AbstractObservation> observations,
AbstractObservationRequest request,
Locale language,
org.hibernate.Session session) |
static List<OmObservation> |
toSosObservation(Collection<AbstractObservation> observations,
AbstractObservationRequest request,
org.hibernate.Session session) |
public static List<ObservationConstellation> getAndCheckObservationConstellationSize(GetObservationRequest request, org.hibernate.Session session) throws CodedException
request
- GetObservation requestsession
- Hibernate sessionObservationConstellation
CodedException
- If the size limit is exceededpublic static void checkMaxNumberOfReturnedTimeSeries(Collection<SeriesObservation> seriesObservations, int metadataObservationsCount) throws CodedException
seriesObservations
- Observations to checkmetadataObservationsCount
- Count of metadata observationsCodedException
- If the size limit is exceededpublic static void checkMaxNumberOfReturnedSeriesSize(int size) throws CodedException
size
- The size limit to checkCodedException
- If the size limit is exceededpublic static void checkMaxNumberOfReturnedValues(int size) throws CodedException
size
- Max number countCodedException
- If the size limit is exceededpublic static int getMaxNumberOfValuesPerSeries(int size)
public static List<String> getAndCheckFeatureOfInterest(ObservationConstellation observationConstellation, Set<String> featureIdentifier, org.hibernate.Session session) throws OwsExceptionReport
OwsExceptionReport
public static List<OmObservation> toSosObservation(Collection<AbstractObservation> observations, AbstractObservationRequest request, org.hibernate.Session session) throws OwsExceptionReport, ConverterException
OwsExceptionReport
ConverterException
public static List<OmObservation> toSosObservation(Collection<AbstractObservation> observations, AbstractObservationRequest request, Locale language, org.hibernate.Session session) throws OwsExceptionReport, ConverterException
OwsExceptionReport
ConverterException
public static OmObservation toSosObservation(AbstractObservation observation, AbstractObservationRequest request, Locale language, org.hibernate.Session session) throws OwsExceptionReport, ConverterException
OwsExceptionReport
ConverterException
public static void addResultFilterToCriteria(org.hibernate.Criteria c, Filter resultFilter) throws CodedException
c
- Hibernate criteriaresultFilter
- Result filter to addCodedException
- If the requested filter is not supported!public static org.hibernate.criterion.Criterion getCriterionForComparisonFilter(ComparisonFilter resultFilter) throws CodedException
resultFilter
- Requested result filterCodedException
- If the requested result filter is not supportedpublic static String checkValueForWildcardSingleCharAndEscape(ComparisonFilter resultFilter)
resultFilter
- Requested result filterpublic static void checkValueReferenceForResultFilter(String valueReference) throws CodedException
valueReference
- Requested value referenceCodedException
- If the requested value reference is not supported.public static List<ObservationConstellation> getObservationConstellations(org.hibernate.Session session, GetObservationRequest request)
session
- Hibernate sessionrequest
- GetObservation requestpublic static org.hibernate.criterion.Criterion getTemporalFilterCriterion(GetObservationRequest request) throws OwsExceptionReport
request
- GetObservation requestOwsExceptionReport
- If a temporal filter is not supportedpublic static boolean checkEncoderForMergeObservationValues(String responseFormat)
ObservationEncoder
demands for merging of
observations with the same timeseries.responseFormat
- Response formattrue
, if the ObservationEncoder
demands for
merging of observations with the same timeseries.Copyright © 2012-2015 52north.org. All Rights Reserved.