public class HibernateProcedureDescriptionGenerator extends Object
Modifier and Type | Field and Description |
---|---|
private static com.google.common.base.Joiner |
COMMA_JOINER |
private static org.slf4j.Logger |
LOGGER |
private static String |
POSITION_NAME |
static String |
SQL_QUERY_GET_UNIT_FOR_OBSERVABLE_PROPERTY |
static String |
SQL_QUERY_GET_UNIT_FOR_OBSERVABLE_PROPERTY_PROCEDURE |
static String |
SQL_QUERY_GET_UNIT_FOR_OBSERVABLE_PROPERTY_PROCEDURE_OFFERING |
private static String |
X_AXIS |
private static String |
Y_AXIS |
private static String |
Z_AXIS |
Constructor and Description |
---|
HibernateProcedureDescriptionGenerator() |
Modifier and Type | Method and Description |
---|---|
private List<SweCoordinate<?>> |
createCoordinatesForPosition(Object longitude,
Object latitude,
Object altitude)
Create SWE Coordinates for SensorML Position
|
private List<String> |
createDescriptions(Procedure procedure,
String[] observableProperties) |
private List<SmlIdentifier> |
createIdentifications(String identifier) |
private SmlIdentifier |
createIdentifier(String identifier) |
private List<SmlIo<?>> |
createInputs(String[] observableProperties) |
private ProcessMethod |
createMethod(Procedure procedure,
String[] observableProperties)
Create a SensorML ProcessMethod for ProcessModel
|
private List<CodeType> |
createNames(Procedure procedure)
Create a names collection for procedure description
|
private SmlIo<?> |
createOutputFromExampleObservation(String procedure,
String observableProperty,
org.hibernate.Session session) |
private SmlIo<?> |
createOutputFromObservationConstellation(String procedure,
String observableProperty,
org.hibernate.Session session) |
private List<SmlIo<?>> |
createOutputs(Procedure procedure,
String[] observableProperties,
org.hibernate.Session session)
Create SensorML output list from observableProperties
|
private SmlPosition |
createPosition(Procedure procedure)
Create SensorML Position from Hibernate procedure entity
|
private RulesDefinition |
createRulesDefinition(Procedure procedure,
String[] observableProperties)
Create the rules definition for ProcessMethod
|
private ProcessModel |
createSmlProcessModel(Procedure procedure,
org.hibernate.Session session)
Create a SensorML ProcessModel from Hibernate procedure entity
|
private System |
createSmlSystem(Procedure procedure,
org.hibernate.Session session)
Create a SensorML System from Hibernate procedure entity
|
private SweQuantity |
createSweQuantity(Object value,
String axis,
String uom)
Create SWE Quantity for SWE coordinate
|
SensorML |
generateProcedureDescription(Procedure procedure,
org.hibernate.Session session)
Generate procedure description from Hibernate procedure entity if no
description (file, XML text) is available
|
(package private) ContentCache |
getCache() |
(package private) AbstractObservation |
getExampleObservation(String identifier,
String observableProperty,
org.hibernate.Session session)
Get example observation for output list creation
|
(package private) String[] |
getObservablePropertiesForProcedure(String identifier) |
(package private) ServiceConfiguration |
getServiceConfig() |
private void |
logTypeNotSupported(Class<?> clazz)
Logger method for class
|
private void |
logTypeNotSupported(String observationType)
Logger method for class
|
(package private) ProcedureDescriptionSettings |
procedureSettings() |
private String |
queryUnit(ObservationConstellation oc,
org.hibernate.Session session) |
private void |
setCommonValues(Procedure procedure,
AbstractProcess abstractSensorML,
org.hibernate.Session session)
Set common values to procedure description
|
private static final org.slf4j.Logger LOGGER
public static final String SQL_QUERY_GET_UNIT_FOR_OBSERVABLE_PROPERTY
public static final String SQL_QUERY_GET_UNIT_FOR_OBSERVABLE_PROPERTY_PROCEDURE
public static final String SQL_QUERY_GET_UNIT_FOR_OBSERVABLE_PROPERTY_PROCEDURE_OFFERING
private static final String Y_AXIS
private static final String X_AXIS
private static final String Z_AXIS
private static final String POSITION_NAME
private static final com.google.common.base.Joiner COMMA_JOINER
public HibernateProcedureDescriptionGenerator()
public SensorML generateProcedureDescription(Procedure procedure, org.hibernate.Session session) throws OwsExceptionReport
procedure
- Hibernate procedure entitysession
- the sessionOwsExceptionReport
- If an error occursprivate ProcessModel createSmlProcessModel(Procedure procedure, org.hibernate.Session session) throws OwsExceptionReport
procedure
- Hibernate procedure entityOwsExceptionReport
- If an error occursprivate ProcessMethod createMethod(Procedure procedure, String[] observableProperties)
procedure
- Hibernate procedure entityobservableProperties
- Properties observed by the procedureprivate List<CodeType> createNames(Procedure procedure)
procedure
- Hibernate procedure entityprivate System createSmlSystem(Procedure procedure, org.hibernate.Session session) throws OwsExceptionReport
procedure
- Hibernate procedure entityOwsExceptionReport
- If an error occursprivate RulesDefinition createRulesDefinition(Procedure procedure, String[] observableProperties)
procedure
- Hibernate procedure entityobservableProperties
- Properties observed by the procedureprivate void setCommonValues(Procedure procedure, AbstractProcess abstractSensorML, org.hibernate.Session session) throws OwsExceptionReport
procedure
- Hibernate procedure entityabstractSensorML
- SensorML processOwsExceptionReport
- If an error occursprivate List<SmlIo<?>> createInputs(String[] observableProperties) throws OwsExceptionReport
OwsExceptionReport
private List<SmlIo<?>> createOutputs(Procedure procedure, String[] observableProperties, org.hibernate.Session session) throws OwsExceptionReport
procedure
- Hibernate procedure entityobservableProperties
- Properties observed by the procedureOwsExceptionReport
- If an error occursprivate SmlIo<?> createOutputFromObservationConstellation(String procedure, String observableProperty, org.hibernate.Session session)
private String queryUnit(ObservationConstellation oc, org.hibernate.Session session)
private void logTypeNotSupported(Class<?> clazz)
clazz
- Name of not supported classprivate void logTypeNotSupported(String observationType)
clazz
- Name of not supported classprivate SmlIo<?> createOutputFromExampleObservation(String procedure, String observableProperty, org.hibernate.Session session) throws OwsExceptionReport
OwsExceptionReport
private SmlPosition createPosition(Procedure procedure)
procedure
- Hibernate procedure entityprivate List<SweCoordinate<?>> createCoordinatesForPosition(Object longitude, Object latitude, Object altitude)
longitude
- Longitude valuelatitude
- Latitude valuealtitude
- Altitude valueprivate SweQuantity createSweQuantity(Object value, String axis, String uom)
value
- Valueaxis
- Axis iduom
- UnitOfMeasureprivate List<String> createDescriptions(Procedure procedure, String[] observableProperties)
private List<SmlIdentifier> createIdentifications(String identifier)
private SmlIdentifier createIdentifier(String identifier)
AbstractObservation getExampleObservation(String identifier, String observableProperty, org.hibernate.Session session) throws OwsExceptionReport
identifier
- Procedure identifierobservableProperty
- ObservableProperty identifiersession
- the sessionOwsExceptionReport
- If an error occurs.ServiceConfiguration getServiceConfig()
ProcedureDescriptionSettings procedureSettings()
ContentCache getCache()
Copyright © 2012-2014 52north.org. All Rights Reserved.