@Configurable public class HibernateFeatureQueryHandler extends Object implements FeatureQueryHandler, HibernateSqlQueryConstants
Modifier and Type | Field and Description |
---|---|
private static org.slf4j.Logger |
LOGGER |
private static String |
SQL_QUERY_TRANFORM_GEOMETRY_H2 |
private static String |
SQL_QUERY_TRANFORM_GEOMETRY_ORACLE |
private static String |
SQL_QUERY_TRANFORM_GEOMETRY_POSTGIS |
DATASOURCE_DAO_IDENTIFIER, IDEPENDET_IDENTIFIER
FEATURE, FEATURES, GEOMETRY, OBSERVABLE_PROPERTIES, OBSERVABLE_PROPERTY, OFFERING, OFFERINGS, PROCEDURE, PROCEDURES, SRID
Constructor and Description |
---|
HibernateFeatureQueryHandler() |
Modifier and Type | Method and Description |
---|---|
private boolean |
checkFormTransformationSupport(int srid,
int newEpsg,
org.hibernate.Session session) |
protected AbstractFeature |
createSosAbstractFeature(FeatureOfInterest feature,
String version,
org.hibernate.Session session)
Creates a SOS feature from the FeatureOfInterest object
|
protected Map<String,AbstractFeature> |
createSosFeatures(List<FeatureOfInterest> features,
String version,
org.hibernate.Session session)
Creates a map with FOI identifier and SOS feature
|
String |
getDatasourceDaoIdentifier() |
int |
getDefault3DEPSG() |
int |
getDefaultEPSG() |
SosEnvelope |
getEnvelopeForFeatureIDs(Collection<String> featureIDs,
Object connection)
Query the envelope for feature ids
|
AbstractFeature |
getFeatureByID(String featureID,
Object connection,
String version,
int responeSrid)
Query feature data from data source for an identifier
|
Collection<String> |
getFeatureIDs(SpatialFilter filter,
Object connection)
Query feature identifier from data source for a spatial filter
|
protected FeatureOfInterest |
getFeatureOfInterest(String identifier,
com.vividsolutions.jts.geom.Geometry geometry,
org.hibernate.Session session) |
Map<String,AbstractFeature> |
getFeatures(Collection<String> featureIDs,
List<SpatialFilter> spatialFilters,
Object connection,
String version,
int responeSrid)
Get feature data for identifiers and/or for a spatial filter
|
protected Map<String,AbstractFeature> |
getFeaturesForNonSpatialDatasource(Collection<String> featureIDs,
List<SpatialFilter> spatialFilters,
org.hibernate.Session session,
String version) |
protected Map<String,AbstractFeature> |
getFeaturesForSpatialDatasource(Collection<String> featureIDs,
List<SpatialFilter> spatialFilters,
org.hibernate.Session session,
String version) |
protected com.vividsolutions.jts.geom.Geometry |
getGeomtery(FeatureOfInterest feature,
org.hibernate.Session session)
Get the geometry from featureOfInterest object.
|
String |
insertFeature(SamplingFeature samplingFeature,
Object connection)
FIXME Add javadoc to clarify the semantics of this method
|
protected String |
insertFeatureOfInterest(SamplingFeature samplingFeature,
org.hibernate.Session session) |
protected void |
processGeometryPreSave(SamplingFeature ssf,
FeatureOfInterest f,
org.hibernate.Session session) |
protected com.vividsolutions.jts.geom.Geometry |
transformGeometry(com.vividsolutions.jts.geom.Geometry geometry,
int newEpsg,
org.hibernate.Session session) |
private static final org.slf4j.Logger LOGGER
private static final String SQL_QUERY_TRANFORM_GEOMETRY_POSTGIS
private static final String SQL_QUERY_TRANFORM_GEOMETRY_ORACLE
private static final String SQL_QUERY_TRANFORM_GEOMETRY_H2
public AbstractFeature getFeatureByID(String featureID, Object connection, String version, int responeSrid) throws OwsExceptionReport
FeatureQueryHandler
getFeatureByID
in interface FeatureQueryHandler
featureID
- FOI identifierconnection
- Data source connectionversion
- SOS versionresponeSrid
- response srid for feature geometry, if negative not
transformationOwsExceptionReport
public Collection<String> getFeatureIDs(SpatialFilter filter, Object connection) throws OwsExceptionReport
FeatureQueryHandler
getFeatureIDs
in interface FeatureQueryHandler
filter
- Spatial filterconnection
- Data source connectionOwsExceptionReport
public Map<String,AbstractFeature> getFeatures(Collection<String> featureIDs, List<SpatialFilter> spatialFilters, Object connection, String version, int responeSrid) throws OwsExceptionReport
FeatureQueryHandler
getFeatures
in interface FeatureQueryHandler
featureIDs
- FOI identifiersspatialFilters
- Spatial filterconnection
- Data source connectionversion
- SOS versionresponeSrid
- response srid for feature geometry, if negative not
transformationOwsExceptionReport
public SosEnvelope getEnvelopeForFeatureIDs(Collection<String> featureIDs, Object connection) throws OwsExceptionReport
FeatureQueryHandler
getEnvelopeForFeatureIDs
in interface FeatureQueryHandler
featureIDs
- FOI identifiersconnection
- Data source connectionOwsExceptionReport
public String insertFeature(SamplingFeature samplingFeature, Object connection) throws OwsExceptionReport
FeatureQueryHandler
insertFeature
in interface FeatureQueryHandler
samplingFeature
- Feature to insert into datasourceconnection
- Datasource connectionOwsExceptionReport
protected Map<String,AbstractFeature> createSosFeatures(List<FeatureOfInterest> features, String version, org.hibernate.Session session) throws OwsExceptionReport
features
- FeatureOfInterest objectsversion
- SOS version
OwsExceptionReport
- * If feature type is not supportedprotected FeatureOfInterest getFeatureOfInterest(String identifier, com.vividsolutions.jts.geom.Geometry geometry, org.hibernate.Session session) throws OwsExceptionReport
OwsExceptionReport
protected AbstractFeature createSosAbstractFeature(FeatureOfInterest feature, String version, org.hibernate.Session session) throws OwsExceptionReport
feature
- FeatureOfInterest objectversion
- SOS version
OwsExceptionReport
protected String insertFeatureOfInterest(SamplingFeature samplingFeature, org.hibernate.Session session) throws OwsExceptionReport
OwsExceptionReport
protected void processGeometryPreSave(SamplingFeature ssf, FeatureOfInterest f, org.hibernate.Session session) throws OwsExceptionReport
OwsExceptionReport
private boolean checkFormTransformationSupport(int srid, int newEpsg, org.hibernate.Session session) throws CodedException
CodedException
protected com.vividsolutions.jts.geom.Geometry transformGeometry(com.vividsolutions.jts.geom.Geometry geometry, int newEpsg, org.hibernate.Session session)
protected com.vividsolutions.jts.geom.Geometry getGeomtery(FeatureOfInterest feature, org.hibernate.Session session) throws OwsExceptionReport
feature
- OwsExceptionReport
protected Map<String,AbstractFeature> getFeaturesForNonSpatialDatasource(Collection<String> featureIDs, List<SpatialFilter> spatialFilters, org.hibernate.Session session, String version) throws OwsExceptionReport
OwsExceptionReport
protected Map<String,AbstractFeature> getFeaturesForSpatialDatasource(Collection<String> featureIDs, List<SpatialFilter> spatialFilters, org.hibernate.Session session, String version) throws OwsExceptionReport
OwsExceptionReport
public int getDefaultEPSG()
getDefaultEPSG
in interface FeatureQueryHandler
public int getDefault3DEPSG()
getDefault3DEPSG
in interface FeatureQueryHandler
public String getDatasourceDaoIdentifier()
getDatasourceDaoIdentifier
in interface DatasourceDaoIdentifier
Copyright © 2012-2014 52north.org. All Rights Reserved.