public class HibernateProcedureConverter extends Object implements HibernateSqlQueryConstants
FEATURE, FEATURES, GEOMETRY, OBSERVABLE_PROPERTIES, OBSERVABLE_PROPERTY, OFFERING, OFFERINGS, PROCEDURE, PROCEDURES, SRID
Constructor and Description |
---|
HibernateProcedureConverter() |
Modifier and Type | Method and Description |
---|---|
private void |
addHumanReadableName(SosProcedureDescription desc,
Procedure procedure) |
(package private) boolean |
checkOutputFormatWithDescriptionFormat(String identifier,
DescriptionXmlEntity procedure,
String requestedFormat,
String descriptionFormat)
Checks the requested procedureDescriptionFormat with the datasource
procedureDescriptionFormat.
|
private SosProcedureDescription |
convert(String fromFormat,
String toFormat,
SosProcedureDescription description)
Convert the description to another procedure description format.
|
private com.google.common.base.Optional<SosProcedureDescription> |
create(Procedure procedure,
String descriptionFormat,
ValidProcedureTime vpt,
Locale i18n,
org.hibernate.Session session) |
SosProcedureDescription |
createSosProcedureDescription(Procedure procedure,
String requestedDescriptionFormat,
String requestedServiceVersion,
Locale i18n,
org.hibernate.Session session) |
SosProcedureDescription |
createSosProcedureDescription(Procedure procedure,
String requestedDescriptionFormat,
String requestedServiceVersion,
Map<String,Procedure> loadedProcedures,
Locale i18n,
org.hibernate.Session session)
Create procedure description from file, single XML text or generate
|
SosProcedureDescription |
createSosProcedureDescription(Procedure procedure,
String requestedDescriptionFormat,
String requestedServiceVersion,
org.hibernate.Session session)
Create procedure description from file, single XML text or generate
|
SosProcedureDescription |
createSosProcedureDescriptionFromValidProcedureTime(Procedure procedure,
String requestedDescriptionFormat,
ValidProcedureTime vpt,
String version,
Locale i18n,
org.hibernate.Session session)
Create procedure description from XML text stored in ValidProcedureTime
table
|
private void |
enrich(SosProcedureDescription desc,
Procedure procedure,
String version,
String format,
TimePeriod validTime,
Map<String,Procedure> cache,
Locale language,
org.hibernate.Session session)
Enrich the procedure description.
|
private boolean |
existConverter(String from,
String to) |
private boolean |
existsGenerator(String descriptionFormat) |
protected ArrayList<DescriptionCreationStrategy> |
getCreationStrategies(ValidProcedureTime vpt) |
private com.google.common.base.Optional<DescriptionCreationStrategy> |
getCreationStrategy(Procedure p,
ValidProcedureTime vpt) |
private String |
getFormat(HibernateRelations.HasProcedureDescriptionFormat hpdf) |
protected TimePeriod |
getValidTime(ValidProcedureTime validProcedureTime) |
public SosProcedureDescription createSosProcedureDescription(Procedure procedure, String requestedDescriptionFormat, String requestedServiceVersion, org.hibernate.Session session) throws OwsExceptionReport
procedure
- Hibernate procedure entityrequestedDescriptionFormat
- Requested procedure descriptionFormatrequestedServiceVersion
- Requested SOS versionsession
- Hibernate sessionOwsExceptionReport
- If an error occurspublic SosProcedureDescription createSosProcedureDescription(Procedure procedure, String requestedDescriptionFormat, String requestedServiceVersion, Map<String,Procedure> loadedProcedures, Locale i18n, org.hibernate.Session session) throws OwsExceptionReport
procedure
- Hibernate procedure entityrequestedDescriptionFormat
- Requested procedure descriptionFormatrequestedServiceVersion
- Requested SOS versionloadedProcedures
- Loaded procedure hierarchy (passed to recursive requests to
avoid multiple queries)session
- Hibernate sessionOwsExceptionReport
- If an error occurspublic SosProcedureDescription createSosProcedureDescriptionFromValidProcedureTime(Procedure procedure, String requestedDescriptionFormat, ValidProcedureTime vpt, String version, Locale i18n, org.hibernate.Session session) throws OwsExceptionReport
procedure
- Hibernate procedure entityvpt
- Hibernate ValidProcedureTime entityversion
- Requested SOS versionsession
- Hibernate sessionOwsExceptionReport
- If an error occurspublic SosProcedureDescription createSosProcedureDescription(Procedure procedure, String requestedDescriptionFormat, String requestedServiceVersion, Locale i18n, org.hibernate.Session session) throws OwsExceptionReport
OwsExceptionReport
private void addHumanReadableName(SosProcedureDescription desc, Procedure procedure)
protected TimePeriod getValidTime(ValidProcedureTime validProcedureTime)
private String getFormat(HibernateRelations.HasProcedureDescriptionFormat hpdf)
boolean checkOutputFormatWithDescriptionFormat(String identifier, DescriptionXmlEntity procedure, String requestedFormat, String descriptionFormat) throws OwsExceptionReport
identifier
- procedure
- the procedurerequestedFormat
- requested procedureDescriptionFormatdescriptionFormat
- Data source procedureDescriptionFormatOwsExceptionReport
- If procedureDescriptionFormats are invalidprivate boolean existsGenerator(String descriptionFormat)
private com.google.common.base.Optional<SosProcedureDescription> create(Procedure procedure, String descriptionFormat, ValidProcedureTime vpt, Locale i18n, org.hibernate.Session session) throws OwsExceptionReport
OwsExceptionReport
private com.google.common.base.Optional<DescriptionCreationStrategy> getCreationStrategy(Procedure p, ValidProcedureTime vpt)
protected ArrayList<DescriptionCreationStrategy> getCreationStrategies(ValidProcedureTime vpt)
private void enrich(SosProcedureDescription desc, Procedure procedure, String version, String format, TimePeriod validTime, Map<String,Procedure> cache, Locale language, org.hibernate.Session session) throws OwsExceptionReport
desc
- the descriptionprocedure
- the procedureversion
- the versionformat
- the formatcache
- the procedure cachelanguage
- the languagesession
- the sessionOwsExceptionReport
- if the enrichment failsHibernateProcedureEnrichment
private SosProcedureDescription convert(String fromFormat, String toFormat, SosProcedureDescription description) throws OwsExceptionReport
fromFormat
- the source formattoFormat
- the target formatdescription
- the procedure description.OwsExceptionReport
- if conversion failsCopyright © 2012-2015 52north.org. All Rights Reserved.