From 4de03b54297c458dff9f63f24a2da0ec14ce7a47 Mon Sep 17 00:00:00 2001
From: CarstenHollmann
Date: Fri, 21 Mar 2014 12:52:31 +0100
Subject: [PATCH 001/229] Set to next Snapshot version (4.0.2-SNAPSHOT and
0.1.3-SNAPSHOT)
---
bindings/json/pom.xml | 2 +-
bindings/kvp/pom.xml | 2 +-
bindings/pom.xml | 2 +-
bindings/pox/pom.xml | 2 +-
bindings/rest/code/pom.xml | 2 +-
bindings/rest/pom.xml | 4 ++--
bindings/rest/xml/pom.xml | 2 +-
bindings/soap/pom.xml | 2 +-
coding/json-common/pom.xml | 2 +-
coding/json/pom.xml | 2 +-
coding/ows-v110/pom.xml | 2 +-
coding/pom.xml | 2 +-
coding/sensorML-v101/pom.xml | 2 +-
coding/sos-v100/pom.xml | 2 +-
coding/sos-v20/pom.xml | 2 +-
coding/wml-v20/pom.xml | 2 +-
core/admin/pom.xml | 2 +-
core/api/pom.xml | 2 +-
core/cache/pom.xml | 2 +-
core/gc-dao/pom.xml | 2 +-
core/pom.xml | 2 +-
core/profile/coding/pom.xml | 2 +-
core/profile/pom.xml | 2 +-
core/profile/xml/pom.xml | 2 +-
core/sqlite-config/pom.xml | 2 +-
core/test/pom.xml | 2 +-
data/pom.xml | 2 +-
extensions/do/core/pom.xml | 2 +-
extensions/do/hibernate/pom.xml | 2 +-
extensions/do/json/pom.xml | 2 +-
extensions/do/kvp/pom.xml | 2 +-
extensions/do/pom.xml | 4 ++--
extensions/do/xml/pom.xml | 2 +-
extensions/gda/hibernate/pom.xml | 2 +-
extensions/gda/operation/pom.xml | 2 +-
extensions/gda/pom.xml | 2 +-
extensions/pom.xml | 2 +-
hibernate/common/pom.xml | 2 +-
hibernate/dao/pom.xml | 2 +-
hibernate/datasource/common/pom.xml | 2 +-
hibernate/datasource/h2/pom.xml | 2 +-
hibernate/datasource/mysql/pom.xml | 2 +-
hibernate/datasource/oracle/pom.xml | 2 +-
hibernate/datasource/pom.xml | 2 +-
hibernate/datasource/postgres/pom.xml | 2 +-
hibernate/feature/pom.xml | 2 +-
hibernate/h2/pom.xml | 2 +-
hibernate/mappings/pom.xml | 2 +-
hibernate/pom.xml | 2 +-
hibernate/session-factory/pom.xml | 2 +-
operations/core-v100/pom.xml | 2 +-
operations/core-v20/pom.xml | 2 +-
operations/enhanced-v20/pom.xml | 2 +-
operations/pom.xml | 2 +-
operations/resultHandling-v20/pom.xml | 2 +-
operations/transactional-v20/pom.xml | 2 +-
pom.xml | 2 +-
spring/admin-controller/pom.xml | 2 +-
spring/client-controller/pom.xml | 2 +-
spring/common-controller/pom.xml | 2 +-
spring/install-controller/pom.xml | 2 +-
spring/pom.xml | 2 +-
spring/views/pom.xml | 2 +-
third-party/pom.xml | 2 +-
third-party/third-party-ncname-resolver/pom.xml | 2 +-
webapp/pom.xml | 2 +-
66 files changed, 68 insertions(+), 68 deletions(-)
diff --git a/bindings/json/pom.xml b/bindings/json/pom.xml
index 00940f3a08..0568de565b 100644
--- a/bindings/json/pom.xml
+++ b/bindings/json/pom.xml
@@ -5,7 +5,7 @@
org.n52.sensorweb.sos
bindings
- 4.0.1
+ 4.0.2-SNAPSHOT
binding-json
52°North SOS - JSON Binding
diff --git a/bindings/kvp/pom.xml b/bindings/kvp/pom.xml
index 9c4cedd685..08ae190f00 100644
--- a/bindings/kvp/pom.xml
+++ b/bindings/kvp/pom.xml
@@ -4,7 +4,7 @@
org.n52.sensorweb.sos
bindings
- 4.0.1
+ 4.0.2-SNAPSHOT
4.0.0
binding-kvp
diff --git a/bindings/pom.xml b/bindings/pom.xml
index cefd8f2faf..4c90f4899f 100644
--- a/bindings/pom.xml
+++ b/bindings/pom.xml
@@ -4,7 +4,7 @@
org.n52.sensorweb.sos
52n-sos
- 4.0.1
+ 4.0.2-SNAPSHOT
bindings
pom
diff --git a/bindings/pox/pom.xml b/bindings/pox/pom.xml
index e08d9fbbe0..3ecbe2ccaf 100644
--- a/bindings/pox/pom.xml
+++ b/bindings/pox/pom.xml
@@ -4,7 +4,7 @@
org.n52.sensorweb.sos
bindings
- 4.0.1
+ 4.0.2-SNAPSHOT
4.0.0
binding-pox
diff --git a/bindings/rest/code/pom.xml b/bindings/rest/code/pom.xml
index 6f8a1ad687..98857520bd 100644
--- a/bindings/rest/code/pom.xml
+++ b/bindings/rest/code/pom.xml
@@ -5,7 +5,7 @@
org.n52.sensorweb.sos
rest
- 0.1.2
+ 0.1.3-SNAPSHOT
rest-code
52°North SOS - Extension REST Binding - Core
diff --git a/bindings/rest/pom.xml b/bindings/rest/pom.xml
index 0535df27bc..327947a7a4 100644
--- a/bindings/rest/pom.xml
+++ b/bindings/rest/pom.xml
@@ -4,12 +4,12 @@
org.n52.sensorweb.sos
bindings
- 4.0.1
+ 4.0.2-SNAPSHOT
4.0.0
rest
pom
- 0.1.2
+ 0.1.3-SNAPSHOT
52°North SOS - Extension REST Binding
RESTful binding for the 52°North SOS
http://52north.org/communities/sensorweb/sosREST/
diff --git a/bindings/rest/xml/pom.xml b/bindings/rest/xml/pom.xml
index 2ca5d7cea4..fe1bc109f3 100644
--- a/bindings/rest/xml/pom.xml
+++ b/bindings/rest/xml/pom.xml
@@ -5,7 +5,7 @@
org.n52.sensorweb.sos
rest
- 0.1.2
+ 0.1.3-SNAPSHOT
rest-xml
52°North SOS - Extension REST Binding - XML
diff --git a/bindings/soap/pom.xml b/bindings/soap/pom.xml
index 167c1219ef..6d3665837e 100644
--- a/bindings/soap/pom.xml
+++ b/bindings/soap/pom.xml
@@ -4,7 +4,7 @@
org.n52.sensorweb.sos
bindings
- 4.0.1
+ 4.0.2-SNAPSHOT
4.0.0
binding-soap
diff --git a/coding/json-common/pom.xml b/coding/json-common/pom.xml
index 34f787be25..ede645c0e4 100644
--- a/coding/json-common/pom.xml
+++ b/coding/json-common/pom.xml
@@ -4,7 +4,7 @@
org.n52.sensorweb.sos
coding
- 4.0.1
+ 4.0.2-SNAPSHOT
4.0.0
coding-json-common
diff --git a/coding/json/pom.xml b/coding/json/pom.xml
index 22c5724db5..ea6827b1da 100644
--- a/coding/json/pom.xml
+++ b/coding/json/pom.xml
@@ -4,7 +4,7 @@
org.n52.sensorweb.sos
coding
- 4.0.1
+ 4.0.2-SNAPSHOT
4.0.0
coding-json
diff --git a/coding/ows-v110/pom.xml b/coding/ows-v110/pom.xml
index 862751695e..433b5acef2 100644
--- a/coding/ows-v110/pom.xml
+++ b/coding/ows-v110/pom.xml
@@ -4,7 +4,7 @@
org.n52.sensorweb.sos
coding
- 4.0.1
+ 4.0.2-SNAPSHOT
4.0.0
coding-ows-v110
diff --git a/coding/pom.xml b/coding/pom.xml
index 815740b0c0..e740418aac 100644
--- a/coding/pom.xml
+++ b/coding/pom.xml
@@ -5,7 +5,7 @@
org.n52.sensorweb.sos
52n-sos
- 4.0.1
+ 4.0.2-SNAPSHOT
coding
pom
diff --git a/coding/sensorML-v101/pom.xml b/coding/sensorML-v101/pom.xml
index 37db41544a..3eb2d580b1 100644
--- a/coding/sensorML-v101/pom.xml
+++ b/coding/sensorML-v101/pom.xml
@@ -4,7 +4,7 @@
org.n52.sensorweb.sos
coding
- 4.0.1
+ 4.0.2-SNAPSHOT
4.0.0
coding-sensorML-v101
diff --git a/coding/sos-v100/pom.xml b/coding/sos-v100/pom.xml
index b052536312..e789e4dfbf 100644
--- a/coding/sos-v100/pom.xml
+++ b/coding/sos-v100/pom.xml
@@ -4,7 +4,7 @@
org.n52.sensorweb.sos
coding
- 4.0.1
+ 4.0.2-SNAPSHOT
4.0.0
coding-sos-v100
diff --git a/coding/sos-v20/pom.xml b/coding/sos-v20/pom.xml
index 0afbe2b2d5..43927018e1 100644
--- a/coding/sos-v20/pom.xml
+++ b/coding/sos-v20/pom.xml
@@ -4,7 +4,7 @@
org.n52.sensorweb.sos
coding
- 4.0.1
+ 4.0.2-SNAPSHOT
4.0.0
coding-sos-v20
diff --git a/coding/wml-v20/pom.xml b/coding/wml-v20/pom.xml
index 4fa799dddd..818fb0ea88 100644
--- a/coding/wml-v20/pom.xml
+++ b/coding/wml-v20/pom.xml
@@ -4,7 +4,7 @@
org.n52.sensorweb.sos
coding
- 4.0.1
+ 4.0.2-SNAPSHOT
4.0.0
coding-wml-v20
diff --git a/core/admin/pom.xml b/core/admin/pom.xml
index 1158497d75..d7f41c068a 100644
--- a/core/admin/pom.xml
+++ b/core/admin/pom.xml
@@ -5,7 +5,7 @@
org.n52.sensorweb.sos
core
- 4.0.1
+ 4.0.2-SNAPSHOT
admin
52°North SOS - Administrator Service Operator
diff --git a/core/api/pom.xml b/core/api/pom.xml
index 5f66e4fd72..0d4e65c55d 100644
--- a/core/api/pom.xml
+++ b/core/api/pom.xml
@@ -4,7 +4,7 @@
org.n52.sensorweb.sos
core
- 4.0.1
+ 4.0.2-SNAPSHOT
4.0.0
api
diff --git a/core/cache/pom.xml b/core/cache/pom.xml
index 59971c5362..f59309774a 100644
--- a/core/cache/pom.xml
+++ b/core/cache/pom.xml
@@ -5,7 +5,7 @@
org.n52.sensorweb.sos
core
- 4.0.1
+ 4.0.2-SNAPSHOT
cache
52°North SOS - Cache
diff --git a/core/gc-dao/pom.xml b/core/gc-dao/pom.xml
index bbfd9f63b6..c4145d0497 100644
--- a/core/gc-dao/pom.xml
+++ b/core/gc-dao/pom.xml
@@ -4,7 +4,7 @@
org.n52.sensorweb.sos
core
- 4.0.1
+ 4.0.2-SNAPSHOT
4.0.0
gc-dao
diff --git a/core/pom.xml b/core/pom.xml
index dc825f65c7..90ddc1673a 100644
--- a/core/pom.xml
+++ b/core/pom.xml
@@ -5,7 +5,7 @@
org.n52.sensorweb.sos
52n-sos
- 4.0.1
+ 4.0.2-SNAPSHOT
core
pom
diff --git a/core/profile/coding/pom.xml b/core/profile/coding/pom.xml
index f3d6c861e6..ddaba30339 100644
--- a/core/profile/coding/pom.xml
+++ b/core/profile/coding/pom.xml
@@ -4,7 +4,7 @@
profile
org.n52.sensorweb.sos
- 4.0.1
+ 4.0.2-SNAPSHOT
4.0.0
profile-coding
diff --git a/core/profile/pom.xml b/core/profile/pom.xml
index 042a014f22..40473147ca 100644
--- a/core/profile/pom.xml
+++ b/core/profile/pom.xml
@@ -4,7 +4,7 @@
org.n52.sensorweb.sos
core
- 4.0.1
+ 4.0.2-SNAPSHOT
4.0.0
profile
diff --git a/core/profile/xml/pom.xml b/core/profile/xml/pom.xml
index 380892761b..82483d2e99 100644
--- a/core/profile/xml/pom.xml
+++ b/core/profile/xml/pom.xml
@@ -4,7 +4,7 @@
profile
org.n52.sensorweb.sos
- 4.0.1
+ 4.0.2-SNAPSHOT
4.0.0
profile-xml
diff --git a/core/sqlite-config/pom.xml b/core/sqlite-config/pom.xml
index 935c3ba5b1..5fb34bfe09 100644
--- a/core/sqlite-config/pom.xml
+++ b/core/sqlite-config/pom.xml
@@ -5,7 +5,7 @@
org.n52.sensorweb.sos
core
- 4.0.1
+ 4.0.2-SNAPSHOT
sqlite-config
52°North SOS - SQLite Configuration
diff --git a/core/test/pom.xml b/core/test/pom.xml
index 083df49b12..9e54071ddf 100644
--- a/core/test/pom.xml
+++ b/core/test/pom.xml
@@ -5,7 +5,7 @@
org.n52.sensorweb.sos
core
- 4.0.1
+ 4.0.2-SNAPSHOT
test
52°North SOS - Test Module
diff --git a/data/pom.xml b/data/pom.xml
index 7931fe976d..522e2334f3 100644
--- a/data/pom.xml
+++ b/data/pom.xml
@@ -5,7 +5,7 @@
org.n52.sensorweb.sos
52n-sos
- 4.0.1
+ 4.0.2-SNAPSHOT
example-data
52°North SOS - Example Data
diff --git a/extensions/do/core/pom.xml b/extensions/do/core/pom.xml
index 95553fa181..7b54e403ee 100644
--- a/extensions/do/core/pom.xml
+++ b/extensions/do/core/pom.xml
@@ -4,7 +4,7 @@
org.n52.sensorweb.sos
do
- 0.1.2
+ 0.1.3-SNAPSHOT
4.0.0
do-core
diff --git a/extensions/do/hibernate/pom.xml b/extensions/do/hibernate/pom.xml
index 473139a0c1..1969d4e621 100644
--- a/extensions/do/hibernate/pom.xml
+++ b/extensions/do/hibernate/pom.xml
@@ -4,7 +4,7 @@
org.n52.sensorweb.sos
do
- 0.1.2
+ 0.1.3-SNAPSHOT
4.0.0
do-hibernate
diff --git a/extensions/do/json/pom.xml b/extensions/do/json/pom.xml
index 6ce53d1ec9..6daf95d1bb 100644
--- a/extensions/do/json/pom.xml
+++ b/extensions/do/json/pom.xml
@@ -4,7 +4,7 @@
org.n52.sensorweb.sos
do
- 0.1.2
+ 0.1.3-SNAPSHOT
4.0.0
do-json
diff --git a/extensions/do/kvp/pom.xml b/extensions/do/kvp/pom.xml
index 244c207e1c..9664d24864 100644
--- a/extensions/do/kvp/pom.xml
+++ b/extensions/do/kvp/pom.xml
@@ -4,7 +4,7 @@
org.n52.sensorweb.sos
do
- 0.1.2
+ 0.1.3-SNAPSHOT
4.0.0
do-kvp
diff --git a/extensions/do/pom.xml b/extensions/do/pom.xml
index ebde7b5414..ddff296be0 100644
--- a/extensions/do/pom.xml
+++ b/extensions/do/pom.xml
@@ -3,12 +3,12 @@
org.n52.sensorweb.sos
extensions
- 4.0.1
+ 4.0.2-SNAPSHOT
4.0.0
pom
do
- 0.1.2
+ 0.1.3-SNAPSHOT
52°North SOS - Extension Delete Observation
52°North SOS Extension Delete Observation
diff --git a/extensions/do/xml/pom.xml b/extensions/do/xml/pom.xml
index c91dc33fc4..c74ed3d86e 100644
--- a/extensions/do/xml/pom.xml
+++ b/extensions/do/xml/pom.xml
@@ -3,7 +3,7 @@
org.n52.sensorweb.sos
do
- 0.1.2
+ 0.1.3-SNAPSHOT
4.0.0
do-xml
diff --git a/extensions/gda/hibernate/pom.xml b/extensions/gda/hibernate/pom.xml
index 878eb562e2..74486e6a10 100644
--- a/extensions/gda/hibernate/pom.xml
+++ b/extensions/gda/hibernate/pom.xml
@@ -5,7 +5,7 @@
org.n52.sensorweb.sos
gda
- 4.0.1
+ 4.0.2-SNAPSHOT
gda-hibernate
52°North SOS - Extension GetDataAvailability - Hibernate DAO
diff --git a/extensions/gda/operation/pom.xml b/extensions/gda/operation/pom.xml
index 2c31395710..0681fbc0ad 100644
--- a/extensions/gda/operation/pom.xml
+++ b/extensions/gda/operation/pom.xml
@@ -5,7 +5,7 @@
org.n52.sensorweb.sos
gda
- 4.0.1
+ 4.0.2-SNAPSHOT
gda-operation
52°North SOS - Extension GetDataAvailability - SOS 2.0 Operation
diff --git a/extensions/gda/pom.xml b/extensions/gda/pom.xml
index 93ffeab68b..2a0d9f8f1c 100644
--- a/extensions/gda/pom.xml
+++ b/extensions/gda/pom.xml
@@ -4,7 +4,7 @@
org.n52.sensorweb.sos
extensions
- 4.0.1
+ 4.0.2-SNAPSHOT
4.0.0
gda
diff --git a/extensions/pom.xml b/extensions/pom.xml
index 940c7ecbb4..0887a46230 100644
--- a/extensions/pom.xml
+++ b/extensions/pom.xml
@@ -5,7 +5,7 @@
org.n52.sensorweb.sos
52n-sos
- 4.0.1
+ 4.0.2-SNAPSHOT
extensions
pom
diff --git a/hibernate/common/pom.xml b/hibernate/common/pom.xml
index e3300cafc6..c104c19375 100644
--- a/hibernate/common/pom.xml
+++ b/hibernate/common/pom.xml
@@ -4,7 +4,7 @@
org.n52.sensorweb.sos
hibernate
- 4.0.1
+ 4.0.2-SNAPSHOT
4.0.0
hibernate-common
diff --git a/hibernate/dao/pom.xml b/hibernate/dao/pom.xml
index c744c538d4..8b816e3b91 100644
--- a/hibernate/dao/pom.xml
+++ b/hibernate/dao/pom.xml
@@ -4,7 +4,7 @@
org.n52.sensorweb.sos
hibernate
- 4.0.1
+ 4.0.2-SNAPSHOT
4.0.0
hibernate-dao
diff --git a/hibernate/datasource/common/pom.xml b/hibernate/datasource/common/pom.xml
index bd3ad8adf5..1872c6a00c 100644
--- a/hibernate/datasource/common/pom.xml
+++ b/hibernate/datasource/common/pom.xml
@@ -4,7 +4,7 @@
org.n52.sensorweb.sos
hibernate-datasource
- 4.0.1
+ 4.0.2-SNAPSHOT
4.0.0
hibernate-datasource-common
diff --git a/hibernate/datasource/h2/pom.xml b/hibernate/datasource/h2/pom.xml
index 8fd8f72fbb..b76afc8cf3 100644
--- a/hibernate/datasource/h2/pom.xml
+++ b/hibernate/datasource/h2/pom.xml
@@ -4,7 +4,7 @@
org.n52.sensorweb.sos
hibernate-datasource
- 4.0.1
+ 4.0.2-SNAPSHOT
4.0.0
hibernate-datasource-h2
diff --git a/hibernate/datasource/mysql/pom.xml b/hibernate/datasource/mysql/pom.xml
index d5e61853b4..838bad105e 100644
--- a/hibernate/datasource/mysql/pom.xml
+++ b/hibernate/datasource/mysql/pom.xml
@@ -4,7 +4,7 @@
org.n52.sensorweb.sos
hibernate-datasource
- 4.0.1
+ 4.0.2-SNAPSHOT
4.0.0
hibernate-datasource-mysql
diff --git a/hibernate/datasource/oracle/pom.xml b/hibernate/datasource/oracle/pom.xml
index 65202b2ec8..af2de2b108 100644
--- a/hibernate/datasource/oracle/pom.xml
+++ b/hibernate/datasource/oracle/pom.xml
@@ -4,7 +4,7 @@
org.n52.sensorweb.sos
hibernate-datasource
- 4.0.1
+ 4.0.2-SNAPSHOT
4.0.0
hibernate-datasource-oracle
diff --git a/hibernate/datasource/pom.xml b/hibernate/datasource/pom.xml
index 8bb9f8f98c..09c6e490dc 100644
--- a/hibernate/datasource/pom.xml
+++ b/hibernate/datasource/pom.xml
@@ -4,7 +4,7 @@
org.n52.sensorweb.sos
hibernate
- 4.0.1
+ 4.0.2-SNAPSHOT
4.0.0
hibernate-datasource
diff --git a/hibernate/datasource/postgres/pom.xml b/hibernate/datasource/postgres/pom.xml
index 97f4ed8559..866d7a74c6 100644
--- a/hibernate/datasource/postgres/pom.xml
+++ b/hibernate/datasource/postgres/pom.xml
@@ -4,7 +4,7 @@
org.n52.sensorweb.sos
hibernate-datasource
- 4.0.1
+ 4.0.2-SNAPSHOT
4.0.0
hibernate-datasource-postgres
diff --git a/hibernate/feature/pom.xml b/hibernate/feature/pom.xml
index 2ad0f5b2e7..664f57b7f8 100644
--- a/hibernate/feature/pom.xml
+++ b/hibernate/feature/pom.xml
@@ -4,7 +4,7 @@
org.n52.sensorweb.sos
hibernate
- 4.0.1
+ 4.0.2-SNAPSHOT
4.0.0
hibernate-feature
diff --git a/hibernate/h2/pom.xml b/hibernate/h2/pom.xml
index 9dd3bb47b3..1a41ced1a2 100644
--- a/hibernate/h2/pom.xml
+++ b/hibernate/h2/pom.xml
@@ -5,7 +5,7 @@
org.n52.sensorweb.sos
hibernate
- 4.0.1
+ 4.0.2-SNAPSHOT
hibernate-h2
52°North SOS - Hibernate H2
diff --git a/hibernate/mappings/pom.xml b/hibernate/mappings/pom.xml
index 2f382fc148..47276f7314 100644
--- a/hibernate/mappings/pom.xml
+++ b/hibernate/mappings/pom.xml
@@ -5,7 +5,7 @@
org.n52.sensorweb.sos
hibernate
- 4.0.1
+ 4.0.2-SNAPSHOT
hibernate-mappings
52°North SOS - Hibernate Mappings
diff --git a/hibernate/pom.xml b/hibernate/pom.xml
index 10d45ad3f5..61e6b2922e 100644
--- a/hibernate/pom.xml
+++ b/hibernate/pom.xml
@@ -4,7 +4,7 @@
org.n52.sensorweb.sos
52n-sos
- 4.0.1
+ 4.0.2-SNAPSHOT
hibernate
pom
diff --git a/hibernate/session-factory/pom.xml b/hibernate/session-factory/pom.xml
index d4c6309d7f..2804848f68 100644
--- a/hibernate/session-factory/pom.xml
+++ b/hibernate/session-factory/pom.xml
@@ -4,7 +4,7 @@
org.n52.sensorweb.sos
hibernate
- 4.0.1
+ 4.0.2-SNAPSHOT
4.0.0
hibernate-session-factory
diff --git a/operations/core-v100/pom.xml b/operations/core-v100/pom.xml
index 77c04e083a..27e7d4192a 100644
--- a/operations/core-v100/pom.xml
+++ b/operations/core-v100/pom.xml
@@ -4,7 +4,7 @@
org.n52.sensorweb.sos
operations
- 4.0.1
+ 4.0.2-SNAPSHOT
4.0.0
core-v100
diff --git a/operations/core-v20/pom.xml b/operations/core-v20/pom.xml
index 4d0e1dfaaf..7cb8c1db90 100644
--- a/operations/core-v20/pom.xml
+++ b/operations/core-v20/pom.xml
@@ -4,7 +4,7 @@
org.n52.sensorweb.sos
operations
- 4.0.1
+ 4.0.2-SNAPSHOT
4.0.0
core-v20
diff --git a/operations/enhanced-v20/pom.xml b/operations/enhanced-v20/pom.xml
index 54a368d23e..f8ff9343e8 100644
--- a/operations/enhanced-v20/pom.xml
+++ b/operations/enhanced-v20/pom.xml
@@ -4,7 +4,7 @@
org.n52.sensorweb.sos
operations
- 4.0.1
+ 4.0.2-SNAPSHOT
4.0.0
enhanced-v20
diff --git a/operations/pom.xml b/operations/pom.xml
index fbb43fad97..cf12789a2d 100644
--- a/operations/pom.xml
+++ b/operations/pom.xml
@@ -5,7 +5,7 @@
org.n52.sensorweb.sos
52n-sos
- 4.0.1
+ 4.0.2-SNAPSHOT
operations
pom
diff --git a/operations/resultHandling-v20/pom.xml b/operations/resultHandling-v20/pom.xml
index 16dfa67e3a..cdac2af07f 100644
--- a/operations/resultHandling-v20/pom.xml
+++ b/operations/resultHandling-v20/pom.xml
@@ -4,7 +4,7 @@
org.n52.sensorweb.sos
operations
- 4.0.1
+ 4.0.2-SNAPSHOT
4.0.0
resultHandling-v20
diff --git a/operations/transactional-v20/pom.xml b/operations/transactional-v20/pom.xml
index 9a726a7c87..e5b9139495 100644
--- a/operations/transactional-v20/pom.xml
+++ b/operations/transactional-v20/pom.xml
@@ -4,7 +4,7 @@
org.n52.sensorweb.sos
operations
- 4.0.1
+ 4.0.2-SNAPSHOT
4.0.0
transactional-v20
diff --git a/pom.xml b/pom.xml
index bc69f2f093..e4c0c4a5c3 100644
--- a/pom.xml
+++ b/pom.xml
@@ -10,7 +10,7 @@
4.0.0
org.n52.sensorweb.sos
52n-sos
- 4.0.1
+ 4.0.2-SNAPSHOT
52°North Sensor Observation Service
52°North Sensor Observation Service - Parent POM for defining dependency versions
https://wiki.52north.org/bin/view/SensorWeb/SensorObservationServiceIVDocumentation
diff --git a/spring/admin-controller/pom.xml b/spring/admin-controller/pom.xml
index 4b1e21f4b7..38ff8d0a4b 100644
--- a/spring/admin-controller/pom.xml
+++ b/spring/admin-controller/pom.xml
@@ -5,7 +5,7 @@
org.n52.sensorweb.sos
spring
- 4.0.1
+ 4.0.2-SNAPSHOT
admin-controller
52°North SOS - Web Admin Controller
diff --git a/spring/client-controller/pom.xml b/spring/client-controller/pom.xml
index 8e511186a9..adf33b2ee2 100644
--- a/spring/client-controller/pom.xml
+++ b/spring/client-controller/pom.xml
@@ -5,7 +5,7 @@
org.n52.sensorweb.sos
spring
- 4.0.1
+ 4.0.2-SNAPSHOT
client-controller
52°North SOS - Web Client Controller
diff --git a/spring/common-controller/pom.xml b/spring/common-controller/pom.xml
index f5089b0d96..72d77df65c 100644
--- a/spring/common-controller/pom.xml
+++ b/spring/common-controller/pom.xml
@@ -5,7 +5,7 @@
org.n52.sensorweb.sos
spring
- 4.0.1
+ 4.0.2-SNAPSHOT
common-controller
52°North SOS - Web Common Controller
diff --git a/spring/install-controller/pom.xml b/spring/install-controller/pom.xml
index 61f67d3dc1..59adcaf7fa 100644
--- a/spring/install-controller/pom.xml
+++ b/spring/install-controller/pom.xml
@@ -5,7 +5,7 @@
org.n52.sensorweb.sos
spring
- 4.0.1
+ 4.0.2-SNAPSHOT
install-controller
52°North SOS - Web Install Controller
diff --git a/spring/pom.xml b/spring/pom.xml
index 09a7ffa61b..3a48d7378c 100644
--- a/spring/pom.xml
+++ b/spring/pom.xml
@@ -5,7 +5,7 @@
52n-sos
org.n52.sensorweb.sos
- 4.0.1
+ 4.0.2-SNAPSHOT
spring
pom
diff --git a/spring/views/pom.xml b/spring/views/pom.xml
index d52862661a..9bf187e45c 100644
--- a/spring/views/pom.xml
+++ b/spring/views/pom.xml
@@ -5,7 +5,7 @@
org.n52.sensorweb.sos
spring
- 4.0.1
+ 4.0.2-SNAPSHOT
views
52°North SOS - Web Views
diff --git a/third-party/pom.xml b/third-party/pom.xml
index 4825c1d8b6..b7ac5849aa 100644
--- a/third-party/pom.xml
+++ b/third-party/pom.xml
@@ -3,7 +3,7 @@
org.n52.sensorweb.sos
52n-sos
- 4.0.1
+ 4.0.2-SNAPSHOT
52n-sos-third-party
52°North Aggregated Third Party modules
diff --git a/third-party/third-party-ncname-resolver/pom.xml b/third-party/third-party-ncname-resolver/pom.xml
index 8f4486e17c..6a9d54d8cd 100644
--- a/third-party/third-party-ncname-resolver/pom.xml
+++ b/third-party/third-party-ncname-resolver/pom.xml
@@ -3,7 +3,7 @@
org.n52.sensorweb.sos
52n-sos-third-party
- 4.0.1
+ 4.0.2-SNAPSHOT
third-party-ncname-resolver
52°North Third Party - NCName resolver
diff --git a/webapp/pom.xml b/webapp/pom.xml
index 6aa1ee12ed..0a8bb83e16 100644
--- a/webapp/pom.xml
+++ b/webapp/pom.xml
@@ -4,7 +4,7 @@
52n-sos
org.n52.sensorweb.sos
- 4.0.1
+ 4.0.2-SNAPSHOT
4.0.0
webapp
From ea7420a2f7ab5be097d865738cdb8b096d49534f Mon Sep 17 00:00:00 2001
From: Christian Autermann
Date: Fri, 21 Mar 2014 15:32:10 +0100
Subject: [PATCH 002/229] made request counter atomic
---
.../java/org/n52/sos/service/SosService.java | 34 +++++++++----------
1 file changed, 16 insertions(+), 18 deletions(-)
diff --git a/core/api/src/main/java/org/n52/sos/service/SosService.java b/core/api/src/main/java/org/n52/sos/service/SosService.java
index 952498fdc9..7079d7d69d 100644
--- a/core/api/src/main/java/org/n52/sos/service/SosService.java
+++ b/core/api/src/main/java/org/n52/sos/service/SosService.java
@@ -33,11 +33,15 @@
import java.util.Enumeration;
import java.util.HashSet;
import java.util.Set;
+import java.util.concurrent.atomic.AtomicLong;
import javax.servlet.ServletException;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+
import org.n52.sos.binding.Binding;
import org.n52.sos.binding.BindingRepository;
import org.n52.sos.event.SosEventBus;
@@ -47,14 +51,12 @@
import org.n52.sos.util.http.HTTPHeaders;
import org.n52.sos.util.http.HTTPMethods;
import org.n52.sos.util.http.HTTPStatus;
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
/**
* The servlet of the SOS which receives the incoming HttpPost and HttpGet
* requests and sends the operation result documents to the client TODO review
* exception handling
- *
+ *
* @since 4.0.0
*/
public class SosService extends ConfiguratedHttpServlet {
@@ -69,8 +71,8 @@ public class SosService extends ConfiguratedHttpServlet {
public static final String BINDING_POST_METHOD = "doPostOperation";
public static final String BINDING_GET_METHOD = "doGetOperation";
-
- private static long counter = 0;
+
+ private static final AtomicLong counter = new AtomicLong(0);
@Override
public void init() throws ServletException {
@@ -99,7 +101,7 @@ private void logResponse(HttpServletResponse response, long count) {
@Override
protected void doDelete(HttpServletRequest request, HttpServletResponse response) throws ServletException,
IOException {
- long currentCount = getNextCounter();
+ long currentCount = counter.incrementAndGet();
logRequest(request, currentCount);
try {
getBinding(request).doDeleteOperation(request, response);
@@ -113,7 +115,7 @@ protected void doDelete(HttpServletRequest request, HttpServletResponse response
@Override
protected void doGet(HttpServletRequest request, HttpServletResponse response) throws ServletException,
IOException {
- long currentCount = getNextCounter();
+ long currentCount = counter.incrementAndGet();
logRequest(request, currentCount);
try {
getBinding(request).doGetOperation(request, response);
@@ -127,7 +129,7 @@ protected void doGet(HttpServletRequest request, HttpServletResponse response) t
@Override
protected void doPost(HttpServletRequest request, HttpServletResponse response) throws ServletException,
IOException {
- long currentCount = getNextCounter();
+ long currentCount = counter.incrementAndGet();
logRequest(request, currentCount);
try {
getBinding(request).doPostOperation(request, response);
@@ -141,7 +143,7 @@ protected void doPost(HttpServletRequest request, HttpServletResponse response)
@Override
protected void doPut(HttpServletRequest request, HttpServletResponse response) throws ServletException,
IOException {
- long currentCount = getNextCounter();
+ long currentCount = counter.incrementAndGet();
logRequest(request, currentCount);
try {
getBinding(request).doPutOperation(request, response);
@@ -155,7 +157,7 @@ protected void doPut(HttpServletRequest request, HttpServletResponse response) t
@Override
protected void doOptions(HttpServletRequest request, HttpServletResponse response) throws ServletException,
IOException {
- long currentCount = getNextCounter();
+ long currentCount = counter.incrementAndGet();
logRequest(request, currentCount);
Binding binding = null;
try {
@@ -180,14 +182,14 @@ protected void doOptions(HttpServletRequest request, HttpServletResponse respons
/**
* Get the implementation of {@link Binding} that is registered for the
* given request
.
- *
+ *
* @param request
* URL pattern from request URL
- *
+ *
* @return The implementation of {@link Binding} that is registered for the
* given urlPattern
.
- *
- *
+ *
+ *
* @throws OwsExceptionReport
* * If the URL pattern is not supported by this SOS.
*/
@@ -258,8 +260,4 @@ private Set getDeclaredBindingMethods(Class> c) {
return parent;
}
}
-
- private long getNextCounter() {
- return counter++;
- }
}
From 47f4b15e094ea25f7cd94ab7dee2921a2ff4cc53 Mon Sep 17 00:00:00 2001
From: Christian Autermann
Date: Fri, 21 Mar 2014 15:46:50 +0100
Subject: [PATCH 003/229] allow query for bindings by MediaType
---
.../n52/sos/binding/BindingRepository.java | 68 +++++++++++++++----
1 file changed, 53 insertions(+), 15 deletions(-)
diff --git a/core/api/src/main/java/org/n52/sos/binding/BindingRepository.java b/core/api/src/main/java/org/n52/sos/binding/BindingRepository.java
index 2e2d99e9f1..bd124dd292 100644
--- a/core/api/src/main/java/org/n52/sos/binding/BindingRepository.java
+++ b/core/api/src/main/java/org/n52/sos/binding/BindingRepository.java
@@ -32,17 +32,19 @@
import java.util.Map;
import java.util.Set;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+
import org.n52.sos.config.SettingsManager;
import org.n52.sos.ds.ConnectionProviderException;
import org.n52.sos.exception.ConfigurationException;
import org.n52.sos.util.AbstractConfiguringServiceLoaderRepository;
import org.n52.sos.util.Activatable;
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
+import org.n52.sos.util.http.MediaType;
/**
* @author Christian Autermann
- *
+ *
* @since 4.0.0
*/
public class BindingRepository extends AbstractConfiguringServiceLoaderRepository {
@@ -56,12 +58,19 @@ public static BindingRepository getInstance() {
return Holder.INSTANCE;
}
- private final Map> bindings = new HashMap>(0);
+ /**
+ * Bindings by URL path.
+ */
+ private final Map> byPath = new HashMap>(0);
+ /**
+ * Bindings by Content-Type.
+ */
+ private final Map> byMediaType = new HashMap>(0);
/**
* reads the requestListeners from the configFile and returns a
* RequestOperator containing the requestListeners
- *
+ *
* @throws ConfigurationException
* if initialization of a RequestListener failed
*/
@@ -72,17 +81,29 @@ private BindingRepository() throws ConfigurationException {
@Override
protected void processConfiguredImplementations(final Set bindings) throws ConfigurationException {
- this.bindings.clear();
+ this.byPath.clear();
+ this.byMediaType.clear();
final SettingsManager sm = SettingsManager.getInstance();
try {
for (final Binding binding : bindings) {
- this.bindings.put(binding.getUrlPattern(),
- Activatable.from(binding, sm.isActive(new BindingKey(binding.getUrlPattern()))));
+ boolean isActive = sm.isActive(new BindingKey(binding.getUrlPattern()));
+ Activatable activatable = Activatable.from(binding, isActive);
+ this.byPath.put(binding.getUrlPattern(), activatable);
+ if (binding.getSupportedEncodings() != null) {
+ for (MediaType mediaType :binding.getSupportedEncodings()) {
+ Activatable previous
+ = this.byMediaType.put(mediaType, activatable);
+ if (previous != null) {
+ LOG.warn("{} is overwriting {} for MediaType {}",
+ binding, previous.getInternal(), mediaType);
+ }
+ }
+ }
}
} catch (final ConnectionProviderException ex) {
throw new ConfigurationException("Could not check status of Binding", ex);
}
- if (this.bindings.isEmpty()) {
+ if (this.byPath.isEmpty()) {
final StringBuilder exceptionText = new StringBuilder();
exceptionText.append("No Binding implementation could be loaded! ");
exceptionText.append("If the SOS is not used as webapp, this has no effect! ");
@@ -92,25 +113,42 @@ protected void processConfiguredImplementations(final Set bindings) thr
}
public Binding getBinding(final String urlPattern) {
- final Activatable binding = bindings.get(urlPattern);
+ final Activatable binding = byPath.get(urlPattern);
+ return binding == null ? null : binding.get();
+ }
+
+ public Binding getBinding(final MediaType mediaType) {
+ final Activatable binding = byMediaType.get(mediaType);
return binding == null ? null : binding.get();
}
public boolean isBindingSupported(final String urlPattern) {
- return bindings.containsKey(urlPattern);
+ return byPath.containsKey(urlPattern);
+ }
+
+ public boolean isBindingSupported(final MediaType mediaType) {
+ return byMediaType.containsKey(mediaType);
}
public Map getBindings() {
- return Activatable.filter(bindings);
+ return Activatable.filter(byPath);
+ }
+
+ public Map getBindingsByMediaType() {
+ return Activatable.filter(byMediaType);
}
public Map getAllBindings() {
- return Activatable.unfiltered(bindings);
+ return Activatable.unfiltered(byPath);
+ }
+
+ public Map getAllBindingsByMediaType() {
+ return Activatable.unfiltered(byMediaType);
}
public void setActive(final BindingKey bk, final boolean active) {
- if (bindings.containsKey(bk.getServletPath())) {
- bindings.get(bk.getServletPath()).setActive(active);
+ if (byPath.containsKey(bk.getServletPath())) {
+ byPath.get(bk.getServletPath()).setActive(active);
}
}
}
From 44b5688c42b25689edff004f899a93fe8b2d50ff Mon Sep 17 00:00:00 2001
From: Christian Autermann
Date: Fri, 21 Mar 2014 15:47:35 +0100
Subject: [PATCH 004/229] select binding by path or content type
---
.../java/org/n52/sos/service/SosService.java | 41 +++++++++++++++----
1 file changed, 34 insertions(+), 7 deletions(-)
diff --git a/core/api/src/main/java/org/n52/sos/service/SosService.java b/core/api/src/main/java/org/n52/sos/service/SosService.java
index 7079d7d69d..68b161c2d0 100644
--- a/core/api/src/main/java/org/n52/sos/service/SosService.java
+++ b/core/api/src/main/java/org/n52/sos/service/SosService.java
@@ -47,10 +47,11 @@
import org.n52.sos.event.SosEventBus;
import org.n52.sos.event.events.ExceptionEvent;
import org.n52.sos.exception.HTTPException;
-import org.n52.sos.ogc.ows.OwsExceptionReport;
import org.n52.sos.util.http.HTTPHeaders;
import org.n52.sos.util.http.HTTPMethods;
import org.n52.sos.util.http.HTTPStatus;
+import org.n52.sos.util.http.MediaType;
+import org.n52.sos.util.http.MediaTypes;
/**
* The servlet of the SOS which receives the incoming HttpPost and HttpGet
@@ -190,22 +191,48 @@ protected void doOptions(HttpServletRequest request, HttpServletResponse respons
* given urlPattern
.
*
*
- * @throws OwsExceptionReport
- * * If the URL pattern is not supported by this SOS.
+ * @throws HTTPException If the URL pattern or ContentType is not supported
+ * by this SOS.
*/
private Binding getBinding(HttpServletRequest request) throws HTTPException {
- String requestURI = request.getPathInfo();
+ final String requestURI = request.getPathInfo();
+ final BindingRepository repo = BindingRepository.getInstance();
if (requestURI == null) {
- throw new HTTPException(HTTPStatus.BAD_REQUEST);
+ MediaType contentType = getContentType(request);
+ Binding binding = repo.getBinding(contentType);
+ if (binding == null) {
+ throw new HTTPException(HTTPStatus.UNSUPPORTED_MEDIA_TYPE);
+ } else {
+ return binding;
+ }
}
- for (String prefix : BindingRepository.getInstance().getBindings().keySet()) {
+
+ for (String prefix : repo.getBindings().keySet()) {
if (requestURI.startsWith(prefix)) {
- return BindingRepository.getInstance().getBinding(prefix);
+ return repo.getBinding(prefix);
}
}
throw new HTTPException(HTTPStatus.NOT_FOUND);
}
+ private MediaType getContentType(HttpServletRequest request)
+ throws HTTPException {
+ if (request.getContentType() == null) {
+ // default to KVP for GET requests
+ if (request.getMethod().equals(HTTPMethods.GET)) {
+ return MediaTypes.APPLICATION_KVP;
+ } else {
+ throw new HTTPException(HTTPStatus.BAD_REQUEST);
+ }
+ } else {
+ try {
+ return MediaType.parse(request.getContentType());
+ } catch (IllegalArgumentException e) {
+ throw new HTTPException(HTTPStatus.BAD_REQUEST, e);
+ }
+ }
+ }
+
protected void onHttpException(HttpServletRequest request, HttpServletResponse response, HTTPException exception)
throws IOException {
SosEventBus.fire(new ExceptionEvent(exception));
From c57d18175eba4028ae64e8196269c9e435282a1c Mon Sep 17 00:00:00 2001
From: Christian Autermann
Date: Fri, 21 Mar 2014 15:48:09 +0100
Subject: [PATCH 005/229] make servlet available under /sos and /service
---
webapp/src/main/webapp/WEB-INF/web.xml | 4 ++++
1 file changed, 4 insertions(+)
diff --git a/webapp/src/main/webapp/WEB-INF/web.xml b/webapp/src/main/webapp/WEB-INF/web.xml
index 4996c673a8..315acb4411 100644
--- a/webapp/src/main/webapp/WEB-INF/web.xml
+++ b/webapp/src/main/webapp/WEB-INF/web.xml
@@ -127,6 +127,10 @@
SOS
/sos/*
+
+ SOS
+ /service/*
+
dispatcher
From 888c32c09eb45cde165ec6092a3db84c77fe3470 Mon Sep 17 00:00:00 2001
From: Christian Autermann
Date: Fri, 21 Mar 2014 16:59:14 +0100
Subject: [PATCH 006/229] do not apply spring security on /service
---
.../views/src/main/webapp/WEB-INF/applicationContext.xml | 9 +++++----
1 file changed, 5 insertions(+), 4 deletions(-)
diff --git a/spring/views/src/main/webapp/WEB-INF/applicationContext.xml b/spring/views/src/main/webapp/WEB-INF/applicationContext.xml
index 5c2c63705d..59544b1f80 100644
--- a/spring/views/src/main/webapp/WEB-INF/applicationContext.xml
+++ b/spring/views/src/main/webapp/WEB-INF/applicationContext.xml
@@ -3,9 +3,9 @@
xmlns:mvc="http://www.springframework.org/schema/mvc"
xmlns:ctx="http://www.springframework.org/schema/context"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
- xsi:schemaLocation="http://www.springframework.org/schema/beans
+ xsi:schemaLocation="http://www.springframework.org/schema/beans
http://www.springframework.org/schema/beans/spring-beans-3.2.xsd
- http://www.springframework.org/schema/security
+ http://www.springframework.org/schema/security
http://www.springframework.org/schema/security/spring-security-3.1.xsd
http://www.springframework.org/schema/context
http://www.springframework.org/schema/context/spring-context-3.2.xsd">
@@ -14,7 +14,7 @@
-
+
@@ -31,6 +31,7 @@
+
@@ -42,7 +43,7 @@
From 41050ffee7ed93d4bb2add3ac9f0b50be7a60a47 Mon Sep 17 00:00:00 2001
From: Christian Autermann
Date: Fri, 21 Mar 2014 17:29:43 +0100
Subject: [PATCH 007/229] reenable integration tests
---
pom.xml | 7 ++++++-
webapp/pom.xml | 17 +++++++++++++----
2 files changed, 19 insertions(+), 5 deletions(-)
diff --git a/pom.xml b/pom.xml
index e4c0c4a5c3..30ea091ee7 100644
--- a/pom.xml
+++ b/pom.xml
@@ -51,7 +51,7 @@
UTF-8
UTF-8
-
+
${catalina.base}/logs
@@ -933,6 +933,11 @@
cargo-maven2-plugin
1.3.2
+
+ org.apache.maven.plugins
+ maven-surefire-plugin
+ 2.16
+
maven-release-plugin
diff --git a/webapp/pom.xml b/webapp/pom.xml
index 0a8bb83e16..6bafc81056 100644
--- a/webapp/pom.xml
+++ b/webapp/pom.xml
@@ -21,6 +21,15 @@
${conf.sos.name}
+
+ org.apache.maven.plugins
+ maven-surefire-plugin
+
+
+ **/*Suite*.java
+
+
+
org.apache.maven.plugins
maven-dependency-plugin
@@ -288,11 +297,11 @@
${project.groupId}
hibernate-datasource-mysql
-
+
${project.groupId}
hibernate-datasource-h2
-
+
${project.groupId}
views
@@ -644,7 +653,7 @@
-
+
wml
@@ -936,7 +945,7 @@
${remote.port}
${remote.user}
${remote.password}
-
+
-->
From dd02a8d84f5ce6db8a9bb7222983445b742fede3 Mon Sep 17 00:00:00 2001
From: Christian Autermann
Date: Fri, 21 Mar 2014 18:07:40 +0100
Subject: [PATCH 008/229] changed sos.version property to 4.0.2-SNAPSHOT
---
pom.xml | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/pom.xml b/pom.xml
index e4c0c4a5c3..568dc5379a 100644
--- a/pom.xml
+++ b/pom.xml
@@ -76,7 +76,7 @@
- 4.1.0-SNAPSHOT
+ 4.0.2-SNAPSHOT
0.2.0-SNAPSHOT
0.2.0-SNAPSHOT
From f80e3ec5ede7acbf5f2168b92bd1f27348d5ace3 Mon Sep 17 00:00:00 2001
From: Christian Autermann
Date: Fri, 21 Mar 2014 18:19:00 +0100
Subject: [PATCH 009/229] strip of mime type parameters to find binding
---
core/api/src/main/java/org/n52/sos/service/SosService.java | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/core/api/src/main/java/org/n52/sos/service/SosService.java b/core/api/src/main/java/org/n52/sos/service/SosService.java
index 68b161c2d0..5a7b4b6776 100644
--- a/core/api/src/main/java/org/n52/sos/service/SosService.java
+++ b/core/api/src/main/java/org/n52/sos/service/SosService.java
@@ -199,7 +199,8 @@ private Binding getBinding(HttpServletRequest request) throws HTTPException {
final BindingRepository repo = BindingRepository.getInstance();
if (requestURI == null) {
MediaType contentType = getContentType(request);
- Binding binding = repo.getBinding(contentType);
+ // strip of the parameters to get rid of things like encoding
+ Binding binding = repo.getBinding(contentType.withoutParameters());
if (binding == null) {
throw new HTTPException(HTTPStatus.UNSUPPORTED_MEDIA_TYPE);
} else {
From ebd47272662eabd17647deccda8567478e3481d2 Mon Sep 17 00:00:00 2001
From: Christian Autermann
Date: Fri, 21 Mar 2014 19:43:04 +0100
Subject: [PATCH 010/229] better check for missing path info
---
core/api/src/main/java/org/n52/sos/service/SosService.java | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/core/api/src/main/java/org/n52/sos/service/SosService.java b/core/api/src/main/java/org/n52/sos/service/SosService.java
index 5a7b4b6776..88c81527ca 100644
--- a/core/api/src/main/java/org/n52/sos/service/SosService.java
+++ b/core/api/src/main/java/org/n52/sos/service/SosService.java
@@ -197,7 +197,7 @@ protected void doOptions(HttpServletRequest request, HttpServletResponse respons
private Binding getBinding(HttpServletRequest request) throws HTTPException {
final String requestURI = request.getPathInfo();
final BindingRepository repo = BindingRepository.getInstance();
- if (requestURI == null) {
+ if (requestURI == null || requestURI.isEmpty() || requestURI.equals("/")) {
MediaType contentType = getContentType(request);
// strip of the parameters to get rid of things like encoding
Binding binding = repo.getBinding(contentType.withoutParameters());
From 233206b459faa40b2c338a2aac2330eec755bb95 Mon Sep 17 00:00:00 2001
From: Christian Autermann
Date: Fri, 21 Mar 2014 19:43:27 +0100
Subject: [PATCH 011/229] updated test suite to 1.0.0-M3
---
webapp/pom.xml | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/webapp/pom.xml b/webapp/pom.xml
index 6bafc81056..adb6c4ab1b 100644
--- a/webapp/pom.xml
+++ b/webapp/pom.xml
@@ -16,7 +16,7 @@
${project.parent.basedir}/misc/conf/datasource.properties
${project.build.directory}/${project.build.finalName}/configuration.db
- 1.0.0-M2
+ 1.0.0-M3
${conf.sos.name}
From fb687252fb7dc9f0fc58383ed685ddf5069be201 Mon Sep 17 00:00:00 2001
From: Christian Autermann
Date: Fri, 21 Mar 2014 19:45:00 +0100
Subject: [PATCH 012/229] added integration tests
---
.../it/ContentNegotiationEndpointTest.java | 232 ++++++++++++++++++
.../service/it/SOS40ComplianceTestSuite.java | 4 +-
2 files changed, 235 insertions(+), 1 deletion(-)
create mode 100644 webapp/src/test/java/org/n52/sos/service/it/ContentNegotiationEndpointTest.java
diff --git a/webapp/src/test/java/org/n52/sos/service/it/ContentNegotiationEndpointTest.java b/webapp/src/test/java/org/n52/sos/service/it/ContentNegotiationEndpointTest.java
new file mode 100644
index 0000000000..106fdcea88
--- /dev/null
+++ b/webapp/src/test/java/org/n52/sos/service/it/ContentNegotiationEndpointTest.java
@@ -0,0 +1,232 @@
+/**
+ * Copyright (C) 2012-2014 52°North Initiative for Geospatial Open Source
+ * Software GmbH
+ *
+ * This program is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU General Public License version 2 as published
+ * by the Free Software Foundation.
+ *
+ * If the program is linked with libraries which are licensed under one of
+ * the following licenses, the combination of the program with the linked
+ * library is not considered a "derivative work" of the program:
+ *
+ * - Apache License, version 2.0
+ * - Apache Software License, version 1.0
+ * - GNU Lesser General Public License, version 3
+ * - Mozilla Public License, versions 1.0, 1.1 and 2.0
+ * - Common Development and Distribution License (CDDL), version 1.0
+ *
+ * Therefore the distribution of the program linked with libraries licensed
+ * under the aforementioned licenses, is permitted by the copyright holders
+ * if the distribution is compliant with both the GNU General Public
+ * License version 2 and the aforementioned licenses.
+ *
+ * This program is distributed in the hope that it will be useful, but
+ * WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General
+ * Public License for more details.
+ */
+package org.n52.sos.service.it;
+
+import static org.hamcrest.Matchers.is;
+import static org.n52.sos.service.it.util.XPath.hasXPath;
+
+import java.io.IOException;
+
+import net.opengis.sos.x20.GetCapabilitiesDocument;
+import net.opengis.sos.x20.GetCapabilitiesType;
+
+import org.apache.xmlbeans.XmlObject;
+import org.junit.Rule;
+import org.junit.Test;
+import org.junit.rules.ErrorCollector;
+import org.w3.x2003.x05.soapEnvelope.EnvelopeDocument;
+
+import org.n52.sos.ogc.ows.OWSConstants;
+import org.n52.sos.ogc.sos.Sos2Constants;
+import org.n52.sos.ogc.sos.SosConstants;
+import org.n52.sos.service.it.v2.XPaths;
+import org.n52.sos.util.http.HTTPStatus;
+import org.n52.sos.util.http.MediaTypes;
+
+import com.fasterxml.jackson.core.JsonProcessingException;
+import com.fasterxml.jackson.databind.ObjectMapper;
+import com.fasterxml.jackson.databind.node.JsonNodeFactory;
+import com.fasterxml.jackson.databind.node.ObjectNode;
+
+/**
+ * TODO JavaDoc
+ *
+ * @author Christian Autermann
+ */
+public class ContentNegotiationEndpointTest extends AbstractComplianceSuiteTest {
+ private static final String APPLICATION_SOAP_XML
+ = MediaTypes.APPLICATION_SOAP_XML.toString();
+ private static final String APPLICATION_XML
+ = MediaTypes.APPLICATION_XML.toString();
+ private static final String APPLICATION_JSON
+ = MediaTypes.APPLICATION_JSON.toString();
+ private static final String SERVICE
+ = OWSConstants.RequestParams.service.toString();
+ private static final String REQUEST
+ = OWSConstants.RequestParams.request.toString();
+ private static final String GET_CAPABILITIES
+ = SosConstants.Operations.GetCapabilities.toString();
+ private static final String SERVICE_VERSION = Sos2Constants.SERVICEVERSION;
+ private static final String SERVICE_TYPE = SosConstants.SOS;
+ @Rule
+ public final ErrorCollector errors = new ErrorCollector();
+
+ private XmlObject envelope(final XmlObject r) {
+ final EnvelopeDocument envDoc = EnvelopeDocument.Factory.newInstance();
+ envDoc.addNewEnvelope().addNewBody().set(r);
+ return envDoc;
+ }
+
+ private GetCapabilitiesDocument validGetCapabilitiesDocument() {
+ GetCapabilitiesDocument document = GetCapabilitiesDocument.Factory
+ .newInstance();
+ GetCapabilitiesType gc = document.addNewGetCapabilities2();
+ gc.addNewAcceptVersions().addNewVersion()
+ .setStringValue(SERVICE_VERSION);
+ gc.setService(SERVICE_TYPE);
+ return document;
+ }
+
+ private String validPoxRequest() {
+ return validGetCapabilitiesDocument().xmlText();
+ }
+
+ private String validSoapRequest() {
+ return envelope(validGetCapabilitiesDocument()).xmlText();
+ }
+
+ private String validJsonRequest()
+ throws JsonProcessingException {
+ ObjectMapper mapper = new ObjectMapper();
+ ObjectNode request = JsonNodeFactory.instance.objectNode();
+ request.put(REQUEST, GET_CAPABILITIES);
+ request.put(SERVICE, SERVICE_TYPE);
+ String a = mapper.writer().writeValueAsString(request);
+ return a;
+ }
+
+ @Test
+ public void testKvpRequest() {
+ validate(get(null).accept(APPLICATION_XML)
+ .query(REQUEST, GET_CAPABILITIES)
+ .query(SERVICE, SERVICE_TYPE).response());
+ }
+
+ @Test
+ public void testPoxRequest() {
+ validate(post(null)
+ .contentType(APPLICATION_XML)
+ .accept(APPLICATION_XML)
+ .entity(validPoxRequest())
+ .response());
+ }
+
+ @Test
+ public void testPoxRequestContentTypeMismatch() {
+ validate(post("/pox")
+ .contentType(APPLICATION_JSON)
+ .accept(APPLICATION_XML)
+ .entity(validPoxRequest())
+ .response());
+ }
+
+ @Test
+ public void testPoxRequestWithEncoding() {
+ validate(post(null)
+ .contentType(APPLICATION_XML + ";charset=UTF-8")
+ .accept(APPLICATION_XML)
+ .entity(validPoxRequest())
+ .response());
+ }
+
+ @Test
+ public void testSoapRequest() {
+ validate(post(null)
+ .contentType(APPLICATION_SOAP_XML)
+ .accept(APPLICATION_XML)
+ .entity(validSoapRequest())
+ .response());
+ }
+
+ @Test
+ public void testSoapRequestContentTypeMismatch() {
+ validate(post("/soap")
+ .contentType(APPLICATION_JSON)
+ .accept(APPLICATION_XML)
+ .entity(validSoapRequest())
+ .response());
+ }
+
+ @Test
+ public void testSoapRequestWithEncoding() {
+ validate(post(null)
+ .contentType(APPLICATION_SOAP_XML + ";charset=UTF-8")
+ .accept(APPLICATION_XML)
+ .entity(validSoapRequest())
+ .response());
+ }
+
+ @Test
+ public void testJsonRequest()
+ throws JsonProcessingException, IOException {
+ validate(post(null)
+ .contentType(APPLICATION_JSON)
+ .accept(APPLICATION_XML)
+ .entity(validJsonRequest())
+ .response());
+ }
+
+ @Test
+ public void testJsonRequestContentTypeMismatch()
+ throws JsonProcessingException, IOException {
+ validate(post("/json")
+ .contentType(APPLICATION_XML)
+ .accept(APPLICATION_XML)
+ .entity(validJsonRequest())
+ .response());
+ }
+
+ @Test
+ public void testJsonRequestWithEncoding()
+ throws JsonProcessingException, IOException {
+ validate(post(null)
+ .contentType(APPLICATION_JSON + ";charset=UTF-8")
+ .accept(APPLICATION_XML)
+ .entity(validJsonRequest())
+ .response());
+ }
+
+ @Test
+ public void unknownMediaType() {
+ Response response = post(null)
+ .contentType("some/thing")
+ .accept(APPLICATION_XML)
+ .entity(validPoxRequest())
+ .response();
+ errors.checkThat(response.getStatus(),
+ is(HTTPStatus.UNSUPPORTED_MEDIA_TYPE
+ .getCode()));
+ }
+
+ @Test
+ public void invalidMediaType() {
+ Response response = post(null)
+ .contentType("some/thing/wrong")
+ .accept(APPLICATION_XML)
+ .entity(validPoxRequest())
+ .response();
+ errors.checkThat(response.getStatus(),
+ is(HTTPStatus.BAD_REQUEST.getCode()));
+ }
+
+ private void validate(Response response) {
+ errors.checkThat(response.getStatus(), is(HTTPStatus.OK.getCode()));
+ errors.checkThat(response.asNode(), hasXPath(XPaths.CAPABILITIES));
+ }
+}
diff --git a/webapp/src/test/java/org/n52/sos/service/it/SOS40ComplianceTestSuite.java b/webapp/src/test/java/org/n52/sos/service/it/SOS40ComplianceTestSuite.java
index 3f1650d1f4..0e58ad2a6d 100644
--- a/webapp/src/test/java/org/n52/sos/service/it/SOS40ComplianceTestSuite.java
+++ b/webapp/src/test/java/org/n52/sos/service/it/SOS40ComplianceTestSuite.java
@@ -31,6 +31,7 @@
import org.junit.AfterClass;
import org.junit.Rule;
import org.junit.runner.RunWith;
+
import org.n52.sos.config.SettingsManager;
import org.n52.sos.service.SosService;
@@ -106,7 +107,8 @@ public Class>[] getTests() {
org.n52.sos.service.it.v2.rest.CapabilitiesTest.class,
org.n52.sos.service.it.v2.rest.OfferingsTest.class,
org.n52.sos.service.it.v2.rest.SensorsTest.class,
- org.n52.sos.service.it.v2.rest.ServiceEndpointTest.class
+ org.n52.sos.service.it.v2.rest.ServiceEndpointTest.class,
+ org.n52.sos.service.it.ContentNegotiationEndpointTest.class
};
}
From 0564ec0b8a53977845d37db331a5af2e1b6e54b5 Mon Sep 17 00:00:00 2001
From: Shane StClair
Date: Tue, 25 Mar 2014 12:45:00 -0700
Subject: [PATCH 013/229] Check if JSON binding is supported before testing
---
.../sos/service/it/ContentNegotiationEndpointTest.java | 10 +++++++++-
1 file changed, 9 insertions(+), 1 deletion(-)
diff --git a/webapp/src/test/java/org/n52/sos/service/it/ContentNegotiationEndpointTest.java b/webapp/src/test/java/org/n52/sos/service/it/ContentNegotiationEndpointTest.java
index 106fdcea88..7890a174cb 100644
--- a/webapp/src/test/java/org/n52/sos/service/it/ContentNegotiationEndpointTest.java
+++ b/webapp/src/test/java/org/n52/sos/service/it/ContentNegotiationEndpointTest.java
@@ -37,11 +37,12 @@
import net.opengis.sos.x20.GetCapabilitiesType;
import org.apache.xmlbeans.XmlObject;
+import org.junit.Assume;
import org.junit.Rule;
import org.junit.Test;
import org.junit.rules.ErrorCollector;
import org.w3.x2003.x05.soapEnvelope.EnvelopeDocument;
-
+import org.n52.sos.binding.BindingRepository;
import org.n52.sos.ogc.ows.OWSConstants;
import org.n52.sos.ogc.sos.Sos2Constants;
import org.n52.sos.ogc.sos.SosConstants;
@@ -172,9 +173,14 @@ public void testSoapRequestWithEncoding() {
.response());
}
+ private boolean isJsonBindingSupported() {
+ return BindingRepository.getInstance().isBindingSupported(MediaTypes.APPLICATION_JSON);
+ }
+
@Test
public void testJsonRequest()
throws JsonProcessingException, IOException {
+ Assume.assumeTrue(isJsonBindingSupported());
validate(post(null)
.contentType(APPLICATION_JSON)
.accept(APPLICATION_XML)
@@ -185,6 +191,7 @@ public void testJsonRequest()
@Test
public void testJsonRequestContentTypeMismatch()
throws JsonProcessingException, IOException {
+ Assume.assumeTrue(isJsonBindingSupported());
validate(post("/json")
.contentType(APPLICATION_XML)
.accept(APPLICATION_XML)
@@ -195,6 +202,7 @@ public void testJsonRequestContentTypeMismatch()
@Test
public void testJsonRequestWithEncoding()
throws JsonProcessingException, IOException {
+ Assume.assumeTrue(isJsonBindingSupported());
validate(post(null)
.contentType(APPLICATION_JSON + ";charset=UTF-8")
.accept(APPLICATION_XML)
From 0599a9609859698ebb2b08ee3f5869e71f645cee Mon Sep 17 00:00:00 2001
From: CarstenHollmann
Date: Thu, 27 Mar 2014 09:04:13 +0100
Subject: [PATCH 014/229] fix typo (degree sign) in install/index.jsp
---
spring/views/src/main/webapp/WEB-INF/views/install/index.jsp | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/spring/views/src/main/webapp/WEB-INF/views/install/index.jsp b/spring/views/src/main/webapp/WEB-INF/views/install/index.jsp
index 266683fe09..ff133de0c2 100644
--- a/spring/views/src/main/webapp/WEB-INF/views/install/index.jsp
+++ b/spring/views/src/main/webapp/WEB-INF/views/install/index.jsp
@@ -58,7 +58,7 @@
Documentation for Oracle can be found here .
- How to install the 52�North SOS with Oracle is described in the SOS wiki
+ How to install the 52°North SOS with Oracle is described in the SOS wiki
If you like to use MySQL 5.6.x you can find here a detailed installation guide for the different platforms
From 03fcdb9198108c8459ddcc3d82fe11b33187cb3f Mon Sep 17 00:00:00 2001
From: CarstenHollmann
Date: Fri, 28 Mar 2014 10:55:08 +0100
Subject: [PATCH 015/229] Show observation identifiers in capabilities only if
the size is less than 100
---
.../org/n52/sos/ds/AbstractGetObservationByIdDAO.java | 9 +++++++--
1 file changed, 7 insertions(+), 2 deletions(-)
diff --git a/core/api/src/main/java/org/n52/sos/ds/AbstractGetObservationByIdDAO.java b/core/api/src/main/java/org/n52/sos/ds/AbstractGetObservationByIdDAO.java
index e7e450381b..502380209b 100644
--- a/core/api/src/main/java/org/n52/sos/ds/AbstractGetObservationByIdDAO.java
+++ b/core/api/src/main/java/org/n52/sos/ds/AbstractGetObservationByIdDAO.java
@@ -46,8 +46,13 @@ public AbstractGetObservationByIdDAO(String service) {
@Override
public void setOperationsMetadata(OwsOperation opsMeta, String service, String version) throws OwsExceptionReport {
- opsMeta.addPossibleValuesParameter(Sos2Constants.GetObservationByIdParams.observation, getCache()
- .getObservationIdentifiers());
+ // TODO create setting for this
+ if (getCache().getObservationIdentifiers().size() > 100) {
+ opsMeta.addAnyParameterValue(Sos2Constants.GetObservationByIdParams.observation);
+ } else {
+ opsMeta.addPossibleValuesParameter(Sos2Constants.GetObservationByIdParams.observation, getCache()
+ .getObservationIdentifiers());
+ }
}
public abstract GetObservationByIdResponse getObservationById(GetObservationByIdRequest request)
From a1dc01965e9f8a978cb9400d530392da4a6a94ed Mon Sep 17 00:00:00 2001
From: CarstenHollmann
Date: Fri, 28 Mar 2014 10:57:11 +0100
Subject: [PATCH 016/229] - Add first/latest observation timestamp (all) and
value (only Measurement) for an easier integration of the Timeseries API -
Update these columns during insertion process - Update SQL scripts
---
RELEASE-NOTES | 22 ++++
.../ds/hibernate/dao/series/SeriesDAO.java | 38 ++++++
.../dao/series/SeriesObservationDAO.java | 7 +-
.../sos/ds/hibernate/entities/Procedure.java | 16 +++
.../ds/hibernate/entities/series/Series.java | 108 +++++++++++++++++-
hibernate/mappings/pom.xml | 4 +-
.../resources/mapping/core/Procedure.hbm.xml | 4 +
.../mapping/series/observation/Series.hbm.xml | 16 +++
.../series/MySQL_series_create_script.sql | 5 +-
.../MySQL/series/MySQL_update_401_to_402.sql | 9 ++
.../series/Oracle_series_create_script.sql | 5 +-
.../series/Oracle_update_401_to_402.sql | 9 ++
.../series/PG_series_script_20_create.sql | 5 +-
.../series/PG_update_401_to_402.sql | 9 ++
14 files changed, 241 insertions(+), 16 deletions(-)
create mode 100644 misc/db/MySQL/series/MySQL_update_401_to_402.sql
create mode 100644 misc/db/Oracle/series/Oracle_update_401_to_402.sql
create mode 100644 misc/db/PostgreSQL/series/PG_update_401_to_402.sql
diff --git a/RELEASE-NOTES b/RELEASE-NOTES
index a4f122608c..8578fd07c5 100644
--- a/RELEASE-NOTES
+++ b/RELEASE-NOTES
@@ -7,6 +7,24 @@ RELEASE NOTES
(SensorML as well).
Changes since last release
+==================================
+
+ --- New features ---
+
+ * Binding selection by ContentType at /sos and /service
+ * Add columns to mapping files for an easier integration of the Timeseries API (only for Series concept)
+ * Added first/latest time (all) and value (only OM_Measurement) columns to series table and update these columns during insertion process
+
+ --- Changes ---
+
+ * Show the observation identifiers only in capabilities if size is less than 100, TODO: make this configurable
+
+ --- Fixed bugs ---
+
+ * Check if JSON binding is supported before testing
+
+
+Release 52n-sos-4.0.1
==================================
--- New features ---
@@ -14,6 +32,10 @@ Changes since last release
--- Changes ---
--- Fixed bugs ---
+
+ * Fix NcNameResolver.fixNcName and Show nested SQLExceptions in OwsExceptionReport
+ * Add missing setting of namedQuery parameter
+
Release 52n-sos-4.0.0
==================================
diff --git a/hibernate/common/src/main/java/org/n52/sos/ds/hibernate/dao/series/SeriesDAO.java b/hibernate/common/src/main/java/org/n52/sos/ds/hibernate/dao/series/SeriesDAO.java
index 62bc707bb6..e3eef0313c 100644
--- a/hibernate/common/src/main/java/org/n52/sos/ds/hibernate/dao/series/SeriesDAO.java
+++ b/hibernate/common/src/main/java/org/n52/sos/ds/hibernate/dao/series/SeriesDAO.java
@@ -34,9 +34,11 @@
import org.hibernate.Criteria;
import org.hibernate.Session;
import org.hibernate.criterion.Restrictions;
+import org.n52.sos.ds.hibernate.entities.AbstractObservation;
import org.n52.sos.ds.hibernate.entities.FeatureOfInterest;
import org.n52.sos.ds.hibernate.entities.ObservableProperty;
import org.n52.sos.ds.hibernate.entities.Procedure;
+import org.n52.sos.ds.hibernate.entities.interfaces.NumericObservation;
import org.n52.sos.ds.hibernate.entities.series.Series;
import org.n52.sos.ds.hibernate.util.HibernateHelper;
import org.n52.sos.request.GetObservationRequest;
@@ -367,4 +369,40 @@ public List updateSeriesSetAsDeletedForProcedureAndGetSeries(String proc
return hSeries;
}
+ /**
+ * Update series values which will be used by the Timeseries API.
+ * Can be later used by the SOS.
+ *
+ * @param series Series object
+ * @param hObservation Observation object
+ * @param session Hibernate session
+ */
+ public void updateSeriesWithFirstLatestValues(Series series, AbstractObservation hObservation, Session session) {
+ boolean minChanged = false;
+ boolean maxChanged = false;
+ if (!series.isSetFirstTimeStamp() || (series.isSetFirstTimeStamp() && series.getFirstTimeStamp().after(hObservation.getPhenomenonTimeStart()))) {
+ minChanged = true;
+ series.setFirstTimeStamp(hObservation.getPhenomenonTimeStart());
+ }
+ if (!series.isSetLastTimeStamp() || (series.isSetLastTimeStamp() && series.getLastTimeStamp().before(hObservation.getPhenomenonTimeEnd()))) {
+ maxChanged = true;
+ series.setLastTimeStamp(hObservation.getPhenomenonTimeEnd());
+ }
+
+ if (hObservation instanceof NumericObservation) {
+ if (minChanged) {
+ series.setFirstNumericValue(((NumericObservation) hObservation).getValue());
+ }
+ if (maxChanged) {
+ series.setLastNumericValue(((NumericObservation) hObservation).getValue());
+ }
+ if (!series.isSetUnit() && hObservation.isSetUnit()) {
+ // TODO check if both unit are equal. If not throw exception?
+ series.setUnit(hObservation.getUnit());
+ }
+ }
+ session.saveOrUpdate(series);
+ session.flush();
+ }
+
}
diff --git a/hibernate/common/src/main/java/org/n52/sos/ds/hibernate/dao/series/SeriesObservationDAO.java b/hibernate/common/src/main/java/org/n52/sos/ds/hibernate/dao/series/SeriesObservationDAO.java
index 3ac3eed729..399ffc2a7c 100644
--- a/hibernate/common/src/main/java/org/n52/sos/ds/hibernate/dao/series/SeriesObservationDAO.java
+++ b/hibernate/common/src/main/java/org/n52/sos/ds/hibernate/dao/series/SeriesObservationDAO.java
@@ -497,9 +497,12 @@ public AbstractObservation createObservationFromValue(Value> value, Session se
@Override
protected void addObservationIdentifiersToObservation(ObservationIdentifiers observationIdentifiers,
AbstractObservation hObservation, Session session) {
- ((SeriesObservation) hObservation).setSeries(new SeriesDAO().getOrInsertSeries(
+ SeriesDAO seriesDAO = new SeriesDAO();
+ Series series = seriesDAO.getOrInsertSeries(
observationIdentifiers.getFeatureOfInterest(), observationIdentifiers.getObservableProperty(),
- observationIdentifiers.getProcedure(), session));
+ observationIdentifiers.getProcedure(), session);
+ ((SeriesObservation) hObservation).setSeries(series);
+ seriesDAO.updateSeriesWithFirstLatestValues(series, hObservation, session);
}
@Override
diff --git a/hibernate/common/src/main/java/org/n52/sos/ds/hibernate/entities/Procedure.java b/hibernate/common/src/main/java/org/n52/sos/ds/hibernate/entities/Procedure.java
index e6b55802ef..43b91d0db4 100644
--- a/hibernate/common/src/main/java/org/n52/sos/ds/hibernate/entities/Procedure.java
+++ b/hibernate/common/src/main/java/org/n52/sos/ds/hibernate/entities/Procedure.java
@@ -55,6 +55,8 @@ public class Procedure extends SpatialEntity implements Serializable, HasDeleted
private boolean deleted;
private String descriptionFile;
+
+ private boolean reference;
public long getProcedureId() {
return this.procedureId;
@@ -94,4 +96,18 @@ public void setDescriptionFile(String descriptionFile) {
this.descriptionFile = descriptionFile;
}
+ /**
+ * @return the reference
+ */
+ public boolean isReference() {
+ return reference;
+ }
+
+ /**
+ * @param reference the reference to set
+ */
+ public void setReference(boolean reference) {
+ this.reference = reference;
+ }
+
}
diff --git a/hibernate/common/src/main/java/org/n52/sos/ds/hibernate/entities/series/Series.java b/hibernate/common/src/main/java/org/n52/sos/ds/hibernate/entities/series/Series.java
index 8b0f3fe449..7cd822a5ad 100644
--- a/hibernate/common/src/main/java/org/n52/sos/ds/hibernate/entities/series/Series.java
+++ b/hibernate/common/src/main/java/org/n52/sos/ds/hibernate/entities/series/Series.java
@@ -29,22 +29,21 @@
package org.n52.sos.ds.hibernate.entities.series;
import java.io.Serializable;
+import java.math.BigDecimal;
+import java.util.Date;
import org.n52.sos.ds.hibernate.entities.FeatureOfInterest;
import org.n52.sos.ds.hibernate.entities.ObservableProperty;
import org.n52.sos.ds.hibernate.entities.Procedure;
-import org.n52.sos.ds.hibernate.entities.HibernateRelations.HasObservableProperty;
-import org.n52.sos.ds.hibernate.entities.HibernateRelations.HasProcedure;
-import org.n52.sos.ds.hibernate.entities.HibernateRelations.HasFeatureOfInterest;
-import org.n52.sos.ds.hibernate.entities.HibernateRelations.HasDeletedFlag;
-
+import org.n52.sos.ds.hibernate.entities.Unit;
+import org.n52.sos.ds.hibernate.entities.HibernateRelations.*;
/**
* Hibernate entity for series
*
* @since 4.0.0
*
*/
-public class Series implements Serializable, HasProcedure, HasObservableProperty, HasFeatureOfInterest, HasDeletedFlag {
+public class Series implements Serializable, HasProcedure, HasObservableProperty, HasFeatureOfInterest, HasDeletedFlag, HasUnit {
private static final long serialVersionUID = 7838379468605356753L;
@@ -60,6 +59,17 @@ public class Series implements Serializable, HasProcedure, HasObservableProperty
private Boolean deleted = false;
+ // the following values are used by the timeseries api
+ private Date firstTimeStamp;
+
+ private Date lastTimeStamp;
+
+ private BigDecimal firstNumericValue;
+
+ private BigDecimal lastNumericValue;
+
+ private Unit unit;
+
/**
* Get series id
*
@@ -119,4 +129,90 @@ public Series setDeleted(final boolean deleted) {
public boolean isDeleted() {
return deleted;
}
+
+ /**
+ * @return the firstTimeStamp
+ */
+ public Date getFirstTimeStamp() {
+ return firstTimeStamp;
+ }
+
+ /**
+ * @param firstTimeStamp the firstTimeStamp to set
+ */
+ public void setFirstTimeStamp(Date firstTimeStamp) {
+ this.firstTimeStamp = firstTimeStamp;
+ }
+
+ public boolean isSetFirstTimeStamp() {
+ return getFirstTimeStamp() != null;
+ }
+
+ /**
+ * @return the lastTimeStamp
+ */
+ public Date getLastTimeStamp() {
+ return lastTimeStamp;
+ }
+
+ /**
+ * @param lastTimeStamp the lastTimeStamp to set
+ */
+ public void setLastTimeStamp(Date lastTimeStamp) {
+ this.lastTimeStamp = lastTimeStamp;
+ }
+
+ public boolean isSetLastTimeStamp() {
+ return getLastTimeStamp() != null;
+ }
+
+ /**
+ * @return the firstNumericValue
+ */
+ public BigDecimal getFirstNumericValue() {
+ return firstNumericValue;
+ }
+
+ /**
+ * @param firstNumericValue the firstNumericValue to set
+ */
+ public void setFirstNumericValue(BigDecimal firstNumericValue) {
+ this.firstNumericValue = firstNumericValue;
+ }
+
+ public boolean isSeFirstNumericValue() {
+ return getFirstNumericValue() != null;
+ }
+
+ /**
+ * @return the lastNumericValue
+ */
+ public BigDecimal getLastNumericValue() {
+ return lastNumericValue;
+ }
+
+ /**
+ * @param lastNumericValue the lastNumericValue to set
+ */
+ public void setLastNumericValue(BigDecimal lastNumericValue) {
+ this.lastNumericValue = lastNumericValue;
+ }
+
+ public boolean isSeLastNumericValue() {
+ return getLastNumericValue() != null;
+ }
+
+ @Override
+ public Unit getUnit() {
+ return unit;
+ }
+
+ @Override
+ public void setUnit(Unit unit) {
+ this.unit = unit;
+ }
+
+ public boolean isSetUnit() {
+ return getUnit() != null && getUnit().isSetUnit();
+ }
}
diff --git a/hibernate/mappings/pom.xml b/hibernate/mappings/pom.xml
index 47276f7314..a951f6fcef 100644
--- a/hibernate/mappings/pom.xml
+++ b/hibernate/mappings/pom.xml
@@ -35,14 +35,14 @@
mysql
mysql-connector-java
-
com.oracle
ojdbc6
11.2.0
provided
- -->
+
diff --git a/hibernate/mappings/src/main/resources/mapping/core/Procedure.hbm.xml b/hibernate/mappings/src/main/resources/mapping/core/Procedure.hbm.xml
index 91cab6d422..26da4418ac 100644
--- a/hibernate/mappings/src/main/resources/mapping/core/Procedure.hbm.xml
+++ b/hibernate/mappings/src/main/resources/mapping/core/Procedure.hbm.xml
@@ -47,5 +47,9 @@
-->
+
+
+
+
diff --git a/hibernate/mappings/src/main/resources/mapping/series/observation/Series.hbm.xml b/hibernate/mappings/src/main/resources/mapping/series/observation/Series.hbm.xml
index daa6c3a715..1167f2f7a4 100644
--- a/hibernate/mappings/src/main/resources/mapping/series/observation/Series.hbm.xml
+++ b/hibernate/mappings/src/main/resources/mapping/series/observation/Series.hbm.xml
@@ -21,5 +21,21 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/misc/db/MySQL/series/MySQL_series_create_script.sql b/misc/db/MySQL/series/MySQL_series_create_script.sql
index 498a11b4a5..6beec7632a 100644
--- a/misc/db/MySQL/series/MySQL_series_create_script.sql
+++ b/misc/db/MySQL/series/MySQL_series_create_script.sql
@@ -48,14 +48,14 @@ create table offeringAllowedFeatureType (offeringId bigint not null, featureOfIn
create table offeringAllowedObservationType (offeringId bigint not null, observationTypeId bigint not null, primary key (offeringId, observationTypeId)) ENGINE=InnoDB;
create table offeringHasRelatedFeature (relatedFeatureId bigint not null, offeringId bigint not null, primary key (offeringId, relatedFeatureId)) ENGINE=InnoDB;
create table parameter (parameterId bigint not null auto_increment, observationId bigint not null, definition varchar(255) not null, title varchar(255), value longblob not null, primary key (parameterId)) ENGINE=InnoDB;
-create table `procedure` (procedureId bigint not null auto_increment, hibernateDiscriminator char(1) not null, procedureDescriptionFormatId bigint not null, identifier varchar(255) not null unique, deleted char(1) default 'F' not null, descriptionFile longtext, disabled char(1) not null default 'F', primary key (procedureId), check (disabled in ('T','F'))) ENGINE=InnoDB;
+create table `procedure` (procedureId bigint not null auto_increment, hibernateDiscriminator char(1) not null, procedureDescriptionFormatId bigint not null, identifier varchar(255) not null unique, deleted char(1) default 'F' not null, descriptionFile longtext, disabled char(1) not null default 'F', primary key (procedureId), referenceFlag char(1) default 'F', primary key (procedureId), check (disabled in ('T','F'))) ENGINE=InnoDB;
create table procedureDescriptionFormat (procedureDescriptionFormatId bigint not null auto_increment, procedureDescriptionFormat varchar(255) not null, primary key (procedureDescriptionFormatId)) ENGINE=InnoDB;
create table relatedFeature (relatedFeatureId bigint not null auto_increment, featureOfInterestId bigint not null, primary key (relatedFeatureId)) ENGINE=InnoDB;
create table relatedFeatureHasRole (relatedFeatureId bigint not null, relatedFeatureRoleId bigint not null, primary key (relatedFeatureId, relatedFeatureRoleId)) ENGINE=InnoDB;
create table relatedFeatureRole (relatedFeatureRoleId bigint not null auto_increment, relatedFeatureRole varchar(255) not null unique, primary key (relatedFeatureRoleId)) ENGINE=InnoDB;
create table resultTemplate (resultTemplateId bigint not null auto_increment, offeringId bigint not null, observablePropertyId bigint not null, procedureId bigint not null, featureOfInterestId bigint not null, identifier varchar(255) not null, resultStructure longtext not null, resultEncoding longtext not null, primary key (resultTemplateId)) ENGINE=InnoDB;
create table sensorSystem (parentSensorId bigint not null, childSensorId bigint not null, primary key (childSensorId, parentSensorId)) ENGINE=InnoDB;
-create table series (seriesId bigint not null auto_increment, featureOfInterestId bigint not null, observablePropertyId bigint not null, procedureId bigint not null, deleted char(1) default 'F' not null, primary key (seriesId), unique (featureOfInterestId, observablePropertyId, procedureId)) ENGINE=InnoDB;
+create table series (seriesId bigint not null auto_increment, featureOfInterestId bigint not null, observablePropertyId bigint not null, procedureId bigint not null, deleted char(1) default 'F' not null, firstTimeStamp datetime, lastTimeStamp datetime, firstNumericValue decimal(19,2), lastNumericValue decimal(19,2), unitId bigint, primary key (seriesId), unique (featureOfInterestId, observablePropertyId, procedureId)) ENGINE=InnoDB;
create table spatialFilteringProfile (spatialFilteringProfileId bigint not null auto_increment, observation bigint not null, definition varchar(255) not null, title varchar(255), geom GEOMETRY not null, primary key (spatialFilteringProfileId)) ENGINE=InnoDB;
create table sweDataArrayValue (observationId bigint not null, value longtext, primary key (observationId)) ENGINE=InnoDB;
create table textValue (observationId bigint not null, value longtext, primary key (observationId)) ENGINE=InnoDB;
@@ -119,6 +119,7 @@ create index seriesProcedureIdx on series (procedureId);
alter table series add index seriesFeatureFk (featureOfInterestId), add constraint seriesFeatureFk foreign key (featureOfInterestId) references featureOfInterest (featureOfInterestId);
alter table series add index seriesObPropFk (observablePropertyId), add constraint seriesObPropFk foreign key (observablePropertyId) references observableProperty (observablePropertyId);
alter table series add index seriesProcedureFk (procedureId), add constraint seriesProcedureFk foreign key (procedureId) references `procedure` (procedureId);
+alter table series add constraint seriesUnitFk foreign key (unitId) references unit;
create index sfpObservationIdx on spatialFilteringProfile (observation);
alter table spatialFilteringProfile add index sfpObservationFK (observation), add constraint sfpObservationFK foreign key (observation) references observation (observationId);
alter table sweDataArrayValue add index observationSweDataArrayValueFk (observationId), add constraint observationSweDataArrayValueFk foreign key (observationId) references observation (observationId);
diff --git a/misc/db/MySQL/series/MySQL_update_401_to_402.sql b/misc/db/MySQL/series/MySQL_update_401_to_402.sql
new file mode 100644
index 0000000000..db9ab7f370
--- /dev/null
+++ b/misc/db/MySQL/series/MySQL_update_401_to_402.sql
@@ -0,0 +1,9 @@
+ALTER TABLE series ADD COLUMN firstTimeStamp datetime;
+ALTER TABLE series ADD COLUMN lastTimeStamp datetime;
+ALTER TABLE series ADD COLUMN firstNumericValue decimal(19,2);
+ALTER TABLE series ADD COLUMN lastNumericValue decimal(19,2);
+ALTER TABLE series ADD COLUMN unitId bigint;
+
+alter table series add constraint seriesUnitFk foreign key (unitId) references unit;
+
+ALTER TABLE `procedure` ADD COLUMN referenceFlag char(1) default 'F';
\ No newline at end of file
diff --git a/misc/db/Oracle/series/Oracle_series_create_script.sql b/misc/db/Oracle/series/Oracle_series_create_script.sql
index 3f1fcc6f5c..d6e1fe3231 100644
--- a/misc/db/Oracle/series/Oracle_series_create_script.sql
+++ b/misc/db/Oracle/series/Oracle_series_create_script.sql
@@ -48,14 +48,14 @@ create table offeringAllowedFeatureType (offeringId number(19,0) not null, featu
create table offeringAllowedObservationType (offeringId number(19,0) not null, observationTypeId number(19,0) not null, primary key (offeringId, observationTypeId));
create table offeringHasRelatedFeature (relatedFeatureId number(19,0) not null, offeringId number(19,0) not null, primary key (offeringId, relatedFeatureId));
create table parameter (parameterId number(19,0) not null, observationId number(19,0) not null, definition varchar2(255 char) not null, title varchar2(255 char), value blob not null, primary key (parameterId));
-create table procedure (procedureId number(19,0) not null, hibernateDiscriminator char(1 char) not null, procedureDescriptionFormatId number(19,0) not null, identifier varchar2(255 char) not null unique, deleted char(1 char) default 'F' not null check (deleted in ('T','F')), descriptionFile clob, disabled char(1 char) default 'F' not null check (disabled in ('T','F'), primary key (procedureId));
+create table procedure (procedureId number(19,0) not null, hibernateDiscriminator char(1 char) not null, procedureDescriptionFormatId number(19,0) not null, identifier varchar2(255 char) not null unique, deleted char(1 char) default 'F' not null check (deleted in ('T','F')), descriptionFile clob, disabled char(1 char) default 'F' not null check (disabled in ('T','F'), referenceFlag char(1 char) default 'F' check (referenceFlag in ('T','F')), primary key (procedureId));
create table procedureDescriptionFormat (procedureDescriptionFormatId number(19,0) not null, procedureDescriptionFormat varchar2(255 char) not null, primary key (procedureDescriptionFormatId));
create table relatedFeature (relatedFeatureId number(19,0) not null, featureOfInterestId number(19,0) not null, primary key (relatedFeatureId));
create table relatedFeatureHasRole (relatedFeatureId number(19,0) not null, relatedFeatureRoleId number(19,0) not null, primary key (relatedFeatureId, relatedFeatureRoleId));
create table relatedFeatureRole (relatedFeatureRoleId number(19,0) not null, relatedFeatureRole varchar2(255 char) not null unique, primary key (relatedFeatureRoleId));
create table resultTemplate (resultTemplateId number(19,0) not null, offeringId number(19,0) not null, observablePropertyId number(19,0) not null, procedureId number(19,0) not null, featureOfInterestId number(19,0) not null, identifier varchar2(255 char) not null, resultStructure clob not null, resultEncoding clob not null, primary key (resultTemplateId));
create table sensorSystem (parentSensorId number(19,0) not null, childSensorId number(19,0) not null, primary key (childSensorId, parentSensorId));
-create table series (seriesId number(19,0) not null, featureOfInterestId number(19,0) not null, observablePropertyId number(19,0) not null, procedureId number(19,0) not null, deleted char(1 char) default 'F' not null check (deleted in ('T','F')), primary key (seriesId), unique (featureOfInterestId, observablePropertyId, procedureId));
+create table series (seriesId number(19,0) not null, featureOfInterestId number(19,0) not null, observablePropertyId number(19,0) not null, procedureId number(19,0) not null, deleted char(1 char) default 'F' not null check (deleted in ('T','F')), firstTimeStamp timestamp, lastTimeStamp timestamp, firstNumericValue number(19,2), lastNumericValue number(19,2), unitId number(19,0), primary key (seriesId), unique (featureOfInterestId, observablePropertyId, procedureId));
create table spatialFilteringProfile (spatialFilteringProfileId number(19,0) not null, observation number(19,0) not null, definition varchar2(255 char) not null, title varchar2(255 char), geom SDO_GEOMETRY not null, primary key (spatialFilteringProfileId));
create table sweDataArrayValue (observationId number(19,0) not null, value clob, primary key (observationId));
create table textValue (observationId number(19,0) not null, value clob, primary key (observationId));
@@ -119,6 +119,7 @@ create index seriesProcedureIdx on series (procedureId);
alter table series add constraint seriesFeatureFk foreign key (featureOfInterestId) references featureOfInterest;
alter table series add constraint seriesObPropFk foreign key (observablePropertyId) references observableProperty;
alter table series add constraint seriesProcedureFk foreign key (procedureId) references procedure;
+alter table series add constraint seriesUnitFk foreign key (unitId) references unit;
create index sfpObservationIdx on spatialFilteringProfile (observation);
alter table spatialFilteringProfile add constraint sfpObservationFK foreign key (observation) references observation;
alter table sweDataArrayValue add constraint observationSweDataArrayValueFk foreign key (observationId) references observation;
diff --git a/misc/db/Oracle/series/Oracle_update_401_to_402.sql b/misc/db/Oracle/series/Oracle_update_401_to_402.sql
new file mode 100644
index 0000000000..1c6f237003
--- /dev/null
+++ b/misc/db/Oracle/series/Oracle_update_401_to_402.sql
@@ -0,0 +1,9 @@
+ALTER TABLE series ADD firstTimeStamp timestamp;
+ALTER TABLE series ADD lastTimeStamp timestamp;
+ALTER TABLE series ADD firstNumericValue number(19,2);
+ALTER TABLE series ADD lastNumericValue number(19,2);
+ALTER TABLE series ADD unitId number(19,0);
+
+alter table series add constraint seriesUnitFk foreign key (unitId) references unit;
+
+ALTER TABLE procedure ADD referenceFlag char(1 char) default 'F' check (referenceFlag in ('T','F'));
\ No newline at end of file
diff --git a/misc/db/PostgreSQL/series/PG_series_script_20_create.sql b/misc/db/PostgreSQL/series/PG_series_script_20_create.sql
index 24d51e64ae..db7c792533 100644
--- a/misc/db/PostgreSQL/series/PG_series_script_20_create.sql
+++ b/misc/db/PostgreSQL/series/PG_series_script_20_create.sql
@@ -48,14 +48,14 @@ create table offeringAllowedFeatureType (offeringId int8 not null, featureOfInte
create table offeringAllowedObservationType (offeringId int8 not null, observationTypeId int8 not null, primary key (offeringId, observationTypeId));
create table offeringHasRelatedFeature (relatedFeatureId int8 not null, offeringId int8 not null, primary key (offeringId, relatedFeatureId));
create table parameter (parameterId int8 not null, observationId int8 not null, definition varchar(255) not null, title varchar(255), value oid not null, primary key (parameterId));
-create table procedure (procedureId int8 not null, hibernateDiscriminator char(1) not null, procedureDescriptionFormatId int8 not null, identifier varchar(255) not null unique, deleted char(1) default 'F' not null check (deleted in ('T','F')), descriptionFile text, disabled char(1) default 'F' not null check (disabled in ('T','F')), primary key (procedureId));
+create table procedure (procedureId int8 not null, hibernateDiscriminator char(1) not null, procedureDescriptionFormatId int8 not null, identifier varchar(255) not null unique, deleted char(1) default 'F' not null check (deleted in ('T','F')), descriptionFile text, referenceFlag char(1) default 'F' check (referenceFlag in ('T','F')), deleted char(1) default 'F' check (deleted in ('T','F')), primary key (procedureId));
create table procedureDescriptionFormat (procedureDescriptionFormatId int8 not null, procedureDescriptionFormat varchar(255) not null, primary key (procedureDescriptionFormatId));
create table relatedFeature (relatedFeatureId int8 not null, featureOfInterestId int8 not null, primary key (relatedFeatureId));
create table relatedFeatureHasRole (relatedFeatureId int8 not null, relatedFeatureRoleId int8 not null, primary key (relatedFeatureId, relatedFeatureRoleId));
create table relatedFeatureRole (relatedFeatureRoleId int8 not null, relatedFeatureRole varchar(255) not null unique, primary key (relatedFeatureRoleId));
create table resultTemplate (resultTemplateId int8 not null, offeringId int8 not null, observablePropertyId int8 not null, procedureId int8 not null, featureOfInterestId int8 not null, identifier varchar(255) not null, resultStructure text not null, resultEncoding text not null, primary key (resultTemplateId));
create table sensorSystem (parentSensorId int8 not null, childSensorId int8 not null, primary key (childSensorId, parentSensorId));
-create table series (seriesId int8 not null, featureOfInterestId int8 not null, observablePropertyId int8 not null, procedureId int8 not null, deleted char(1) default 'F' not null check (deleted in ('T','F')), primary key (seriesId), unique (featureOfInterestId, observablePropertyId, procedureId));
+create table series (seriesId int8 not null, featureOfInterestId int8 not null, observablePropertyId int8 not null, procedureId int8 not null, deleted char(1) default 'F' not null check (deleted in ('T','F')), firstTimeStamp timestamp, lastTimeStamp timestamp, firstNumericValue numeric(19, 2), lastNumericValue numeric(19, 2), unitId int8, primary key (seriesId), unique (featureOfInterestId, observablePropertyId, procedureId));
create table spatialFilteringProfile (spatialFilteringProfileId int8 not null, observation int8 not null, definition varchar(255) not null, title varchar(255), geom GEOMETRY not null, primary key (spatialFilteringProfileId));
create table sweDataArrayValue (observationId int8 not null, value text, primary key (observationId));
create table textValue (observationId int8 not null, value text, primary key (observationId));
@@ -119,6 +119,7 @@ create index seriesProcedureIdx on series (procedureId);
alter table series add constraint seriesFeatureFk foreign key (featureOfInterestId) references featureOfInterest;
alter table series add constraint seriesObPropFk foreign key (observablePropertyId) references observableProperty;
alter table series add constraint seriesProcedureFk foreign key (procedureId) references procedure;
+alter table series add constraint seriesUnitFk foreign key (unitId) references unit;
create index sfpObservationIdx on spatialFilteringProfile (observation);
alter table spatialFilteringProfile add constraint sfpObservationFK foreign key (observation) references observation;
alter table sweDataArrayValue add constraint observationSweDataArrayValueFk foreign key (observationId) references observation;
diff --git a/misc/db/PostgreSQL/series/PG_update_401_to_402.sql b/misc/db/PostgreSQL/series/PG_update_401_to_402.sql
new file mode 100644
index 0000000000..caabc3f073
--- /dev/null
+++ b/misc/db/PostgreSQL/series/PG_update_401_to_402.sql
@@ -0,0 +1,9 @@
+ALTER TABLE series ADD COLUMN firstTimeStamp timestamp;
+ALTER TABLE series ADD COLUMN lastTimeStamp timestamp;
+ALTER TABLE series ADD COLUMN firstNumericValue numeric(19, 2);
+ALTER TABLE series ADD COLUMN lastNumericValue numeric(19, 2);
+ALTER TABLE series ADD COLUMN unitId int8;
+
+alter table series add constraint seriesUnitFk foreign key (unitId) references unit;
+
+ALTER TABLE procedure ADD COLUMN referenceFlag char(1) default 'F' check (referenceFlag in ('T','F'));
\ No newline at end of file
From 44d2c5c865d4f60382c729749208b41474fd37e2 Mon Sep 17 00:00:00 2001
From: CarstenHollmann
Date: Fri, 28 Mar 2014 11:26:35 +0100
Subject: [PATCH 017/229] Add update SQL scripts from 4.0.1 to 4.02
---
.../MySQL/series/MySQL_update_401_to_402.sql | 29 +++++++++++++++++++
.../series/Oracle_update_401_to_402.sql | 29 +++++++++++++++++++
.../series/PG_update_401_to_402.sql | 29 +++++++++++++++++++
3 files changed, 87 insertions(+)
diff --git a/misc/db/MySQL/series/MySQL_update_401_to_402.sql b/misc/db/MySQL/series/MySQL_update_401_to_402.sql
index db9ab7f370..bbd1a5ee19 100644
--- a/misc/db/MySQL/series/MySQL_update_401_to_402.sql
+++ b/misc/db/MySQL/series/MySQL_update_401_to_402.sql
@@ -1,3 +1,32 @@
+--
+-- Copyright (C) 2012-2014 52°North Initiative for Geospatial Open Source
+-- Software GmbH
+--
+-- This program is free software; you can redistribute it and/or modify it
+-- under the terms of the GNU General Public License version 2 as published
+-- by the Free Software Foundation.
+--
+-- If the program is linked with libraries which are licensed under one of
+-- the following licenses, the combination of the program with the linked
+-- library is not considered a "derivative work" of the program:
+--
+-- - Apache License, version 2.0
+-- - Apache Software License, version 1.0
+-- - GNU Lesser General Public License, version 3
+-- - Mozilla Public License, versions 1.0, 1.1 and 2.0
+-- - Common Development and Distribution License (CDDL), version 1.0
+--
+-- Therefore the distribution of the program linked with libraries licensed
+-- under the aforementioned licenses, is permitted by the copyright holders
+-- if the distribution is compliant with both the GNU General Public
+-- License version 2 and the aforementioned licenses.
+--
+-- This program is distributed in the hope that it will be useful, but
+-- WITHOUT ANY WARRANTY; without even the implied warranty of
+-- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General
+-- Public License for more details.
+--
+
ALTER TABLE series ADD COLUMN firstTimeStamp datetime;
ALTER TABLE series ADD COLUMN lastTimeStamp datetime;
ALTER TABLE series ADD COLUMN firstNumericValue decimal(19,2);
diff --git a/misc/db/Oracle/series/Oracle_update_401_to_402.sql b/misc/db/Oracle/series/Oracle_update_401_to_402.sql
index 1c6f237003..197284811c 100644
--- a/misc/db/Oracle/series/Oracle_update_401_to_402.sql
+++ b/misc/db/Oracle/series/Oracle_update_401_to_402.sql
@@ -1,3 +1,32 @@
+--
+-- Copyright (C) 2012-2014 52°North Initiative for Geospatial Open Source
+-- Software GmbH
+--
+-- This program is free software; you can redistribute it and/or modify it
+-- under the terms of the GNU General Public License version 2 as published
+-- by the Free Software Foundation.
+--
+-- If the program is linked with libraries which are licensed under one of
+-- the following licenses, the combination of the program with the linked
+-- library is not considered a "derivative work" of the program:
+--
+-- - Apache License, version 2.0
+-- - Apache Software License, version 1.0
+-- - GNU Lesser General Public License, version 3
+-- - Mozilla Public License, versions 1.0, 1.1 and 2.0
+-- - Common Development and Distribution License (CDDL), version 1.0
+--
+-- Therefore the distribution of the program linked with libraries licensed
+-- under the aforementioned licenses, is permitted by the copyright holders
+-- if the distribution is compliant with both the GNU General Public
+-- License version 2 and the aforementioned licenses.
+--
+-- This program is distributed in the hope that it will be useful, but
+-- WITHOUT ANY WARRANTY; without even the implied warranty of
+-- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General
+-- Public License for more details.
+--
+
ALTER TABLE series ADD firstTimeStamp timestamp;
ALTER TABLE series ADD lastTimeStamp timestamp;
ALTER TABLE series ADD firstNumericValue number(19,2);
diff --git a/misc/db/PostgreSQL/series/PG_update_401_to_402.sql b/misc/db/PostgreSQL/series/PG_update_401_to_402.sql
index caabc3f073..40841d832c 100644
--- a/misc/db/PostgreSQL/series/PG_update_401_to_402.sql
+++ b/misc/db/PostgreSQL/series/PG_update_401_to_402.sql
@@ -1,3 +1,32 @@
+--
+-- Copyright (C) 2012-2014 52°North Initiative for Geospatial Open Source
+-- Software GmbH
+--
+-- This program is free software; you can redistribute it and/or modify it
+-- under the terms of the GNU General Public License version 2 as published
+-- by the Free Software Foundation.
+--
+-- If the program is linked with libraries which are licensed under one of
+-- the following licenses, the combination of the program with the linked
+-- library is not considered a "derivative work" of the program:
+--
+-- - Apache License, version 2.0
+-- - Apache Software License, version 1.0
+-- - GNU Lesser General Public License, version 3
+-- - Mozilla Public License, versions 1.0, 1.1 and 2.0
+-- - Common Development and Distribution License (CDDL), version 1.0
+--
+-- Therefore the distribution of the program linked with libraries licensed
+-- under the aforementioned licenses, is permitted by the copyright holders
+-- if the distribution is compliant with both the GNU General Public
+-- License version 2 and the aforementioned licenses.
+--
+-- This program is distributed in the hope that it will be useful, but
+-- WITHOUT ANY WARRANTY; without even the implied warranty of
+-- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General
+-- Public License for more details.
+--
+
ALTER TABLE series ADD COLUMN firstTimeStamp timestamp;
ALTER TABLE series ADD COLUMN lastTimeStamp timestamp;
ALTER TABLE series ADD COLUMN firstNumericValue numeric(19, 2);
From ca446ebf0b851be419e390dce1d602d5cf8bb3c2 Mon Sep 17 00:00:00 2001
From: CarstenHollmann
Date: Fri, 28 Mar 2014 11:27:21 +0100
Subject: [PATCH 018/229] Fix wrong column name in check attribute
---
.../mappings/src/main/resources/mapping/core/Procedure.hbm.xml | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/hibernate/mappings/src/main/resources/mapping/core/Procedure.hbm.xml b/hibernate/mappings/src/main/resources/mapping/core/Procedure.hbm.xml
index 26da4418ac..3eb9b1be0b 100644
--- a/hibernate/mappings/src/main/resources/mapping/core/Procedure.hbm.xml
+++ b/hibernate/mappings/src/main/resources/mapping/core/Procedure.hbm.xml
@@ -49,7 +49,7 @@
-->
-
+
From cb02d1afc6f0fec54f04d7661f8509854ce229db Mon Sep 17 00:00:00 2001
From: CarstenHollmann
Date: Fri, 28 Mar 2014 12:02:08 +0100
Subject: [PATCH 019/229] Comment oracle dependency because build fails if the
oracle jdbc is not available
---
hibernate/mappings/pom.xml | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/hibernate/mappings/pom.xml b/hibernate/mappings/pom.xml
index a951f6fcef..1488a1e314 100644
--- a/hibernate/mappings/pom.xml
+++ b/hibernate/mappings/pom.xml
@@ -35,14 +35,14 @@
mysql
mysql-connector-java
-
+
From 0209a6a1893ebd769a7e69be7ed836665bb625ae Mon Sep 17 00:00:00 2001
From: Christian Autermann
Date: Fri, 28 Mar 2014 13:49:45 +0100
Subject: [PATCH 020/229] removed repository declaration in sub-pom
---
bindings/rest/pom.xml | 24 ------------------------
1 file changed, 24 deletions(-)
diff --git a/bindings/rest/pom.xml b/bindings/rest/pom.xml
index 327947a7a4..0c9568ed9e 100644
--- a/bindings/rest/pom.xml
+++ b/bindings/rest/pom.xml
@@ -80,30 +80,6 @@
-
-
- n52-releases
- 52n Releases
- http://52north.org/maven/repo/releases/
-
- true
-
-
- false
-
-
-
- n52s
- 52n Snapshots
- http://52north.org/maven/repo/snapshots/
-
- false
-
-
- true
-
-
-
release
From 46233a89105989265e822970f969c1b4aa4fd71d Mon Sep 17 00:00:00 2001
From: CarstenHollmann
Date: Mon, 31 Mar 2014 11:16:02 +0200
Subject: [PATCH 021/229] Fix duplicate column definition.
---
misc/db/PostgreSQL/series/PG_series_script_20_create.sql | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/misc/db/PostgreSQL/series/PG_series_script_20_create.sql b/misc/db/PostgreSQL/series/PG_series_script_20_create.sql
index db7c792533..ab56669c41 100644
--- a/misc/db/PostgreSQL/series/PG_series_script_20_create.sql
+++ b/misc/db/PostgreSQL/series/PG_series_script_20_create.sql
@@ -48,7 +48,7 @@ create table offeringAllowedFeatureType (offeringId int8 not null, featureOfInte
create table offeringAllowedObservationType (offeringId int8 not null, observationTypeId int8 not null, primary key (offeringId, observationTypeId));
create table offeringHasRelatedFeature (relatedFeatureId int8 not null, offeringId int8 not null, primary key (offeringId, relatedFeatureId));
create table parameter (parameterId int8 not null, observationId int8 not null, definition varchar(255) not null, title varchar(255), value oid not null, primary key (parameterId));
-create table procedure (procedureId int8 not null, hibernateDiscriminator char(1) not null, procedureDescriptionFormatId int8 not null, identifier varchar(255) not null unique, deleted char(1) default 'F' not null check (deleted in ('T','F')), descriptionFile text, referenceFlag char(1) default 'F' check (referenceFlag in ('T','F')), deleted char(1) default 'F' check (deleted in ('T','F')), primary key (procedureId));
+create table procedure (procedureId int8 not null, hibernateDiscriminator char(1) not null, procedureDescriptionFormatId int8 not null, identifier varchar(255) not null unique, deleted char(1) default 'F' not null check (deleted in ('T','F')), descriptionFile text, referenceFlag char(1) default 'F' check (referenceFlag in ('T','F')), disabled char(1) default 'F' check (disabled in ('T','F')), primary key (procedureId));
create table procedureDescriptionFormat (procedureDescriptionFormatId int8 not null, procedureDescriptionFormat varchar(255) not null, primary key (procedureDescriptionFormatId));
create table relatedFeature (relatedFeatureId int8 not null, featureOfInterestId int8 not null, primary key (relatedFeatureId));
create table relatedFeatureHasRole (relatedFeatureId int8 not null, relatedFeatureRoleId int8 not null, primary key (relatedFeatureId, relatedFeatureRoleId));
From 69f565585e7af4c0bb3602ef6836025851f7ecde Mon Sep 17 00:00:00 2001
From: Christian Autermann
Date: Mon, 31 Mar 2014 13:18:58 +0200
Subject: [PATCH 022/229] fixed Java 8 generics issue
---
.../sos/util/AbstractDelegatingMultiMap.java | 11 ++---
.../util/AbstractSynchronizedMultiMap.java | 10 ++---
.../main/java/org/n52/sos/util/MultiMap.java | 43 ++++++++++---------
3 files changed, 33 insertions(+), 31 deletions(-)
diff --git a/core/api/src/main/java/org/n52/sos/util/AbstractDelegatingMultiMap.java b/core/api/src/main/java/org/n52/sos/util/AbstractDelegatingMultiMap.java
index 07826785eb..44845cae97 100644
--- a/core/api/src/main/java/org/n52/sos/util/AbstractDelegatingMultiMap.java
+++ b/core/api/src/main/java/org/n52/sos/util/AbstractDelegatingMultiMap.java
@@ -34,14 +34,14 @@
/**
* Abstract implementation that delegates to a existing map implementation.
- *
+ *
* @param
* the key type
* @param
* the value type
* @param
* the collection type
- *
+ *
* @author Christian Autermann
* @since 4.0.0
*/
@@ -95,10 +95,11 @@ public C remove(Object key) {
}
@Override
- public boolean remove(K k, V v) {
- C c = get(k);
+ @SuppressWarnings("unchecked")
+ public boolean remove(Object k, Object v) {
+ C c = get((K) k);
if (c != null) {
- return c.remove(v);
+ return c.remove((V) v);
}
return false;
}
diff --git a/core/api/src/main/java/org/n52/sos/util/AbstractSynchronizedMultiMap.java b/core/api/src/main/java/org/n52/sos/util/AbstractSynchronizedMultiMap.java
index 2aa0811e12..543a4fddec 100644
--- a/core/api/src/main/java/org/n52/sos/util/AbstractSynchronizedMultiMap.java
+++ b/core/api/src/main/java/org/n52/sos/util/AbstractSynchronizedMultiMap.java
@@ -39,18 +39,18 @@
/**
* Abstract implementation that delegates to synchronized {@link HashMap}
- *
+ *
* @param
* the key type
* @param
* the value type
* @param
* the collection type
- *
+ *
* @see Collections#synchronizedMap(java.util.Map)
* @author Christian Autermann
* @since 4.0.0
- *
+ *
*/
public abstract class AbstractSynchronizedMultiMap> extends
AbstractDelegatingMultiMap {
@@ -62,7 +62,7 @@ public abstract class AbstractSynchronizedMultiMap
private final Lock write = lock.writeLock();
- private Map delegate;
+ private final Map delegate;
public AbstractSynchronizedMultiMap(Map extends K, ? extends C> m) {
this.delegate = new HashMap(m);
@@ -166,7 +166,7 @@ public C remove(Object key) {
}
@Override
- public boolean remove(K k, V v) {
+ public boolean remove(Object k, Object v) {
write.lock();
try {
return super.remove(k, v);
diff --git a/core/api/src/main/java/org/n52/sos/util/MultiMap.java b/core/api/src/main/java/org/n52/sos/util/MultiMap.java
index 50e6071a97..3f63e4f321 100644
--- a/core/api/src/main/java/org/n52/sos/util/MultiMap.java
+++ b/core/api/src/main/java/org/n52/sos/util/MultiMap.java
@@ -33,27 +33,27 @@
import java.util.Map;
/**
- *
+ *
* Map that encapsulates access to multiple values per key.
- *
+ *
* @param
* the key type
* @param
* the value type
* @param
* the collection type
- *
+ *
* @author Christian Autermann
* @since 4.0.0
- *
+ *
*/
public interface MultiMap> extends Map, Serializable {
/**
* Checks if any collection of any key contains {@code v}.
- *
+ *
* @param v
* the element to check
- *
+ *
* @return if it is contained
*/
boolean containsCollectionValue(V v);
@@ -61,12 +61,12 @@ public interface MultiMap> extends Map, Seri
/**
* Adds the specified value to the key. If the collection for the key was
* {@code null} it will be created.
- *
+ *
* @param key
* the key
* @param value
* the value
- *
+ *
* @return the collection the value was added to
*/
C add(K key, V value);
@@ -74,38 +74,39 @@ public interface MultiMap> extends Map, Seri
/**
* Adds the specified values to the key. If the collection for the key was
* {@code null} it will be created.
- *
+ *
* @param key
* the key
* @param values
* the values
- *
+ *
* @return the collection the values were added to
*/
C addAll(K key, Collection extends V> values);
/**
* Removes the value of the collection for the specified key (if it exists).
- *
+ *
* @param key
* the key
* @param value
* the value to remove
- *
+ *
* @return if the map was altered
*/
- boolean remove(K key, V value);
+ @Override
+ boolean remove(Object key, Object value);
/**
* Removes the specified value of the collection for the specified key (if
* it exists). If the collection for the key is empty after the removal the
* key is removed from the map.
- *
+ *
* @param key
* the key
* @param value
* the value
- *
+ *
* @return if the map was altered
*/
boolean removeWithKey(K key, V value);
@@ -113,12 +114,12 @@ public interface MultiMap> extends Map, Seri
/**
* Removes the values of the collection for the specified key (if it
* exists).
- *
+ *
* @param key
* the key
* @param value
* the values to remove
- *
+ *
* @return if the map was altered
*/
boolean remove(K key, Iterable value);
@@ -127,12 +128,12 @@ public interface MultiMap> extends Map, Seri
* Removes the specified values of the collection for the specified key (if
* it exists). If the collection for the key is empty after the removal the
* key is removed from the map.
- *
+ *
* @param key
* the key
* @param value
* the value
- *
+ *
* @return if the map was altered
*/
boolean removeWithKey(K key, Iterable value);
@@ -140,10 +141,10 @@ public interface MultiMap> extends Map, Seri
/**
* Checks if the specified key is contained in this map and if the
* associated collection is not empty.
- *
+ *
* @param key
* the key
- *
+ *
* @return if the key has at least one value
*/
boolean hasValues(K key);
From ef75ed8d28c2501690e0d4854664d03156850244 Mon Sep 17 00:00:00 2001
From: Christian Autermann
Date: Mon, 31 Mar 2014 13:19:12 +0200
Subject: [PATCH 023/229] LinkedSets to maintain order
---
.../org/n52/sos/ogc/sos/SosProcedureDescription.java | 10 +++++-----
1 file changed, 5 insertions(+), 5 deletions(-)
diff --git a/core/api/src/main/java/org/n52/sos/ogc/sos/SosProcedureDescription.java b/core/api/src/main/java/org/n52/sos/ogc/sos/SosProcedureDescription.java
index e1b88fe48e..8b9710269f 100644
--- a/core/api/src/main/java/org/n52/sos/ogc/sos/SosProcedureDescription.java
+++ b/core/api/src/main/java/org/n52/sos/ogc/sos/SosProcedureDescription.java
@@ -38,16 +38,16 @@
/**
* @since 4.0.0
- *
+ *
*/
public abstract class SosProcedureDescription {
private String identifier;
private String sensorDescriptionXmlString;
private String descriptionFormat;
- private final Set offerings = Sets.newHashSet();
- private final Set featuresOfInterest = Sets.newHashSet();
- private final Set parentProcedures = Sets.newHashSet();
- private final Set childProcedures = Sets.newHashSet();
+ private final Set offerings = Sets.newLinkedHashSet();
+ private final Set featuresOfInterest = Sets.newLinkedHashSet();
+ private final Set parentProcedures = Sets.newLinkedHashSet();
+ private final Set childProcedures = Sets.newLinkedHashSet();
private Time validTime;
public SosProcedureDescription setIdentifier(String identifier) {
From f28badbe23a29cb7e67a8f515b5a6320c4e792c5 Mon Sep 17 00:00:00 2001
From: Christian Autermann
Date: Mon, 31 Mar 2014 13:19:59 +0200
Subject: [PATCH 024/229] enable Java 8 on Travis
---
.travis.yml | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/.travis.yml b/.travis.yml
index c8842805b2..8d1f711630 100644
--- a/.travis.yml
+++ b/.travis.yml
@@ -5,6 +5,6 @@ jdk:
- openjdk6
- openjdk7
- oraclejdk7
-# - oraclejdk8
+ - oraclejdk8
install: true
script: mvn clean install -P develop
From 6ffd57c40d6b0c18e4bba45ff6f7b50e2de6beed Mon Sep 17 00:00:00 2001
From: Christian Autermann
Date: Mon, 31 Mar 2014 13:36:19 +0200
Subject: [PATCH 025/229] change default value for service.sosUrl to end in
/service
---
.../webapp/WEB-INF/views/admin/settings.jsp | 24 +++++++++----------
.../webapp/WEB-INF/views/install/settings.jsp | 4 ++--
2 files changed, 14 insertions(+), 14 deletions(-)
diff --git a/spring/views/src/main/webapp/WEB-INF/views/admin/settings.jsp b/spring/views/src/main/webapp/WEB-INF/views/admin/settings.jsp
index 616c5a8b07..3476021c5a 100644
--- a/spring/views/src/main/webapp/WEB-INF/views/admin/settings.jsp
+++ b/spring/views/src/main/webapp/WEB-INF/views/admin/settings.jsp
@@ -42,12 +42,12 @@
@@ -73,7 +73,7 @@
$.getJSON(' ', function(settings) {
var $container = $("#settings"),
$button = $("").attr("type", "button").addClass("btn btn-info").text("Save");
-
+
$button.click(function() {
$.post(' ', $container.serializeArray())
.fail(function(e) {
@@ -106,7 +106,7 @@
"admin_password_facade": {
"type": "string",
"title": "New Password",
- "description": "The new administrator password."
+ "description": "The new administrator password."
}
}
});
@@ -116,17 +116,17 @@
$("#service_identification .control-group:last").before("Extended Settings ");
$("#service_provider .control-group:last").before("Extended Settings ");
$("").addClass("form-actions").append($button).appendTo($container);
-
+
function setSosUrl() {
$("input[name='service.sosUrl']").val(window.location.toString()
- .replace(/admin\/settings.*/, "sos")).trigger("input");
+ .replace(/admin\/settings.*/, "service")).trigger("input");
}
setSosUrl();
-
+
$(".required").bind("keyup input change", function() {
var valid = true;
- $(".required").each(function(){
+ $(".required").each(function(){
var val = $(this).val();
return valid = (val !== null && val !== undefined && val !== "");
});
@@ -136,11 +136,11 @@
$button.attr("disabled", true);
}
});
-
+
overwriteDefaultSettings(settings);
$(".required:first").trigger("change");
-
+
$("input[name=admin_password_facade]").removeAttr("name").attr("id","admin_password_facade");
$("form#settings").append($("
").attr({ "type":"hidden", "name": "admin_password" }));
$("input#admin_password_facade").bind('focus', function() {
@@ -168,8 +168,8 @@
if (key === "service.sosUrl") {
setSosUrl();
} else {
- setSetting(key, (s[key]["default"] !== undefined
- && s[key]["default"] !== null) ? s[key]["default"] : "", settings);
+ setSetting(key, (s[key]["default"] !== undefined
+ && s[key]["default"] !== null) ? s[key]["default"] : "", settings);
}
}
$(".required").trigger("input").trigger("change");
diff --git a/spring/views/src/main/webapp/WEB-INF/views/install/settings.jsp b/spring/views/src/main/webapp/WEB-INF/views/install/settings.jsp
index f9315fa1d2..d755cbc261 100644
--- a/spring/views/src/main/webapp/WEB-INF/views/install/settings.jsp
+++ b/spring/views/src/main/webapp/WEB-INF/views/install/settings.jsp
@@ -73,13 +73,13 @@
$("#service_identification .control-group:last").before("
Extended Settings ");
$("#service_provider .control-group:last").before("
Extended Settings ");
$("input[name='service.sosUrl']").val(window.location.toString()
- .replace(/install\/settings.*/, "sos")).trigger("input");
+ .replace(/install\/settings.*/, "service")).trigger("input");
overwriteDefaultSettings(settings);
$(".required").bind("keyup input change", function() {
var valid = true;
- $(".required").each(function(){
+ $(".required").each(function(){
var val = $(this).val();
return valid = (val !== null && val !== undefined && val !== "");
});
From 83384204165a589deb617ec2e31968f1b31a1736 Mon Sep 17 00:00:00 2001
From: Christian Autermann
Date: Mon, 31 Mar 2014 13:37:30 +0200
Subject: [PATCH 026/229] added NetBeans configurations to .gitignore
---
.gitignore | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/.gitignore b/.gitignore
index 387cacfd0e..ea93477d50 100644
--- a/.gitignore
+++ b/.gitignore
@@ -1,4 +1,5 @@
target
.classpath
.project
-.settings
\ No newline at end of file
+.settings
+nb-*.xml
From af12fbaa8948671c1f5931e2a4ab94feba33aa85 Mon Sep 17 00:00:00 2001
From: Christian Autermann
Date: Mon, 31 Mar 2014 14:02:28 +0200
Subject: [PATCH 027/229] adjusted client to use /service endpoint
---
.../src/main/webapp/WEB-INF/views/client.jsp | 59 +-
.../views/src/main/webapp/static/js/client.js | 16 +-
.../webapp/static/conf/client-config.json | 720 +++++++++---------
3 files changed, 406 insertions(+), 389 deletions(-)
diff --git a/spring/views/src/main/webapp/WEB-INF/views/client.jsp b/spring/views/src/main/webapp/WEB-INF/views/client.jsp
index 4ec5f483f1..4659a5fd9d 100644
--- a/spring/views/src/main/webapp/WEB-INF/views/client.jsp
+++ b/spring/views/src/main/webapp/WEB-INF/views/client.jsp
@@ -137,29 +137,46 @@
r = requests[s][v][b][o][t];
r.service = s;
r.version = v;
- r.binding = b;
r.operation = o;
r.title = t;
r.headers = {};
- if (b === "/kvp") {
- r.method = "GET";
- r.headers["Accept"] = "application/xml";
- } else if (b === "/pox") {
- r.method = "POST";
- r.headers["Accept"] = "application/xml";
- r.headers["Content-Type"] = "application/xml";
- } else if (b === "/soap") {
- r.method = "POST";
- r.headers["Accept"] = "application/soap+xml";
- r.headers["Content-Type"] = "application/soap+xml";
- } else if (b === "/json") {
- r.method = "POST";
- r.headers["Accept"] = "application/json";
- r.headers["Content-Type"] = "application/json";
- } else {
- throw new Error("Unsupported binding" + b);
- }
- transformed.push(r);
+ switch (b) {
+ case "KVP":
+: case "/kvp":
+ r.method = "GET";
+ r.headers["Accept"] = "application/xml";
+ r.binding = "KVP";
+ break;
+ case "POX":
+ case "/pox":
+ r.method = "POST";
+ r.headers["Accept"] = "application/xml";
+ r.headers["Content-Type"] = "application/xml";
+ r.binding = "POX"
+ break;
+ case "SOAP":
+ case "/soap":
+ r.method = "POST";
+ r.headers["Accept"] = "application/soap+xml";
+ r.headers["Content-Type"] = "application/soap+xml";
+ r.binding = "SOAP":
+ break;
+ case "JSON":
+ case "/json":
+ r.method = "POST";
+ r.headers["Accept"] = "application/json";
+ r.headers["Content-Type"] = "application/json";
+ r.binding = "JSON";
+ break;
+ default:
+ if (console && console.log) {
+ console.log("Unsupported binding" + b);
+ }
+ break;
+ }
+ if (r.binding) {
+ transformed.push(r);
+ }
}
}
}
@@ -174,7 +191,7 @@
}
config.sosUrl = document.location.protocol + "//"
- + document.location.host + " ";
+ + document.location.host + " ";
config.availableOperations = availableOperations;
new Client(config);
})
diff --git a/spring/views/src/main/webapp/static/js/client.js b/spring/views/src/main/webapp/static/js/client.js
index 9c510df1f8..6fcfc2a526 100644
--- a/spring/views/src/main/webapp/static/js/client.js
+++ b/spring/views/src/main/webapp/static/js/client.js
@@ -182,7 +182,7 @@ $(function() {
this.changeSyntax("application/xml");
}
},
- createFilters: function(filters) {
+ createFilters: function() {
var self = this;
this.filters = [];
for (var i = 0; i < arguments.length; ++i) {
@@ -205,7 +205,7 @@ $(function() {
this[jq] = $(id).on("change", (function(filter) {
return function() {
self.onFilterChange.apply(self, [filter]);
- }
+ };
})(e));
// append valid values
this[jq].append($("").attr("value", "any")
@@ -411,7 +411,7 @@ $(function() {
}
},
updateExamples: function() {
- var def, text, id, current, example, examples = {};
+ var def, text, id, example, examples = {};
// apply current filters
outer: for (var i = 0; i < this.requests.length; ++i) {
@@ -472,7 +472,7 @@ $(function() {
this.$method.val(definition.method);
- var url = this.sosUrl + definition.binding;
+ var url = this.sosUrl;
if (definition.param) {
if (!url.endsWith("?")) {
url += "?";
@@ -497,11 +497,11 @@ $(function() {
this.$contentType.val("");
this.$accept.val("");
}
- this.$contentType.trigger("change");
+ this.$contentType.trigger("change");
this.$accept.trigger("change");
if (definition.request) {
- if (typeof(definition.request) == "string") {
+ if (typeof(definition.request) === "string") {
if (definition.request.endsWith("xml")) {
$.get(definition.request, function(data) {
var xml = self.xml2string(data);
@@ -514,8 +514,8 @@ $(function() {
} else {
this.editor.setValue(definition.request);
}
- } else if (typeof(definition.request) == "object") {
- this.editor.setValue(JSON.stringify(definition.request, undefined, 2))
+ } else if (typeof(definition.request) === "object") {
+ this.editor.setValue(JSON.stringify(definition.request, undefined, 2));
}
} else {
this.editor.setValue("");
diff --git a/webapp/src/main/webapp/static/conf/client-config.json b/webapp/src/main/webapp/static/conf/client-config.json
index 4d5395a460..8f2e30bd46 100644
--- a/webapp/src/main/webapp/static/conf/client-config.json
+++ b/webapp/src/main/webapp/static/conf/client-config.json
@@ -10,7 +10,7 @@
},
"service":"SOS",
"version":"1.0.0",
- "binding":"/kvp",
+ "binding": "KVP",
"operation":"DescribeSensor",
"headers":{
"Accept":"application/xml"
@@ -25,7 +25,7 @@
},
"service":"SOS",
"version":"1.0.0",
- "binding":"/kvp",
+ "binding": "KVP",
"operation":"GetCapabilities",
"headers":{
"Accept":"application/xml"
@@ -46,7 +46,7 @@
},
"service":"SOS",
"version":"1.0.0",
- "binding":"/kvp",
+ "binding": "KVP",
"operation":"GetObservation",
"headers":{
"Accept":"application/xml"
@@ -62,7 +62,7 @@
},
"service":"SOS",
"version":"2.0.0",
- "binding":"/kvp",
+ "binding": "KVP",
"operation":"DeleteObservation",
"headers":{
"Accept":"application/xml"
@@ -78,7 +78,7 @@
},
"service":"SOS",
"version":"2.0.0",
- "binding":"/kvp",
+ "binding": "KVP",
"operation":"DeleteSensor",
"headers":{
"Accept":"application/xml"
@@ -95,7 +95,7 @@
},
"service":"SOS",
"version":"2.0.0",
- "binding":"/kvp",
+ "binding": "KVP",
"operation":"DescribeSensor",
"headers":{
"Accept":"application/xml"
@@ -109,7 +109,7 @@
},
"service":"SOS",
"version":"2.0.0",
- "binding":"/kvp",
+ "binding": "KVP",
"operation":"GetCapabilities",
"title":"minimal",
"headers":{
@@ -125,7 +125,7 @@
},
"service":"SOS",
"version":"2.0.0",
- "binding":"/kvp",
+ "binding": "KVP",
"operation":"GetCapabilities",
"title":"only Contents section",
"headers":{
@@ -141,7 +141,7 @@
},
"service":"SOS",
"version":"2.0.0",
- "binding":"/kvp",
+ "binding": "KVP",
"operation":"GetCapabilities",
"title":"only OperationsMetadata section",
"headers":{
@@ -157,7 +157,7 @@
},
"service":"SOS",
"version":"2.0.0",
- "binding":"/kvp",
+ "binding": "KVP",
"operation":"GetCapabilities",
"title":"with AcceptVersions=2.0.0",
"headers":{
@@ -183,11 +183,11 @@
"http://www.52north.org/test/featureOfInterest/3",
"http://www.52north.org/test/featureOfInterest/4"
]
-
+
},
"service":"SOS",
"version":"2.0.0",
- "binding":"/kvp",
+ "binding": "KVP",
"operation":"GetDataAvailability",
"headers":{
"Accept":"application/xml"
@@ -202,7 +202,7 @@
},
"service":"SOS",
"version":"2.0.0",
- "binding":"/kvp",
+ "binding": "KVP",
"operation":"GetDataAvailability",
"title":"minimal",
"headers":{
@@ -219,7 +219,7 @@
},
"service":"SOS",
"version":"2.0.0",
- "binding":"/kvp",
+ "binding": "KVP",
"operation":"GetFeatureOfInterest",
"title":"featureOfInterest",
"headers":{
@@ -236,11 +236,11 @@
"http://www.52north.org/test/featureOfInterest/1",
"http://www.52north.org/test/featureOfInterest/2"
]
-
+
},
"service":"SOS",
"version":"2.0.0",
- "binding":"/kvp",
+ "binding": "KVP",
"operation":"GetFeatureOfInterest",
"title":"featureOfInterests",
"headers":{
@@ -256,7 +256,7 @@
},
"service":"SOS",
"version":"2.0.0",
- "binding":"/kvp",
+ "binding": "KVP",
"operation":"GetFeatureOfInterest",
"title":"minimal",
"headers":{
@@ -273,11 +273,11 @@
"http://www.52north.org/test/observableProperty/1",
"http://www.52north.org/test/observableProperty/2"
]
-
+
},
"service":"SOS",
"version":"2.0.0",
- "binding":"/kvp",
+ "binding": "KVP",
"operation":"GetFeatureOfInterest",
"title":"observableProperties",
"headers":{
@@ -294,7 +294,7 @@
},
"service":"SOS",
"version":"2.0.0",
- "binding":"/kvp",
+ "binding": "KVP",
"operation":"GetFeatureOfInterest",
"title":"observableProperty",
"headers":{
@@ -311,7 +311,7 @@
},
"service":"SOS",
"version":"2.0.0",
- "binding":"/kvp",
+ "binding": "KVP",
"operation":"GetFeatureOfInterest",
"title":"procedure",
"headers":{
@@ -328,11 +328,11 @@
"http://www.52north.org/test/procedure/1",
"http://www.52north.org/test/procedure/2"
]
-
+
},
"service":"SOS",
"version":"2.0.0",
- "binding":"/kvp",
+ "binding": "KVP",
"operation":"GetFeatureOfInterest",
"title":"procedures",
"headers":{
@@ -353,7 +353,7 @@
},
"service":"SOS",
"version":"2.0.0",
- "binding":"/kvp",
+ "binding": "KVP",
"operation":"GetFeatureOfInterest",
"title":"spatial filter, URL",
"headers":{
@@ -374,7 +374,7 @@
},
"service":"SOS",
"version":"2.0.0",
- "binding":"/kvp",
+ "binding": "KVP",
"operation":"GetFeatureOfInterest",
"title":"spatial filter, URN",
"headers":{
@@ -391,11 +391,11 @@
"procedure":[
"http://www.52north.org/test/procedure/8"
]
-
+
},
"service":"SOS",
"version":"2.0.0",
- "binding":"/kvp",
+ "binding": "KVP",
"operation":"GetObservation",
"title":"Extension 'MergeObservationsIntoDataArray'",
"headers":{
@@ -412,7 +412,7 @@
},
"service":"SOS",
"version":"2.0.0",
- "binding":"/kvp",
+ "binding": "KVP",
"operation":"GetObservation",
"title":"featureOfInterest",
"headers":{
@@ -429,11 +429,11 @@
"http://www.52north.org/test/featureOfInterest/1",
"http://www.52north.org/test/featureOfInterest/3"
]
-
+
},
"service":"SOS",
"version":"2.0.0",
- "binding":"/kvp",
+ "binding": "KVP",
"operation":"GetObservation",
"title":"featureOfInterests",
"headers":{
@@ -458,7 +458,7 @@
},
"service":"SOS",
"version":"2.0.0",
- "binding":"/kvp",
+ "binding": "KVP",
"operation":"GetObservation",
"title":"full",
"headers":{
@@ -475,11 +475,11 @@
"http://www.52north.org/test/observableProperty/1",
"http://www.52north.org/test/observableProperty/3"
]
-
+
},
"service":"SOS",
"version":"2.0.0",
- "binding":"/kvp",
+ "binding": "KVP",
"operation":"GetObservation",
"title":"observableProperties",
"headers":{
@@ -496,7 +496,7 @@
},
"service":"SOS",
"version":"2.0.0",
- "binding":"/kvp",
+ "binding": "KVP",
"operation":"GetObservation",
"title":"observableProperty",
"headers":{
@@ -513,7 +513,7 @@
},
"service":"SOS",
"version":"2.0.0",
- "binding":"/kvp",
+ "binding": "KVP",
"operation":"GetObservation",
"title":"offering",
"headers":{
@@ -530,11 +530,11 @@
"http://www.52north.org/test/offering/1",
"http://www.52north.org/test/offering/3"
]
-
+
},
"service":"SOS",
"version":"2.0.0",
- "binding":"/kvp",
+ "binding": "KVP",
"operation":"GetObservation",
"title":"offerings",
"headers":{
@@ -551,7 +551,7 @@
},
"service":"SOS",
"version":"2.0.0",
- "binding":"/kvp",
+ "binding": "KVP",
"operation":"GetObservation",
"title":"procedure",
"headers":{
@@ -568,11 +568,11 @@
"http://www.52north.org/test/procedure/1",
"http://www.52north.org/test/procedure/3"
]
-
+
},
"service":"SOS",
"version":"2.0.0",
- "binding":"/kvp",
+ "binding": "KVP",
"operation":"GetObservation",
"title":"procedures",
"headers":{
@@ -593,7 +593,7 @@
},
"service":"SOS",
"version":"2.0.0",
- "binding":"/kvp",
+ "binding": "KVP",
"operation":"GetObservation",
"title":"spatial filter, URL",
"headers":{
@@ -614,7 +614,7 @@
},
"service":"SOS",
"version":"2.0.0",
- "binding":"/kvp",
+ "binding": "KVP",
"operation":"GetObservation",
"title":"spatial filter, URN",
"headers":{
@@ -632,7 +632,7 @@
},
"service":"SOS",
"version":"2.0.0",
- "binding":"/kvp",
+ "binding": "KVP",
"operation":"GetObservation",
"title":"temporal filter during",
"headers":{
@@ -650,7 +650,7 @@
},
"service":"SOS",
"version":"2.0.0",
- "binding":"/kvp",
+ "binding": "KVP",
"operation":"GetObservation",
"title":"temporal filter equal",
"headers":{
@@ -668,7 +668,7 @@
},
"service":"SOS",
"version":"2.0.0",
- "binding":"/kvp",
+ "binding": "KVP",
"operation":"GetObservation",
"title":"temporal filter equal, negativ time zone",
"headers":{
@@ -686,7 +686,7 @@
},
"service":"SOS",
"version":"2.0.0",
- "binding":"/kvp",
+ "binding": "KVP",
"operation":"GetObservation",
"title":"temporal filter equal, reduced time",
"headers":{
@@ -704,7 +704,7 @@
},
"service":"SOS",
"version":"2.0.0",
- "binding":"/kvp",
+ "binding": "KVP",
"operation":"GetObservation",
"title":"temporal filter first",
"headers":{
@@ -722,7 +722,7 @@
},
"service":"SOS",
"version":"2.0.0",
- "binding":"/kvp",
+ "binding": "KVP",
"operation":"GetObservation",
"title":"temporal filter latest",
"headers":{
@@ -740,7 +740,7 @@
},
"service":"SOS",
"version":"2.0.0",
- "binding":"/kvp",
+ "binding": "KVP",
"operation":"GetResult",
"headers":{
"Accept":"application/xml"
@@ -757,7 +757,7 @@
},
"service":"SOS",
"version":"2.0.0",
- "binding":"/kvp",
+ "binding": "KVP",
"operation":"GetResultTemplate",
"headers":{
"Accept":"application/xml"
@@ -768,7 +768,7 @@
"request":"static/examples/sos_v100/requests_xml/DescribeSensor.xml",
"service":"SOS",
"version":"1.0.0",
- "binding":"/pox",
+ "binding": "POX",
"operation":"DescribeSensor",
"headers":{
"Accept":"application/xml",
@@ -780,7 +780,7 @@
"request":"static/examples/sos_v100/requests_xml/GetCapabilities.xml",
"service":"SOS",
"version":"1.0.0",
- "binding":"/pox",
+ "binding": "POX",
"operation":"GetCapabilities",
"title":"All Sections",
"headers":{
@@ -793,7 +793,7 @@
"request":"static/examples/sos_v100/requests_xml/GetFeatureOfInterest_SpatialFilter.xml",
"service":"SOS",
"version":"1.0.0",
- "binding":"/pox",
+ "binding": "POX",
"operation":"GetFeatureOfInterest",
"title":"BoundingBox",
"headers":{
@@ -806,7 +806,7 @@
"request":"static/examples/sos_v100/requests_xml/GetFeatureOfInterest.xml",
"service":"SOS",
"version":"1.0.0",
- "binding":"/pox",
+ "binding": "POX",
"operation":"GetFeatureOfInterest",
"title":"FeatureOfInterestId",
"headers":{
@@ -819,7 +819,7 @@
"request":"static/examples/sos_v100/requests_xml/GetObservation.xml",
"service":"SOS",
"version":"1.0.0",
- "binding":"/pox",
+ "binding": "POX",
"operation":"GetObservation",
"title":"All Parameters",
"headers":{
@@ -832,7 +832,7 @@
"request":"static/examples/sos_v100/requests_xml/GetObservationById.xml",
"service":"SOS",
"version":"1.0.0",
- "binding":"/pox",
+ "binding": "POX",
"operation":"GetObservationById",
"headers":{
"Accept":"application/xml",
@@ -844,7 +844,7 @@
"request":"static/examples/sos_v100/requests_xml/InsertObservation/InsertObservation_categoryObservation.xml",
"service":"SOS",
"version":"1.0.0",
- "binding":"/pox",
+ "binding": "POX",
"operation":"InsertObservation",
"title":"CategoryObservation",
"headers":{
@@ -857,7 +857,7 @@
"request":"static/examples/sos_v100/requests_xml/InsertObservation/InsertObservation_GenericObs_allTypes.xml",
"service":"SOS",
"version":"1.0.0",
- "binding":"/pox",
+ "binding": "POX",
"operation":"InsertObservation",
"title":"GenericObservation - AllTypes",
"headers":{
@@ -870,7 +870,7 @@
"request":"static/examples/sos_v100/requests_xml/InsertObservation/InsertObservation_GenericObs_Derwent.xml",
"service":"SOS",
"version":"1.0.0",
- "binding":"/pox",
+ "binding": "POX",
"operation":"InsertObservation",
"title":"GenericObservation - Derwent",
"headers":{
@@ -883,7 +883,7 @@
"request":"static/examples/sos_v100/requests_xml/InsertObservation/InsertObservation_GenericObs_Derwent_2.xml",
"service":"SOS",
"version":"1.0.0",
- "binding":"/pox",
+ "binding": "POX",
"operation":"InsertObservation",
"title":"GenericObservation - Derwent 2",
"headers":{
@@ -896,7 +896,7 @@
"request":"static/examples/sos_v100/requests_xml/InsertObservation/InsertObservation_GenericObs_noIDs.xml",
"service":"SOS",
"version":"1.0.0",
- "binding":"/pox",
+ "binding": "POX",
"operation":"InsertObservation",
"title":"GenericObservation - No ID's",
"headers":{
@@ -909,7 +909,7 @@
"request":"static/examples/sos_v100/requests_xml/InsertObservation/InsertObs_geometry.xml",
"service":"SOS",
"version":"1.0.0",
- "binding":"/pox",
+ "binding": "POX",
"operation":"InsertObservation",
"title":"Geometry",
"headers":{
@@ -922,7 +922,7 @@
"request":"static/examples/sos_v100/requests_xml/InsertObservation/InsertObs_geometry_movingObject.xml",
"service":"SOS",
"version":"1.0.0",
- "binding":"/pox",
+ "binding": "POX",
"operation":"InsertObservation",
"title":"Geometry - MovingObject",
"headers":{
@@ -935,7 +935,7 @@
"request":"static/examples/sos_v100/requests_xml/InsertObservation/InsertObservation_Measurement.xml",
"service":"SOS",
"version":"1.0.0",
- "binding":"/pox",
+ "binding": "POX",
"operation":"InsertObservation",
"title":"Measurement",
"headers":{
@@ -948,7 +948,7 @@
"request":"static/examples/sos_v100/requests_xml/InsertObservation/InsertObservation_4_RegSen_withFOI.xml",
"service":"SOS",
"version":"1.0.0",
- "binding":"/pox",
+ "binding": "POX",
"operation":"InsertObservation",
"title":"RegisterSensor - FeatureOfInterest",
"headers":{
@@ -961,7 +961,7 @@
"request":"static/examples/sos_v100/requests_xml/InsertObservation/InsertObservation_samplingPoint.xml",
"service":"SOS",
"version":"1.0.0",
- "binding":"/pox",
+ "binding": "POX",
"operation":"InsertObservation",
"title":"SamplingPoint",
"headers":{
@@ -974,7 +974,7 @@
"request":"static/examples/sos_v100/requests_xml/InsertObservation/InsertObservation_samplingSurface.xml",
"service":"SOS",
"version":"1.0.0",
- "binding":"/pox",
+ "binding": "POX",
"operation":"InsertObservation",
"title":"SamplingSurface",
"headers":{
@@ -987,7 +987,7 @@
"request":"static/examples/sos_v100/requests_xml/RegisterSensor/RegisterSensor_categoryObservation.xml",
"service":"SOS",
"version":"1.0.0",
- "binding":"/pox",
+ "binding": "POX",
"operation":"RegisterSensor",
"title":"CategoryObservation",
"headers":{
@@ -1000,7 +1000,7 @@
"request":"static/examples/sos_v100/requests_xml/RegisterSensor/RegisterSensor_withFOI.xml",
"service":"SOS",
"version":"1.0.0",
- "binding":"/pox",
+ "binding": "POX",
"operation":"RegisterSensor",
"title":"FeatureOfInterest",
"headers":{
@@ -1013,7 +1013,7 @@
"request":"static/examples/sos_v100/requests_xml/RegisterSensor/RegisterSensor_geometry.xml",
"service":"SOS",
"version":"1.0.0",
- "binding":"/pox",
+ "binding": "POX",
"operation":"RegisterSensor",
"title":"Geometry",
"headers":{
@@ -1026,7 +1026,7 @@
"request":"static/examples/sos_v100/requests_xml/RegisterSensor/RegisterSensor_measurement.xml",
"service":"SOS",
"version":"1.0.0",
- "binding":"/pox",
+ "binding": "POX",
"operation":"RegisterSensor",
"title":"Measurement",
"headers":{
@@ -1039,7 +1039,7 @@
"request":"static/examples/sos_v100/requests_xml/RegisterSensor/RegisterSensor_Measurement_Derwent.xml",
"service":"SOS",
"version":"1.0.0",
- "binding":"/pox",
+ "binding": "POX",
"operation":"RegisterSensor",
"title":"Measurement - Derwent",
"headers":{
@@ -1052,7 +1052,7 @@
"request":"static/examples/sos_v100/requests_xml/RegisterSensor/RegisterSensor_Observation_Derwent_2.xml",
"service":"SOS",
"version":"1.0.0",
- "binding":"/pox",
+ "binding": "POX",
"operation":"RegisterSensor",
"title":"Measurement - Derwent 2",
"headers":{
@@ -1065,7 +1065,7 @@
"request":"static/examples/sos_v100/requests_xml/RegisterSensor/RegisterSensor_Observation_allTypes.xml",
"service":"SOS",
"version":"1.0.0",
- "binding":"/pox",
+ "binding": "POX",
"operation":"RegisterSensor",
"title":"Observation - AllTypes",
"headers":{
@@ -1078,7 +1078,7 @@
"request":"static/examples/sos_v100/requests_xml/RegisterSensor/RegisterSensor_Observation_noIDs.xml",
"service":"SOS",
"version":"1.0.0",
- "binding":"/pox",
+ "binding": "POX",
"operation":"RegisterSensor",
"title":"Observation - No ID's",
"headers":{
@@ -1091,7 +1091,7 @@
"request":"static/examples/sos_v20/requests_xml/DeleteObservation.xml",
"service":"SOS",
"version":"2.0.0",
- "binding":"/pox",
+ "binding": "POX",
"operation":"DeleteObservation",
"headers":{
"Accept":"application/xml",
@@ -1103,7 +1103,7 @@
"request":"static/examples/sos_v20/requests_xml/Transactional/DeleteSensor.xml",
"service":"SOS",
"version":"2.0.0",
- "binding":"/pox",
+ "binding": "POX",
"operation":"DeleteSensor",
"headers":{
"Accept":"application/xml",
@@ -1115,7 +1115,7 @@
"request":"static/examples/sos_v20/requests_xml/DescribeSensor.xml",
"service":"SOS",
"version":"2.0.0",
- "binding":"/pox",
+ "binding": "POX",
"operation":"DescribeSensor",
"headers":{
"Accept":"application/xml",
@@ -1127,7 +1127,7 @@
"request":"static/examples/sos_v20/requests_xml/GetCapabilities.xml",
"service":"SOS",
"version":"2.0.0",
- "binding":"/pox",
+ "binding": "POX",
"operation":"GetCapabilities",
"headers":{
"Accept":"application/xml",
@@ -1139,7 +1139,7 @@
"request":"static/examples/sos_v20/requests_xml/GetDataAvailability.xml",
"service":"SOS",
"version":"2.0.0",
- "binding":"/pox",
+ "binding": "POX",
"operation":"GetDataAvailability",
"headers":{
"Accept":"application/xml",
@@ -1151,7 +1151,7 @@
"request":"static/examples/sos_v20/requests_xml/GetFeatureOfInterest.xml",
"service":"SOS",
"version":"2.0.0",
- "binding":"/pox",
+ "binding": "POX",
"operation":"GetFeatureOfInterest",
"headers":{
"Accept":"application/xml",
@@ -1163,7 +1163,7 @@
"request":"static/examples/sos_v20/requests_xml/GetObservation.xml",
"service":"SOS",
"version":"2.0.0",
- "binding":"/pox",
+ "binding": "POX",
"operation":"GetObservation",
"headers":{
"Accept":"application/xml",
@@ -1175,7 +1175,7 @@
"request":"static/examples/sos_v20/requests_xml/GetObservationById.xml",
"service":"SOS",
"version":"2.0.0",
- "binding":"/pox",
+ "binding": "POX",
"operation":"GetObservationById",
"headers":{
"Accept":"application/xml",
@@ -1187,7 +1187,7 @@
"request":"static/examples/sos_v20/requests_xml/ResultHandling/GetResult.xml",
"service":"SOS",
"version":"2.0.0",
- "binding":"/pox",
+ "binding": "POX",
"operation":"GetResult",
"headers":{
"Accept":"application/xml",
@@ -1199,7 +1199,7 @@
"request":"static/examples/sos_v20/requests_xml/ResultHandling/GetResultTemplate.xml",
"service":"SOS",
"version":"2.0.0",
- "binding":"/pox",
+ "binding": "POX",
"operation":"GetResultTemplate",
"headers":{
"Accept":"application/xml",
@@ -1211,7 +1211,7 @@
"request":"static/examples/sos_v20/requests_xml/Transactional/InsertObservation_Category.xml",
"service":"SOS",
"version":"2.0.0",
- "binding":"/pox",
+ "binding": "POX",
"operation":"InsertObservation",
"title":"Category",
"headers":{
@@ -1224,7 +1224,7 @@
"request":"static/examples/sos_v20/requests_xml/Transactional/InsertObservation_Count.xml",
"service":"SOS",
"version":"2.0.0",
- "binding":"/pox",
+ "binding": "POX",
"operation":"InsertObservation",
"title":"Count",
"headers":{
@@ -1237,7 +1237,7 @@
"request":"static/examples/sos_v20/requests_xml/Transactional/InsertObservation_Geometry.xml",
"service":"SOS",
"version":"2.0.0",
- "binding":"/pox",
+ "binding": "POX",
"operation":"InsertObservation",
"title":"Geometry",
"headers":{
@@ -1250,7 +1250,7 @@
"request":"static/examples/sos_v20/requests_xml/Transactional/InsertObservation_Measurement.xml",
"service":"SOS",
"version":"2.0.0",
- "binding":"/pox",
+ "binding": "POX",
"operation":"InsertObservation",
"title":"Measurement",
"headers":{
@@ -1263,7 +1263,7 @@
"request":"static/examples/sos_v20/requests_xml/Transactional/InsertObservation_Measurement_SFP.xml",
"service":"SOS",
"version":"2.0.0",
- "binding":"/pox",
+ "binding": "POX",
"operation":"InsertObservation",
"title":"Measurement/Spatial Filtering Profile",
"headers":{
@@ -1276,7 +1276,7 @@
"request":"static/examples/sos_v20/requests_xml/Transactional/InsertObservation_Multiple.xml",
"service":"SOS",
"version":"2.0.0",
- "binding":"/pox",
+ "binding": "POX",
"operation":"InsertObservation",
"title":"Multiple observations",
"headers":{
@@ -1289,7 +1289,7 @@
"request":"static/examples/sos_v20/requests_xml/Transactional/InsertObservation_SweArray.xml",
"service":"SOS",
"version":"2.0.0",
- "binding":"/pox",
+ "binding": "POX",
"operation":"InsertObservation",
"title":"SweArray",
"headers":{
@@ -1302,7 +1302,7 @@
"request":"static/examples/sos_v20/requests_xml/Transactional/InsertObservation_Text.xml",
"service":"SOS",
"version":"2.0.0",
- "binding":"/pox",
+ "binding": "POX",
"operation":"InsertObservation",
"title":"Text",
"headers":{
@@ -1315,7 +1315,7 @@
"request":"static/examples/sos_v20/requests_xml/Transactional/InsertObservation_Truth.xml",
"service":"SOS",
"version":"2.0.0",
- "binding":"/pox",
+ "binding": "POX",
"operation":"InsertObservation",
"title":"Truth",
"headers":{
@@ -1328,7 +1328,7 @@
"request":"static/examples/sos_v20/requests_xml/ResultHandling/InsertResult.xml",
"service":"SOS",
"version":"2.0.0",
- "binding":"/pox",
+ "binding": "POX",
"operation":"InsertResult",
"headers":{
"Accept":"application/xml",
@@ -1340,7 +1340,7 @@
"request":"static/examples/sos_v20/requests_xml/ResultHandling/InsertResultTemplate.xml",
"service":"SOS",
"version":"2.0.0",
- "binding":"/pox",
+ "binding": "POX",
"operation":"InsertResultTemplate",
"headers":{
"Accept":"application/xml",
@@ -1352,7 +1352,7 @@
"request":"static/examples/sos_v20/requests_xml/Transactional/InsertSensor.xml",
"service":"SOS",
"version":"2.0.0",
- "binding":"/pox",
+ "binding": "POX",
"operation":"InsertSensor",
"headers":{
"Accept":"application/xml",
@@ -1364,7 +1364,7 @@
"request":"static/examples/sos_v20/requests_xml/Transactional/UpdateSensorDescription.xml",
"service":"SOS",
"version":"2.0.0",
- "binding":"/pox",
+ "binding": "POX",
"operation":"UpdateSensorDescription",
"headers":{
"Accept":"application/xml",
@@ -1376,7 +1376,7 @@
"request":"static/examples/sos_v100/requests_soap/DescribeSensor.xml",
"service":"SOS",
"version":"1.0.0",
- "binding":"/soap",
+ "binding": "SOAP",
"operation":"DescribeSensor",
"title":"SOAP 1.2",
"headers":{
@@ -1389,7 +1389,7 @@
"request":"static/examples/sos_v100/requests_soap/GetCapabilities.xml",
"service":"SOS",
"version":"1.0.0",
- "binding":"/soap",
+ "binding": "SOAP",
"operation":"GetCapabilities",
"title":"All Sections (SOAP 1.2)",
"headers":{
@@ -1402,7 +1402,7 @@
"request":"static/examples/sos_v100/requests_soap/GetFeatureOfInterest_SpatialFilter.xml",
"service":"SOS",
"version":"1.0.0",
- "binding":"/soap",
+ "binding": "SOAP",
"operation":"GetFeatureOfInterest",
"title":"BBOX (SOAP 1.2)",
"headers":{
@@ -1415,7 +1415,7 @@
"request":"static/examples/sos_v100/requests_soap/GetFeatureOfInterest.xml",
"service":"SOS",
"version":"1.0.0",
- "binding":"/soap",
+ "binding": "SOAP",
"operation":"GetFeatureOfInterest",
"title":"ID (SOAP 1.2)",
"headers":{
@@ -1428,7 +1428,7 @@
"request":"static/examples/sos_v100/requests_soap/GetObservation.xml",
"service":"SOS",
"version":"1.0.0",
- "binding":"/soap",
+ "binding": "SOAP",
"operation":"GetObservation",
"title":"All Parameters (SOAP 1.2)",
"headers":{
@@ -1441,7 +1441,7 @@
"request":"static/examples/sos_v100/requests_soap/GetObservationById.xml",
"service":"SOS",
"version":"1.0.0",
- "binding":"/soap",
+ "binding": "SOAP",
"operation":"GetObservationById",
"title":"By ID (SOAP 1.2)",
"headers":{
@@ -1454,7 +1454,7 @@
"request":"static/examples/sos_v100/requests_soap/InsertObservation.xml",
"service":"SOS",
"version":"1.0.0",
- "binding":"/soap",
+ "binding": "SOAP",
"operation":"InsertObservation",
"title":"SOAP 1.2",
"headers":{
@@ -1467,7 +1467,7 @@
"request":"static/examples/sos_v100/requests_soap/RegisterSensor.xml",
"service":"SOS",
"version":"1.0.0",
- "binding":"/soap",
+ "binding": "SOAP",
"operation":"RegisterSensor",
"title":"SOAP 1.2",
"headers":{
@@ -1480,7 +1480,7 @@
"request":"static/examples/sos_v20/requests_soap/DeleteObservation.xml",
"service":"SOS",
"version":"2.0.0",
- "binding":"/soap",
+ "binding": "SOAP",
"operation":"DeleteObservation",
"headers":{
"Accept":"application/soap+xml",
@@ -1492,7 +1492,7 @@
"request":"static/examples/sos_v20/requests_soap/Transactional/DeleteSensor.xml",
"service":"SOS",
"version":"2.0.0",
- "binding":"/soap",
+ "binding": "SOAP",
"operation":"DeleteSensor",
"headers":{
"Accept":"application/soap+xml",
@@ -1504,7 +1504,7 @@
"request":"static/examples/sos_v20/requests_soap/DescribeSensor.xml",
"service":"SOS",
"version":"2.0.0",
- "binding":"/soap",
+ "binding": "SOAP",
"operation":"DescribeSensor",
"headers":{
"Accept":"application/soap+xml",
@@ -1516,7 +1516,7 @@
"request":"static/examples/sos_v20/requests_soap/GetCapabilities.xml",
"service":"SOS",
"version":"2.0.0",
- "binding":"/soap",
+ "binding": "SOAP",
"operation":"GetCapabilities",
"headers":{
"Accept":"application/soap+xml",
@@ -1528,7 +1528,7 @@
"request":"static/examples/sos_v20/requests_soap/GetDataAvailability.xml",
"service":"SOS",
"version":"2.0.0",
- "binding":"/soap",
+ "binding": "SOAP",
"operation":"GetDataAvailability",
"headers":{
"Accept":"application/soap+xml",
@@ -1540,7 +1540,7 @@
"request":"static/examples/sos_v20/requests_soap/GetFeatureOfInterest.xml",
"service":"SOS",
"version":"2.0.0",
- "binding":"/soap",
+ "binding": "SOAP",
"operation":"GetFeatureOfInterest",
"headers":{
"Accept":"application/soap+xml",
@@ -1552,7 +1552,7 @@
"request":"static/examples/sos_v20/requests_soap/GetObservation.xml",
"service":"SOS",
"version":"2.0.0",
- "binding":"/soap",
+ "binding": "SOAP",
"operation":"GetObservation",
"headers":{
"Accept":"application/soap+xml",
@@ -1564,7 +1564,7 @@
"request":"static/examples/sos_v20/requests_soap/GetObservationById.xml",
"service":"SOS",
"version":"2.0.0",
- "binding":"/soap",
+ "binding": "SOAP",
"operation":"GetObservationById",
"headers":{
"Accept":"application/soap+xml",
@@ -1576,7 +1576,7 @@
"request":"static/examples/sos_v20/requests_soap/ResultHandling/GetResult.xml",
"service":"SOS",
"version":"2.0.0",
- "binding":"/soap",
+ "binding": "SOAP",
"operation":"GetResult",
"headers":{
"Accept":"application/soap+xml",
@@ -1588,7 +1588,7 @@
"request":"static/examples/sos_v20/requests_soap/ResultHandling/GetResultTemplate.xml",
"service":"SOS",
"version":"2.0.0",
- "binding":"/soap",
+ "binding": "SOAP",
"operation":"GetResultTemplate",
"headers":{
"Accept":"application/soap+xml",
@@ -1600,7 +1600,7 @@
"request":"static/examples/sos_v20/requests_soap/Transactional/InsertObservation_Category.xml",
"service":"SOS",
"version":"2.0.0",
- "binding":"/soap",
+ "binding": "SOAP",
"operation":"InsertObservation",
"title":"Category",
"headers":{
@@ -1613,7 +1613,7 @@
"request":"static/examples/sos_v20/requests_soap/Transactional/InsertObservation_Count.xml",
"service":"SOS",
"version":"2.0.0",
- "binding":"/soap",
+ "binding": "SOAP",
"operation":"InsertObservation",
"title":"Count",
"headers":{
@@ -1626,7 +1626,7 @@
"request":"static/examples/sos_v20/requests_soap/Transactional/InsertObservation_Geometry.xml",
"service":"SOS",
"version":"2.0.0",
- "binding":"/soap",
+ "binding": "SOAP",
"operation":"InsertObservation",
"title":"Geometry",
"headers":{
@@ -1639,7 +1639,7 @@
"request":"static/examples/sos_v20/requests_soap/Transactional/InsertObservation_Measurement.xml",
"service":"SOS",
"version":"2.0.0",
- "binding":"/soap",
+ "binding": "SOAP",
"operation":"InsertObservation",
"title":"Measurement",
"headers":{
@@ -1652,7 +1652,7 @@
"request":"static/examples/sos_v20/requests_soap/Transactional/InsertObservation_Measurement_SFP.xml",
"service":"SOS",
"version":"2.0.0",
- "binding":"/soap",
+ "binding": "SOAP",
"operation":"InsertObservation",
"title":"Measurement/Spatial Filtering Profile",
"headers":{
@@ -1665,7 +1665,7 @@
"request":"static/examples/sos_v20/requests_soap/Transactional/InsertObservation_Multiple.xml",
"service":"SOS",
"version":"2.0.0",
- "binding":"/soap",
+ "binding": "SOAP",
"operation":"InsertObservation",
"title":"Multiple observations",
"headers":{
@@ -1678,7 +1678,7 @@
"request":"static/examples/sos_v20/requests_soap/Transactional/InsertObservation_SweArray.xml",
"service":"SOS",
"version":"2.0.0",
- "binding":"/soap",
+ "binding": "SOAP",
"operation":"InsertObservation",
"title":"SweArray",
"headers":{
@@ -1691,7 +1691,7 @@
"request":"static/examples/sos_v20/requests_soap/Transactional/InsertObservation_Text.xml",
"service":"SOS",
"version":"2.0.0",
- "binding":"/soap",
+ "binding": "SOAP",
"operation":"InsertObservation",
"title":"Text",
"headers":{
@@ -1704,7 +1704,7 @@
"request":"static/examples/sos_v20/requests_soap/Transactional/InsertObservation_Truth.xml",
"service":"SOS",
"version":"2.0.0",
- "binding":"/soap",
+ "binding": "SOAP",
"operation":"InsertObservation",
"title":"Truth",
"headers":{
@@ -1717,7 +1717,7 @@
"request":"static/examples/sos_v20/requests_soap/ResultHandling/InsertResult.xml",
"service":"SOS",
"version":"2.0.0",
- "binding":"/soap",
+ "binding": "SOAP",
"operation":"InsertResult",
"headers":{
"Accept":"application/soap+xml",
@@ -1729,7 +1729,7 @@
"request":"static/examples/sos_v20/requests_soap/ResultHandling/InsertResultTemplate.xml",
"service":"SOS",
"version":"2.0.0",
- "binding":"/soap",
+ "binding": "SOAP",
"operation":"InsertResultTemplate",
"headers":{
"Accept":"application/soap+xml",
@@ -1741,7 +1741,7 @@
"request":"static/examples/sos_v20/requests_soap/Transactional/InsertSensor.xml",
"service":"SOS",
"version":"2.0.0",
- "binding":"/soap",
+ "binding": "SOAP",
"operation":"InsertSensor",
"headers":{
"Accept":"application/soap+xml",
@@ -1753,7 +1753,7 @@
"request":"static/examples/sos_v20/requests_soap/Transactional/UpdateSensorDescription.xml",
"service":"SOS",
"version":"2.0.0",
- "binding":"/soap",
+ "binding": "SOAP",
"operation":"UpdateSensorDescription",
"headers":{
"Accept":"application/soap+xml",
@@ -1765,7 +1765,7 @@
"service":"SOS",
"version":"2.0.0",
"method":"POST",
- "binding":"/json",
+ "binding": "JSON",
"headers":{
"Accept":"application/json",
"Content-Type":"application/json"
@@ -1776,13 +1776,13 @@
"request":"GetCapabilities",
"service":"SOS"
}
-
+
},
{
"service":"SOS",
"version":"2.0.0",
"method":"POST",
- "binding":"/json",
+ "binding": "JSON",
"headers":{
"Accept":"application/json",
"Content-Type":"application/json"
@@ -1795,15 +1795,15 @@
"sections":[
"Contents"
]
-
+
}
-
+
},
{
"service":"SOS",
"version":"2.0.0",
"method":"POST",
- "binding":"/json",
+ "binding": "JSON",
"headers":{
"Accept":"application/json",
"Content-Type":"application/json"
@@ -1820,15 +1820,15 @@
"FilterCapabilities",
"Contents"
]
-
+
}
-
+
},
{
"service":"SOS",
"version":"2.0.0",
"method":"POST",
- "binding":"/json",
+ "binding": "JSON",
"headers":{
"Accept":"application/json",
"Content-Type":"application/json"
@@ -1841,13 +1841,13 @@
"procedure":"http://www.52north.org/test/procedure/1",
"procedureDescriptionFormat":"http://www.opengis.net/sensorML/1.0.1"
}
-
+
},
{
"service":"SOS",
"version":"2.0.0",
"method":"POST",
- "binding":"/json",
+ "binding": "JSON",
"headers":{
"Accept":"application/json",
"Content-Type":"application/json"
@@ -1862,13 +1862,13 @@
"procedureDescriptionFormat":"http://www.opengis.net/sensorML/1.0.1",
"validTime":"2013-11-20T16:08:23Z"
}
-
+
},
{
"service":"SOS",
"version":"2.0.0",
"method":"POST",
- "binding":"/json",
+ "binding": "JSON",
"headers":{
"Accept":"application/json",
"Content-Type":"application/json"
@@ -1885,15 +1885,15 @@
"2013-11-20T16:08:23Z",
"2013-11-20T16:08:25Z"
]
-
+
}
-
+
},
{
"service":"SOS",
"version":"2.0.0",
"method":"POST",
- "binding":"/json",
+ "binding": "JSON",
"headers":{
"Accept":"application/json",
"Content-Type":"application/json"
@@ -1909,13 +1909,13 @@
"observedProperty":"http://www.52north.org/test/observableProperty/6",
"featureOfInterest":"http://www.52north.org/test/featureOfInterest/6"
}
-
+
},
{
"service":"SOS",
"version":"2.0.0",
"method":"POST",
- "binding":"/json",
+ "binding": "JSON",
"headers":{
"Accept":"application/json",
"Content-Type":"application/json"
@@ -1957,15 +1957,15 @@
50.0,
7.0
]
-
+
]
-
+
]
-
+
}
-
+
}
-
+
},
"temporalFilter":{
"during":{
@@ -1974,19 +1974,19 @@
"2012-11-19T14:00:00+01:00",
"2012-11-19T15:00:00+01:00"
]
-
+
}
-
+
}
-
+
}
-
+
},
{
"service":"SOS",
"version":"2.0.0",
"method":"POST",
- "binding":"/json",
+ "binding": "JSON",
"headers":{
"Accept":"application/json",
"Content-Type":"application/json"
@@ -2040,15 +2040,15 @@
50.0,
7.0
]
-
+
]
-
+
]
-
+
}
-
+
}
-
+
},
"temporalFilter":[
{
@@ -2058,28 +2058,28 @@
"2012-11-19T14:00:00+01:00",
"2012-11-19T14:05:00+01:00"
]
-
+
}
-
+
},
{
"equals":{
"ref":"om:phenomenonTime",
"value":"2012-11-19T14:08:00+01:00"
}
-
+
}
-
+
]
-
+
}
-
+
},
{
"service":"SOS",
"version":"2.0.0",
"method":"POST",
- "binding":"/json",
+ "binding": "JSON",
"headers":{
"Accept":"application/json",
"Content-Type":"application/json"
@@ -2094,13 +2094,13 @@
"observedProperty":"http://www.52north.org/test/observableProperty/1",
"featureOfInterest":"http://www.52north.org/test/featureOfInterest/1"
}
-
+
},
{
"service":"SOS",
"version":"2.0.0",
"method":"POST",
- "binding":"/json",
+ "binding": "JSON",
"headers":{
"Accept":"application/json",
"Content-Type":"application/json"
@@ -2123,15 +2123,15 @@
"http://www.52north.org/test/featureOfInterest/1",
"http://www.52north.org/test/featureOfInterest/5"
]
-
+
}
-
+
},
{
"service":"SOS",
"version":"2.0.0",
"method":"POST",
- "binding":"/json",
+ "binding": "JSON",
"headers":{
"Accept":"application/json",
"Content-Type":"application/json"
@@ -2146,13 +2146,13 @@
"observedProperty":"http://www.52north.org/test/observableProperty/1",
"procedure":"http://www.52north.org/test/procedure/1"
}
-
+
},
{
"service":"SOS",
"version":"2.0.0",
"method":"POST",
- "binding":"/json",
+ "binding": "JSON",
"headers":{
"Accept":"application/json",
"Content-Type":"application/json"
@@ -2202,25 +2202,25 @@
50.0,
7.0
]
-
+
]
-
+
]
-
+
}
-
+
}
-
+
}
-
+
}
-
+
},
{
"service":"SOS",
"version":"2.0.0",
"method":"POST",
- "binding":"/json",
+ "binding": "JSON",
"headers":{
"Accept":"application/json",
"Content-Type":"application/json"
@@ -2232,13 +2232,13 @@
"version":"2.0.0",
"procedure":"http://www.52north.org/test/procedure/9"
}
-
+
},
{
"service":"SOS",
"version":"2.0.0",
"method":"POST",
- "binding":"/json",
+ "binding": "JSON",
"headers":{
"Accept":"application/json",
"Content-Type":"application/json"
@@ -2252,15 +2252,15 @@
"http://www.52north.org/test/observation/1",
"http://www.52north.org/test/observation/2"
]
-
+
}
-
+
},
{
"service":"SOS",
"version":"2.0.0",
"method":"POST",
- "binding":"/json",
+ "binding": "JSON",
"headers":{
"Accept":"application/json",
"Content-Type":"application/json"
@@ -2290,13 +2290,13 @@
],
"featureOfInterestType":"http://www.opengis.net/def/samplingFeatureType/OGC-OM/2.0/SF_SamplingPoint"
}
-
+
},
{
"service":"SOS",
"version":"2.0.0",
"method":"POST",
- "binding":"/json",
+ "binding": "JSON",
"headers":{
"Accept":"application/json",
"Content-Type":"application/json"
@@ -2326,7 +2326,7 @@
"value":"52°North",
"codespace":"http://www.opengis.net/def/nil/OGC/0/unknown"
}
-
+
],
"sampledFeature":[
"http://www.52north.org/test/featureOfInterest/world"
@@ -2342,11 +2342,11 @@
"properties":{
"name":"EPSG:4326"
}
-
+
}
-
+
}
-
+
},
"phenomenonTime":"012-11-19T17:45:15+00:00",
"resultTime":"012-11-19T17:45:15+00:00",
@@ -2354,17 +2354,17 @@
"uom":"test_unit_9_3",
"value":0.28
}
-
+
}
-
+
}
-
+
},
{
"service":"SOS",
"version":"2.0.0",
"method":"POST",
- "binding":"/json",
+ "binding": "JSON",
"headers":{
"Accept":"application/json",
"Content-Type":"application/json"
@@ -2377,13 +2377,13 @@
"offering":"http://www.52north.org/test/offering/6",
"observedProperty":"http://www.52north.org/test/observableProperty/6"
}
-
+
},
{
"service":"SOS",
"version":"2.0.0",
"method":"POST",
- "binding":"/json",
+ "binding": "JSON",
"headers":{
"Accept":"application/json",
"Content-Type":"application/json"
@@ -2397,13 +2397,13 @@
"offering":"http://www.52north.org/test/offering/6",
"observedProperty":"http://www.52north.org/test/observableProperty/6"
}
-
+
},
{
"service":"SOS",
"version":"2.0.0",
"method":"POST",
- "binding":"/json",
+ "binding": "JSON",
"headers":{
"Accept":"application/json",
"Content-Type":"application/json"
@@ -2429,7 +2429,7 @@
"value":"52°North",
"codespace":"http://www.opengis.net/def/nil/OGC/0/unknown"
}
-
+
],
"sampledFeature":[
"http://www.52north.org/test/featureOfInterest/world"
@@ -2445,11 +2445,11 @@
"properties":{
"name":"EPSG:4326"
}
-
+
}
-
+
}
-
+
},
"phenomenonTime":"template",
"resultTime":"template",
@@ -2469,23 +2469,23 @@
"definition":"http://www.52north.org/test/observableProperty/9_3",
"uom":"test_unit_9"
}
-
+
]
-
+
},
"resultEncoding":{
"tokenSeparator":",",
"blockSeparator":"#"
}
-
+
}
-
+
},
{
"service":"SOS",
"version":"2.0.0",
"method":"POST",
- "binding":"/json",
+ "binding": "JSON",
"headers":{
"Accept":"application/json",
"Content-Type":"application/json"
@@ -2498,13 +2498,13 @@
"templateIdentifier":"http://www.52north.org/test/procedure/9/template/1",
"resultValues":"15#2012-11-19T13:30:00+01:00,159.15#2012-11-19T13:31:00+01:00,159.15#2012-11-19T13:32:00+01:00,159.85#2012-11-19T13:33:00+01:00,160.5#2012-11-19T13:34:00+01:00,160.9#2012-11-19T13:35:00+01:00,160.7#2012-11-19T13:36:00+01:00,160.5#2012-11-19T13:37:00+01:00,160.6#2012-11-19T13:38:00+01:00,160.5#2012-11-19T13:39:00+01:00,160.4#2012-11-19T13:40:00+01:00,160.34#2012-11-19T13:41:00+01:00,160.25#2012-11-19T13:42:00+01:00,159.79#2012-11-19T13:43:00+01:00,159.56#2012-11-19T13:44:00+01:00,159.25#"
}
-
+
},
{
"service":"SOS",
"version":"2.0.0",
"method":"POST",
- "binding":"/json",
+ "binding": "JSON",
"headers":{
"Accept":"application/json",
"Content-Type":"application/json"
@@ -2545,15 +2545,15 @@
50.0,
7.0
]
-
+
]
-
+
]
-
+
}
-
+
}
-
+
},
"temporalFilter":[
{
@@ -2563,28 +2563,28 @@
"2012-11-19T14:00:00+01:00",
"2012-11-19T14:05:00+01:00"
]
-
+
}
-
+
},
{
"equals":{
"ref":"om:phenomenonTime",
"value":"2012-11-19T14:08:00+01:00"
}
-
+
}
-
+
]
-
+
}
-
+
},
{
"service":"SOS",
"version":"2.0.0",
"method":"POST",
- "binding":"/json",
+ "binding": "JSON",
"headers":{
"Accept":"application/json",
"Content-Type":"application/json"
@@ -2598,14 +2598,14 @@
"procedureDescriptionFormat":"http://www.opengis.net/sensorML/1.0.1",
"procedureDescription":"http://www.52north.org/test/procedure/1 con terra GmbH (www.conterra.de) con terra http://www.52north.org/test/offering/1 http://www.52north.org/test/featureOfInterest/1 7.727958 51.883906 52.0 "
}
-
+
},
{
"id":"exampleData",
"service":"SOS",
"version":"2.0.0",
"method":"POST",
- "binding":"/json",
+ "binding": "JSON",
"headers":{
"Accept":"application/json",
"Content-Type":"application/json"
@@ -2617,24 +2617,24 @@
"service":"SOS",
"version":"2.0.0",
"method":"POST",
- "binding":"/json",
+ "binding": "JSON",
"operation":"InsertSensor"
},
{
"service":"SOS",
"version":"2.0.0",
"method":"POST",
- "binding":"/json",
+ "binding": "JSON",
"operation":"InsertObservation"
},
{
"service":"SOS",
"version":"2.0.0",
"method":"POST",
- "binding":"/json",
+ "binding": "JSON",
"operation":"InsertResultTemplate"
}
-
+
],
"request":{
"service":"SOS",
@@ -2680,7 +2680,7 @@
"value":"con terra",
"codespace":"http://www.opengis.net/def/nil/OGC/0/unknown"
}
-
+
],
"sampledFeature":[
"http://www.52north.org/test/featureOfInterest/world"
@@ -2696,11 +2696,11 @@
"properties":{
"name":"EPSG:4326"
}
-
+
}
-
+
}
-
+
},
"phenomenonTime":"2012-11-19T13:00:00+00:00",
"resultTime":"2012-11-19T13:00:00+00:00",
@@ -2708,7 +2708,7 @@
"uom":"test_unit_1",
"value":1.0
}
-
+
},
{
"identifier":{
@@ -2725,7 +2725,7 @@
"uom":"test_unit_1",
"value":1.1
}
-
+
},
{
"type":"http://www.opengis.net/def/observationType/OGC-OM/2.0/OM_Measurement",
@@ -2738,7 +2738,7 @@
"uom":"test_unit_1",
"value":1.2
}
-
+
},
{
"type":"http://www.opengis.net/def/observationType/OGC-OM/2.0/OM_Measurement",
@@ -2751,7 +2751,7 @@
"uom":"test_unit_1",
"value":1.3
}
-
+
},
{
"type":"http://www.opengis.net/def/observationType/OGC-OM/2.0/OM_Measurement",
@@ -2764,7 +2764,7 @@
"uom":"test_unit_1",
"value":1.4
}
-
+
},
{
"type":"http://www.opengis.net/def/observationType/OGC-OM/2.0/OM_Measurement",
@@ -2777,7 +2777,7 @@
"uom":"test_unit_1",
"value":1.5
}
-
+
},
{
"type":"http://www.opengis.net/def/observationType/OGC-OM/2.0/OM_Measurement",
@@ -2790,7 +2790,7 @@
"uom":"test_unit_1",
"value":1.6
}
-
+
},
{
"type":"http://www.opengis.net/def/observationType/OGC-OM/2.0/OM_Measurement",
@@ -2803,7 +2803,7 @@
"uom":"test_unit_1",
"value":1.7
}
-
+
},
{
"type":"http://www.opengis.net/def/observationType/OGC-OM/2.0/OM_Measurement",
@@ -2816,7 +2816,7 @@
"uom":"test_unit_1",
"value":1.8
}
-
+
},
{
"type":"http://www.opengis.net/def/observationType/OGC-OM/2.0/OM_Measurement",
@@ -2829,11 +2829,11 @@
"uom":"test_unit_1",
"value":1.9
}
-
+
}
-
+
]
-
+
},
{
"request":"InsertSensor",
@@ -2869,7 +2869,7 @@
"value":"ESRI",
"codespace":"http://www.opengis.net/def/nil/OGC/0/unknown"
}
-
+
],
"sampledFeature":[
"http://www.52north.org/test/featureOfInterest/world"
@@ -2885,11 +2885,11 @@
"properties":{
"name":"EPSG:4326"
}
-
+
}
-
+
}
-
+
},
"phenomenonTime":"2012-11-19T13:00:00+00:00",
"resultTime":"2012-11-19T13:00:00+00:00",
@@ -2976,9 +2976,9 @@
"resultTime":"2012-11-19T13:09:00+00:00",
"result":9
}
-
+
]
-
+
},
{
"request":"InsertSensor",
@@ -3014,7 +3014,7 @@
"value":"Kisters",
"codespace":"http://www.opengis.net/def/nil/OGC/0/unknown"
}
-
+
],
"sampledFeature":[
"http://www.52north.org/test/featureOfInterest/world"
@@ -3030,11 +3030,11 @@
"properties":{
"name":"EPSG:4326"
}
-
+
}
-
+
}
-
+
},
"phenomenonTime":"2012-11-19T13:00:00+00:00",
"resultTime":"2012-11-19T13:00:00+00:00",
@@ -3121,9 +3121,9 @@
"resultTime":"2012-11-19T13:09:00+00:00",
"result":true
}
-
+
]
-
+
},
{
"request":"InsertSensor",
@@ -3159,7 +3159,7 @@
"value":"con terra",
"codespace":"http://www.opengis.net/def/nil/OGC/0/unknown"
}
-
+
],
"sampledFeature":[
"http://www.52north.org/test/featureOfInterest/world"
@@ -3175,11 +3175,11 @@
"properties":{
"name":"EPSG:4326"
}
-
+
}
-
+
}
-
+
},
"phenomenonTime":"2012-11-19T13:00:00+00:00",
"resultTime":"2012-11-19T13:00:00+00:00",
@@ -3187,7 +3187,7 @@
"codespace":"test_unit_4",
"value":"test_category_0"
}
-
+
},
{
"type":"http://www.opengis.net/def/observationType/OGC-OM/2.0/OM_CategoryObservation",
@@ -3200,7 +3200,7 @@
"codespace":"test_unit_4",
"value":"test_category_1"
}
-
+
},
{
"type":"http://www.opengis.net/def/observationType/OGC-OM/2.0/OM_CategoryObservation",
@@ -3213,7 +3213,7 @@
"codespace":"test_unit_4",
"value":"test_category_2"
}
-
+
},
{
"type":"http://www.opengis.net/def/observationType/OGC-OM/2.0/OM_CategoryObservation",
@@ -3226,7 +3226,7 @@
"codespace":"test_unit_4",
"value":"test_category_3"
}
-
+
},
{
"type":"http://www.opengis.net/def/observationType/OGC-OM/2.0/OM_CategoryObservation",
@@ -3239,7 +3239,7 @@
"codespace":"test_unit_4",
"value":"test_category_4"
}
-
+
},
{
"type":"http://www.opengis.net/def/observationType/OGC-OM/2.0/OM_CategoryObservation",
@@ -3252,7 +3252,7 @@
"codespace":"test_unit_4",
"value":"test_category_5"
}
-
+
},
{
"type":"http://www.opengis.net/def/observationType/OGC-OM/2.0/OM_CategoryObservation",
@@ -3265,7 +3265,7 @@
"codespace":"test_unit_4",
"value":"test_category_6"
}
-
+
},
{
"type":"http://www.opengis.net/def/observationType/OGC-OM/2.0/OM_CategoryObservation",
@@ -3278,7 +3278,7 @@
"codespace":"test_unit_4",
"value":"test_category_7"
}
-
+
},
{
"type":"http://www.opengis.net/def/observationType/OGC-OM/2.0/OM_CategoryObservation",
@@ -3291,7 +3291,7 @@
"codespace":"test_unit_4",
"value":"test_category_8"
}
-
+
},
{
"type":"http://www.opengis.net/def/observationType/OGC-OM/2.0/OM_CategoryObservation",
@@ -3304,11 +3304,11 @@
"codespace":"test_unit_4",
"value":"test_category_9"
}
-
+
}
-
+
]
-
+
},
{
"request":"InsertSensor",
@@ -3344,7 +3344,7 @@
"value":"TU-Dresden",
"codespace":"http://www.opengis.net/def/nil/OGC/0/unknown"
}
-
+
],
"sampledFeature":[
"http://www.52north.org/test/featureOfInterest/world"
@@ -3360,11 +3360,11 @@
"properties":{
"name":"EPSG:4326"
}
-
+
}
-
+
}
-
+
},
"phenomenonTime":"2012-11-19T13:00:00+00:00",
"resultTime":"2012-11-19T13:00:00+00:00",
@@ -3451,9 +3451,9 @@
"resultTime":"2012-11-19T13:09:00+00:00",
"result":"test_text_9"
}
-
+
]
-
+
},
{
"request":"InsertSensor",
@@ -3489,7 +3489,7 @@
"value":"Hochschule Bochum",
"codespace":"http://www.opengis.net/def/nil/OGC/0/unknown"
}
-
+
],
"sampledFeature":[
"http://www.52north.org/test/featureOfInterest/world"
@@ -3505,11 +3505,11 @@
"properties":{
"name":"EPSG:4326"
}
-
+
}
-
+
}
-
+
},
"phenomenonTime":"template",
"resultTime":"template",
@@ -3535,15 +3535,15 @@
"definition":"http://www.52north.org/test/observableProperty/6",
"uom":"test_unit_6"
}
-
+
]
-
+
},
"resultEncoding":{
"tokenSeparator":",",
"blockSeparator":"#"
}
-
+
},
{
"request":"InsertObservation",
@@ -3565,7 +3565,7 @@
"value":"Hochschule Bochum",
"codespace":"http://www.opengis.net/def/nil/OGC/0/unknown"
}
-
+
],
"sampledFeature":[
"http://www.52north.org/test/featureOfInterest/world"
@@ -3581,11 +3581,11 @@
"properties":{
"name":"EPSG:4326"
}
-
+
}
-
+
}
-
+
},
"phenomenonTime":"2012-11-19T13:00:00+00:00",
"resultTime":"2012-11-19T13:00:00+00:00",
@@ -3593,7 +3593,7 @@
"uom":"test_unit_6",
"value":2.0
}
-
+
},
{
"type":"http://www.opengis.net/def/observationType/OGC-OM/2.0/OM_Measurement",
@@ -3606,7 +3606,7 @@
"uom":"test_unit_6",
"value":2.1
}
-
+
},
{
"type":"http://www.opengis.net/def/observationType/OGC-OM/2.0/OM_Measurement",
@@ -3619,7 +3619,7 @@
"uom":"test_unit_6",
"value":2.2
}
-
+
},
{
"type":"http://www.opengis.net/def/observationType/OGC-OM/2.0/OM_Measurement",
@@ -3632,7 +3632,7 @@
"uom":"test_unit_6",
"value":2.3
}
-
+
},
{
"type":"http://www.opengis.net/def/observationType/OGC-OM/2.0/OM_Measurement",
@@ -3645,7 +3645,7 @@
"uom":"test_unit_6",
"value":2.4
}
-
+
},
{
"type":"http://www.opengis.net/def/observationType/OGC-OM/2.0/OM_Measurement",
@@ -3658,7 +3658,7 @@
"uom":"test_unit_6",
"value":2.5
}
-
+
},
{
"type":"http://www.opengis.net/def/observationType/OGC-OM/2.0/OM_Measurement",
@@ -3671,7 +3671,7 @@
"uom":"test_unit_6",
"value":2.6
}
-
+
},
{
"type":"http://www.opengis.net/def/observationType/OGC-OM/2.0/OM_Measurement",
@@ -3684,7 +3684,7 @@
"uom":"test_unit_6",
"value":2.7
}
-
+
},
{
"type":"http://www.opengis.net/def/observationType/OGC-OM/2.0/OM_Measurement",
@@ -3697,7 +3697,7 @@
"uom":"test_unit_6",
"value":2.8
}
-
+
},
{
"type":"http://www.opengis.net/def/observationType/OGC-OM/2.0/OM_Measurement",
@@ -3710,11 +3710,11 @@
"uom":"test_unit_6",
"value":2.9
}
-
+
}
-
+
]
-
+
},
{
"request":"InsertSensor",
@@ -3750,7 +3750,7 @@
"value":"ITC",
"codespace":"http://www.opengis.net/def/nil/OGC/0/unknown"
}
-
+
],
"sampledFeature":[
"http://www.52north.org/test/featureOfInterest/world"
@@ -3766,11 +3766,11 @@
"properties":{
"name":"EPSG:4326"
}
-
+
}
-
+
}
-
+
},
"phenomenonTime":"2012-11-19T13:00:00+00:00",
"resultTime":"2012-11-19T13:00:00+00:00",
@@ -3778,7 +3778,7 @@
"uom":"test_unit_7",
"value":3.0
}
-
+
},
{
"type":"http://www.opengis.net/def/observationType/OGC-OM/2.0/OM_Measurement",
@@ -3791,7 +3791,7 @@
"uom":"test_unit_7",
"value":3.1
}
-
+
},
{
"type":"http://www.opengis.net/def/observationType/OGC-OM/2.0/OM_Measurement",
@@ -3804,7 +3804,7 @@
"uom":"test_unit_7",
"value":3.2
}
-
+
},
{
"type":"http://www.opengis.net/def/observationType/OGC-OM/2.0/OM_Measurement",
@@ -3817,7 +3817,7 @@
"uom":"test_unit_7",
"value":3.3
}
-
+
},
{
"type":"http://www.opengis.net/def/observationType/OGC-OM/2.0/OM_Measurement",
@@ -3830,7 +3830,7 @@
"uom":"test_unit_7",
"value":3.4
}
-
+
},
{
"type":"http://www.opengis.net/def/observationType/OGC-OM/2.0/OM_Measurement",
@@ -3843,7 +3843,7 @@
"uom":"test_unit_7",
"value":3.5
}
-
+
},
{
"type":"http://www.opengis.net/def/observationType/OGC-OM/2.0/OM_Measurement",
@@ -3856,7 +3856,7 @@
"uom":"test_unit_7",
"value":3.6
}
-
+
},
{
"type":"http://www.opengis.net/def/observationType/OGC-OM/2.0/OM_Measurement",
@@ -3869,7 +3869,7 @@
"uom":"test_unit_7",
"value":3.7
}
-
+
},
{
"type":"http://www.opengis.net/def/observationType/OGC-OM/2.0/OM_Measurement",
@@ -3882,7 +3882,7 @@
"uom":"test_unit_7",
"value":3.8
}
-
+
},
{
"type":"http://www.opengis.net/def/observationType/OGC-OM/2.0/OM_Measurement",
@@ -3895,11 +3895,11 @@
"uom":"test_unit_7",
"value":3.9
}
-
+
}
-
+
]
-
+
},
{
"request":"InsertSensor",
@@ -3935,7 +3935,7 @@
"value":"DLZ-IT",
"codespace":"http://www.opengis.net/def/nil/OGC/0/unknown"
}
-
+
],
"sampledFeature":[
"http://www.52north.org/test/featureOfInterest/world"
@@ -3951,11 +3951,11 @@
"properties":{
"name":"EPSG:4326"
}
-
+
}
-
+
}
-
+
},
"phenomenonTime":[
"2012-11-19T13:00:00+00:00",
@@ -3966,7 +3966,7 @@
"uom":"test_unit_8",
"value":4.0
}
-
+
},
{
"type":"http://www.opengis.net/def/observationType/OGC-OM/2.0/OM_Measurement",
@@ -3982,7 +3982,7 @@
"uom":"test_unit_8",
"value":4.1
}
-
+
},
{
"type":"http://www.opengis.net/def/observationType/OGC-OM/2.0/OM_Measurement",
@@ -3998,7 +3998,7 @@
"uom":"test_unit_8",
"value":4.2
}
-
+
},
{
"type":"http://www.opengis.net/def/observationType/OGC-OM/2.0/OM_Measurement",
@@ -4014,7 +4014,7 @@
"uom":"test_unit_8",
"value":4.3
}
-
+
},
{
"type":"http://www.opengis.net/def/observationType/OGC-OM/2.0/OM_Measurement",
@@ -4030,7 +4030,7 @@
"uom":"test_unit_8",
"value":4.4
}
-
+
},
{
"type":"http://www.opengis.net/def/observationType/OGC-OM/2.0/OM_Measurement",
@@ -4046,7 +4046,7 @@
"uom":"test_unit_8",
"value":4.5
}
-
+
},
{
"type":"http://www.opengis.net/def/observationType/OGC-OM/2.0/OM_Measurement",
@@ -4062,7 +4062,7 @@
"uom":"test_unit_8",
"value":4.6
}
-
+
},
{
"type":"http://www.opengis.net/def/observationType/OGC-OM/2.0/OM_Measurement",
@@ -4078,7 +4078,7 @@
"uom":"test_unit_8",
"value":4.7
}
-
+
},
{
"type":"http://www.opengis.net/def/observationType/OGC-OM/2.0/OM_Measurement",
@@ -4094,7 +4094,7 @@
"uom":"test_unit_8",
"value":4.8
}
-
+
},
{
"type":"http://www.opengis.net/def/observationType/OGC-OM/2.0/OM_Measurement",
@@ -4110,11 +4110,11 @@
"uom":"test_unit_8",
"value":4.9
}
-
+
}
-
+
]
-
+
},
{
"request":"InsertSensor",
@@ -4150,7 +4150,7 @@
"value":"Heiden",
"codespace":"http://www.opengis.net/def/nil/OGC/0/unknown"
}
-
+
],
"sampledFeature":[
"http://www.52north.org/test/featureOfInterest/world"
@@ -4166,11 +4166,11 @@
"properties":{
"name":"EPSG:4326"
}
-
+
}
-
+
}
-
+
},
"phenomenonTime":"2008-10-29T00:00:00+00:00",
"resultTime":"2008-10-29T00:00:00+00:00",
@@ -4190,7 +4190,7 @@
"value":"Münster/FE101",
"codespace":"http://www.opengis.net/def/nil/OGC/0/unknown"
}
-
+
],
"sampledFeature":[
"http://www.52north.org/test/featureOfInterest/world"
@@ -4206,11 +4206,11 @@
"properties":{
"name":"EPSG:4326"
}
-
+
}
-
+
}
-
+
},
"phenomenonTime":"2008-10-29T00:00:00+00:00",
"resultTime":"2008-10-29T00:00:00+00:00",
@@ -4230,7 +4230,7 @@
"value":"Portland",
"codespace":"http://www.opengis.net/def/nil/OGC/0/unknown"
}
-
+
],
"sampledFeature":[
"http://www.52north.org/test/featureOfInterest/world"
@@ -4246,11 +4246,11 @@
"properties":{
"name":"EPSG:4326"
}
-
+
}
-
+
}
-
+
},
"phenomenonTime":"2008-10-29T00:00:00+00:00",
"resultTime":"2008-10-29T00:00:00+00:00",
@@ -4270,7 +4270,7 @@
"value":"TODO",
"codespace":"http://www.opengis.net/def/nil/OGC/0/unknown"
}
-
+
],
"sampledFeature":[
"http://www.52north.org/test/featureOfInterest/world"
@@ -4286,27 +4286,27 @@
"properties":{
"name":"EPSG:4326"
}
-
+
}
-
+
}
-
+
},
"phenomenonTime":"2013-01-01T01:00:00+02:00",
"resultTime":"2013-01-01T00:01:00+02:00",
"result":"John/Jane Doe"
}
-
+
]
-
+
}
-
+
]
-
+
}
-
+
}
-
+
]
-
+
}
\ No newline at end of file
From 7c6f7d8c94128407618d25a9d5a2e43f8a8f41ba Mon Sep 17 00:00:00 2001
From: Christian Autermann
Date: Mon, 31 Mar 2014 14:09:20 +0200
Subject: [PATCH 028/229] Remove override annotation
---
core/api/src/main/java/org/n52/sos/util/MultiMap.java | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/core/api/src/main/java/org/n52/sos/util/MultiMap.java b/core/api/src/main/java/org/n52/sos/util/MultiMap.java
index 3f63e4f321..f7b2c4088d 100644
--- a/core/api/src/main/java/org/n52/sos/util/MultiMap.java
+++ b/core/api/src/main/java/org/n52/sos/util/MultiMap.java
@@ -94,7 +94,7 @@ public interface MultiMap> extends Map, Seri
*
* @return if the map was altered
*/
- @Override
+ // @Override will compile in Java 8 but not in Java 6/7
boolean remove(Object key, Object value);
/**
From 8da75eb62e1c92b65e036b1debf4d8db0f39402f Mon Sep 17 00:00:00 2001
From: Christian Autermann
Date: Mon, 31 Mar 2014 17:17:19 +0200
Subject: [PATCH 029/229] fixed client binding selection
---
.../org/n52/sos/web/ClientController.java | 60 ++--
.../src/main/webapp/WEB-INF/views/client.jsp | 12 +-
.../views/src/main/webapp/static/js/client.js | 40 ++-
.../webapp/static/conf/client-config.json | 294 +++++++++---------
4 files changed, 225 insertions(+), 181 deletions(-)
diff --git a/spring/client-controller/src/main/java/org/n52/sos/web/ClientController.java b/spring/client-controller/src/main/java/org/n52/sos/web/ClientController.java
index 0ea000996d..c7c3bf52aa 100644
--- a/spring/client-controller/src/main/java/org/n52/sos/web/ClientController.java
+++ b/spring/client-controller/src/main/java/org/n52/sos/web/ClientController.java
@@ -32,6 +32,11 @@
import java.util.List;
import java.util.Map.Entry;
+import org.springframework.stereotype.Controller;
+import org.springframework.web.bind.annotation.RequestMapping;
+import org.springframework.web.bind.annotation.RequestMethod;
+import org.springframework.web.servlet.ModelAndView;
+
import org.n52.sos.binding.Binding;
import org.n52.sos.binding.BindingRepository;
import org.n52.sos.coding.OperationKey;
@@ -40,16 +45,13 @@
import org.n52.sos.request.operator.RequestOperatorRepository;
import org.n52.sos.service.Configurator;
import org.n52.sos.util.http.HTTPMethods;
-import org.springframework.stereotype.Controller;
-import org.springframework.web.bind.annotation.RequestMapping;
-import org.springframework.web.bind.annotation.RequestMethod;
-import org.springframework.web.servlet.ModelAndView;
+import org.n52.sos.util.http.MediaType;
import com.google.common.base.Objects;
/**
* @since 4.0.0
- *
+ *
*/
@Controller
@RequestMapping(ControllerConstants.Paths.CLIENT)
@@ -81,19 +83,39 @@ private List getAvailableOperations() {
final String pattern = b.getKey();
final Binding binding = b.getValue();
if (binding.checkOperationHttpDeleteSupported(ok)) {
- ops.add(new AvailableOperation(service, version, operation, pattern, HTTPMethods.DELETE));
+ for (MediaType contentType : binding.getSupportedEncodings()) {
+ ops.add(new AvailableOperation(
+ service, version, operation,
+ contentType.toString(), HTTPMethods.DELETE));
+ }
}
if (binding.checkOperationHttpGetSupported(ok)) {
- ops.add(new AvailableOperation(service, version, operation, pattern, HTTPMethods.GET));
+ for (MediaType contentType : binding.getSupportedEncodings()) {
+ ops.add(new AvailableOperation(
+ service, version, operation,
+ contentType.toString(), HTTPMethods.GET));
+ }
}
if (binding.checkOperationHttpOptionsSupported(ok)) {
- ops.add(new AvailableOperation(service, version, operation, pattern, HTTPMethods.OPTIONS));
+ for (MediaType contentType : binding.getSupportedEncodings()) {
+ ops.add(new AvailableOperation(
+ service, version, operation,
+ contentType.toString(), HTTPMethods.OPTIONS));
+ }
}
if (binding.checkOperationHttpPostSupported(ok)) {
- ops.add(new AvailableOperation(service, version, operation, pattern, HTTPMethods.POST));
+ for (MediaType contentType : binding.getSupportedEncodings()) {
+ ops.add(new AvailableOperation(
+ service, version, operation,
+ contentType.toString(), HTTPMethods.POST));
+ }
}
if (binding.checkOperationHttpPutSupported(ok)) {
- ops.add(new AvailableOperation(service, version, operation, pattern, HTTPMethods.PUT));
+ for (MediaType contentType : binding.getSupportedEncodings()) {
+ ops.add(new AvailableOperation(
+ service, version, operation,
+ contentType.toString(), HTTPMethods.PUT));
+ }
}
} catch (HTTPException ex) {
/* ignore */
@@ -110,15 +132,15 @@ public static class AvailableOperation {
private final String operation;
- private final String binding;
+ private final String contentType;
private final String method;
- public AvailableOperation(String service, String version, String operation, String binding, String method) {
+ public AvailableOperation(String service, String version, String operation, String contentType, String method) {
this.service = service;
this.version = version;
this.operation = operation;
- this.binding = binding;
+ this.contentType = contentType;
this.method = method;
}
@@ -134,8 +156,8 @@ public String getOperation() {
return operation;
}
- public String getBinding() {
- return binding;
+ public String getContentType() {
+ return contentType;
}
public String getMethod() {
@@ -144,13 +166,13 @@ public String getMethod() {
@Override
public String toString() {
- return String.format("AvailableOperation[method=%s, service=%s, version=%s, operation=%s, binding=%s]",
- getMethod(), getService(), getVersion(), getOperation(), getBinding());
+ return String.format("AvailableOperation[method=%s, service=%s, version=%s, operation=%s, contentType=%s]",
+ getMethod(), getService(), getVersion(), getOperation(), getContentType());
}
@Override
public int hashCode() {
- return Objects.hashCode(getMethod(), getService(), getVersion(), getOperation(), getBinding());
+ return Objects.hashCode(getMethod(), getService(), getVersion(), getOperation(), getContentType());
}
@Override
@@ -161,7 +183,7 @@ public boolean equals(Object obj) {
&& Objects.equal(getService(), other.getService())
&& Objects.equal(getVersion(), other.getVersion())
&& Objects.equal(getOperation(), other.getOperation())
- && Objects.equal(getBinding(), other.getBinding());
+ && Objects.equal(getContentType(), other.getContentType());
}
return false;
}
diff --git a/spring/views/src/main/webapp/WEB-INF/views/client.jsp b/spring/views/src/main/webapp/WEB-INF/views/client.jsp
index 4659a5fd9d..e07a01bde7 100644
--- a/spring/views/src/main/webapp/WEB-INF/views/client.jsp
+++ b/spring/views/src/main/webapp/WEB-INF/views/client.jsp
@@ -120,7 +120,7 @@
@@ -142,31 +142,31 @@
r.headers = {};
switch (b) {
case "KVP":
-: case "/kvp":
+ case "/kvp":
r.method = "GET";
r.headers["Accept"] = "application/xml";
- r.binding = "KVP";
+ r.binding = "application/x-kvp";
break;
case "POX":
case "/pox":
r.method = "POST";
r.headers["Accept"] = "application/xml";
r.headers["Content-Type"] = "application/xml";
- r.binding = "POX"
+ r.binding = "application/xml";
break;
case "SOAP":
case "/soap":
r.method = "POST";
r.headers["Accept"] = "application/soap+xml";
r.headers["Content-Type"] = "application/soap+xml";
- r.binding = "SOAP":
+ r.binding = "application/soap+xml";
break;
case "JSON":
case "/json":
r.method = "POST";
r.headers["Accept"] = "application/json";
r.headers["Content-Type"] = "application/json";
- r.binding = "JSON";
+ r.binding = "application/json";
break;
default:
if (console && console.log) {
diff --git a/spring/views/src/main/webapp/static/js/client.js b/spring/views/src/main/webapp/static/js/client.js
index 6fcfc2a526..8daa394b00 100644
--- a/spring/views/src/main/webapp/static/js/client.js
+++ b/spring/views/src/main/webapp/static/js/client.js
@@ -183,20 +183,26 @@ $(function() {
}
},
createFilters: function() {
- var self = this;
+ var self = this, e, pl, jq, id, i, j;
this.filters = [];
- for (var i = 0; i < arguments.length; ++i) {
- var e = arguments[i],
- pl = e + "s",
- jq = "$" + e,
- id = "#" + e;
+ for (i = 0; i < arguments.length; ++i) {
+ e = arguments[i],
+ pl = e + "s",
+ jq = "$" + e,
+ id = "#" + e;
// currently selected value
this[e] = null;
this.filters.push(e);
// supported values
this[pl] = new Set();
this.availableOperations.forEach(function(r) {
- self[pl].add(r[e]);
+ // check if we actually have a matching request example
+ for (j = 0; j < self.requests.length; ++j) {
+ if (self.requests[j][e] === r[e]) {
+ self[pl].add(r[e]);
+ break;
+ }
+ }
});
this[pl] = this[pl].keys();
this[pl].sort();
@@ -211,13 +217,29 @@ $(function() {
this[jq].append($("").attr("value", "any")
.text("Any " + e.slice(0, 1).toUpperCase() + e.slice(1)));
this[pl].forEach(function(s) {
- self[jq].append($(" ").attr("value", s).text(s));
+ self[jq].append($(" ").attr("value", s)
+ .text(self.toHumanReadableString(s)));
});
this[jq].trigger("change");
this[jq].attr("disabled", this[jq].find("option").length <= 1);
}
},
+ toHumanReadableString: function(contentType) {
+ switch (contentType) {
+ case "application/x-kvp":
+ return "KVP";
+ case "application/soap+xml":
+ return "SOAP";
+ case "text/xml":
+ case "application/xml":
+ return "POX";
+ case "application/json":
+ return "JSON";
+ default:
+ return contentType;
+ }
+ },
filter: function(requests) {
var filtered = [];
for (var i = 0; i < requests.length; ++i) {
@@ -439,7 +461,7 @@ $(function() {
if (examples.hasOwnProperty(id)){
def = examples[id];
text = "";
- text += "[" + def.binding.slice(1).toUpperCase() + "]";
+ text += "[" + this.toHumanReadableString(def.binding) + "]";
text += " " + def.operation;
if (def.title) {
text += " - " + def.title;
diff --git a/webapp/src/main/webapp/static/conf/client-config.json b/webapp/src/main/webapp/static/conf/client-config.json
index 8f2e30bd46..f7428d9704 100644
--- a/webapp/src/main/webapp/static/conf/client-config.json
+++ b/webapp/src/main/webapp/static/conf/client-config.json
@@ -10,7 +10,7 @@
},
"service":"SOS",
"version":"1.0.0",
- "binding": "KVP",
+ "binding": "application/x-kvp",
"operation":"DescribeSensor",
"headers":{
"Accept":"application/xml"
@@ -25,7 +25,7 @@
},
"service":"SOS",
"version":"1.0.0",
- "binding": "KVP",
+ "binding": "application/x-kvp",
"operation":"GetCapabilities",
"headers":{
"Accept":"application/xml"
@@ -46,7 +46,7 @@
},
"service":"SOS",
"version":"1.0.0",
- "binding": "KVP",
+ "binding": "application/x-kvp",
"operation":"GetObservation",
"headers":{
"Accept":"application/xml"
@@ -62,7 +62,7 @@
},
"service":"SOS",
"version":"2.0.0",
- "binding": "KVP",
+ "binding": "application/x-kvp",
"operation":"DeleteObservation",
"headers":{
"Accept":"application/xml"
@@ -78,7 +78,7 @@
},
"service":"SOS",
"version":"2.0.0",
- "binding": "KVP",
+ "binding": "application/x-kvp",
"operation":"DeleteSensor",
"headers":{
"Accept":"application/xml"
@@ -95,7 +95,7 @@
},
"service":"SOS",
"version":"2.0.0",
- "binding": "KVP",
+ "binding": "application/x-kvp",
"operation":"DescribeSensor",
"headers":{
"Accept":"application/xml"
@@ -109,7 +109,7 @@
},
"service":"SOS",
"version":"2.0.0",
- "binding": "KVP",
+ "binding": "application/x-kvp",
"operation":"GetCapabilities",
"title":"minimal",
"headers":{
@@ -125,7 +125,7 @@
},
"service":"SOS",
"version":"2.0.0",
- "binding": "KVP",
+ "binding": "application/x-kvp",
"operation":"GetCapabilities",
"title":"only Contents section",
"headers":{
@@ -141,7 +141,7 @@
},
"service":"SOS",
"version":"2.0.0",
- "binding": "KVP",
+ "binding": "application/x-kvp",
"operation":"GetCapabilities",
"title":"only OperationsMetadata section",
"headers":{
@@ -157,7 +157,7 @@
},
"service":"SOS",
"version":"2.0.0",
- "binding": "KVP",
+ "binding": "application/x-kvp",
"operation":"GetCapabilities",
"title":"with AcceptVersions=2.0.0",
"headers":{
@@ -187,7 +187,7 @@
},
"service":"SOS",
"version":"2.0.0",
- "binding": "KVP",
+ "binding": "application/x-kvp",
"operation":"GetDataAvailability",
"headers":{
"Accept":"application/xml"
@@ -202,7 +202,7 @@
},
"service":"SOS",
"version":"2.0.0",
- "binding": "KVP",
+ "binding": "application/x-kvp",
"operation":"GetDataAvailability",
"title":"minimal",
"headers":{
@@ -219,7 +219,7 @@
},
"service":"SOS",
"version":"2.0.0",
- "binding": "KVP",
+ "binding": "application/x-kvp",
"operation":"GetFeatureOfInterest",
"title":"featureOfInterest",
"headers":{
@@ -240,7 +240,7 @@
},
"service":"SOS",
"version":"2.0.0",
- "binding": "KVP",
+ "binding": "application/x-kvp",
"operation":"GetFeatureOfInterest",
"title":"featureOfInterests",
"headers":{
@@ -256,7 +256,7 @@
},
"service":"SOS",
"version":"2.0.0",
- "binding": "KVP",
+ "binding": "application/x-kvp",
"operation":"GetFeatureOfInterest",
"title":"minimal",
"headers":{
@@ -277,7 +277,7 @@
},
"service":"SOS",
"version":"2.0.0",
- "binding": "KVP",
+ "binding": "application/x-kvp",
"operation":"GetFeatureOfInterest",
"title":"observableProperties",
"headers":{
@@ -294,7 +294,7 @@
},
"service":"SOS",
"version":"2.0.0",
- "binding": "KVP",
+ "binding": "application/x-kvp",
"operation":"GetFeatureOfInterest",
"title":"observableProperty",
"headers":{
@@ -311,7 +311,7 @@
},
"service":"SOS",
"version":"2.0.0",
- "binding": "KVP",
+ "binding": "application/x-kvp",
"operation":"GetFeatureOfInterest",
"title":"procedure",
"headers":{
@@ -332,7 +332,7 @@
},
"service":"SOS",
"version":"2.0.0",
- "binding": "KVP",
+ "binding": "application/x-kvp",
"operation":"GetFeatureOfInterest",
"title":"procedures",
"headers":{
@@ -353,7 +353,7 @@
},
"service":"SOS",
"version":"2.0.0",
- "binding": "KVP",
+ "binding": "application/x-kvp",
"operation":"GetFeatureOfInterest",
"title":"spatial filter, URL",
"headers":{
@@ -374,7 +374,7 @@
},
"service":"SOS",
"version":"2.0.0",
- "binding": "KVP",
+ "binding": "application/x-kvp",
"operation":"GetFeatureOfInterest",
"title":"spatial filter, URN",
"headers":{
@@ -395,7 +395,7 @@
},
"service":"SOS",
"version":"2.0.0",
- "binding": "KVP",
+ "binding": "application/x-kvp",
"operation":"GetObservation",
"title":"Extension 'MergeObservationsIntoDataArray'",
"headers":{
@@ -412,7 +412,7 @@
},
"service":"SOS",
"version":"2.0.0",
- "binding": "KVP",
+ "binding": "application/x-kvp",
"operation":"GetObservation",
"title":"featureOfInterest",
"headers":{
@@ -433,7 +433,7 @@
},
"service":"SOS",
"version":"2.0.0",
- "binding": "KVP",
+ "binding": "application/x-kvp",
"operation":"GetObservation",
"title":"featureOfInterests",
"headers":{
@@ -458,7 +458,7 @@
},
"service":"SOS",
"version":"2.0.0",
- "binding": "KVP",
+ "binding": "application/x-kvp",
"operation":"GetObservation",
"title":"full",
"headers":{
@@ -479,7 +479,7 @@
},
"service":"SOS",
"version":"2.0.0",
- "binding": "KVP",
+ "binding": "application/x-kvp",
"operation":"GetObservation",
"title":"observableProperties",
"headers":{
@@ -496,7 +496,7 @@
},
"service":"SOS",
"version":"2.0.0",
- "binding": "KVP",
+ "binding": "application/x-kvp",
"operation":"GetObservation",
"title":"observableProperty",
"headers":{
@@ -513,7 +513,7 @@
},
"service":"SOS",
"version":"2.0.0",
- "binding": "KVP",
+ "binding": "application/x-kvp",
"operation":"GetObservation",
"title":"offering",
"headers":{
@@ -534,7 +534,7 @@
},
"service":"SOS",
"version":"2.0.0",
- "binding": "KVP",
+ "binding": "application/x-kvp",
"operation":"GetObservation",
"title":"offerings",
"headers":{
@@ -551,7 +551,7 @@
},
"service":"SOS",
"version":"2.0.0",
- "binding": "KVP",
+ "binding": "application/x-kvp",
"operation":"GetObservation",
"title":"procedure",
"headers":{
@@ -572,7 +572,7 @@
},
"service":"SOS",
"version":"2.0.0",
- "binding": "KVP",
+ "binding": "application/x-kvp",
"operation":"GetObservation",
"title":"procedures",
"headers":{
@@ -593,7 +593,7 @@
},
"service":"SOS",
"version":"2.0.0",
- "binding": "KVP",
+ "binding": "application/x-kvp",
"operation":"GetObservation",
"title":"spatial filter, URL",
"headers":{
@@ -614,7 +614,7 @@
},
"service":"SOS",
"version":"2.0.0",
- "binding": "KVP",
+ "binding": "application/x-kvp",
"operation":"GetObservation",
"title":"spatial filter, URN",
"headers":{
@@ -632,7 +632,7 @@
},
"service":"SOS",
"version":"2.0.0",
- "binding": "KVP",
+ "binding": "application/x-kvp",
"operation":"GetObservation",
"title":"temporal filter during",
"headers":{
@@ -650,7 +650,7 @@
},
"service":"SOS",
"version":"2.0.0",
- "binding": "KVP",
+ "binding": "application/x-kvp",
"operation":"GetObservation",
"title":"temporal filter equal",
"headers":{
@@ -668,7 +668,7 @@
},
"service":"SOS",
"version":"2.0.0",
- "binding": "KVP",
+ "binding": "application/x-kvp",
"operation":"GetObservation",
"title":"temporal filter equal, negativ time zone",
"headers":{
@@ -686,7 +686,7 @@
},
"service":"SOS",
"version":"2.0.0",
- "binding": "KVP",
+ "binding": "application/x-kvp",
"operation":"GetObservation",
"title":"temporal filter equal, reduced time",
"headers":{
@@ -704,7 +704,7 @@
},
"service":"SOS",
"version":"2.0.0",
- "binding": "KVP",
+ "binding": "application/x-kvp",
"operation":"GetObservation",
"title":"temporal filter first",
"headers":{
@@ -722,7 +722,7 @@
},
"service":"SOS",
"version":"2.0.0",
- "binding": "KVP",
+ "binding": "application/x-kvp",
"operation":"GetObservation",
"title":"temporal filter latest",
"headers":{
@@ -740,7 +740,7 @@
},
"service":"SOS",
"version":"2.0.0",
- "binding": "KVP",
+ "binding": "application/x-kvp",
"operation":"GetResult",
"headers":{
"Accept":"application/xml"
@@ -757,7 +757,7 @@
},
"service":"SOS",
"version":"2.0.0",
- "binding": "KVP",
+ "binding": "application/x-kvp",
"operation":"GetResultTemplate",
"headers":{
"Accept":"application/xml"
@@ -768,7 +768,7 @@
"request":"static/examples/sos_v100/requests_xml/DescribeSensor.xml",
"service":"SOS",
"version":"1.0.0",
- "binding": "POX",
+ "binding": "application/xml",
"operation":"DescribeSensor",
"headers":{
"Accept":"application/xml",
@@ -780,7 +780,7 @@
"request":"static/examples/sos_v100/requests_xml/GetCapabilities.xml",
"service":"SOS",
"version":"1.0.0",
- "binding": "POX",
+ "binding": "application/xml",
"operation":"GetCapabilities",
"title":"All Sections",
"headers":{
@@ -793,7 +793,7 @@
"request":"static/examples/sos_v100/requests_xml/GetFeatureOfInterest_SpatialFilter.xml",
"service":"SOS",
"version":"1.0.0",
- "binding": "POX",
+ "binding": "application/xml",
"operation":"GetFeatureOfInterest",
"title":"BoundingBox",
"headers":{
@@ -806,7 +806,7 @@
"request":"static/examples/sos_v100/requests_xml/GetFeatureOfInterest.xml",
"service":"SOS",
"version":"1.0.0",
- "binding": "POX",
+ "binding": "application/xml",
"operation":"GetFeatureOfInterest",
"title":"FeatureOfInterestId",
"headers":{
@@ -819,7 +819,7 @@
"request":"static/examples/sos_v100/requests_xml/GetObservation.xml",
"service":"SOS",
"version":"1.0.0",
- "binding": "POX",
+ "binding": "application/xml",
"operation":"GetObservation",
"title":"All Parameters",
"headers":{
@@ -832,7 +832,7 @@
"request":"static/examples/sos_v100/requests_xml/GetObservationById.xml",
"service":"SOS",
"version":"1.0.0",
- "binding": "POX",
+ "binding": "application/xml",
"operation":"GetObservationById",
"headers":{
"Accept":"application/xml",
@@ -844,7 +844,7 @@
"request":"static/examples/sos_v100/requests_xml/InsertObservation/InsertObservation_categoryObservation.xml",
"service":"SOS",
"version":"1.0.0",
- "binding": "POX",
+ "binding": "application/xml",
"operation":"InsertObservation",
"title":"CategoryObservation",
"headers":{
@@ -857,7 +857,7 @@
"request":"static/examples/sos_v100/requests_xml/InsertObservation/InsertObservation_GenericObs_allTypes.xml",
"service":"SOS",
"version":"1.0.0",
- "binding": "POX",
+ "binding": "application/xml",
"operation":"InsertObservation",
"title":"GenericObservation - AllTypes",
"headers":{
@@ -870,7 +870,7 @@
"request":"static/examples/sos_v100/requests_xml/InsertObservation/InsertObservation_GenericObs_Derwent.xml",
"service":"SOS",
"version":"1.0.0",
- "binding": "POX",
+ "binding": "application/xml",
"operation":"InsertObservation",
"title":"GenericObservation - Derwent",
"headers":{
@@ -883,7 +883,7 @@
"request":"static/examples/sos_v100/requests_xml/InsertObservation/InsertObservation_GenericObs_Derwent_2.xml",
"service":"SOS",
"version":"1.0.0",
- "binding": "POX",
+ "binding": "application/xml",
"operation":"InsertObservation",
"title":"GenericObservation - Derwent 2",
"headers":{
@@ -896,7 +896,7 @@
"request":"static/examples/sos_v100/requests_xml/InsertObservation/InsertObservation_GenericObs_noIDs.xml",
"service":"SOS",
"version":"1.0.0",
- "binding": "POX",
+ "binding": "application/xml",
"operation":"InsertObservation",
"title":"GenericObservation - No ID's",
"headers":{
@@ -909,7 +909,7 @@
"request":"static/examples/sos_v100/requests_xml/InsertObservation/InsertObs_geometry.xml",
"service":"SOS",
"version":"1.0.0",
- "binding": "POX",
+ "binding": "application/xml",
"operation":"InsertObservation",
"title":"Geometry",
"headers":{
@@ -922,7 +922,7 @@
"request":"static/examples/sos_v100/requests_xml/InsertObservation/InsertObs_geometry_movingObject.xml",
"service":"SOS",
"version":"1.0.0",
- "binding": "POX",
+ "binding": "application/xml",
"operation":"InsertObservation",
"title":"Geometry - MovingObject",
"headers":{
@@ -935,7 +935,7 @@
"request":"static/examples/sos_v100/requests_xml/InsertObservation/InsertObservation_Measurement.xml",
"service":"SOS",
"version":"1.0.0",
- "binding": "POX",
+ "binding": "application/xml",
"operation":"InsertObservation",
"title":"Measurement",
"headers":{
@@ -948,7 +948,7 @@
"request":"static/examples/sos_v100/requests_xml/InsertObservation/InsertObservation_4_RegSen_withFOI.xml",
"service":"SOS",
"version":"1.0.0",
- "binding": "POX",
+ "binding": "application/xml",
"operation":"InsertObservation",
"title":"RegisterSensor - FeatureOfInterest",
"headers":{
@@ -961,7 +961,7 @@
"request":"static/examples/sos_v100/requests_xml/InsertObservation/InsertObservation_samplingPoint.xml",
"service":"SOS",
"version":"1.0.0",
- "binding": "POX",
+ "binding": "application/xml",
"operation":"InsertObservation",
"title":"SamplingPoint",
"headers":{
@@ -974,7 +974,7 @@
"request":"static/examples/sos_v100/requests_xml/InsertObservation/InsertObservation_samplingSurface.xml",
"service":"SOS",
"version":"1.0.0",
- "binding": "POX",
+ "binding": "application/xml",
"operation":"InsertObservation",
"title":"SamplingSurface",
"headers":{
@@ -987,7 +987,7 @@
"request":"static/examples/sos_v100/requests_xml/RegisterSensor/RegisterSensor_categoryObservation.xml",
"service":"SOS",
"version":"1.0.0",
- "binding": "POX",
+ "binding": "application/xml",
"operation":"RegisterSensor",
"title":"CategoryObservation",
"headers":{
@@ -1000,7 +1000,7 @@
"request":"static/examples/sos_v100/requests_xml/RegisterSensor/RegisterSensor_withFOI.xml",
"service":"SOS",
"version":"1.0.0",
- "binding": "POX",
+ "binding": "application/xml",
"operation":"RegisterSensor",
"title":"FeatureOfInterest",
"headers":{
@@ -1013,7 +1013,7 @@
"request":"static/examples/sos_v100/requests_xml/RegisterSensor/RegisterSensor_geometry.xml",
"service":"SOS",
"version":"1.0.0",
- "binding": "POX",
+ "binding": "application/xml",
"operation":"RegisterSensor",
"title":"Geometry",
"headers":{
@@ -1026,7 +1026,7 @@
"request":"static/examples/sos_v100/requests_xml/RegisterSensor/RegisterSensor_measurement.xml",
"service":"SOS",
"version":"1.0.0",
- "binding": "POX",
+ "binding": "application/xml",
"operation":"RegisterSensor",
"title":"Measurement",
"headers":{
@@ -1039,7 +1039,7 @@
"request":"static/examples/sos_v100/requests_xml/RegisterSensor/RegisterSensor_Measurement_Derwent.xml",
"service":"SOS",
"version":"1.0.0",
- "binding": "POX",
+ "binding": "application/xml",
"operation":"RegisterSensor",
"title":"Measurement - Derwent",
"headers":{
@@ -1052,7 +1052,7 @@
"request":"static/examples/sos_v100/requests_xml/RegisterSensor/RegisterSensor_Observation_Derwent_2.xml",
"service":"SOS",
"version":"1.0.0",
- "binding": "POX",
+ "binding": "application/xml",
"operation":"RegisterSensor",
"title":"Measurement - Derwent 2",
"headers":{
@@ -1065,7 +1065,7 @@
"request":"static/examples/sos_v100/requests_xml/RegisterSensor/RegisterSensor_Observation_allTypes.xml",
"service":"SOS",
"version":"1.0.0",
- "binding": "POX",
+ "binding": "application/xml",
"operation":"RegisterSensor",
"title":"Observation - AllTypes",
"headers":{
@@ -1078,7 +1078,7 @@
"request":"static/examples/sos_v100/requests_xml/RegisterSensor/RegisterSensor_Observation_noIDs.xml",
"service":"SOS",
"version":"1.0.0",
- "binding": "POX",
+ "binding": "application/xml",
"operation":"RegisterSensor",
"title":"Observation - No ID's",
"headers":{
@@ -1091,7 +1091,7 @@
"request":"static/examples/sos_v20/requests_xml/DeleteObservation.xml",
"service":"SOS",
"version":"2.0.0",
- "binding": "POX",
+ "binding": "application/xml",
"operation":"DeleteObservation",
"headers":{
"Accept":"application/xml",
@@ -1103,7 +1103,7 @@
"request":"static/examples/sos_v20/requests_xml/Transactional/DeleteSensor.xml",
"service":"SOS",
"version":"2.0.0",
- "binding": "POX",
+ "binding": "application/xml",
"operation":"DeleteSensor",
"headers":{
"Accept":"application/xml",
@@ -1115,7 +1115,7 @@
"request":"static/examples/sos_v20/requests_xml/DescribeSensor.xml",
"service":"SOS",
"version":"2.0.0",
- "binding": "POX",
+ "binding": "application/xml",
"operation":"DescribeSensor",
"headers":{
"Accept":"application/xml",
@@ -1127,7 +1127,7 @@
"request":"static/examples/sos_v20/requests_xml/GetCapabilities.xml",
"service":"SOS",
"version":"2.0.0",
- "binding": "POX",
+ "binding": "application/xml",
"operation":"GetCapabilities",
"headers":{
"Accept":"application/xml",
@@ -1139,7 +1139,7 @@
"request":"static/examples/sos_v20/requests_xml/GetDataAvailability.xml",
"service":"SOS",
"version":"2.0.0",
- "binding": "POX",
+ "binding": "application/xml",
"operation":"GetDataAvailability",
"headers":{
"Accept":"application/xml",
@@ -1151,7 +1151,7 @@
"request":"static/examples/sos_v20/requests_xml/GetFeatureOfInterest.xml",
"service":"SOS",
"version":"2.0.0",
- "binding": "POX",
+ "binding": "application/xml",
"operation":"GetFeatureOfInterest",
"headers":{
"Accept":"application/xml",
@@ -1163,7 +1163,7 @@
"request":"static/examples/sos_v20/requests_xml/GetObservation.xml",
"service":"SOS",
"version":"2.0.0",
- "binding": "POX",
+ "binding": "application/xml",
"operation":"GetObservation",
"headers":{
"Accept":"application/xml",
@@ -1175,7 +1175,7 @@
"request":"static/examples/sos_v20/requests_xml/GetObservationById.xml",
"service":"SOS",
"version":"2.0.0",
- "binding": "POX",
+ "binding": "application/xml",
"operation":"GetObservationById",
"headers":{
"Accept":"application/xml",
@@ -1187,7 +1187,7 @@
"request":"static/examples/sos_v20/requests_xml/ResultHandling/GetResult.xml",
"service":"SOS",
"version":"2.0.0",
- "binding": "POX",
+ "binding": "application/xml",
"operation":"GetResult",
"headers":{
"Accept":"application/xml",
@@ -1199,7 +1199,7 @@
"request":"static/examples/sos_v20/requests_xml/ResultHandling/GetResultTemplate.xml",
"service":"SOS",
"version":"2.0.0",
- "binding": "POX",
+ "binding": "application/xml",
"operation":"GetResultTemplate",
"headers":{
"Accept":"application/xml",
@@ -1211,7 +1211,7 @@
"request":"static/examples/sos_v20/requests_xml/Transactional/InsertObservation_Category.xml",
"service":"SOS",
"version":"2.0.0",
- "binding": "POX",
+ "binding": "application/xml",
"operation":"InsertObservation",
"title":"Category",
"headers":{
@@ -1224,7 +1224,7 @@
"request":"static/examples/sos_v20/requests_xml/Transactional/InsertObservation_Count.xml",
"service":"SOS",
"version":"2.0.0",
- "binding": "POX",
+ "binding": "application/xml",
"operation":"InsertObservation",
"title":"Count",
"headers":{
@@ -1237,7 +1237,7 @@
"request":"static/examples/sos_v20/requests_xml/Transactional/InsertObservation_Geometry.xml",
"service":"SOS",
"version":"2.0.0",
- "binding": "POX",
+ "binding": "application/xml",
"operation":"InsertObservation",
"title":"Geometry",
"headers":{
@@ -1250,7 +1250,7 @@
"request":"static/examples/sos_v20/requests_xml/Transactional/InsertObservation_Measurement.xml",
"service":"SOS",
"version":"2.0.0",
- "binding": "POX",
+ "binding": "application/xml",
"operation":"InsertObservation",
"title":"Measurement",
"headers":{
@@ -1263,7 +1263,7 @@
"request":"static/examples/sos_v20/requests_xml/Transactional/InsertObservation_Measurement_SFP.xml",
"service":"SOS",
"version":"2.0.0",
- "binding": "POX",
+ "binding": "application/xml",
"operation":"InsertObservation",
"title":"Measurement/Spatial Filtering Profile",
"headers":{
@@ -1276,7 +1276,7 @@
"request":"static/examples/sos_v20/requests_xml/Transactional/InsertObservation_Multiple.xml",
"service":"SOS",
"version":"2.0.0",
- "binding": "POX",
+ "binding": "application/xml",
"operation":"InsertObservation",
"title":"Multiple observations",
"headers":{
@@ -1289,7 +1289,7 @@
"request":"static/examples/sos_v20/requests_xml/Transactional/InsertObservation_SweArray.xml",
"service":"SOS",
"version":"2.0.0",
- "binding": "POX",
+ "binding": "application/xml",
"operation":"InsertObservation",
"title":"SweArray",
"headers":{
@@ -1302,7 +1302,7 @@
"request":"static/examples/sos_v20/requests_xml/Transactional/InsertObservation_Text.xml",
"service":"SOS",
"version":"2.0.0",
- "binding": "POX",
+ "binding": "application/xml",
"operation":"InsertObservation",
"title":"Text",
"headers":{
@@ -1315,7 +1315,7 @@
"request":"static/examples/sos_v20/requests_xml/Transactional/InsertObservation_Truth.xml",
"service":"SOS",
"version":"2.0.0",
- "binding": "POX",
+ "binding": "application/xml",
"operation":"InsertObservation",
"title":"Truth",
"headers":{
@@ -1328,7 +1328,7 @@
"request":"static/examples/sos_v20/requests_xml/ResultHandling/InsertResult.xml",
"service":"SOS",
"version":"2.0.0",
- "binding": "POX",
+ "binding": "application/xml",
"operation":"InsertResult",
"headers":{
"Accept":"application/xml",
@@ -1340,7 +1340,7 @@
"request":"static/examples/sos_v20/requests_xml/ResultHandling/InsertResultTemplate.xml",
"service":"SOS",
"version":"2.0.0",
- "binding": "POX",
+ "binding": "application/xml",
"operation":"InsertResultTemplate",
"headers":{
"Accept":"application/xml",
@@ -1352,7 +1352,7 @@
"request":"static/examples/sos_v20/requests_xml/Transactional/InsertSensor.xml",
"service":"SOS",
"version":"2.0.0",
- "binding": "POX",
+ "binding": "application/xml",
"operation":"InsertSensor",
"headers":{
"Accept":"application/xml",
@@ -1364,7 +1364,7 @@
"request":"static/examples/sos_v20/requests_xml/Transactional/UpdateSensorDescription.xml",
"service":"SOS",
"version":"2.0.0",
- "binding": "POX",
+ "binding": "application/xml",
"operation":"UpdateSensorDescription",
"headers":{
"Accept":"application/xml",
@@ -1376,7 +1376,7 @@
"request":"static/examples/sos_v100/requests_soap/DescribeSensor.xml",
"service":"SOS",
"version":"1.0.0",
- "binding": "SOAP",
+ "binding": "application/soap+xml",
"operation":"DescribeSensor",
"title":"SOAP 1.2",
"headers":{
@@ -1389,7 +1389,7 @@
"request":"static/examples/sos_v100/requests_soap/GetCapabilities.xml",
"service":"SOS",
"version":"1.0.0",
- "binding": "SOAP",
+ "binding": "application/soap+xml",
"operation":"GetCapabilities",
"title":"All Sections (SOAP 1.2)",
"headers":{
@@ -1402,7 +1402,7 @@
"request":"static/examples/sos_v100/requests_soap/GetFeatureOfInterest_SpatialFilter.xml",
"service":"SOS",
"version":"1.0.0",
- "binding": "SOAP",
+ "binding": "application/soap+xml",
"operation":"GetFeatureOfInterest",
"title":"BBOX (SOAP 1.2)",
"headers":{
@@ -1415,7 +1415,7 @@
"request":"static/examples/sos_v100/requests_soap/GetFeatureOfInterest.xml",
"service":"SOS",
"version":"1.0.0",
- "binding": "SOAP",
+ "binding": "application/soap+xml",
"operation":"GetFeatureOfInterest",
"title":"ID (SOAP 1.2)",
"headers":{
@@ -1428,7 +1428,7 @@
"request":"static/examples/sos_v100/requests_soap/GetObservation.xml",
"service":"SOS",
"version":"1.0.0",
- "binding": "SOAP",
+ "binding": "application/soap+xml",
"operation":"GetObservation",
"title":"All Parameters (SOAP 1.2)",
"headers":{
@@ -1441,7 +1441,7 @@
"request":"static/examples/sos_v100/requests_soap/GetObservationById.xml",
"service":"SOS",
"version":"1.0.0",
- "binding": "SOAP",
+ "binding": "application/soap+xml",
"operation":"GetObservationById",
"title":"By ID (SOAP 1.2)",
"headers":{
@@ -1454,7 +1454,7 @@
"request":"static/examples/sos_v100/requests_soap/InsertObservation.xml",
"service":"SOS",
"version":"1.0.0",
- "binding": "SOAP",
+ "binding": "application/soap+xml",
"operation":"InsertObservation",
"title":"SOAP 1.2",
"headers":{
@@ -1467,7 +1467,7 @@
"request":"static/examples/sos_v100/requests_soap/RegisterSensor.xml",
"service":"SOS",
"version":"1.0.0",
- "binding": "SOAP",
+ "binding": "application/soap+xml",
"operation":"RegisterSensor",
"title":"SOAP 1.2",
"headers":{
@@ -1480,7 +1480,7 @@
"request":"static/examples/sos_v20/requests_soap/DeleteObservation.xml",
"service":"SOS",
"version":"2.0.0",
- "binding": "SOAP",
+ "binding": "application/soap+xml",
"operation":"DeleteObservation",
"headers":{
"Accept":"application/soap+xml",
@@ -1492,7 +1492,7 @@
"request":"static/examples/sos_v20/requests_soap/Transactional/DeleteSensor.xml",
"service":"SOS",
"version":"2.0.0",
- "binding": "SOAP",
+ "binding": "application/soap+xml",
"operation":"DeleteSensor",
"headers":{
"Accept":"application/soap+xml",
@@ -1504,7 +1504,7 @@
"request":"static/examples/sos_v20/requests_soap/DescribeSensor.xml",
"service":"SOS",
"version":"2.0.0",
- "binding": "SOAP",
+ "binding": "application/soap+xml",
"operation":"DescribeSensor",
"headers":{
"Accept":"application/soap+xml",
@@ -1516,7 +1516,7 @@
"request":"static/examples/sos_v20/requests_soap/GetCapabilities.xml",
"service":"SOS",
"version":"2.0.0",
- "binding": "SOAP",
+ "binding": "application/soap+xml",
"operation":"GetCapabilities",
"headers":{
"Accept":"application/soap+xml",
@@ -1528,7 +1528,7 @@
"request":"static/examples/sos_v20/requests_soap/GetDataAvailability.xml",
"service":"SOS",
"version":"2.0.0",
- "binding": "SOAP",
+ "binding": "application/soap+xml",
"operation":"GetDataAvailability",
"headers":{
"Accept":"application/soap+xml",
@@ -1540,7 +1540,7 @@
"request":"static/examples/sos_v20/requests_soap/GetFeatureOfInterest.xml",
"service":"SOS",
"version":"2.0.0",
- "binding": "SOAP",
+ "binding": "application/soap+xml",
"operation":"GetFeatureOfInterest",
"headers":{
"Accept":"application/soap+xml",
@@ -1552,7 +1552,7 @@
"request":"static/examples/sos_v20/requests_soap/GetObservation.xml",
"service":"SOS",
"version":"2.0.0",
- "binding": "SOAP",
+ "binding": "application/soap+xml",
"operation":"GetObservation",
"headers":{
"Accept":"application/soap+xml",
@@ -1564,7 +1564,7 @@
"request":"static/examples/sos_v20/requests_soap/GetObservationById.xml",
"service":"SOS",
"version":"2.0.0",
- "binding": "SOAP",
+ "binding": "application/soap+xml",
"operation":"GetObservationById",
"headers":{
"Accept":"application/soap+xml",
@@ -1576,7 +1576,7 @@
"request":"static/examples/sos_v20/requests_soap/ResultHandling/GetResult.xml",
"service":"SOS",
"version":"2.0.0",
- "binding": "SOAP",
+ "binding": "application/soap+xml",
"operation":"GetResult",
"headers":{
"Accept":"application/soap+xml",
@@ -1588,7 +1588,7 @@
"request":"static/examples/sos_v20/requests_soap/ResultHandling/GetResultTemplate.xml",
"service":"SOS",
"version":"2.0.0",
- "binding": "SOAP",
+ "binding": "application/soap+xml",
"operation":"GetResultTemplate",
"headers":{
"Accept":"application/soap+xml",
@@ -1600,7 +1600,7 @@
"request":"static/examples/sos_v20/requests_soap/Transactional/InsertObservation_Category.xml",
"service":"SOS",
"version":"2.0.0",
- "binding": "SOAP",
+ "binding": "application/soap+xml",
"operation":"InsertObservation",
"title":"Category",
"headers":{
@@ -1613,7 +1613,7 @@
"request":"static/examples/sos_v20/requests_soap/Transactional/InsertObservation_Count.xml",
"service":"SOS",
"version":"2.0.0",
- "binding": "SOAP",
+ "binding": "application/soap+xml",
"operation":"InsertObservation",
"title":"Count",
"headers":{
@@ -1626,7 +1626,7 @@
"request":"static/examples/sos_v20/requests_soap/Transactional/InsertObservation_Geometry.xml",
"service":"SOS",
"version":"2.0.0",
- "binding": "SOAP",
+ "binding": "application/soap+xml",
"operation":"InsertObservation",
"title":"Geometry",
"headers":{
@@ -1639,7 +1639,7 @@
"request":"static/examples/sos_v20/requests_soap/Transactional/InsertObservation_Measurement.xml",
"service":"SOS",
"version":"2.0.0",
- "binding": "SOAP",
+ "binding": "application/soap+xml",
"operation":"InsertObservation",
"title":"Measurement",
"headers":{
@@ -1652,7 +1652,7 @@
"request":"static/examples/sos_v20/requests_soap/Transactional/InsertObservation_Measurement_SFP.xml",
"service":"SOS",
"version":"2.0.0",
- "binding": "SOAP",
+ "binding": "application/soap+xml",
"operation":"InsertObservation",
"title":"Measurement/Spatial Filtering Profile",
"headers":{
@@ -1665,7 +1665,7 @@
"request":"static/examples/sos_v20/requests_soap/Transactional/InsertObservation_Multiple.xml",
"service":"SOS",
"version":"2.0.0",
- "binding": "SOAP",
+ "binding": "application/soap+xml",
"operation":"InsertObservation",
"title":"Multiple observations",
"headers":{
@@ -1678,7 +1678,7 @@
"request":"static/examples/sos_v20/requests_soap/Transactional/InsertObservation_SweArray.xml",
"service":"SOS",
"version":"2.0.0",
- "binding": "SOAP",
+ "binding": "application/soap+xml",
"operation":"InsertObservation",
"title":"SweArray",
"headers":{
@@ -1691,7 +1691,7 @@
"request":"static/examples/sos_v20/requests_soap/Transactional/InsertObservation_Text.xml",
"service":"SOS",
"version":"2.0.0",
- "binding": "SOAP",
+ "binding": "application/soap+xml",
"operation":"InsertObservation",
"title":"Text",
"headers":{
@@ -1704,7 +1704,7 @@
"request":"static/examples/sos_v20/requests_soap/Transactional/InsertObservation_Truth.xml",
"service":"SOS",
"version":"2.0.0",
- "binding": "SOAP",
+ "binding": "application/soap+xml",
"operation":"InsertObservation",
"title":"Truth",
"headers":{
@@ -1717,7 +1717,7 @@
"request":"static/examples/sos_v20/requests_soap/ResultHandling/InsertResult.xml",
"service":"SOS",
"version":"2.0.0",
- "binding": "SOAP",
+ "binding": "application/soap+xml",
"operation":"InsertResult",
"headers":{
"Accept":"application/soap+xml",
@@ -1729,7 +1729,7 @@
"request":"static/examples/sos_v20/requests_soap/ResultHandling/InsertResultTemplate.xml",
"service":"SOS",
"version":"2.0.0",
- "binding": "SOAP",
+ "binding": "application/soap+xml",
"operation":"InsertResultTemplate",
"headers":{
"Accept":"application/soap+xml",
@@ -1741,7 +1741,7 @@
"request":"static/examples/sos_v20/requests_soap/Transactional/InsertSensor.xml",
"service":"SOS",
"version":"2.0.0",
- "binding": "SOAP",
+ "binding": "application/soap+xml",
"operation":"InsertSensor",
"headers":{
"Accept":"application/soap+xml",
@@ -1753,7 +1753,7 @@
"request":"static/examples/sos_v20/requests_soap/Transactional/UpdateSensorDescription.xml",
"service":"SOS",
"version":"2.0.0",
- "binding": "SOAP",
+ "binding": "application/soap+xml",
"operation":"UpdateSensorDescription",
"headers":{
"Accept":"application/soap+xml",
@@ -1765,7 +1765,7 @@
"service":"SOS",
"version":"2.0.0",
"method":"POST",
- "binding": "JSON",
+ "binding": "application/json",
"headers":{
"Accept":"application/json",
"Content-Type":"application/json"
@@ -1782,7 +1782,7 @@
"service":"SOS",
"version":"2.0.0",
"method":"POST",
- "binding": "JSON",
+ "binding": "application/json",
"headers":{
"Accept":"application/json",
"Content-Type":"application/json"
@@ -1803,7 +1803,7 @@
"service":"SOS",
"version":"2.0.0",
"method":"POST",
- "binding": "JSON",
+ "binding": "application/json",
"headers":{
"Accept":"application/json",
"Content-Type":"application/json"
@@ -1828,7 +1828,7 @@
"service":"SOS",
"version":"2.0.0",
"method":"POST",
- "binding": "JSON",
+ "binding": "application/json",
"headers":{
"Accept":"application/json",
"Content-Type":"application/json"
@@ -1847,7 +1847,7 @@
"service":"SOS",
"version":"2.0.0",
"method":"POST",
- "binding": "JSON",
+ "binding": "application/json",
"headers":{
"Accept":"application/json",
"Content-Type":"application/json"
@@ -1868,7 +1868,7 @@
"service":"SOS",
"version":"2.0.0",
"method":"POST",
- "binding": "JSON",
+ "binding": "application/json",
"headers":{
"Accept":"application/json",
"Content-Type":"application/json"
@@ -1893,7 +1893,7 @@
"service":"SOS",
"version":"2.0.0",
"method":"POST",
- "binding": "JSON",
+ "binding": "application/json",
"headers":{
"Accept":"application/json",
"Content-Type":"application/json"
@@ -1915,7 +1915,7 @@
"service":"SOS",
"version":"2.0.0",
"method":"POST",
- "binding": "JSON",
+ "binding": "application/json",
"headers":{
"Accept":"application/json",
"Content-Type":"application/json"
@@ -1986,7 +1986,7 @@
"service":"SOS",
"version":"2.0.0",
"method":"POST",
- "binding": "JSON",
+ "binding": "application/json",
"headers":{
"Accept":"application/json",
"Content-Type":"application/json"
@@ -2079,7 +2079,7 @@
"service":"SOS",
"version":"2.0.0",
"method":"POST",
- "binding": "JSON",
+ "binding": "application/json",
"headers":{
"Accept":"application/json",
"Content-Type":"application/json"
@@ -2100,7 +2100,7 @@
"service":"SOS",
"version":"2.0.0",
"method":"POST",
- "binding": "JSON",
+ "binding": "application/json",
"headers":{
"Accept":"application/json",
"Content-Type":"application/json"
@@ -2131,7 +2131,7 @@
"service":"SOS",
"version":"2.0.0",
"method":"POST",
- "binding": "JSON",
+ "binding": "application/json",
"headers":{
"Accept":"application/json",
"Content-Type":"application/json"
@@ -2152,7 +2152,7 @@
"service":"SOS",
"version":"2.0.0",
"method":"POST",
- "binding": "JSON",
+ "binding": "application/json",
"headers":{
"Accept":"application/json",
"Content-Type":"application/json"
@@ -2220,7 +2220,7 @@
"service":"SOS",
"version":"2.0.0",
"method":"POST",
- "binding": "JSON",
+ "binding": "application/json",
"headers":{
"Accept":"application/json",
"Content-Type":"application/json"
@@ -2238,7 +2238,7 @@
"service":"SOS",
"version":"2.0.0",
"method":"POST",
- "binding": "JSON",
+ "binding": "application/json",
"headers":{
"Accept":"application/json",
"Content-Type":"application/json"
@@ -2260,7 +2260,7 @@
"service":"SOS",
"version":"2.0.0",
"method":"POST",
- "binding": "JSON",
+ "binding": "application/json",
"headers":{
"Accept":"application/json",
"Content-Type":"application/json"
@@ -2296,7 +2296,7 @@
"service":"SOS",
"version":"2.0.0",
"method":"POST",
- "binding": "JSON",
+ "binding": "application/json",
"headers":{
"Accept":"application/json",
"Content-Type":"application/json"
@@ -2364,7 +2364,7 @@
"service":"SOS",
"version":"2.0.0",
"method":"POST",
- "binding": "JSON",
+ "binding": "application/json",
"headers":{
"Accept":"application/json",
"Content-Type":"application/json"
@@ -2383,7 +2383,7 @@
"service":"SOS",
"version":"2.0.0",
"method":"POST",
- "binding": "JSON",
+ "binding": "application/json",
"headers":{
"Accept":"application/json",
"Content-Type":"application/json"
@@ -2403,7 +2403,7 @@
"service":"SOS",
"version":"2.0.0",
"method":"POST",
- "binding": "JSON",
+ "binding": "application/json",
"headers":{
"Accept":"application/json",
"Content-Type":"application/json"
@@ -2485,7 +2485,7 @@
"service":"SOS",
"version":"2.0.0",
"method":"POST",
- "binding": "JSON",
+ "binding": "application/json",
"headers":{
"Accept":"application/json",
"Content-Type":"application/json"
@@ -2504,7 +2504,7 @@
"service":"SOS",
"version":"2.0.0",
"method":"POST",
- "binding": "JSON",
+ "binding": "application/json",
"headers":{
"Accept":"application/json",
"Content-Type":"application/json"
@@ -2584,7 +2584,7 @@
"service":"SOS",
"version":"2.0.0",
"method":"POST",
- "binding": "JSON",
+ "binding": "application/json",
"headers":{
"Accept":"application/json",
"Content-Type":"application/json"
@@ -2605,7 +2605,7 @@
"service":"SOS",
"version":"2.0.0",
"method":"POST",
- "binding": "JSON",
+ "binding": "application/json",
"headers":{
"Accept":"application/json",
"Content-Type":"application/json"
@@ -2617,21 +2617,21 @@
"service":"SOS",
"version":"2.0.0",
"method":"POST",
- "binding": "JSON",
+ "binding": "application/json",
"operation":"InsertSensor"
},
{
"service":"SOS",
"version":"2.0.0",
"method":"POST",
- "binding": "JSON",
+ "binding": "application/json",
"operation":"InsertObservation"
},
{
"service":"SOS",
"version":"2.0.0",
"method":"POST",
- "binding": "JSON",
+ "binding": "application/json",
"operation":"InsertResultTemplate"
}
From 8e67f783fdeaa74f0c185d506b82c77ac02074a7 Mon Sep 17 00:00:00 2001
From: Christian Autermann
Date: Mon, 31 Mar 2014 17:26:27 +0200
Subject: [PATCH 030/229] speed up build by fetching SCM revision only once
---
pom.xml | 28 +++++++---------------------
1 file changed, 7 insertions(+), 21 deletions(-)
diff --git a/pom.xml b/pom.xml
index 9a3d8774ef..48bf39838b 100644
--- a/pom.xml
+++ b/pom.xml
@@ -687,6 +687,13 @@
org.codehaus.mojo
buildnumber-maven-plugin
+
+ false
+ false
+ {0,date,yyyy-MM-dd HH:mm:ss}
+ 0
+ true
+
validate
@@ -695,27 +702,6 @@
-
- false
- false
- {0,date,yyyy-MM-dd HH:mm:ss}
-
- javasvn
-
- 0
-
-
-
- com.google.code.maven-scm-provider-svnjava
- maven-scm-provider-svnjava
- 2.0.6
-
-
- org.tmatesoft.svnkit
- svnkit
- 1.7.8
-
-
org.apache.maven.plugins
From 405d94100cd6910da1bd769326d173decbe204c1 Mon Sep 17 00:00:00 2001
From: Christian Autermann
Date: Mon, 31 Mar 2014 17:29:11 +0200
Subject: [PATCH 031/229] fixed OGC logo URL in footer
---
spring/views/src/main/webapp/WEB-INF/views/common/footer.jsp | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/spring/views/src/main/webapp/WEB-INF/views/common/footer.jsp b/spring/views/src/main/webapp/WEB-INF/views/common/footer.jsp
index 9d1befa414..601bcc27d7 100644
--- a/spring/views/src/main/webapp/WEB-INF/views/common/footer.jsp
+++ b/spring/views/src/main/webapp/WEB-INF/views/common/footer.jsp
@@ -60,7 +60,7 @@
Affiliations
The 52°North affiliations:
-
+
" />
Cooperation partners
@@ -88,7 +88,7 @@
Tested in Firefox 17.0.1, Google Chrome 23.0.1271.95, Safari 6, Internet Explorer 10
-
Copyright ©
+ Copyright ©
2012
52°North Initiative for Geospatial Open Source Software GmbH. All Rights Reserved.
From 757d273942c4477fbea95d692b7334b36f72b795 Mon Sep 17 00:00:00 2001
From: Christian Autermann
Date: Mon, 31 Mar 2014 19:14:36 +0200
Subject: [PATCH 032/229] call GeoDB.InitGeoDB() for H2 in memory and file
based databases
---
.../main/java/org/n52/sos/ds/Datasource.java | 63 ++++++-----
.../org/n52/sos/ds/DatasourceCallback.java | 71 ++++++++++++
.../AbstractHibernateDatasource.java | 106 ++++++++++--------
.../ds/datasource/AbstractH2Datasource.java | 40 ++++++-
.../sos/ds/datasource/H2FileDatasource.java | 13 ++-
.../ds/datasource/H2InMemoryDatasource.java | 7 +-
.../n52/sos/ds/hibernate/H2Configuration.java | 15 +--
.../ds/hibernate/SessionFactoryProvider.java | 57 ++++++++--
.../web/install/InstallFinishController.java | 21 ++--
9 files changed, 287 insertions(+), 106 deletions(-)
create mode 100644 core/api/src/main/java/org/n52/sos/ds/DatasourceCallback.java
diff --git a/core/api/src/main/java/org/n52/sos/ds/Datasource.java b/core/api/src/main/java/org/n52/sos/ds/Datasource.java
index 1e649415d3..e01b8254b8 100644
--- a/core/api/src/main/java/org/n52/sos/ds/Datasource.java
+++ b/core/api/src/main/java/org/n52/sos/ds/Datasource.java
@@ -37,7 +37,7 @@
/**
* @author Christian Autermann
- *
+ *
* @since 4.0.0
*/
public interface Datasource {
@@ -60,7 +60,7 @@ public interface Datasource {
/**
* @param current
* the current settings
- *
+ *
* @return the settings that can be newSettings without schema without
* reinstallation
*/
@@ -68,7 +68,7 @@ public interface Datasource {
/**
* Check if a connection is possible.
- *
+ *
* @param settings
* the settings to connect
*/
@@ -76,7 +76,7 @@ public interface Datasource {
/**
* Check if a connection is still possible with the newSettings settings.
- *
+ *
* @param current
* the current datasource settings
* @param newSettings
@@ -89,7 +89,7 @@ public interface Datasource {
* only be called if
* {@link #validateConnection(java.util.Properties, java.util.Map)
* validateConnection()} succeeded.
- *
+ *
* @param settings
* the settings to connect
*/
@@ -98,7 +98,7 @@ public interface Datasource {
/**
* Used to validate prerequisites after the connections settings newSettings
* in the admin interface.
- *
+ *
* @param current
* the current datasource settings
* @param newSettings
@@ -116,7 +116,7 @@ public interface Datasource {
* {@link #needsSchema() needsSchema()} and
* {@link #checkIfSchemaExists(java.util.Map) checkIfSchemaExists()} return
* {@code true}.
- *
+ *
* @param settings
* the settings to connect
*/
@@ -127,7 +127,7 @@ public interface Datasource {
* {@link #needsSchema() needsSchema()} and
* {@link #checkIfSchemaExists(java.util.Properties, java.util.Map)
* checkIfSchemaExists()} return {@code true}.
- *
+ *
* @param current
* the current datasource settings
* @param newSettings
@@ -136,14 +136,14 @@ public interface Datasource {
void validateSchema(Properties current, Map newSettings);
/**
- *
+ *
* Check if the schema exists. Should return {@code true} even if parts are
* missing. Will only be called if {@link #needsSchema() needsSchema()}
* returns {@code true}.
- *
+ *
* @param settings
* the settings to connect
- *
+ *
* @return if the schema (or parts of it) exists
*/
boolean checkIfSchemaExists(Map settings);
@@ -152,12 +152,12 @@ public interface Datasource {
* Check if the schema exists. Should return {@code true} even if parts are
* missing. Will only be called if {@link #needsSchema() needsSchema()}
* returns {@code true}.
- *
+ *
* @param current
* the current datasource settings
* @param newSettings
* the newSettings settings
- *
+ *
* @return if the schema (or parts of it) exists
*/
boolean checkIfSchemaExists(Properties current, Map newSettings);
@@ -166,10 +166,10 @@ public interface Datasource {
* Check if it is possible to create the schema (e.g. test if the privilege
* are sufficient). Will only be called if {@link #needsSchema()
* needsSchema()} returns {@code true}.
- *
+ *
* @param settings
* the settings to connect
- *
+ *
* @return if the creation if the schema is possible
*/
boolean checkSchemaCreation(Map settings);
@@ -181,7 +181,7 @@ public interface Datasource {
* {@code true}. If {@link #checkIfSchemaExists(java.util.Map)
* checkIfSchemaExists()} returned {@code true},
* {@link #dropSchema(java.util.Map) dropSchema()} will be called first.
- *
+ *
* @param settings
* the settings to connect
*/
@@ -192,12 +192,12 @@ public interface Datasource {
* {@link #needsSchema() needsSchema()} and
* {@link #checkIfSchemaExists(java.util.Map) checkIfSchemaExists()} return
* {@code true}.
- *
+ *
* @param settings
* the settings to connect
*/
String[] dropSchema(Map settings);
-
+
/**
* Creates an update schema for the supplied settings. Will only be called if
* {@link #needsSchema() needsSchema()} and
@@ -205,7 +205,7 @@ public interface Datasource {
* {@code true}. If {@link #checkIfSchemaExists(java.util.Map)
* checkIfSchemaExists()} returned {@code true},
* {@link #dropSchema(java.util.Map) dropSchema()} will be called first.
- *
+ *
* @param settings
* the settings to connect
* @return
@@ -217,14 +217,14 @@ public interface Datasource {
/**
* Clear the contents of the datasource. Only called if
* {@link #supportsClear() supportsClear()} returns {@code true}.
- *
+ *
* @param settings
* the settings to connect
*/
void clear(Properties settings);
/**
- *
+ *
* @return {@code true}
*/
boolean supportsClear();
@@ -232,10 +232,10 @@ public interface Datasource {
/**
* Create the datasource properties used by the {@link ConnectionProvider}
* to connect.
- *
+ *
* @param settings
* the settings to connect
- *
+ *
* @return the datasource properties
*/
Properties getDatasourceProperties(Map settings);
@@ -243,13 +243,26 @@ public interface Datasource {
/**
* Create the datasource properties used by the {@link ConnectionProvider}
* to connect.
- *
+ *
* @param current
* the current datasource settings
* @param newSettings
* the newSettings settings
- *
+ *
* @return the new datasource properties
*/
Properties getDatasourceProperties(Properties current, Map newSettings);
+
+ /**
+ * @return the callback used at instantiation time of the connection provider
+ */
+ DatasourceCallback getCallback();
+
+ /**
+ * Called right before a schema is created.
+ *
+ * @param settings the settings to connect
+ */
+ void prepare(Map settings);
+
}
diff --git a/core/api/src/main/java/org/n52/sos/ds/DatasourceCallback.java b/core/api/src/main/java/org/n52/sos/ds/DatasourceCallback.java
new file mode 100644
index 0000000000..b3be1bc58f
--- /dev/null
+++ b/core/api/src/main/java/org/n52/sos/ds/DatasourceCallback.java
@@ -0,0 +1,71 @@
+/**
+ * Copyright (C) 2012-2014 52°North Initiative for Geospatial Open Source
+ * Software GmbH
+ *
+ * This program is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU General Public License version 2 as published
+ * by the Free Software Foundation.
+ *
+ * If the program is linked with libraries which are licensed under one of
+ * the following licenses, the combination of the program with the linked
+ * library is not considered a "derivative work" of the program:
+ *
+ * - Apache License, version 2.0
+ * - Apache Software License, version 1.0
+ * - GNU Lesser General Public License, version 3
+ * - Mozilla Public License, versions 1.0, 1.1 and 2.0
+ * - Common Development and Distribution License (CDDL), version 1.0
+ *
+ * Therefore the distribution of the program linked with libraries licensed
+ * under the aforementioned licenses, is permitted by the copyright holders
+ * if the distribution is compliant with both the GNU General Public
+ * License version 2 and the aforementioned licenses.
+ *
+ * This program is distributed in the hope that it will be useful, but
+ * WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General
+ * Public License for more details.
+ */
+package org.n52.sos.ds;
+
+import java.sql.Connection;
+import java.sql.SQLException;
+import java.util.Properties;
+
+/**
+ * TODO JavaDoc
+ *
+ * @author Christian Autermann
+ */
+public abstract class DatasourceCallback {
+
+ public void onFirstConnection(Connection connection)
+ throws SQLException {
+ }
+
+ public Properties onInit(Properties properties) {
+ return properties;
+ }
+
+ public static DatasourceCallback nullCallback() {
+ return new DatasourceCallback() {
+ };
+ }
+
+ public static DatasourceCallback chain(final DatasourceCallback first,
+ final DatasourceCallback second) {
+ return new DatasourceCallback() {
+ @Override
+ public void onFirstConnection(Connection connection)
+ throws SQLException {
+ first.onFirstConnection(connection);
+ second.onFirstConnection(connection);
+ }
+
+ @Override
+ public Properties onInit(Properties properties) {
+ return second.onInit(first.onInit(properties));
+ }
+ };
+ }
+}
diff --git a/hibernate/datasource/common/src/main/java/org/n52/sos/ds/datasource/AbstractHibernateDatasource.java b/hibernate/datasource/common/src/main/java/org/n52/sos/ds/datasource/AbstractHibernateDatasource.java
index ff500bfade..ebce175c54 100644
--- a/hibernate/datasource/common/src/main/java/org/n52/sos/ds/datasource/AbstractHibernateDatasource.java
+++ b/hibernate/datasource/common/src/main/java/org/n52/sos/ds/datasource/AbstractHibernateDatasource.java
@@ -43,25 +43,27 @@
import org.hibernate.dialect.Dialect;
import org.hibernate.mapping.Table;
import org.hibernate.tool.hbm2ddl.DatabaseMetadata;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+
import org.n52.sos.config.SettingDefinitionProvider;
import org.n52.sos.config.settings.BooleanSettingDefinition;
import org.n52.sos.config.settings.IntegerSettingDefinition;
import org.n52.sos.config.settings.StringSettingDefinition;
import org.n52.sos.ds.Datasource;
+import org.n52.sos.ds.DatasourceCallback;
import org.n52.sos.ds.HibernateDatasourceConstants;
import org.n52.sos.ds.hibernate.SessionFactoryProvider;
import org.n52.sos.ds.hibernate.util.HibernateConstants;
import org.n52.sos.exception.ConfigurationException;
import org.n52.sos.util.SQLConstants;
import org.n52.sos.util.StringHelper;
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
import com.google.common.collect.Lists;
/**
* @author Christian Autermann
- *
+ *
* @since 4.0.0
*/
public abstract class AbstractHibernateDatasource implements Datasource, SQLConstants, HibernateDatasourceConstants {
@@ -183,7 +185,7 @@ public abstract class AbstractHibernateDatasource implements Datasource, SQLCons
/**
* Create settings definition for username
- *
+ *
* @return Username settings definition
*/
protected StringSettingDefinition createUsernameDefinition() {
@@ -193,7 +195,7 @@ protected StringSettingDefinition createUsernameDefinition() {
/**
* Create settings definition for password
- *
+ *
* @return Password settings definition
*/
protected StringSettingDefinition createPasswordDefinition() {
@@ -203,7 +205,7 @@ protected StringSettingDefinition createPasswordDefinition() {
/**
* Create settings definition for database name
- *
+ *
* @return database name settings definition
*/
protected StringSettingDefinition createDatabaseDefinition() {
@@ -214,7 +216,7 @@ protected StringSettingDefinition createDatabaseDefinition() {
/**
* Create settings definition for host
- *
+ *
* @return Host settings definition
*/
protected StringSettingDefinition createHostDefinition() {
@@ -225,7 +227,7 @@ protected StringSettingDefinition createHostDefinition() {
/**
* Create settings definition for port
- *
+ *
* @return Port settings definition
*/
protected IntegerSettingDefinition createPortDefinition() {
@@ -235,7 +237,7 @@ protected IntegerSettingDefinition createPortDefinition() {
/**
* Create settings definition for database schema
- *
+ *
* @return Database schema settings definition
*/
protected StringSettingDefinition createSchemaDefinition() {
@@ -246,7 +248,7 @@ protected StringSettingDefinition createSchemaDefinition() {
/**
* Create settings definition for old concept
- *
+ *
* @return Old concept settings definition
*/
protected BooleanSettingDefinition createOldConceptDefinition() {
@@ -257,7 +259,7 @@ protected BooleanSettingDefinition createOldConceptDefinition() {
/**
* Create settings definition for transactional support
- *
+ *
* @return Transactional support settings definition
*/
protected BooleanSettingDefinition createTransactionalDefinition() {
@@ -268,7 +270,7 @@ protected BooleanSettingDefinition createTransactionalDefinition() {
/**
* Create settings definition for Spatial Filtering Profile support
- *
+ *
* @return Spatial Filtering Profile support settings definition
*/
protected BooleanSettingDefinition createSpatialFilteringProfileDefinition() {
@@ -280,7 +282,7 @@ protected BooleanSettingDefinition createSpatialFilteringProfileDefinition() {
/**
* Create settings definition for JDBC driver
- *
+ *
* @return JDBC driver settings definition
*/
protected BooleanSettingDefinition createProvidedJdbcDriverDefinition() {
@@ -292,7 +294,7 @@ protected BooleanSettingDefinition createProvidedJdbcDriverDefinition() {
/**
* Create settings definition for minimal connection pool size
- *
+ *
* @return Minimal connection pool size settings definition
*/
protected IntegerSettingDefinition createMinPoolSizeDefinition() {
@@ -303,7 +305,7 @@ protected IntegerSettingDefinition createMinPoolSizeDefinition() {
/**
* Create settings definition for maximal connection pool size
- *
+ *
* @return Maximal connection pool size settings definition
*/
protected IntegerSettingDefinition createMaxPoolSizeDefinition() {
@@ -314,7 +316,7 @@ protected IntegerSettingDefinition createMaxPoolSizeDefinition() {
/**
* Create settings definition for JDBC batch size
- *
+ *
* @return JDBC batch size settings definition
*/
protected IntegerSettingDefinition createBatchSizeDefinition() {
@@ -325,7 +327,7 @@ protected IntegerSettingDefinition createBatchSizeDefinition() {
/**
* Get custom configuration from datasource settings
- *
+ *
* @param settings
* Datasource settings to create custom configuration from
* @return Custom configuration from datasource settings
@@ -360,7 +362,7 @@ public CustomConfiguration getConfig(Map settings) {
/**
* Check if this datasource supported the series concept
- *
+ *
* @param settings
* Datasource settings
* @return true
, if this datasource supported the series
@@ -372,7 +374,7 @@ private boolean isSeriesConceptDatasource(Map settings) {
/**
* Check if this datasource supported the old concept
- *
+ *
* @param settings
* Datasource settings
* @return true
, if this datasource supported the old concept
@@ -386,7 +388,7 @@ private boolean isOldConceptDatasource(Map settings) {
* Add Spatial Filtering Profile mapping files path to configuration if this
* is a Spatial Filtering Profile datasource and Spatial Filtering Profile
* is activated in the settings
- *
+ *
* @param config
* Datasource configuration
* @param settings
@@ -406,7 +408,7 @@ private void addSpatialFilteringProfilePathToConfig(CustomConfiguration config,
/**
* Get File from resource String
- *
+ *
* @param resource
* Resource String
* @return File from resource String
@@ -577,7 +579,7 @@ public Properties getDatasourceProperties(Properties current, Map mergeProperties(Properties current, Map settings, Propertie
* Add Spatial Filtering Profile mapping files path to directory String if
* this is a Spatial Filtering Profile datasource and Spatial Filtering
* Profile is activated in the settings
- *
+ *
* @param builder
* Mapping files directories String
* @param settings
@@ -722,7 +724,7 @@ private void addSpatialFilteringProfilePathToDirList(final StringBuilder builder
/**
* Get the old database schema concept
- *
+ *
* @return Old database schema concept
*/
protected BooleanSettingDefinition getOldConceptDefiniton() {
@@ -731,7 +733,7 @@ protected BooleanSettingDefinition getOldConceptDefiniton() {
/**
* Check if properties contains transactional mapping path
- *
+ *
* @param properties
* Datasource properties
* @return true
, if properties contains transactional mapping
@@ -744,7 +746,7 @@ protected boolean isTransactional(Properties properties) {
/**
* Get transactional setting definition
- *
+ *
* @return Transactional setting definition
*/
protected BooleanSettingDefinition getTransactionalDefiniton() {
@@ -753,7 +755,7 @@ protected BooleanSettingDefinition getTransactionalDefiniton() {
/**
* Check if properties contains Spatial Filtering Profile mapping path
- *
+ *
* @param properties
* Datasource properties
* @return true
, if properties contains Spatial Filtering
@@ -767,7 +769,7 @@ protected boolean isSpatialFilteringProfile(Properties properties) {
/**
* Get Spatial Filtering Profile setting definition
- *
+ *
* @return Spatial Filtering Profile setting definition
*/
protected BooleanSettingDefinition getSpatialFilteringProfileDefiniton() {
@@ -776,7 +778,7 @@ protected BooleanSettingDefinition getSpatialFilteringProfileDefiniton() {
/**
* Concatenate two arrays
- *
+ *
* @param first
* First array
* @param rest
@@ -799,7 +801,7 @@ private T[] concat(T[] first, T[]... rest) {
/**
* Get the schema script before the database schema is created
- *
+ *
* @return script to run before the schema creation
*/
protected String[] getPreSchemaScript() {
@@ -808,7 +810,7 @@ protected String[] getPreSchemaScript() {
/**
* Get the schema script after the database schema is created
- *
+ *
* @return script to run after the schema creation
*/
protected String[] getPostSchemaScript() {
@@ -831,7 +833,7 @@ protected String getSchema(Map settings) {
/**
* Check if the datasource is transactional
- *
+ *
* @return true
, if it is a transactionalDatasource
*/
public boolean isTransactionalDatasource() {
@@ -840,7 +842,7 @@ public boolean isTransactionalDatasource() {
/**
* Set transactional datasource flag
- *
+ *
* @param transactionalDatasource
* the transactionalDatasource flag to set
*/
@@ -850,7 +852,7 @@ public void setTransactional(boolean transactionalDatasource) {
/**
* Check if the datasource has Spatial Filtering Profile
- *
+ *
* @return true
, if it has Spatial Filtering Profile
*/
public boolean isSpatialFilteringProfileDatasource() {
@@ -859,7 +861,7 @@ public boolean isSpatialFilteringProfileDatasource() {
/**
* Set Spatial Filtering Profile datasource flag
- *
+ *
* @param spatialFilteringProfileDatasource
* the spatialFilteringProfileDatasource to set
*/
@@ -870,7 +872,7 @@ public void setSpatialFilteringProfile(boolean spatialFilteringProfileDatasource
/**
* Remove duplicated foreign key definition for table observationHasOffering
* otherwise database model creation fails in Oracle
- *
+ *
* @param script
* Create and not checked script.
* @return Checked script without duplicate foreign key for
@@ -897,16 +899,26 @@ private String[] checkCreateSchema(String[] script) {
return checkedSchema.toArray(new String[checkedSchema.size()]);
}
+ @Override
+ public DatasourceCallback getCallback() {
+ return DatasourceCallback.nullCallback();
+ }
+
+ @Override
+ public void prepare(Map settings) {
+
+ }
+
/**
* Gets the qualified name of the driver class.
- *
+ *
* @return the driver class.
*/
protected abstract String getDriverClass();
/**
* Parse datasource properties to map
- *
+ *
* @param current
* Current datasource properties
* @return Map with String key and Object value
@@ -915,7 +927,7 @@ private String[] checkCreateSchema(String[] script) {
/**
* Check if the required extensions are available
- *
+ *
* @param con
* SQL connection
* @param metadata
@@ -928,14 +940,14 @@ protected abstract void validatePrerequisites(Connection con, DatabaseMetadata m
/**
* Create a new Hibernate dialect
- *
+ *
* @return Hibernate dialect
*/
protected abstract Dialect createDialect();
/**
* Open a new SQL connection
- *
+ *
* @param settings
* Datasource setting: URL, username, passsword, database, ...
* @return New SQL connection
@@ -947,7 +959,7 @@ protected abstract void validatePrerequisites(Connection con, DatabaseMetadata m
/**
* Check if drop schema contains alter table ... drop constraint ... . Due
* to dynamic generation some constraints are generated and differ.
- *
+ *
* @param dropSchema
* Schema to check
* @return Checked schema
diff --git a/hibernate/datasource/h2/src/main/java/org/n52/sos/ds/datasource/AbstractH2Datasource.java b/hibernate/datasource/h2/src/main/java/org/n52/sos/ds/datasource/AbstractH2Datasource.java
index f1ec864bdd..517d00aad6 100644
--- a/hibernate/datasource/h2/src/main/java/org/n52/sos/ds/datasource/AbstractH2Datasource.java
+++ b/hibernate/datasource/h2/src/main/java/org/n52/sos/ds/datasource/AbstractH2Datasource.java
@@ -40,14 +40,20 @@
import org.hibernate.dialect.Dialect;
import org.hibernate.mapping.Table;
import org.hibernate.spatial.dialect.h2geodb.GeoDBDialect;
+
import org.n52.sos.config.SettingDefinition;
+import org.n52.sos.ds.DatasourceCallback;
import org.n52.sos.exception.ConfigurationException;
+import geodb.GeoDB;
+
+
+
/**
* TODO JavaDoc
- *
+ *
* @author Christian Autermann
- *
+ *
* @since 4.0.0
*/
public abstract class AbstractH2Datasource extends AbstractHibernateDatasource {
@@ -93,6 +99,7 @@ public void clear(Properties properties) {
}
}
stmt.execute("set referential_integrity true");
+ GeoDB.InitGeoDB(conn);
} catch (SQLException ex) {
throw new ConfigurationException(ex);
} finally {
@@ -105,4 +112,33 @@ public void clear(Properties properties) {
protected String getDriverClass() {
return H2_DRIVER_CLASS;
}
+
+ @Override
+ public DatasourceCallback getCallback() {
+ return DatasourceCallback.chain(super.getCallback(),
+ new DatasourceCallback() {
+
+ @Override
+ public Properties onInit(Properties props) {
+ initGeoDB(parseDatasourceProperties(props));
+ return props;
+ }
+ });
+ }
+
+ protected void initGeoDB(Map settings)
+ throws ConfigurationException {
+ try {
+
+ Connection cx = openConnection(settings);
+ try {
+ GeoDB.InitGeoDB(cx);
+ } finally {
+ cx.close();
+ }
+ } catch (SQLException ex) {
+ throw new ConfigurationException("Could not init GeoDB", ex);
+ }
+ }
+
}
diff --git a/hibernate/datasource/h2/src/main/java/org/n52/sos/ds/datasource/H2FileDatasource.java b/hibernate/datasource/h2/src/main/java/org/n52/sos/ds/datasource/H2FileDatasource.java
index ae4ee0357d..0ed9021126 100644
--- a/hibernate/datasource/h2/src/main/java/org/n52/sos/ds/datasource/H2FileDatasource.java
+++ b/hibernate/datasource/h2/src/main/java/org/n52/sos/ds/datasource/H2FileDatasource.java
@@ -41,6 +41,7 @@
import java.util.regex.Pattern;
import org.hibernate.tool.hbm2ddl.DatabaseMetadata;
+
import org.n52.sos.config.SettingDefinition;
import org.n52.sos.config.settings.StringSettingDefinition;
import org.n52.sos.ds.hibernate.util.HibernateConstants;
@@ -48,18 +49,19 @@
import com.google.common.collect.Sets;
+
/**
* @author Christian Autermann
- *
+ *
* @since 4.0.0
*/
public class H2FileDatasource extends AbstractH2Datasource {
private static final String DIALECT = "H2/GeoDB (file based)";
private static final Pattern JDBC_URL_PATTERN = Pattern
- .compile("^jdbc:h2:(.+); INIT=create domain if not exists geometry as blob$");
+ .compile("^jdbc:h2:(.+)$");
- private static final String JDBC_URL_FORMAT = "jdbc:h2:%s; INIT=create domain if not exists geometry as blob";
+ private static final String JDBC_URL_FORMAT = "jdbc:h2:%s";
private final StringSettingDefinition h2Database = createDatabaseDefinition().setDescription(
"Set this to the name/path of the database you want to use for SOS.").setDefaultValue(
@@ -150,4 +152,9 @@ protected void validatePrerequisites(Connection con, DatabaseMetadata metadata,
protected String[] checkDropSchema(String[] dropSchema) {
return dropSchema;
}
+
+ @Override
+ public void prepare(Map settings) {
+ initGeoDB(settings);
+ }
}
diff --git a/hibernate/datasource/h2/src/main/java/org/n52/sos/ds/datasource/H2InMemoryDatasource.java b/hibernate/datasource/h2/src/main/java/org/n52/sos/ds/datasource/H2InMemoryDatasource.java
index 03332dabd3..1fb98de4d0 100644
--- a/hibernate/datasource/h2/src/main/java/org/n52/sos/ds/datasource/H2InMemoryDatasource.java
+++ b/hibernate/datasource/h2/src/main/java/org/n52/sos/ds/datasource/H2InMemoryDatasource.java
@@ -37,6 +37,7 @@
import java.util.Set;
import org.hibernate.tool.hbm2ddl.DatabaseMetadata;
+
import org.n52.sos.config.SettingDefinition;
import org.n52.sos.ds.hibernate.util.HibernateConstants;
@@ -44,16 +45,16 @@
/**
* TODO JavaDoc
- *
+ *
* @author Christian Autermann
- *
+ *
* @since 4.0.0
*/
public class H2InMemoryDatasource extends AbstractH2Datasource {
private static final String DIALECT = "H2/GeoDB (in memory)";
private static final String JDBC_URL =
- "jdbc:h2:mem:sos;DB_CLOSE_DELAY=-1;INIT=create domain if not exists geometry as blob";
+ "jdbc:h2:mem:sos;DB_CLOSE_DELAY=-1;";
@Override
public String getDialectName() {
diff --git a/hibernate/h2/src/main/java/org/n52/sos/ds/hibernate/H2Configuration.java b/hibernate/h2/src/main/java/org/n52/sos/ds/hibernate/H2Configuration.java
index 5db27d9973..49d22231b1 100644
--- a/hibernate/h2/src/main/java/org/n52/sos/ds/hibernate/H2Configuration.java
+++ b/hibernate/h2/src/main/java/org/n52/sos/ds/hibernate/H2Configuration.java
@@ -48,6 +48,9 @@
import org.hibernate.jdbc.Work;
import org.hibernate.mapping.Table;
import org.hibernate.spatial.dialect.h2geodb.GeoDBDialect;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+
import org.n52.sos.cache.ctrl.ScheduledContentCacheControllerSettings;
import org.n52.sos.config.sqlite.SQLiteSessionFactory;
import org.n52.sos.ds.ConnectionProviderException;
@@ -55,14 +58,14 @@
import org.n52.sos.ogc.ows.OwsExceptionReport;
import org.n52.sos.service.Configurator;
import org.n52.sos.service.SosContextListener;
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
import com.google.common.collect.Lists;
+import geodb.GeoDB;
+
/**
* @since 4.0.0
- *
+ *
*/
public class H2Configuration {
private static final Logger LOG = LoggerFactory.getLogger(H2Configuration.class);
@@ -114,7 +117,7 @@ private List getResources() {
// resources.add("mapping/old/observation/Observation.hbm.xml");
// resources.add("mapping/old/observation/ObservationInfo.hbm.xml");
// resources.add("mapping/old/spatialFilteringProfile/SpatialFitleringProfile.hbm.xml");
- // series observation concept, needs changes in tests
+ // series observation concept, needs changes in tests
resources.add("mapping/series/observation/Series.hbm.xml");
resources.add("mapping/series/observation/SeriesObservation.hbm.xml");
resources.add("mapping/series/observation/SeriesObservationInfo.hbm.xml");
@@ -318,10 +321,8 @@ private void prepareDatabase() {
try {
Class.forName(H2_DRIVER);
conn = DriverManager.getConnection(H2_CONNECTION_URL);
+ GeoDB.InitGeoDB(conn);
stmt = conn.createStatement();
- final String cmd = "create domain if not exists geometry as blob";
- LOG.debug("Executing {}", cmd);
- stmt.execute(cmd);
configuration = new Configuration().configure("/sos-hibernate.cfg.xml");
@SuppressWarnings("unchecked")
List resources = (List) properties.get(SessionFactoryProvider.HIBERNATE_RESOURCES);
diff --git a/hibernate/session-factory/src/main/java/org/n52/sos/ds/hibernate/SessionFactoryProvider.java b/hibernate/session-factory/src/main/java/org/n52/sos/ds/hibernate/SessionFactoryProvider.java
index db56568116..ba9b48dcf4 100644
--- a/hibernate/session-factory/src/main/java/org/n52/sos/ds/hibernate/SessionFactoryProvider.java
+++ b/hibernate/session-factory/src/main/java/org/n52/sos/ds/hibernate/SessionFactoryProvider.java
@@ -46,21 +46,25 @@
import org.hibernate.dialect.Dialect;
import org.hibernate.engine.spi.SessionFactoryImplementor;
import org.hibernate.engine.spi.SessionImplementor;
+import org.hibernate.jdbc.Work;
import org.hibernate.service.ServiceRegistry;
import org.hibernate.service.ServiceRegistryBuilder;
import org.hibernate.tool.hbm2ddl.DatabaseMetadata;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+
import org.n52.sos.ds.ConnectionProviderException;
import org.n52.sos.ds.DataConnectionProvider;
+import org.n52.sos.ds.Datasource;
+import org.n52.sos.ds.DatasourceCallback;
import org.n52.sos.ds.HibernateDatasourceConstants;
import org.n52.sos.ds.hibernate.type.UtcTimestampType;
import org.n52.sos.exception.ConfigurationException;
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
/**
- *
+ *
* Implementation of the SessionFactory.
- *
+ *
* @since 4.0.0
*/
public class SessionFactoryProvider extends AbstractSessionFactoryProvider implements DataConnectionProvider,
@@ -86,7 +90,7 @@ public SessionFactoryProvider() {
/*
* (non-Javadoc)
- *
+ *
* @see org.n52.sos.ds.ConnectionProvider#getConnection()
*/
@Override
@@ -107,7 +111,7 @@ public Session getConnection() throws ConnectionProviderException {
/*
* (non-Javadoc)
- *
+ *
* @see org.n52.sos.ds.ConnectionProvider#returnConnection(java.lang.Object)
*/
@Override
@@ -153,6 +157,9 @@ public void returnConnection(Object connection) {
@Override
@SuppressWarnings("unchecked")
public void initialize(Properties properties) throws ConfigurationException {
+ final DatasourceCallback datasourceCallback
+ = getDatasourceCallback(properties);
+ datasourceCallback.onInit(properties);
try {
LOGGER.debug("Instantiating configuration and session factory");
configuration = new Configuration().configure("/sos-hibernate.cfg.xml");
@@ -180,7 +187,7 @@ public void initialize(Properties properties) throws ConfigurationException {
}
if (!hibernateDir.exists()) {
throw new ConfigurationException("Hibernate directory " + directory + " doesn't exist!");
- }
+ }
configuration.addDirectory(hibernateDir);
}
} else {
@@ -191,7 +198,7 @@ public void initialize(Properties properties) throws ConfigurationException {
configuration.addDirectory(new File(getClass().getResource(HIBERNATE_MAPPING_SERIES_CONCEPT_OBSERVATION_PATH)
.toURI()));
configuration.addDirectory(new File(getClass().getResource(HIBERNATE_MAPPING_SERIES_CONCEPT_SPATIAL_FILTERING_PROFILE_PATH)
- .toURI()));
+ .toURI()));
}
configuration.mergeProperties(properties);
@@ -199,10 +206,21 @@ public void initialize(Properties properties) throws ConfigurationException {
// queried in UTC
configuration.registerTypeOverride(new UtcTimestampType());
-
ServiceRegistry serviceRegistry =
new ServiceRegistryBuilder().applySettings(configuration.getProperties()).buildServiceRegistry();
this.sessionFactory = configuration.buildSessionFactory(serviceRegistry);
+ Session s = this.sessionFactory.openSession();
+ try {
+ s.doWork(new Work() {
+ @Override
+ public void execute(Connection connection)
+ throws SQLException {
+ datasourceCallback.onFirstConnection(connection);
+ }
+ });
+ } finally {
+ returnConnection(s);
+ }
} catch (HibernateException he) {
String exceptionText = "An error occurs during instantiation of the database connection pool!";
LOGGER.error(exceptionText, he);
@@ -216,6 +234,27 @@ public void initialize(Properties properties) throws ConfigurationException {
}
}
+ private DatasourceCallback getDatasourceCallback(Properties properties) {
+ if (properties.containsKey(Datasource.class.getName())) {
+ try {
+ Class> c = Class.forName((String) properties
+ .get(Datasource.class.getName()));
+ Datasource datasource = (Datasource) c.newInstance();
+ DatasourceCallback callback = datasource.getCallback();
+ if (callback != null) {
+ return callback;
+ }
+ } catch (ClassNotFoundException ex) {
+ LOGGER.warn("Error instantiating Datasource", ex);
+ } catch (InstantiationException ex) {
+ LOGGER.warn("Error instantiating Datasource", ex);
+ } catch (IllegalAccessException ex) {
+ LOGGER.warn("Error instantiating Datasource", ex);
+ }
+ }
+ return DatasourceCallback.nullCallback();
+ }
+
@Override
protected SessionFactory getSessionFactory() {
return this.sessionFactory;
diff --git a/spring/install-controller/src/main/java/org/n52/sos/web/install/InstallFinishController.java b/spring/install-controller/src/main/java/org/n52/sos/web/install/InstallFinishController.java
index d4b9a8cbcd..e773547a5c 100644
--- a/spring/install-controller/src/main/java/org/n52/sos/web/install/InstallFinishController.java
+++ b/spring/install-controller/src/main/java/org/n52/sos/web/install/InstallFinishController.java
@@ -38,6 +38,14 @@
import org.joda.time.DateTime;
import org.joda.time.format.DateTimeFormat;
import org.joda.time.format.DateTimeFormatter;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.stereotype.Controller;
+import org.springframework.web.bind.annotation.RequestMapping;
+import org.springframework.web.bind.annotation.RequestMethod;
+import org.springframework.web.servlet.ModelAndView;
+
import org.n52.sos.config.SettingValue;
import org.n52.sos.ds.ConnectionProviderException;
import org.n52.sos.ds.Datasource;
@@ -47,17 +55,10 @@
import org.n52.sos.web.MetaDataHandler;
import org.n52.sos.web.auth.UserService;
import org.n52.sos.web.install.InstallConstants.Step;
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
-import org.springframework.beans.factory.annotation.Autowired;
-import org.springframework.stereotype.Controller;
-import org.springframework.web.bind.annotation.RequestMapping;
-import org.springframework.web.bind.annotation.RequestMethod;
-import org.springframework.web.servlet.ModelAndView;
/**
* @since 4.0.0
- *
+ *
*/
@Controller
@RequestMapping(ControllerConstants.Paths.INSTALL_FINISH)
@@ -92,19 +93,18 @@ protected void process(Map param, InstallationConfiguration c) t
Properties properties = datasource.getDatasourceProperties(c.getDatabaseSettings());
// save the used datasource class
properties.put(Datasource.class.getCanonicalName(), datasource.getClass().getCanonicalName());
-
try {
if (c.isDropSchema()) {
String[] dropSchema = datasource.dropSchema(c.getDatabaseSettings());
datasource.execute(dropSchema, c.getDatabaseSettings());
}
+ datasource.prepare(c.getDatabaseSettings());
if (c.isCreateSchema()) {
String[] createSchema = datasource.createSchema(c.getDatabaseSettings());
datasource.execute(createSchema, c.getDatabaseSettings());
}
if (c.isForceUpdateSchema()) {
String[] updateSchema = datasource.updateSchema(c.getDatabaseSettings());
- datasource.execute(updateSchema, c.getDatabaseSettings());
if (LOG.isDebugEnabled()) {
LOG.debug("Update database with the following statements:");
int counter = 1;
@@ -112,6 +112,7 @@ protected void process(Map param, InstallationConfiguration c) t
LOG.debug("{}. Statement: {}", counter++, string);
}
}
+ datasource.execute(updateSchema, c.getDatabaseSettings());
}
} catch (Throwable e) {
throw new InstallationSettingsError(c, String.format(ErrorMessages.COULD_NOT_CONNECT_TO_THE_DATABASE,
From ae7b445369679e22547adef5bc5c64c886c0a845 Mon Sep 17 00:00:00 2001
From: Christian Autermann
Date: Mon, 31 Mar 2014 19:44:37 +0200
Subject: [PATCH 033/229] override XPathFactory implementation for SAXON
see https://saxonica.plan.io/issues/1944
---
.../resources/META-INF/services/javax.xml.xpath.XPathFactory | 1 +
1 file changed, 1 insertion(+)
create mode 100644 extensions/gda/operation/src/main/resources/META-INF/services/javax.xml.xpath.XPathFactory
diff --git a/extensions/gda/operation/src/main/resources/META-INF/services/javax.xml.xpath.XPathFactory b/extensions/gda/operation/src/main/resources/META-INF/services/javax.xml.xpath.XPathFactory
new file mode 100644
index 0000000000..6538eda93f
--- /dev/null
+++ b/extensions/gda/operation/src/main/resources/META-INF/services/javax.xml.xpath.XPathFactory
@@ -0,0 +1 @@
+net.sf.saxon.xpath.XPathFactoryImpl
\ No newline at end of file
From a3ea8ccca51aeecf49f7c0302a9aa6ad60b0c894 Mon Sep 17 00:00:00 2001
From: EHJ-52n
Date: Tue, 1 Apr 2014 16:12:34 +0200
Subject: [PATCH 034/229] Remove version: it is already managed
---
hibernate/common/pom.xml | 1 -
1 file changed, 1 deletion(-)
diff --git a/hibernate/common/pom.xml b/hibernate/common/pom.xml
index c104c19375..21d0fcd26f 100644
--- a/hibernate/common/pom.xml
+++ b/hibernate/common/pom.xml
@@ -71,7 +71,6 @@
org.apache.maven.plugins
maven-surefire-plugin
- 2.15
**/CacheQueryTest.java
From 48623470eb41c7ecd46d58169ee76b7a49a9d6a4 Mon Sep 17 00:00:00 2001
From: EHJ-52n
Date: Tue, 1 Apr 2014 16:13:11 +0200
Subject: [PATCH 035/229] Fix wrong version of do extension and rest binding
---
pom.xml | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/pom.xml b/pom.xml
index 48bf39838b..d72b987858 100644
--- a/pom.xml
+++ b/pom.xml
@@ -77,8 +77,8 @@
4.0.2-SNAPSHOT
- 0.2.0-SNAPSHOT
- 0.2.0-SNAPSHOT
+ 0.1.3-SNAPSHOT
+ 0.1.3-SNAPSHOT
From f908f8ab9b27d02a76d94bc55edb8c3ed8d1b9a4 Mon Sep 17 00:00:00 2001
From: EHJ-52n
Date: Tue, 1 Apr 2014 16:13:37 +0200
Subject: [PATCH 036/229] Update to latest version
---
webapp/pom.xml | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/webapp/pom.xml b/webapp/pom.xml
index adb6c4ab1b..4e5caeab47 100644
--- a/webapp/pom.xml
+++ b/webapp/pom.xml
@@ -16,7 +16,7 @@
${project.parent.basedir}/misc/conf/datasource.properties
${project.build.directory}/${project.build.finalName}/configuration.db
- 1.0.0-M3
+ 1.0.0-M4
${conf.sos.name}
From ace8e211314f88a56e0cbfc6ae6350b5bf013d55 Mon Sep 17 00:00:00 2001
From: CarstenHollmann
Date: Tue, 1 Apr 2014 16:25:59 +0200
Subject: [PATCH 037/229] Update xmlbeans-xpath version to 2.6.0, same as for
xmlbeans dependency
---
extensions/gda/pom.xml | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/extensions/gda/pom.xml b/extensions/gda/pom.xml
index 2a0d9f8f1c..3f449fd122 100644
--- a/extensions/gda/pom.xml
+++ b/extensions/gda/pom.xml
@@ -23,7 +23,7 @@
org.apache.xmlbeans
xmlbeans-xpath
- 2.5.0
+ 2.6.0
net.sf.saxon
From ea673eb805a5e0757b0b3341b79240f1a36517ca Mon Sep 17 00:00:00 2001
From: CarstenHollmann
Date: Tue, 1 Apr 2014 16:26:38 +0200
Subject: [PATCH 038/229] Update NOTICE file after changing the SOS-Test-Suite
license
---
NOTICE | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/NOTICE b/NOTICE
index a4708af89b..5642eb2c39 100644
--- a/NOTICE
+++ b/NOTICE
@@ -5,8 +5,8 @@ Licensed under GNU General Public License, Version 2.0
This project includes:
"Java Concurrency in Practice" book annotations under Creative Commons Attribution License, http://creativecommons.org/licenses/by/2.5
- 52North SOS Integration and Compliance 2.0 under GPLv2
- 52North SOS Integration and Compliance Common under GPLv2
+ 52North SOS Integration and Compliance 2.0 under Eclipse Public License 1.0
+ 52North SOS Integration and Compliance Common under Eclipse Public License 1.0
52°North Aggregated Third Party modules under GPLv2
52°North Sensor Observation Service under GPLv2
52°North SOS - 2.0 XML Request Coding under GPLv2
From 53907f1a3ec68cd590aaa7f103b1053cee0c7f03 Mon Sep 17 00:00:00 2001
From: CarstenHollmann
Date: Wed, 2 Apr 2014 11:04:48 +0200
Subject: [PATCH 039/229] Fix incorrect list splitting for the limit expression
depth
---
.../ds/hibernate/util/HibernateHelperTest.java | 2 +-
.../sos/ds/hibernate/util/HibernateHelper.java | 16 ++++++++--------
2 files changed, 9 insertions(+), 9 deletions(-)
diff --git a/hibernate/common/src/test/java/org/n52/sos/ds/hibernate/util/HibernateHelperTest.java b/hibernate/common/src/test/java/org/n52/sos/ds/hibernate/util/HibernateHelperTest.java
index fbb6da3162..fa257cd93e 100644
--- a/hibernate/common/src/test/java/org/n52/sos/ds/hibernate/util/HibernateHelperTest.java
+++ b/hibernate/common/src/test/java/org/n52/sos/ds/hibernate/util/HibernateHelperTest.java
@@ -40,7 +40,7 @@ public class HibernateHelperTest {
@Test
public void shouldReturnListsOfLists() {
- assertTrue( HibernateHelper.getValidSizedLists(getList()).size() == 10);
+ assertTrue( HibernateHelper.getValidSizedLists(getList()).size() == 11);
}
@Test
diff --git a/hibernate/session-factory/src/main/java/org/n52/sos/ds/hibernate/util/HibernateHelper.java b/hibernate/session-factory/src/main/java/org/n52/sos/ds/hibernate/util/HibernateHelper.java
index 947d289952..267dd92358 100644
--- a/hibernate/session-factory/src/main/java/org/n52/sos/ds/hibernate/util/HibernateHelper.java
+++ b/hibernate/session-factory/src/main/java/org/n52/sos/ds/hibernate/util/HibernateHelper.java
@@ -132,15 +132,15 @@ public static List> getValidSizedLists(Collection queryIds) {
List queryIdsList = Lists.newArrayList(queryIds);
List> lists = Lists.newArrayList();
if (queryIds.size() > HibernateConstants.LIMIT_EXPRESSION_DEPTH) {
- List ids = Lists.newArrayList();
- for (int i = 0; i < queryIds.size(); i++) {
- if (i != 0 && i % (HibernateConstants.LIMIT_EXPRESSION_DEPTH - 1) == 0) {
- lists.add(ids);
- ids = Lists.newArrayList();
- ids.add(queryIdsList.get(i));
- } else {
- ids.add(queryIdsList.get(i));
+ int startIndex = 0;
+ int endIndex = HibernateConstants.LIMIT_EXPRESSION_DEPTH - 1;
+ while (startIndex < queryIdsList.size() - 1) {
+ if (endIndex > (queryIdsList.size())) {
+ endIndex = (queryIdsList.size());
}
+ lists.add(queryIdsList.subList(startIndex, endIndex));
+ startIndex = endIndex;
+ endIndex = endIndex + HibernateConstants.LIMIT_EXPRESSION_DEPTH - 1;
}
} else {
lists.add(queryIdsList);
From 37693aa3697370b4fa9cd2667a54933029734ecb Mon Sep 17 00:00:00 2001
From: Christian Autermann
Date: Wed, 2 Apr 2014 17:16:59 +0200
Subject: [PATCH 040/229] allow endpoint style binding definitions in client
config
---
.../src/main/webapp/WEB-INF/views/client.jsp | 86 +++++++++++--------
1 file changed, 48 insertions(+), 38 deletions(-)
diff --git a/spring/views/src/main/webapp/WEB-INF/views/client.jsp b/spring/views/src/main/webapp/WEB-INF/views/client.jsp
index e07a01bde7..fd4e59f6d2 100644
--- a/spring/views/src/main/webapp/WEB-INF/views/client.jsp
+++ b/spring/views/src/main/webapp/WEB-INF/views/client.jsp
@@ -140,43 +140,43 @@
r.operation = o;
r.title = t;
r.headers = {};
- switch (b) {
- case "KVP":
- case "/kvp":
- r.method = "GET";
- r.headers["Accept"] = "application/xml";
- r.binding = "application/x-kvp";
- break;
- case "POX":
- case "/pox":
- r.method = "POST";
- r.headers["Accept"] = "application/xml";
- r.headers["Content-Type"] = "application/xml";
- r.binding = "application/xml";
- break;
- case "SOAP":
- case "/soap":
- r.method = "POST";
- r.headers["Accept"] = "application/soap+xml";
- r.headers["Content-Type"] = "application/soap+xml";
- r.binding = "application/soap+xml";
- break;
- case "JSON":
- case "/json":
- r.method = "POST";
- r.headers["Accept"] = "application/json";
- r.headers["Content-Type"] = "application/json";
- r.binding = "application/json";
- break;
- default:
- if (console && console.log) {
- console.log("Unsupported binding" + b);
- }
- break;
- }
- if (r.binding) {
- transformed.push(r);
- }
+ switch (b) {
+ case "KVP":
+ case "/kvp":
+ r.method = "GET";
+ r.headers["Accept"] = "application/xml";
+ r.binding = "application/x-kvp";
+ break;
+ case "POX":
+ case "/pox":
+ r.method = "POST";
+ r.headers["Accept"] = "application/xml";
+ r.headers["Content-Type"] = "application/xml";
+ r.binding = "application/xml";
+ break;
+ case "SOAP":
+ case "/soap":
+ r.method = "POST";
+ r.headers["Accept"] = "application/soap+xml";
+ r.headers["Content-Type"] = "application/soap+xml";
+ r.binding = "application/soap+xml";
+ break;
+ case "JSON":
+ case "/json":
+ r.method = "POST";
+ r.headers["Accept"] = "application/json";
+ r.headers["Content-Type"] = "application/json";
+ r.binding = "application/json";
+ break;
+ default:
+ if (console && console.log) {
+ console.log("Unsupported binding" + b);
+ }
+ break;
+ }
+ if (r.binding) {
+ transformed.push(r);
+ }
}
}
}
@@ -190,13 +190,23 @@
config = { examples: flatten(config) };
}
+ /* accept endpoint based configs */
+ for (var i = 0; i < config.examples.length; ++i) {
+ switch (config.examples[i].binding) {
+ case "/kvp" : config.examples[i].binding = "application/x-kvp"; break;
+ case "/soap": config.examples[i].binding = "application/soap+xml"; break;
+ case "/pox" : config.examples[i].binding = "application/xml"; break;
+ case "/json": config.examples[i].binding = "application/json"; break;
+ }
+ }
+
config.sosUrl = document.location.protocol + "//"
+ document.location.host + " ";
config.availableOperations = availableOperations;
new Client(config);
})
.fail(function() {
- alert('Error while loading request data!');
+ alert('Error while loading request data!');
});
From aee9de88faa8a76b0e8433babaae93bdf44b0b8a Mon Sep 17 00:00:00 2001
From: CarstenHollmann
Date: Thu, 3 Apr 2014 11:25:35 +0200
Subject: [PATCH 041/229] First changes to support the response streaming: -
add response writer for streaming - move SOAP response encoding to writer
---
.../java/org/n52/sos/binding/SoapBinding.java | 104 +++++++++++++-----
.../n52/sos/encode/AbstractSoapEncoder.java | 50 ++++++++-
.../org/n52/sos/encode/Soap11Encoder.java | 2 +-
.../org/n52/sos/encode/Soap12Encoder.java | 3 +-
.../java/org/n52/sos/encode/SoapChain.java | 6 +
.../sos/encode/StreamSoapResponseWriter.java | 93 ++++++++++++++++
.../java/org/n52/sos/soap/SoapResponse.java | 28 ++++-
.../org.n52.sos.encode.ResponseWriter | 3 +-
.../encode/AbstractStreamResponseWriter.java | 54 +++++++++
.../n52/sos/service/ServiceConfiguration.java | 12 ++
.../util/http/AbstractGenericWritable.java | 67 +++++++++++
.../java/org/n52/sos/util/http/HTTPUtils.java | 48 +++++---
.../sos/util/http/StreamResponseWritable.java | 53 +++++++++
13 files changed, 467 insertions(+), 56 deletions(-)
create mode 100644 bindings/soap/src/main/java/org/n52/sos/encode/StreamSoapResponseWriter.java
create mode 100644 core/api/src/main/java/org/n52/sos/encode/AbstractStreamResponseWriter.java
create mode 100644 core/api/src/main/java/org/n52/sos/util/http/AbstractGenericWritable.java
create mode 100644 core/api/src/main/java/org/n52/sos/util/http/StreamResponseWritable.java
diff --git a/bindings/soap/src/main/java/org/n52/sos/binding/SoapBinding.java b/bindings/soap/src/main/java/org/n52/sos/binding/SoapBinding.java
index d1fa0c48d2..30ad138c57 100644
--- a/bindings/soap/src/main/java/org/n52/sos/binding/SoapBinding.java
+++ b/bindings/soap/src/main/java/org/n52/sos/binding/SoapBinding.java
@@ -57,6 +57,7 @@
import org.n52.sos.request.AbstractServiceRequest;
import org.n52.sos.request.GetCapabilitiesRequest;
import org.n52.sos.service.CommunicationObjectWithSoapHeader;
+import org.n52.sos.service.ServiceConfiguration;
import org.n52.sos.service.SoapHeader;
import org.n52.sos.soap.SoapHelper;
import org.n52.sos.soap.SoapRequest;
@@ -67,6 +68,7 @@
import org.n52.sos.util.http.HTTPUtils;
import org.n52.sos.util.http.MediaType;
import org.n52.sos.util.http.MediaTypes;
+import org.n52.sos.util.http.StreamResponseWritable;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
@@ -155,24 +157,25 @@ private void parseBodyRequest(SoapChain chain) throws OwsExceptionReport, OwsExc
chain.setBodyRequest(bodyRequest);
}
+ private void createSoapResponse(SoapChain chain) {
+ SoapResponse soapResponse = new SoapResponse();
+ soapResponse.setSoapVersion(chain.getSoapRequest().getSoapVersion());
+ soapResponse.setSoapNamespace(chain.getSoapRequest().getSoapNamespace());
+ soapResponse.setHeader(chain.getSoapRequest().getSoapHeader());
+ chain.setSoapResponse(soapResponse);
+ }
+
+ private void createBodyResponse(SoapChain chain) throws OwsExceptionReport {
+ AbstractServiceRequest req = chain.getBodyRequest();
+ chain.setBodyResponse(getServiceOperator(req).receiveRequest(req));
+ }
+
private void encodeBodyResponse(SoapChain chain) throws OwsExceptionReport {
XmlObject encodedResponse = (XmlObject) encodeResponse(chain.getBodyResponse(), MediaTypes.APPLICATION_XML);
chain.getSoapResponse().setSoapBodyContent(encodedResponse);
}
private Object encodeSoapResponse(SoapChain chain) throws OwsExceptionReport {
- // soap injection
- if (chain.getBodyResponse() instanceof CommunicationObjectWithSoapHeader) {
- final CommunicationObjectWithSoapHeader soapHeaderObject =
- (CommunicationObjectWithSoapHeader) chain.getBodyResponse();
- if (soapHeaderObject.isSetSoapHeader()) {
- final Map header =
- ((CommunicationObjectWithSoapHeader) chain.getSoapRequest()).getSoapHeader();
- // TODO do things
- chain.getSoapResponse().setHeader(header);
- }
- }
-
final EncoderKey key =
CodingHelper.getEncoderKey(chain.getSoapResponse().getSoapNamespace(), chain.getSoapResponse());
final Encoder, SoapResponse> encoder = getEncoder(key);
@@ -194,7 +197,12 @@ private void writeOwsExceptionReport(SoapChain chain, OwsExceptionReport owse) t
if (!chain.getSoapResponse().hasSoapNamespace()) {
chain.getSoapResponse().setSoapNamespace(SOAPConstants.URI_NS_SOAP_1_2_ENVELOPE);
}
- writeSoapResponse(chain);
+ if (chain.getSoapResponse().hasException() && chain.getSoapResponse().getException().hasStatus()) {
+ chain.getHttpResponse().setStatus(chain.getSoapResponse().getException().getStatus().getCode());
+ }
+ checkSoapInjection(chain);
+ HTTPUtils.writeObject(chain.getHttpRequest(), chain.getHttpResponse(), checkMediaType(chain),
+ encodeSoapResponse(chain));
} catch (OwsExceptionReport t) {
throw new HTTPException(HTTPStatus.INTERNAL_SERVER_ERROR, t);
}
@@ -208,32 +216,72 @@ private void writeResponse(SoapChain chain) throws IOException, HTTPException {
// TODO allow other bindings to encode response as soap messages
if (contentType.isCompatible(getDefaultContentType())) {
- try {
- if (chain.hasBodyResponse()) {
- encodeBodyResponse(chain);
+ checkSoapInjection(chain);
+ if (ServiceConfiguration.getInstance().isStreamingEnabled()) {
+ HTTPUtils.writeObject(chain.getHttpRequest(), chain.getHttpResponse(), checkMediaType(chain),
+ new StreamResponseWritable(chain));
+ } else {
+ try {
+ if (chain.hasBodyResponse()) {
+ encodeBodyResponse(chain);
+ }
+ HTTPUtils.writeObject(chain.getHttpRequest(), chain.getHttpResponse(), checkMediaType(chain),
+ encodeSoapResponse(chain));
+ } catch (OwsExceptionReport e) {
+ writeOwsExceptionReport(chain, e);
}
- writeSoapResponse(chain);
- } catch (OwsExceptionReport e) {
- writeOwsExceptionReport(chain, e);
}
} else {
writeResponse(chain.getHttpRequest(), chain.getHttpResponse(), chain.getBodyResponse(), contentType);
}
}
- private void createSoapResponse(SoapChain chain) {
- SoapResponse soapResponse = new SoapResponse();
- soapResponse.setSoapVersion(chain.getSoapRequest().getSoapVersion());
- soapResponse.setSoapNamespace(chain.getSoapRequest().getSoapNamespace());
- soapResponse.setHeader(chain.getSoapRequest().getSoapHeader());
- chain.setSoapResponse(soapResponse);
+ /**
+ * Check the {@link MediaType}
+ *
+ * @param chain
+ * SoapChain to check
+ * @return the valid {@link MediaType}
+ */
+ private MediaType checkMediaType(SoapChain chain) {
+ if (chain.getBodyRequest() instanceof GetCapabilitiesRequest) {
+ GetCapabilitiesRequest r = (GetCapabilitiesRequest) chain.getBodyRequest();
+ if (r.isSetAcceptFormats()) {
+ return MediaType.parse(r.getAcceptFormats().get(0));
+ }
+ }
+ return MediaTypes.APPLICATION_SOAP_XML;
}
- private void createBodyResponse(SoapChain chain) throws OwsExceptionReport {
- AbstractServiceRequest req = chain.getBodyRequest();
- chain.setBodyResponse(getServiceOperator(req).receiveRequest(req));
+ /**
+ * Check if SoapHeader information is contained in the body response and add
+ * the header information to the {@link SoapResponse}
+ *
+ * @param chain
+ * SoapChain to check
+ */
+ private void checkSoapInjection(SoapChain chain) {
+ if (chain.getBodyResponse() instanceof CommunicationObjectWithSoapHeader) {
+ final CommunicationObjectWithSoapHeader soapHeaderObject =
+ (CommunicationObjectWithSoapHeader) chain.getBodyResponse();
+ if (soapHeaderObject.isSetSoapHeader()) {
+ final Map header =
+ ((CommunicationObjectWithSoapHeader) chain.getSoapRequest()).getSoapHeader();
+ // TODO do things
+ chain.getSoapResponse().setHeader(header);
+ }
+ }
}
+ /**
+ * Deprecated because of functionality has moved to
+ * {@link #writeResponse(SoapChain)} for streaming support
+ *
+ * @param chain
+ * @throws IOException
+ * @throws OwsExceptionReport
+ */
+ @Deprecated
private void writeSoapResponse(SoapChain chain) throws IOException, OwsExceptionReport {
Object encodedSoapResponse = encodeSoapResponse(chain);
if (chain.getSoapResponse().hasException() && chain.getSoapResponse().getException().hasStatus()) {
diff --git a/bindings/soap/src/main/java/org/n52/sos/encode/AbstractSoapEncoder.java b/bindings/soap/src/main/java/org/n52/sos/encode/AbstractSoapEncoder.java
index 85d0fc6e7c..00f593c0cb 100644
--- a/bindings/soap/src/main/java/org/n52/sos/encode/AbstractSoapEncoder.java
+++ b/bindings/soap/src/main/java/org/n52/sos/encode/AbstractSoapEncoder.java
@@ -43,15 +43,17 @@
import javax.xml.soap.SOAPMessage;
import org.apache.xmlbeans.XmlObject;
+import org.n52.sos.coding.CodingRepository;
import org.n52.sos.exception.CodedException;
import org.n52.sos.exception.ows.OwsExceptionCode;
-import org.n52.sos.exception.ows.concrete.XmlDecodingException;
+import org.n52.sos.exception.ows.concrete.NoEncoderForKeyException;
import org.n52.sos.exception.sos.SosExceptionCode;
import org.n52.sos.exception.swes.SwesExceptionCode;
import org.n52.sos.ogc.ows.ExceptionCode;
import org.n52.sos.ogc.ows.OWSConstants;
import org.n52.sos.ogc.ows.OwsExceptionReport;
import org.n52.sos.ogc.sos.SosSoapConstants;
+import org.n52.sos.response.AbstractServiceResponse;
import org.n52.sos.service.ServiceConstants.SupportedTypeKey;
import org.n52.sos.soap.SoapFault;
import org.n52.sos.soap.SoapHelper;
@@ -128,10 +130,9 @@ public T encode(SoapResponse response) throws OwsExceptionReport {
*
* @throws SOAPException
* if an error occurs.
- * @throws XmlDecodingException
*/
protected String createSOAPBody(SOAPMessage soapResponseMessage, XmlObject sosResponse, String actionURI)
- throws SOAPException, XmlDecodingException {
+ throws SOAPException {
if (sosResponse != null) {
addAndRemoveSchemaLocationForSOAP(sosResponse, soapResponseMessage);
@@ -150,6 +151,49 @@ protected String createSOAPBody(SOAPMessage soapResponseMessage, XmlObject sosRe
return null;
}
+ /**
+ * Create and add the SOAPBody content
+ *
+ * @param soapResponseMessage
+ * SOAPMessage to add the body
+ * @param soapResponse
+ * SOS internal SOAP response
+ * @param actionURI
+ * The ation URI
+ * @return action URI
+ * @throws SOAPException
+ * If an error occurs when add content to {@link SOAPMessage}
+ * @throws OwsExceptionReport
+ * If an error occurs while encoding the body content
+ */
+ protected String createSOAPBody(SOAPMessage soapResponseMessage, SoapResponse soapResponse, String actionURI)
+ throws SOAPException, OwsExceptionReport {
+ return createSOAPBody(soapResponseMessage, getBodyContent(soapResponse), actionURI);
+ }
+
+ /**
+ * Get the content for the SOAPBody as {@link XmlObject}
+ *
+ * @param response
+ * SOAP response
+ * @return SOAPBody content as {@link XmlObject}
+ * @throws OwsExceptionReport
+ * If no encoder is available, the object to encode is not
+ * supported or an error occurs during the encoding
+ */
+ protected XmlObject getBodyContent(SoapResponse response) throws OwsExceptionReport {
+ if (response.isSetXmlBodyContent()) {
+ return response.getSoapBodyContent();
+ }
+ OperationEncoderKey key =
+ new OperationEncoderKey(response.getBodyContent().getOperationKey(), MediaTypes.APPLICATION_XML);
+ Encoder encoder = CodingRepository.getInstance().getEncoder(key);
+ if (encoder == null) {
+ throw new NoEncoderForKeyException(key);
+ }
+ return (XmlObject) encoder.encode(response.getBodyContent());
+ }
+
/**
* Check SOS response for xsi:schemaLocation, remove attribute and add
* attribute to SOAP message
diff --git a/bindings/soap/src/main/java/org/n52/sos/encode/Soap11Encoder.java b/bindings/soap/src/main/java/org/n52/sos/encode/Soap11Encoder.java
index e4c3f13aa8..3e7aa85ee1 100644
--- a/bindings/soap/src/main/java/org/n52/sos/encode/Soap11Encoder.java
+++ b/bindings/soap/src/main/java/org/n52/sos/encode/Soap11Encoder.java
@@ -98,7 +98,7 @@ public SOAPMessage encode(SoapResponse soapResponse, Map a
addSchemaLocationForExceptionToSOAPMessage(soapResponseMessage);
} else {
action =
- createSOAPBody(soapResponseMessage, soapResponse.getSoapBodyContent(),
+ createSOAPBody(soapResponseMessage, soapResponse,
soapResponse.getSoapAction());
}
}
diff --git a/bindings/soap/src/main/java/org/n52/sos/encode/Soap12Encoder.java b/bindings/soap/src/main/java/org/n52/sos/encode/Soap12Encoder.java
index 8408450496..d1a771ab4f 100644
--- a/bindings/soap/src/main/java/org/n52/sos/encode/Soap12Encoder.java
+++ b/bindings/soap/src/main/java/org/n52/sos/encode/Soap12Encoder.java
@@ -115,7 +115,8 @@ public XmlObject encode(final SoapResponse response, final Map
+ * @since 4.0.2
+ *
+ */
+public class StreamSoapResponseWriter extends AbstractStreamResponseWriter {
+
+ @Override
+ public Class getType() {
+ return SoapChain.class;
+ }
+
+ @Override
+ public void write(SoapChain chain, OutputStream out) throws IOException {
+ try {
+ Object o = encodeSoapResponse(chain);
+ if (o instanceof SOAPMessage) {
+ ((SOAPMessage) o).writeTo(out);
+ } else if (o instanceof XmlObject) {
+ ((XmlObject) o).save(out, XmlOptionsHelper.getInstance().getXmlOptions());
+ }
+ } catch (SOAPException soapex) {
+ throw new IOException(soapex);
+ } catch (OwsExceptionReport owsex) {
+ throw new IOException(owsex);
+ }
+ }
+
+ /**
+ * Currently used to do not break the functionality. Will be exchanged for full streaming.
+ *
+ * @param chain
+ * @return
+ * @throws OwsExceptionReport
+ */
+ @Deprecated
+ private Object encodeSoapResponse(SoapChain chain) throws OwsExceptionReport {
+ final EncoderKey key =
+ CodingHelper.getEncoderKey(chain.getSoapResponse().getSoapNamespace(), chain.getSoapResponse());
+ final Encoder, SoapResponse> encoder = getEncoder(key);
+ if (encoder != null) {
+ return encoder.encode(chain.getSoapResponse());
+ } else {
+ throw new NoEncoderForKeyException(key);
+ }
+ }
+
+}
diff --git a/bindings/soap/src/main/java/org/n52/sos/soap/SoapResponse.java b/bindings/soap/src/main/java/org/n52/sos/soap/SoapResponse.java
index 0f69da5617..19a08d29d7 100644
--- a/bindings/soap/src/main/java/org/n52/sos/soap/SoapResponse.java
+++ b/bindings/soap/src/main/java/org/n52/sos/soap/SoapResponse.java
@@ -32,6 +32,7 @@
import org.apache.xmlbeans.XmlObject;
import org.n52.sos.ogc.ows.OwsExceptionReport;
+import org.n52.sos.response.AbstractServiceResponse;
import org.n52.sos.service.SoapHeader;
/**
@@ -48,14 +49,15 @@ public class SoapResponse {
private SoapFault soapFault;
- private XmlObject bodyContent;
+ private XmlObject xmlBodyContent;
+
+ private AbstractServiceResponse bodyContent;
private Map header;
private OwsExceptionReport exception;
public SoapResponse() {
- // TODO Auto-generated constructor stub
}
/**
@@ -105,7 +107,7 @@ public SoapFault getSoapFault() {
}
public XmlObject getSoapBodyContent() {
- return bodyContent;
+ return xmlBodyContent;
}
public void setSoapAction(String soapAction) {
@@ -116,8 +118,16 @@ public String getSoapAction() {
return soapAction;
}
- public void setSoapBodyContent(XmlObject bodyContent) {
- this.bodyContent = bodyContent;
+ public void setSoapBodyContent(XmlObject xmlBodyContent) {
+ this.xmlBodyContent = xmlBodyContent;
+ }
+
+ public void setBodyContent(AbstractServiceResponse response) {
+ this.bodyContent = response;
+ }
+
+ public AbstractServiceResponse getBodyContent() {
+ return bodyContent;
}
public void setHeader(Map map) {
@@ -140,4 +150,12 @@ public boolean hasException() {
return exception != null;
}
+ public boolean isSetXmlBodyContent() {
+ return getSoapBodyContent() != null;
+ }
+
+ public boolean isSetBodyContent() {
+ return getBodyContent() != null;
+ }
+
}
diff --git a/bindings/soap/src/main/resources/META-INF/services/org.n52.sos.encode.ResponseWriter b/bindings/soap/src/main/resources/META-INF/services/org.n52.sos.encode.ResponseWriter
index 3bd8414bee..0fb3b74a0b 100644
--- a/bindings/soap/src/main/resources/META-INF/services/org.n52.sos.encode.ResponseWriter
+++ b/bindings/soap/src/main/resources/META-INF/services/org.n52.sos.encode.ResponseWriter
@@ -1 +1,2 @@
-org.n52.sos.encode.SoapResponseWriter
\ No newline at end of file
+org.n52.sos.encode.SoapResponseWriter
+org.n52.sos.encode.StreamSoapResponseWriter
\ No newline at end of file
diff --git a/core/api/src/main/java/org/n52/sos/encode/AbstractStreamResponseWriter.java b/core/api/src/main/java/org/n52/sos/encode/AbstractStreamResponseWriter.java
new file mode 100644
index 0000000000..be67311f47
--- /dev/null
+++ b/core/api/src/main/java/org/n52/sos/encode/AbstractStreamResponseWriter.java
@@ -0,0 +1,54 @@
+/**
+ * Copyright (C) 2012-2014 52°North Initiative for Geospatial Open Source
+ * Software GmbH
+ *
+ * This program is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU General Public License version 2 as published
+ * by the Free Software Foundation.
+ *
+ * If the program is linked with libraries which are licensed under one of
+ * the following licenses, the combination of the program with the linked
+ * library is not considered a "derivative work" of the program:
+ *
+ * - Apache License, version 2.0
+ * - Apache Software License, version 1.0
+ * - GNU Lesser General Public License, version 3
+ * - Mozilla Public License, versions 1.0, 1.1 and 2.0
+ * - Common Development and Distribution License (CDDL), version 1.0
+ *
+ * Therefore the distribution of the program linked with libraries licensed
+ * under the aforementioned licenses, is permitted by the copyright holders
+ * if the distribution is compliant with both the GNU General Public
+ * License version 2 and the aforementioned licenses.
+ *
+ * This program is distributed in the hope that it will be useful, but
+ * WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General
+ * Public License for more details.
+ */
+package org.n52.sos.encode;
+
+import org.n52.sos.coding.CodingRepository;
+
+/**
+ * Abstract {@link ResponseWriter} class for response streaming
+ *
+ * @author Carsten Hollmann
+ * @since 4.0.2
+ *
+ * @param
+ * generic for the element to write
+ */
+public abstract class AbstractStreamResponseWriter implements ResponseWriter {
+
+ /**
+ * Getter for encoder, encapsulates the instance call
+ *
+ * @param key
+ * Encoder key
+ * @return Matching encoder
+ */
+ protected Encoder getEncoder(EncoderKey key) {
+ return CodingRepository.getInstance().getEncoder(key);
+ }
+}
diff --git a/core/api/src/main/java/org/n52/sos/service/ServiceConfiguration.java b/core/api/src/main/java/org/n52/sos/service/ServiceConfiguration.java
index dbf9958bc5..887e9d8099 100644
--- a/core/api/src/main/java/org/n52/sos/service/ServiceConfiguration.java
+++ b/core/api/src/main/java/org/n52/sos/service/ServiceConfiguration.java
@@ -137,6 +137,9 @@ private ServiceConfiguration() {
private int maxNumberOfReturnedValues = Integer.MAX_VALUE;
private boolean overallExtrema = true;
+
+ private boolean streaming = true;
+
/**
* Returns the default token seperator for results.
*
@@ -386,7 +389,16 @@ public void setOverallExtrema(boolean overallExtrema) {
public boolean isOverallExtrema() {
return overallExtrema;
}
+
+// @Setting(MiscSettings.RETURN_OVERALL_EXTREMA_FOR_FIRST_LATEST)
+ public void setStreamingEnabled(boolean streaming) {
+ this.streaming = streaming;
+ }
+ public boolean isStreamingEnabled() {
+ return streaming;
+ }
+
/*
* Now, we return the list of returned features and not a complex encoded
* relatedFeature => this setting is not needed at all See
diff --git a/core/api/src/main/java/org/n52/sos/util/http/AbstractGenericWritable.java b/core/api/src/main/java/org/n52/sos/util/http/AbstractGenericWritable.java
new file mode 100644
index 0000000000..0f92184fbd
--- /dev/null
+++ b/core/api/src/main/java/org/n52/sos/util/http/AbstractGenericWritable.java
@@ -0,0 +1,67 @@
+/**
+ * Copyright (C) 2012-2014 52°North Initiative for Geospatial Open Source
+ * Software GmbH
+ *
+ * This program is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU General Public License version 2 as published
+ * by the Free Software Foundation.
+ *
+ * If the program is linked with libraries which are licensed under one of
+ * the following licenses, the combination of the program with the linked
+ * library is not considered a "derivative work" of the program:
+ *
+ * - Apache License, version 2.0
+ * - Apache Software License, version 1.0
+ * - GNU Lesser General Public License, version 3
+ * - Mozilla Public License, versions 1.0, 1.1 and 2.0
+ * - Common Development and Distribution License (CDDL), version 1.0
+ *
+ * Therefore the distribution of the program linked with libraries licensed
+ * under the aforementioned licenses, is permitted by the copyright holders
+ * if the distribution is compliant with both the GNU General Public
+ * License version 2 and the aforementioned licenses.
+ *
+ * This program is distributed in the hope that it will be useful, but
+ * WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General
+ * Public License for more details.
+ */
+package org.n52.sos.util.http;
+
+import java.io.IOException;
+import java.io.OutputStream;
+
+import org.n52.sos.encode.ResponseWriter;
+import org.n52.sos.encode.ResponseWriterRepository;
+import org.n52.sos.util.http.HTTPUtils.Writable;
+
+/**
+ * Abstract generic writable class
+ *
+ * @author Carsten Hollmann
+ * @since 4.0.2
+ *
+ */
+public abstract class AbstractGenericWritable implements Writable {
+ private final Object o;
+
+ /**
+ * constructor
+ *
+ * @param o
+ * Object to write out
+ */
+ AbstractGenericWritable(Object o) {
+ this.o = o;
+ }
+
+ @Override
+ public void write(OutputStream out) throws IOException {
+ ResponseWriter writer = ResponseWriterRepository.getInstance().getWriter(o.getClass());
+ if (writer == null) {
+ throw new RuntimeException("no writer for " + o.getClass() + " found!");
+ }
+ writer.write(o, out);
+ }
+
+}
diff --git a/core/api/src/main/java/org/n52/sos/util/http/HTTPUtils.java b/core/api/src/main/java/org/n52/sos/util/http/HTTPUtils.java
index 4d80e4ce64..59631c8309 100644
--- a/core/api/src/main/java/org/n52/sos/util/http/HTTPUtils.java
+++ b/core/api/src/main/java/org/n52/sos/util/http/HTTPUtils.java
@@ -42,8 +42,6 @@
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
-import org.n52.sos.encode.ResponseWriter;
-import org.n52.sos.encode.ResponseWriterRepository;
import org.n52.sos.exception.HTTPException;
import org.n52.sos.response.ServiceResponse;
import org.slf4j.Logger;
@@ -141,7 +139,7 @@ public static void writeObject(HttpServletRequest request, HttpServletResponse r
}
}
- private static void writeObject(HttpServletRequest request, HttpServletResponse response, MediaType contentType,
+ public static void writeObject(HttpServletRequest request, HttpServletResponse response, MediaType contentType,
Writable writable) throws IOException {
OutputStream out = null;
response.setContentType(contentType.toString());
@@ -150,7 +148,7 @@ private static void writeObject(HttpServletRequest request, HttpServletResponse
if (supportsGzipEncoding(request) && writable.supportsGZip()) {
out = new GZIPOutputStream(out);
response.setHeader(HTTPHeaders.CONTENT_ENCODING, HTTPConstants.GZIP_ENCODING);
- //FIXME content length is unknown when using GZIPOutputStream
+ // FIXME content length is unknown when using GZIPOutputStream
response.setContentLength(-1);
}
@@ -163,20 +161,10 @@ private static void writeObject(HttpServletRequest request, HttpServletResponse
}
}
- private static class GenericWritable implements Writable {
- private final Object o;
+ private static class GenericWritable extends AbstractGenericWritable {
GenericWritable(Object o) {
- this.o = o;
- }
-
- @Override
- public void write(OutputStream out) throws IOException {
- ResponseWriter writer = ResponseWriterRepository.getInstance().getWriter(o.getClass());
- if (writer == null) {
- throw new RuntimeException("no writer for " + o.getClass() + " found!");
- }
- writer.write(o, out);
+ super(o);
}
@Override
@@ -203,9 +191,35 @@ public boolean supportsGZip() {
}
}
- private interface Writable {
+ /**
+ * Writer implementation for response streaming
+ *
+ * @author Carsten Hollmann
+ * @since 4.0.2
+ *
+ */
+ public static class StreamResponseWritable extends AbstractGenericWritable {
+
+ /**
+ * constructor
+ *
+ * @param o
+ * Object to write out
+ */
+ StreamResponseWritable(Object o) {
+ super(o);
+ }
+
+ @Override
+ public boolean supportsGZip() {
+ return false;
+ }
+ }
+
+ public interface Writable {
void write(OutputStream out) throws IOException;
boolean supportsGZip();
}
+
}
diff --git a/core/api/src/main/java/org/n52/sos/util/http/StreamResponseWritable.java b/core/api/src/main/java/org/n52/sos/util/http/StreamResponseWritable.java
new file mode 100644
index 0000000000..2a15586403
--- /dev/null
+++ b/core/api/src/main/java/org/n52/sos/util/http/StreamResponseWritable.java
@@ -0,0 +1,53 @@
+/**
+ * Copyright (C) 2012-2014 52°North Initiative for Geospatial Open Source
+ * Software GmbH
+ *
+ * This program is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU General Public License version 2 as published
+ * by the Free Software Foundation.
+ *
+ * If the program is linked with libraries which are licensed under one of
+ * the following licenses, the combination of the program with the linked
+ * library is not considered a "derivative work" of the program:
+ *
+ * - Apache License, version 2.0
+ * - Apache Software License, version 1.0
+ * - GNU Lesser General Public License, version 3
+ * - Mozilla Public License, versions 1.0, 1.1 and 2.0
+ * - Common Development and Distribution License (CDDL), version 1.0
+ *
+ * Therefore the distribution of the program linked with libraries licensed
+ * under the aforementioned licenses, is permitted by the copyright holders
+ * if the distribution is compliant with both the GNU General Public
+ * License version 2 and the aforementioned licenses.
+ *
+ * This program is distributed in the hope that it will be useful, but
+ * WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General
+ * Public License for more details.
+ */
+package org.n52.sos.util.http;
+
+/**
+ * Writable for streaming responses
+ *
+ * @author Carsten Hollmann
+ * @since 4.0.2
+ *
+ */
+public class StreamResponseWritable extends AbstractGenericWritable {
+
+ /**
+ * constructor
+ * @param o Object to stream
+ */
+ public StreamResponseWritable(Object o) {
+ super(o);
+ }
+
+ @Override
+ public boolean supportsGZip() {
+ return false;
+ }
+
+}
From 487c7265cad6b39ccbac6d751524ab953ee352e9 Mon Sep 17 00:00:00 2001
From: CarstenHollmann
Date: Thu, 3 Apr 2014 12:07:39 +0200
Subject: [PATCH 042/229] Picked changes from inspire branch
---
.../org/n52/sos/encode/XmlEventWriter.java | 117 ++++++++++++++++++
.../org/n52/sos/encode/XmlStreamWriter.java | 114 +++++++++++++++++
.../java/org/n52/sos/encode/XmlWriter.java | 100 +++++++++++++++
3 files changed, 331 insertions(+)
create mode 100644 core/api/src/main/java/org/n52/sos/encode/XmlEventWriter.java
create mode 100644 core/api/src/main/java/org/n52/sos/encode/XmlStreamWriter.java
create mode 100644 core/api/src/main/java/org/n52/sos/encode/XmlWriter.java
diff --git a/core/api/src/main/java/org/n52/sos/encode/XmlEventWriter.java b/core/api/src/main/java/org/n52/sos/encode/XmlEventWriter.java
new file mode 100644
index 0000000000..d0d25c1701
--- /dev/null
+++ b/core/api/src/main/java/org/n52/sos/encode/XmlEventWriter.java
@@ -0,0 +1,117 @@
+/**
+ * Copyright (C) 2012-2014 52°North Initiative for Geospatial Open Source
+ * Software GmbH
+ *
+ * This program is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU General Public License version 2 as published
+ * by the Free Software Foundation.
+ *
+ * If the program is linked with libraries which are licensed under one of
+ * the following licenses, the combination of the program with the linked
+ * library is not considered a "derivative work" of the program:
+ *
+ * - Apache License, version 2.0
+ * - Apache Software License, version 1.0
+ * - GNU Lesser General Public License, version 3
+ * - Mozilla Public License, versions 1.0, 1.1 and 2.0
+ * - Common Development and Distribution License (CDDL), version 1.0
+ *
+ * Therefore the distribution of the program linked with libraries licensed
+ * under the aforementioned licenses, is permitted by the copyright holders
+ * if the distribution is compliant with both the GNU General Public
+ * License version 2 and the aforementioned licenses.
+ *
+ * This program is distributed in the hope that it will be useful, but
+ * WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General
+ * Public License for more details.
+ */
+package org.n52.sos.encode;
+
+import java.io.OutputStream;
+
+import javax.xml.namespace.QName;
+import javax.xml.stream.XMLEventWriter;
+import javax.xml.stream.XMLStreamException;
+
+/**
+ * Abstract XML writer class for {@link XMLEventWriter}
+ *
+ * @author Carsten Hollmann
+ * @since 4.0.2
+ *
+ */
+public abstract class XmlEventWriter extends XmlWriter {
+
+ private XMLEventWriter w;
+
+ @Override
+ protected void init(OutputStream out) throws XMLStreamException {
+ init(out, "UTF-8");
+ }
+
+ @Override
+ protected void init(OutputStream out, String encoding) throws XMLStreamException {
+ this.w = getXmlOutputFactory().createXMLEventWriter(out, encoding);
+ }
+
+ @Override
+ protected XMLEventWriter getXmlWriter() {
+ return w;
+ }
+
+ protected void finish() throws XMLStreamException {
+ getXmlWriter().flush();
+ getXmlWriter().close();
+ }
+
+ @Override
+ protected void attr(QName name, String value) throws XMLStreamException {
+ getXmlWriter().add(getXmlEventFactory().createAttribute(name, value));
+ }
+
+ @Override
+ protected void attr(String name, String value) throws XMLStreamException {
+ getXmlWriter().add(getXmlEventFactory().createAttribute(name, value));
+ }
+
+ @Override
+ protected void chars(String chars) throws XMLStreamException {
+ getXmlWriter().add(getXmlEventFactory().createCharacters(chars));
+ }
+
+ @Override
+ protected void end(QName name) throws XMLStreamException {
+ getXmlWriter().add(
+ getXmlEventFactory().createEndElement(name.getPrefix(), name.getNamespaceURI(), name.getLocalPart()));
+ }
+
+ @Override
+ protected void end() throws XMLStreamException {
+ getXmlWriter().add(getXmlEventFactory().createEndDocument());
+ }
+
+ @Override
+ protected void namespace(String prefix, String namespace) throws XMLStreamException {
+ getXmlWriter().add(getXmlEventFactory().createNamespace(prefix, namespace));
+ }
+
+ @Override
+ protected void start(QName name) throws XMLStreamException {
+ getXmlWriter()
+ .add(getXmlEventFactory().createStartElement(name.getPrefix(), name.getNamespaceURI(),
+ name.getLocalPart()));
+ }
+
+ @Override
+ protected void start() throws XMLStreamException {
+ getXmlWriter().add(getXmlEventFactory().createStartDocument());
+ }
+
+ @Override
+ protected void empty(QName name) throws XMLStreamException {
+ start(name);
+ end(name);
+ }
+
+}
diff --git a/core/api/src/main/java/org/n52/sos/encode/XmlStreamWriter.java b/core/api/src/main/java/org/n52/sos/encode/XmlStreamWriter.java
new file mode 100644
index 0000000000..e35fe916f5
--- /dev/null
+++ b/core/api/src/main/java/org/n52/sos/encode/XmlStreamWriter.java
@@ -0,0 +1,114 @@
+/**
+ * Copyright (C) 2012-2014 52°North Initiative for Geospatial Open Source
+ * Software GmbH
+ *
+ * This program is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU General Public License version 2 as published
+ * by the Free Software Foundation.
+ *
+ * If the program is linked with libraries which are licensed under one of
+ * the following licenses, the combination of the program with the linked
+ * library is not considered a "derivative work" of the program:
+ *
+ * - Apache License, version 2.0
+ * - Apache Software License, version 1.0
+ * - GNU Lesser General Public License, version 3
+ * - Mozilla Public License, versions 1.0, 1.1 and 2.0
+ * - Common Development and Distribution License (CDDL), version 1.0
+ *
+ * Therefore the distribution of the program linked with libraries licensed
+ * under the aforementioned licenses, is permitted by the copyright holders
+ * if the distribution is compliant with both the GNU General Public
+ * License version 2 and the aforementioned licenses.
+ *
+ * This program is distributed in the hope that it will be useful, but
+ * WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General
+ * Public License for more details.
+ */
+package org.n52.sos.encode;
+
+import java.io.OutputStream;
+
+import javax.xml.namespace.QName;
+import javax.xml.stream.XMLStreamException;
+import javax.xml.stream.XMLStreamWriter;
+
+/**
+ * Abstract XML writer class for {@link XMLStreamWriter}
+ *
+ * @author Carsten Hollmann
+ * @since 4.0.2
+ *
+ */
+public abstract class XmlStreamWriter extends XmlWriter {
+
+ private XMLStreamWriter w;
+
+ @Override
+ protected void init(OutputStream out) throws XMLStreamException {
+ init(out, "UTF-8");
+ }
+
+ @Override
+ protected void init(OutputStream out, String encoding) throws XMLStreamException {
+ this.w = getXmlOutputFactory().createXMLStreamWriter(out, encoding);
+ }
+
+ @Override
+ protected XMLStreamWriter getXmlWriter() {
+ return w;
+ }
+
+ @Override
+ protected void finish() throws XMLStreamException {
+ getXmlWriter().flush();
+ getXmlWriter().close();
+ }
+
+ @Override
+ protected void attr(QName name, String value) throws XMLStreamException {
+ getXmlWriter().writeAttribute(name.getPrefix(), name.getNamespaceURI(), name.getLocalPart(), value);
+ }
+
+ @Override
+ protected void attr(String name, String value) throws XMLStreamException {
+ getXmlWriter().writeAttribute(name, value);
+ }
+
+ @Override
+ protected void chars(String chars) throws XMLStreamException {
+ getXmlWriter().writeCharacters(chars);
+ }
+
+ @Override
+ protected void end(QName name) throws XMLStreamException {
+ getXmlWriter().writeEndElement();
+ }
+
+ @Override
+ protected void end() throws XMLStreamException {
+ getXmlWriter().writeEndDocument();
+ }
+
+ @Override
+ protected void namespace(String prefix, String namespace) throws XMLStreamException {
+ getXmlWriter().writeNamespace(prefix, namespace);
+ }
+
+ @Override
+ protected void start(QName name) throws XMLStreamException {
+ getXmlWriter().writeStartElement(name.getPrefix(), name.getLocalPart(), name.getNamespaceURI());
+ }
+
+ @Override
+ protected void start() throws XMLStreamException {
+ getXmlWriter().writeStartDocument();
+ }
+
+ @Override
+ protected void empty(QName name) throws XMLStreamException {
+ getXmlWriter().writeEmptyElement(name.getPrefix(), name.getLocalPart(), name.getNamespaceURI());
+ }
+
+}
diff --git a/core/api/src/main/java/org/n52/sos/encode/XmlWriter.java b/core/api/src/main/java/org/n52/sos/encode/XmlWriter.java
new file mode 100644
index 0000000000..e08c9c3054
--- /dev/null
+++ b/core/api/src/main/java/org/n52/sos/encode/XmlWriter.java
@@ -0,0 +1,100 @@
+/**
+ * Copyright (C) 2012-2014 52°North Initiative for Geospatial Open Source
+ * Software GmbH
+ *
+ * This program is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU General Public License version 2 as published
+ * by the Free Software Foundation.
+ *
+ * If the program is linked with libraries which are licensed under one of
+ * the following licenses, the combination of the program with the linked
+ * library is not considered a "derivative work" of the program:
+ *
+ * - Apache License, version 2.0
+ * - Apache Software License, version 1.0
+ * - GNU Lesser General Public License, version 3
+ * - Mozilla Public License, versions 1.0, 1.1 and 2.0
+ * - Common Development and Distribution License (CDDL), version 1.0
+ *
+ * Therefore the distribution of the program linked with libraries licensed
+ * under the aforementioned licenses, is permitted by the copyright holders
+ * if the distribution is compliant with both the GNU General Public
+ * License version 2 and the aforementioned licenses.
+ *
+ * This program is distributed in the hope that it will be useful, but
+ * WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General
+ * Public License for more details.
+ */
+package org.n52.sos.encode;
+
+import java.io.OutputStream;
+
+import javax.xml.namespace.QName;
+import javax.xml.stream.XMLEventFactory;
+import javax.xml.stream.XMLOutputFactory;
+import javax.xml.stream.XMLStreamException;
+
+import org.n52.sos.ogc.gml.time.TimeInstant;
+import org.n52.sos.ogc.gml.time.TimePosition;
+import org.n52.sos.ogc.ows.OwsExceptionReport;
+import org.n52.sos.util.DateTimeHelper;
+
+/**
+ * Abstract XML writer class
+ *
+ * @author Carsten Hollmann
+ * @since 4.0.2
+ *
+ * @param
+ */
+public abstract class XmlWriter {
+
+ private final XMLEventFactory eventFactory = XMLEventFactory.newInstance();
+
+ private final XMLOutputFactory outputFactory = XMLOutputFactory.newInstance();
+
+ protected abstract void init(OutputStream out) throws XMLStreamException;
+
+ protected abstract void init(OutputStream out, String encoding) throws XMLStreamException;
+
+ protected abstract T getXmlWriter();
+
+ protected abstract void finish() throws XMLStreamException;
+
+ protected abstract void attr(QName name, String value) throws XMLStreamException;
+
+ protected abstract void attr(String name, String value) throws XMLStreamException;
+
+ protected abstract void chars(String chars) throws XMLStreamException;
+
+ protected abstract void end(QName name) throws XMLStreamException;
+
+ protected abstract void end() throws XMLStreamException;
+
+ protected abstract void namespace(String prefix, String namespace) throws XMLStreamException;
+
+ protected abstract void start(QName name) throws XMLStreamException;
+
+ protected abstract void start() throws XMLStreamException;
+
+ protected abstract void empty(QName name) throws XMLStreamException;
+
+ public abstract void write(OutputStream out) throws XMLStreamException, OwsExceptionReport;
+
+ protected void time(TimeInstant time) throws XMLStreamException {
+ time(time.getTimePosition());
+ }
+
+ protected void time(TimePosition time) throws XMLStreamException {
+ chars(DateTimeHelper.formatDateTime2IsoString(time.getTime()));
+ }
+
+ protected XMLEventFactory getXmlEventFactory() {
+ return this.eventFactory;
+ }
+
+ protected XMLOutputFactory getXmlOutputFactory() {
+ return this.outputFactory;
+ }
+}
From 75a090436c7add9a906914d0ebfa14f4708f1804 Mon Sep 17 00:00:00 2001
From: Christian Autermann
Date: Fri, 4 Apr 2014 13:38:55 +0200
Subject: [PATCH 043/229] fixed OGC logo URL
---
spring/views/src/main/webapp/WEB-INF/views/common/footer.jsp | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/spring/views/src/main/webapp/WEB-INF/views/common/footer.jsp b/spring/views/src/main/webapp/WEB-INF/views/common/footer.jsp
index 601bcc27d7..4c89612fcc 100644
--- a/spring/views/src/main/webapp/WEB-INF/views/common/footer.jsp
+++ b/spring/views/src/main/webapp/WEB-INF/views/common/footer.jsp
@@ -60,7 +60,7 @@
Affiliations
The 52°North affiliations:
-
" />
+
" />
Cooperation partners
From bd243c8df1ad100b765fe79da011245bf2b7c21a Mon Sep 17 00:00:00 2001
From: Christian Autermann
Date: Fri, 4 Apr 2014 13:39:20 +0200
Subject: [PATCH 044/229] removed the option to not show the response inline
---
.../src/main/webapp/WEB-INF/views/client.jsp | 7 ++---
.../views/src/main/webapp/static/js/client.js | 29 +++++--------------
2 files changed, 10 insertions(+), 26 deletions(-)
diff --git a/spring/views/src/main/webapp/WEB-INF/views/client.jsp b/spring/views/src/main/webapp/WEB-INF/views/client.jsp
index fd4e59f6d2..e8ba3ea489 100644
--- a/spring/views/src/main/webapp/WEB-INF/views/client.jsp
+++ b/spring/views/src/main/webapp/WEB-INF/views/client.jsp
@@ -70,7 +70,7 @@
.CodeMirror-foldgutter-folded:after { content: "\25B8"; }
-
@@ -80,7 +80,7 @@
$(function(){
/* put warnings on empty fields */
$("input[type=text], input[type=password], textarea").bind("keyup input", function() {
- var $this = $(this);
+ var $this = $(this);
if ($this.val() === "") {
$this.parents(".control-group").addClass("warning");
} else {
@@ -89,7 +89,7 @@
}).trigger("input");
});
-
+
@@ -97,3 +97,7 @@
+
+ Warning! This page makes heavy use of JavaScript and is virtually unusable if JavaScript is disabled.
+
+
From b50fe0b70fbb7e13a73fb8077b6ecf5592a1f096 Mon Sep 17 00:00:00 2001
From: Shane StClair
Date: Tue, 12 Aug 2014 20:21:16 -0700
Subject: [PATCH 190/229] Output exception causes (recursive) in
ows:ExceptionReport
---
.../src/main/java/org/n52/sos/encode/OwsEncoderv110.java | 7 +++++++
1 file changed, 7 insertions(+)
diff --git a/coding/ows-v110/src/main/java/org/n52/sos/encode/OwsEncoderv110.java b/coding/ows-v110/src/main/java/org/n52/sos/encode/OwsEncoderv110.java
index eb71ab35c3..f678aa26f9 100644
--- a/coding/ows-v110/src/main/java/org/n52/sos/encode/OwsEncoderv110.java
+++ b/coding/ows-v110/src/main/java/org/n52/sos/encode/OwsEncoderv110.java
@@ -392,11 +392,18 @@ private void addExceptionMessages(StringBuilder exceptionText, Throwable excepti
JavaHelper.appendTextToStringBuilderWithLineBreak(exceptionText, localizedMessage);
JavaHelper.appendTextToStringBuilderWithLineBreak(exceptionText, message);
}
+
+ //recurse cause if necessary
+ if (exception.getCause() != null) {
+ exceptionText.append("[CAUSED BY]\n");
+ addExceptionMessages(exceptionText, exception.getCause());
+ }
//recurse SQLException if necessary
if (exception instanceof SQLException) {
SQLException sqlException = (SQLException) exception;
if (sqlException.getNextException() != null) {
+ exceptionText.append("[NEXT SQL EXCEPTION]\n");
addExceptionMessages(exceptionText, sqlException.getNextException());
}
}
From 3724905410acbe7e2e6d0bc94dda2983c53c8a59 Mon Sep 17 00:00:00 2001
From: Shane StClair
Date: Tue, 12 Aug 2014 20:22:09 -0700
Subject: [PATCH 191/229] Throw proper exception (InvalidParameterException)
when srs prefix is invalid
---
core/api/src/main/java/org/n52/sos/util/SosHelper.java | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/core/api/src/main/java/org/n52/sos/util/SosHelper.java b/core/api/src/main/java/org/n52/sos/util/SosHelper.java
index 7dd07fde5e..f36b9d40ab 100644
--- a/core/api/src/main/java/org/n52/sos/util/SosHelper.java
+++ b/core/api/src/main/java/org/n52/sos/util/SosHelper.java
@@ -252,7 +252,7 @@ public static int parseSrsName(final String srsName) throws OwsExceptionReport {
srid = Integer.valueOf(srsName.replace(urnSrsPrefix, Constants.EMPTY_STRING)
.replace(urlSrsPrefix, Constants.EMPTY_STRING));
} catch (final NumberFormatException nfe) {
- throw new NoApplicableCodeException()
+ throw new InvalidParameterValueException()
.causedBy(nfe)
.at(SosConstants.GetObservationParams.srsName)
.withMessage(
From d51d68cf52b6b730723b2a709df8ed8ad531d2e2 Mon Sep 17 00:00:00 2001
From: Shane StClair
Date: Tue, 12 Aug 2014 20:22:25 -0700
Subject: [PATCH 192/229] Fix error message grammar
---
.../n52/sos/ds/hibernate/HibernateFeatureQueryHandler.java | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/hibernate/feature/src/main/java/org/n52/sos/ds/hibernate/HibernateFeatureQueryHandler.java b/hibernate/feature/src/main/java/org/n52/sos/ds/hibernate/HibernateFeatureQueryHandler.java
index 6bc3e23188..99cdc1285d 100644
--- a/hibernate/feature/src/main/java/org/n52/sos/ds/hibernate/HibernateFeatureQueryHandler.java
+++ b/hibernate/feature/src/main/java/org/n52/sos/ds/hibernate/HibernateFeatureQueryHandler.java
@@ -116,7 +116,7 @@ public AbstractFeature getFeatureByID(final String featureID, final Object conne
return createSosAbstractFeature((FeatureOfInterest) q.uniqueResult(), version, session);
} catch (final HibernateException he) {
throw new NoApplicableCodeException().causedBy(he).withMessage(
- "An error occurs while querying feature data for a featureOfInterest identifier!");
+ "An error occurred while querying feature data for a featureOfInterest identifier!");
}
}
@@ -153,7 +153,7 @@ public Collection getFeatureIDs(final SpatialFilter filter, final Object
}
} catch (final HibernateException he) {
throw new NoApplicableCodeException().causedBy(he).withMessage(
- "An error occurs while querying feature identifiers for a featureOfInterest identifier!");
+ "An error occurred while querying feature identifiers for a featureOfInterest identifier!");
}
}
From c2b32714f403daf599ee95ba5a4ee04bdee0a1ea Mon Sep 17 00:00:00 2001
From: CarstenHollmann
Date: Wed, 13 Aug 2014 10:21:47 +0200
Subject: [PATCH 193/229] Rename or move files
---
.../series/MySQL_series_update_40_to_41.sql | 40 ++++
.../series/Oracle_series_update_40_to_41.sql | 40 ++++
misc/db/PostgreSQL/old/PG_script_create.sql | 154 ++++++++++++++
misc/db/PostgreSQL/old/PG_script_drop.sql | 77 +++++++
.../series/PG_series_script_create.sql | 189 ++++++++++++++++++
.../series/PG_series_script_drop.sql | 79 ++++++++
.../series/PG_series_update_40_to_41.sql | 40 ++++
7 files changed, 619 insertions(+)
create mode 100644 misc/db/MySQL/series/MySQL_series_update_40_to_41.sql
create mode 100644 misc/db/Oracle/series/Oracle_series_update_40_to_41.sql
create mode 100644 misc/db/PostgreSQL/old/PG_script_create.sql
create mode 100644 misc/db/PostgreSQL/old/PG_script_drop.sql
create mode 100644 misc/db/PostgreSQL/series/PG_series_script_create.sql
create mode 100644 misc/db/PostgreSQL/series/PG_series_script_drop.sql
create mode 100644 misc/db/PostgreSQL/series/PG_series_update_40_to_41.sql
diff --git a/misc/db/MySQL/series/MySQL_series_update_40_to_41.sql b/misc/db/MySQL/series/MySQL_series_update_40_to_41.sql
new file mode 100644
index 0000000000..30cee430b7
--- /dev/null
+++ b/misc/db/MySQL/series/MySQL_series_update_40_to_41.sql
@@ -0,0 +1,40 @@
+--
+-- Copyright (C) 2012-2014 52°North Initiative for Geospatial Open Source
+-- Software GmbH
+--
+-- This program is free software; you can redistribute it and/or modify it
+-- under the terms of the GNU General Public License version 2 as published
+-- by the Free Software Foundation.
+--
+-- If the program is linked with libraries which are licensed under one of
+-- the following licenses, the combination of the program with the linked
+-- library is not considered a "derivative work" of the program:
+--
+-- - Apache License, version 2.0
+-- - Apache Software License, version 1.0
+-- - GNU Lesser General Public License, version 3
+-- - Mozilla Public License, versions 1.0, 1.1 and 2.0
+-- - Common Development and Distribution License (CDDL), version 1.0
+--
+-- Therefore the distribution of the program linked with libraries licensed
+-- under the aforementioned licenses, is permitted by the copyright holders
+-- if the distribution is compliant with both the GNU General Public
+-- License version 2 and the aforementioned licenses.
+--
+-- This program is distributed in the hope that it will be useful, but
+-- WITHOUT ANY WARRANTY; without even the implied warranty of
+-- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General
+-- Public License for more details.
+--
+
+ALTER TABLE series ADD COLUMN firstTimeStamp datetime;
+ALTER TABLE series ADD COLUMN lastTimeStamp datetime;
+ALTER TABLE series ADD COLUMN firstNumericValue decimal(19,2);
+ALTER TABLE series ADD COLUMN lastNumericValue decimal(19,2);
+ALTER TABLE series ADD COLUMN unitId bigint;
+
+alter table series add constraint seriesUnitFk foreign key (unitId) references unit;
+
+ALTER TABLE `procedure` ADD COLUMN referenceFlag char(1) default 'F';
+
+ALTER TABLE observation ADD COLUMN samplingGeometry GEOMETRY;
\ No newline at end of file
diff --git a/misc/db/Oracle/series/Oracle_series_update_40_to_41.sql b/misc/db/Oracle/series/Oracle_series_update_40_to_41.sql
new file mode 100644
index 0000000000..0878ec9e9a
--- /dev/null
+++ b/misc/db/Oracle/series/Oracle_series_update_40_to_41.sql
@@ -0,0 +1,40 @@
+--
+-- Copyright (C) 2012-2014 52°North Initiative for Geospatial Open Source
+-- Software GmbH
+--
+-- This program is free software; you can redistribute it and/or modify it
+-- under the terms of the GNU General Public License version 2 as published
+-- by the Free Software Foundation.
+--
+-- If the program is linked with libraries which are licensed under one of
+-- the following licenses, the combination of the program with the linked
+-- library is not considered a "derivative work" of the program:
+--
+-- - Apache License, version 2.0
+-- - Apache Software License, version 1.0
+-- - GNU Lesser General Public License, version 3
+-- - Mozilla Public License, versions 1.0, 1.1 and 2.0
+-- - Common Development and Distribution License (CDDL), version 1.0
+--
+-- Therefore the distribution of the program linked with libraries licensed
+-- under the aforementioned licenses, is permitted by the copyright holders
+-- if the distribution is compliant with both the GNU General Public
+-- License version 2 and the aforementioned licenses.
+--
+-- This program is distributed in the hope that it will be useful, but
+-- WITHOUT ANY WARRANTY; without even the implied warranty of
+-- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General
+-- Public License for more details.
+--
+
+ALTER TABLE series ADD firstTimeStamp timestamp;
+ALTER TABLE series ADD lastTimeStamp timestamp;
+ALTER TABLE series ADD firstNumericValue number(19,2);
+ALTER TABLE series ADD lastNumericValue number(19,2);
+ALTER TABLE series ADD unitId number(19,0);
+
+alter table series add constraint seriesUnitFk foreign key (unitId) references unit;
+
+ALTER TABLE procedure ADD referenceFlag char(1 char) default 'F' check (referenceFlag in ('T','F'));
+
+ALTER TABLE observation ADD samplingGeometry GEOMETRY;
\ No newline at end of file
diff --git a/misc/db/PostgreSQL/old/PG_script_create.sql b/misc/db/PostgreSQL/old/PG_script_create.sql
new file mode 100644
index 0000000000..cc93bb4b3b
--- /dev/null
+++ b/misc/db/PostgreSQL/old/PG_script_create.sql
@@ -0,0 +1,154 @@
+--
+-- Copyright (C) 2012-2014 52°North Initiative for Geospatial Open Source
+-- Software GmbH
+--
+-- This program is free software; you can redistribute it and/or modify it
+-- under the terms of the GNU General Public License version 2 as published
+-- by the Free Software Foundation.
+--
+-- If the program is linked with libraries which are licensed under one of
+-- the following licenses, the combination of the program with the linked
+-- library is not considered a "derivative work" of the program:
+--
+-- - Apache License, version 2.0
+-- - Apache Software License, version 1.0
+-- - GNU Lesser General Public License, version 3
+-- - Mozilla Public License, versions 1.0, 1.1 and 2.0
+-- - Common Development and Distribution License (CDDL), version 1.0
+--
+-- Therefore the distribution of the program linked with libraries licensed
+-- under the aforementioned licenses, is permitted by the copyright holders
+-- if the distribution is compliant with both the GNU General Public
+-- License version 2 and the aforementioned licenses.
+--
+-- This program is distributed in the hope that it will be useful, but
+-- WITHOUT ANY WARRANTY; without even the implied warranty of
+-- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General
+-- Public License for more details.
+--
+
+create table "procedure" (procedureId int8 not null, hibernateDiscriminator char(1) not null, procedureDescriptionFormatId int8 not null, identifier varchar(255) not null, deleted char(1) default 'F' not null check (deleted in ('T','F')), descriptionFile text, referenceFlag char(1) default 'F' check (referenceFlag in ('T','F')), primary key (procedureId));
+create table blobValue (observationId int8 not null, value oid, primary key (observationId));
+create table booleanValue (observationId int8 not null, value char(1), primary key (observationId), check (value in ('T','F')), check (value in ('T','F')));
+create table categoryValue (observationId int8 not null, value varchar(255), primary key (observationId));
+create table codespace (codespaceId int8 not null, codespace varchar(255) not null, primary key (codespaceId));
+create table compositePhenomenon (parentObservablePropertyId int8 not null, childObservablePropertyId int8 not null, primary key (childObservablePropertyId, parentObservablePropertyId));
+create table countValue (observationId int8 not null, value int4, primary key (observationId));
+create table featureOfInterest (featureOfInterestId int8 not null, hibernateDiscriminator char(1) not null, featureOfInterestTypeId int8 not null, identifier varchar(255), codespaceId int8, name text, geom GEOMETRY, descriptionXml text, url varchar(255), primary key (featureOfInterestId));
+create table featureOfInterestType (featureOfInterestTypeId int8 not null, featureOfInterestType varchar(255) not null, primary key (featureOfInterestTypeId));
+create table featureRelation (parentFeatureId int8 not null, childFeatureId int8 not null, primary key (childFeatureId, parentFeatureId));
+create table geometryValue (observationId int8 not null, value GEOMETRY, primary key (observationId));
+create table numericValue (observationId int8 not null, value numeric(19, 2), primary key (observationId));
+create table observableProperty (observablePropertyId int8 not null, hibernateDiscriminator char(1) not null, identifier varchar(255) not null, description varchar(255), primary key (observablePropertyId));
+create table observation (observationId int8 not null, featureOfInterestId int8 not null, observablePropertyId int8 not null, procedureId int8 not null, phenomenonTimeStart timestamp not null, phenomenonTimeEnd timestamp not null, resultTime timestamp not null, identifier varchar(255), codespaceId int8, description varchar(255), deleted char(1) default 'F' not null check (deleted in ('T','F')), validTimeStart timestamp, validTimeEnd timestamp, unitId int8, samplingGeometry GEOMETRY, primary key (observationId));
+create table observationConstellation (observationConstellationId int8 not null, observablePropertyId int8 not null, procedureId int8 not null, observationTypeId int8, offeringId int8 not null, deleted char(1) default 'F' not null check (deleted in ('T','F')), hiddenChild char(1) default 'F' not null check (hiddenChild in ('T','F')), primary key (observationConstellationId));
+create table observationHasOffering (observationId int8 not null, offeringId int8 not null, primary key (observationId, offeringId));
+create table observationType (observationTypeId int8 not null, observationType varchar(255) not null, primary key (observationTypeId));
+create table offering (offeringId int8 not null, hibernateDiscriminator char(1) not null, identifier varchar(255) not null, name varchar(255), primary key (offeringId));
+create table offeringAllowedFeatureType (offeringId int8 not null, featureOfInterestTypeId int8 not null, primary key (offeringId, featureOfInterestTypeId));
+create table offeringAllowedObservationType (offeringId int8 not null, observationTypeId int8 not null, primary key (offeringId, observationTypeId));
+create table offeringHasRelatedFeature (relatedFeatureId int8 not null, offeringId int8 not null, primary key (offeringId, relatedFeatureId));
+create table parameter (parameterId int8 not null, observationId int8 not null, definition varchar(255) not null, title varchar(255), value oid not null, primary key (parameterId));
+create table procedureDescriptionFormat (procedureDescriptionFormatId int8 not null, procedureDescriptionFormat varchar(255) not null, primary key (procedureDescriptionFormatId));
+create table relatedFeature (relatedFeatureId int8 not null, featureOfInterestId int8 not null, primary key (relatedFeatureId));
+create table relatedFeatureHasRole (relatedFeatureId int8 not null, relatedFeatureRoleId int8 not null, primary key (relatedFeatureId, relatedFeatureRoleId));
+create table relatedFeatureRole (relatedFeatureRoleId int8 not null, relatedFeatureRole varchar(255) not null, primary key (relatedFeatureRoleId));
+create table resultTemplate (resultTemplateId int8 not null, offeringId int8 not null, observablePropertyId int8 not null, procedureId int8 not null, featureOfInterestId int8 not null, identifier varchar(255) not null, resultStructure text not null, resultEncoding text not null, primary key (resultTemplateId));
+create table sensorSystem (parentSensorId int8 not null, childSensorId int8 not null, primary key (childSensorId, parentSensorId));
+create table sweDataArrayValue (observationId int8 not null, value text, primary key (observationId));
+create table textValue (observationId int8 not null, value text, primary key (observationId));
+create table unit (unitId int8 not null, unit varchar(255) not null, primary key (unitId));
+create table validProcedureTime (validProcedureTimeId int8 not null, procedureId int8 not null, procedureDescriptionFormatId int8 not null, startTime timestamp not null, endTime timestamp, descriptionXml text not null, primary key (validProcedureTimeId));
+alter table "procedure" add constraint procIdentifierUK unique (identifier);
+alter table codespace add constraint codespaceUK unique (codespace);
+alter table featureOfInterest add constraint foiIdentifierUK unique (identifier);
+alter table featureOfInterest add constraint obsUrl unique (url);
+create index featureGeomidx ON featureOfInterest USING GIST (geom);
+alter table featureOfInterestType add constraint featureTypeUK unique (featureOfInterestType);
+alter table observableProperty add constraint obsPropIdentifierUK unique (identifier);
+alter table observation add constraint observationIdentity unique (featureOfInterestId, observablePropertyId, procedureId, phenomenonTimeStart, phenomenonTimeEnd, resultTime);
+alter table observation add constraint UK_mi06n33vm64vg2yk2ix0xjuny unique (identifier);
+create index obsFeatureIdx on observation (featureOfInterestId);
+create index obsObsPropIdx on observation (observablePropertyId);
+create index obsProcedureIdx on observation (procedureId);
+create index obsPhenTimeStartIdx on observation (phenomenonTimeStart);
+create index obsPhenTimeEndIdx on observation (phenomenonTimeEnd);
+create index obsResultTimeIdx on observation (resultTime);
+create index obsCodespaceIdx on observation (codespaceId);
+CREATE INDEX featureGeomidx ON featureOfInterest USING GIST (geom);
+alter table observationConstellation add constraint obsnConstellationIdentity unique (observablePropertyId, procedureId, offeringId);
+create index obsConstObsPropIdx on observationConstellation (observablePropertyId);
+create index obsConstProcedureIdx on observationConstellation (procedureId);
+create index obsConstOfferingIdx on observationConstellation (offeringId);
+create index obshasoffobservationidx on observationHasOffering (observationId);
+create index obshasoffofferingidx on observationHasOffering (offeringId);
+alter table observationType add constraint observationTypeUK unique (observationType);
+alter table offering add constraint offIdentifierUK unique (identifier);
+alter table procedureDescriptionFormat add constraint procDescFormatUK unique (procedureDescriptionFormat);
+alter table relatedFeatureRole add constraint relFeatRoleUK unique (relatedFeatureRole);
+create index resultTempOfferingIdx on resultTemplate (offeringId);
+create index resultTempeObsPropIdx on resultTemplate (observablePropertyId);
+create index resultTempProcedureIdx on resultTemplate (procedureId);
+create index resultTempIdentifierIdx on resultTemplate (identifier);
+alter table unit add constraint unitUK unique (unit);
+create index validProcedureTimeStartTimeIdx on validProcedureTime (startTime);
+create index validProcedureTimeEndTimeIdx on validProcedureTime (endTime);
+alter table "procedure" add constraint procProcDescFormatFk foreign key (procedureDescriptionFormatId) references procedureDescriptionFormat;
+alter table blobValue add constraint observationBlobValueFk foreign key (observationId) references observation;
+alter table booleanValue add constraint observationBooleanValueFk foreign key (observationId) references observation;
+alter table categoryValue add constraint observationCategoryValueFk foreign key (observationId) references observation;
+alter table compositePhenomenon add constraint observablePropertyChildFk foreign key (childObservablePropertyId) references observableProperty;
+alter table compositePhenomenon add constraint observablePropertyParentFk foreign key (parentObservablePropertyId) references observableProperty;
+alter table countValue add constraint observationCountValueFk foreign key (observationId) references observation;
+alter table featureOfInterest add constraint featureFeatureTypeFk foreign key (featureOfInterestTypeId) references featureOfInterestType;
+alter table featureOfInterest add constraint featureCodespaceFk foreign key (codespaceId) references codespace;
+alter table featureRelation add constraint featureOfInterestChildFk foreign key (childFeatureId) references featureOfInterest;
+alter table featureRelation add constraint featureOfInterestParentFk foreign key (parentFeatureId) references featureOfInterest;
+alter table geometryValue add constraint observationGeometryValueFk foreign key (observationId) references observation;
+alter table numericValue add constraint observationNumericValueFk foreign key (observationId) references observation;
+alter table observation add constraint observationFeatureFk foreign key (featureOfInterestId) references featureOfInterest;
+alter table observation add constraint observationObPropFk foreign key (observablePropertyId) references observableProperty;
+alter table observation add constraint observationProcedureFk foreign key (procedureId) references "procedure";
+alter table observation add constraint observationCodespaceFk foreign key (codespaceId) references codespace;
+alter table observation add constraint observationUnitFk foreign key (unitId) references unit;
+alter table observationConstellation add constraint obsConstObsPropFk foreign key (observablePropertyId) references observableProperty;
+alter table observationConstellation add constraint obsnConstProcedureFk foreign key (procedureId) references "procedure";
+alter table observationConstellation add constraint obsConstObservationIypeFk foreign key (observationTypeId) references observationType;
+alter table observationConstellation add constraint obsConstOfferingFk foreign key (offeringId) references offering;
+alter table observationHasOffering add constraint observationOfferingFk foreign key (offeringId) references offering;
+alter table observationHasOffering add constraint FK_9ex7hawh3dbplkllmw5w3kvej foreign key (observationId) references observation;
+alter table offeringAllowedFeatureType add constraint offeringFeatureTypeFk foreign key (featureOfInterestTypeId) references featureOfInterestType;
+alter table offeringAllowedFeatureType add constraint FK_6vvrdxvd406n48gkm706ow1pt foreign key (offeringId) references offering;
+alter table offeringAllowedObservationType add constraint offeringObservationTypeFk foreign key (observationTypeId) references observationType;
+alter table offeringAllowedObservationType add constraint FK_lkljeohulvu7cr26pduyp5bd0 foreign key (offeringId) references offering;
+alter table offeringHasRelatedFeature add constraint relatedFeatureOfferingFk foreign key (offeringId) references offering;
+alter table offeringHasRelatedFeature add constraint offeringRelatedFeatureFk foreign key (relatedFeatureId) references relatedFeature;
+alter table relatedFeature add constraint relatedFeatureFeatureFk foreign key (featureOfInterestId) references featureOfInterest;
+alter table relatedFeatureHasRole add constraint relatedFeatRelatedFeatRoleFk foreign key (relatedFeatureRoleId) references relatedFeatureRole;
+alter table relatedFeatureHasRole add constraint FK_6ynwkk91xe8p1uibmjt98sog3 foreign key (relatedFeatureId) references relatedFeature;
+alter table resultTemplate add constraint resultTemplateOfferingIdx foreign key (offeringId) references offering;
+alter table resultTemplate add constraint resultTemplateObsPropFk foreign key (observablePropertyId) references observableProperty;
+alter table resultTemplate add constraint resultTemplateProcedureFk foreign key (procedureId) references "procedure";
+alter table resultTemplate add constraint resultTemplateFeatureIdx foreign key (featureOfInterestId) references featureOfInterest;
+alter table sensorSystem add constraint procedureChildFk foreign key (childSensorId) references "procedure";
+alter table sensorSystem add constraint procedureParenfFk foreign key (parentSensorId) references "procedure";
+alter table sweDataArrayValue add constraint observationSweDataArrayValueFk foreign key (observationId) references observation;
+alter table textValue add constraint observationTextValueFk foreign key (observationId) references observation;
+alter table validProcedureTime add constraint validProcedureTimeProcedureFk foreign key (procedureId) references "procedure";
+alter table validProcedureTime add constraint validProcProcDescFormatFk foreign key (procedureDescriptionFormatId) references procedureDescriptionFormat;
+create sequence codespaceId_seq;
+create sequence featureOfInterestId_seq;
+create sequence featureOfInterestTypeId_seq;
+create sequence observablePropertyId_seq;
+create sequence observationConstellationId_seq;
+create sequence observationId_seq;
+create sequence observationTypeId_seq;
+create sequence offeringId_seq;
+create sequence parameterId_seq;
+create sequence procDescFormatId_seq;
+create sequence procedureId_seq;
+create sequence relatedFeatureId_seq;
+create sequence relatedFeatureRoleId_seq;
+create sequence resultTemplateId_seq;
+create sequence unitId_seq;
+create sequence validProcedureTimeId_seq;
\ No newline at end of file
diff --git a/misc/db/PostgreSQL/old/PG_script_drop.sql b/misc/db/PostgreSQL/old/PG_script_drop.sql
new file mode 100644
index 0000000000..b063fcbd0b
--- /dev/null
+++ b/misc/db/PostgreSQL/old/PG_script_drop.sql
@@ -0,0 +1,77 @@
+--
+-- Copyright (C) 2012-2014 52°North Initiative for Geospatial Open Source
+-- Software GmbH
+--
+-- This program is free software; you can redistribute it and/or modify it
+-- under the terms of the GNU General Public License version 2 as published
+-- by the Free Software Foundation.
+--
+-- If the program is linked with libraries which are licensed under one of
+-- the following licenses, the combination of the program with the linked
+-- library is not considered a "derivative work" of the program:
+--
+-- - Apache License, version 2.0
+-- - Apache Software License, version 1.0
+-- - GNU Lesser General Public License, version 3
+-- - Mozilla Public License, versions 1.0, 1.1 and 2.0
+-- - Common Development and Distribution License (CDDL), version 1.0
+--
+-- Therefore the distribution of the program linked with libraries licensed
+-- under the aforementioned licenses, is permitted by the copyright holders
+-- if the distribution is compliant with both the GNU General Public
+-- License version 2 and the aforementioned licenses.
+--
+-- This program is distributed in the hope that it will be useful, but
+-- WITHOUT ANY WARRANTY; without even the implied warranty of
+-- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General
+-- Public License for more details.
+--
+
+drop table if exists "procedure" cascade;
+drop table if exists blobValue cascade;
+drop table if exists booleanValue cascade;
+drop table if exists categoryValue cascade;
+drop table if exists codespace cascade;
+drop table if exists compositePhenomenon cascade;
+drop table if exists countValue cascade;
+drop table if exists featureOfInterest cascade;
+drop table if exists featureOfInterestType cascade;
+drop table if exists featureRelation cascade;
+drop table if exists geometryValue cascade;
+drop table if exists numericValue cascade;
+drop table if exists observableProperty cascade;
+drop table if exists observation cascade;
+drop table if exists observationConstellation cascade;
+drop table if exists observationHasOffering cascade;
+drop table if exists observationType cascade;
+drop table if exists offering cascade;
+drop table if exists offeringAllowedFeatureType cascade;
+drop table if exists offeringAllowedObservationType cascade;
+drop table if exists offeringHasRelatedFeature cascade;
+drop table if exists parameter cascade;
+drop table if exists procedureDescriptionFormat cascade;
+drop table if exists relatedFeature cascade;
+drop table if exists relatedFeatureHasRole cascade;
+drop table if exists relatedFeatureRole cascade;
+drop table if exists resultTemplate cascade;
+drop table if exists sensorSystem cascade;
+drop table if exists sweDataArrayValue cascade;
+drop table if exists textValue cascade;
+drop table if exists unit cascade;
+drop table if exists validProcedureTime cascade;
+drop sequence codespaceId_seq;
+drop sequence featureOfInterestId_seq;
+drop sequence featureOfInterestTypeId_seq;
+drop sequence observablePropertyId_seq;
+drop sequence observationConstellationId_seq;
+drop sequence observationId_seq;
+drop sequence observationTypeId_seq;
+drop sequence offeringId_seq;
+drop sequence parameterId_seq;
+drop sequence procDescFormatId_seq;
+drop sequence procedureId_seq;
+drop sequence relatedFeatureId_seq;
+drop sequence relatedFeatureRoleId_seq;
+drop sequence resultTemplateId_seq;
+drop sequence unitId_seq;
+drop sequence validProcedureTimeId_seq;
\ No newline at end of file
diff --git a/misc/db/PostgreSQL/series/PG_series_script_create.sql b/misc/db/PostgreSQL/series/PG_series_script_create.sql
new file mode 100644
index 0000000000..7d470d85ee
--- /dev/null
+++ b/misc/db/PostgreSQL/series/PG_series_script_create.sql
@@ -0,0 +1,189 @@
+--
+-- Copyright (C) 2012-2014 52°North Initiative for Geospatial Open Source
+-- Software GmbH
+--
+-- This program is free software; you can redistribute it and/or modify it
+-- under the terms of the GNU General Public License version 2 as published
+-- by the Free Software Foundation.
+--
+-- If the program is linked with libraries which are licensed under one of
+-- the following licenses, the combination of the program with the linked
+-- library is not considered a "derivative work" of the program:
+--
+-- - Apache License, version 2.0
+-- - Apache Software License, version 1.0
+-- - GNU Lesser General Public License, version 3
+-- - Mozilla Public License, versions 1.0, 1.1 and 2.0
+-- - Common Development and Distribution License (CDDL), version 1.0
+--
+-- Therefore the distribution of the program linked with libraries licensed
+-- under the aforementioned licenses, is permitted by the copyright holders
+-- if the distribution is compliant with both the GNU General Public
+-- License version 2 and the aforementioned licenses.
+--
+-- This program is distributed in the hope that it will be useful, but
+-- WITHOUT ANY WARRANTY; without even the implied warranty of
+-- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General
+-- Public License for more details.
+--
+
+--
+-- Copyright (C) 2012-2014 52°North Initiative for Geospatial Open Source
+-- Software GmbH
+--
+-- This program is free software; you can redistribute it and/or modify it
+-- under the terms of the GNU General Public License version 2 as published
+-- by the Free Software Foundation.
+--
+-- If the program is linked with libraries which are licensed under one of
+-- the following licenses, the combination of the program with the linked
+-- library is not considered a "derivative work" of the program:
+--
+-- - Apache License, version 2.0
+-- - Apache Software License, version 1.0
+-- - GNU Lesser General Public License, version 3
+-- - Mozilla Public License, versions 1.0, 1.1 and 2.0
+-- - Common Development and Distribution License (CDDL), version 1.0
+--
+-- Therefore the distribution of the program linked with libraries licensed
+-- under the aforementioned licenses, is permitted by the copyright holders
+-- if the distribution is compliant with both the GNU General Public
+-- License version 2 and the aforementioned licenses.
+--
+-- This program is distributed in the hope that it will be useful, but
+-- WITHOUT ANY WARRANTY; without even the implied warranty of
+-- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General
+-- Public License for more details.
+--
+
+create table public."procedure" (procedureId int8 not null, hibernateDiscriminator char(1) not null, procedureDescriptionFormatId int8 not null, identifier varchar(255) not null, deleted char(1) default 'F' not null check (deleted in ('T','F')), descriptionFile text, referenceFlag char(1) default 'F' check (referenceFlag in ('T','F')), primary key (procedureId));
+create table blobValue (observationId int8 not null, value oid, primary key (observationId));
+create table booleanValue (observationId int8 not null, value char(1), primary key (observationId), check (value in ('T','F')), check (value in ('T','F')));
+create table categoryValue (observationId int8 not null, value varchar(255), primary key (observationId));
+create table codespace (codespaceId int8 not null, codespace varchar(255) not null, primary key (codespaceId));
+create table compositePhenomenon (parentObservablePropertyId int8 not null, childObservablePropertyId int8 not null, primary key (childObservablePropertyId, parentObservablePropertyId));
+create table countValue (observationId int8 not null, value int4, primary key (observationId));
+create table featureOfInterest (featureOfInterestId int8 not null, hibernateDiscriminator char(1) not null, featureOfInterestTypeId int8 not null, identifier varchar(255), codespaceId int8, name text, geom GEOMETRY, descriptionXml text, url varchar(255), primary key (featureOfInterestId));
+create table featureOfInterestType (featureOfInterestTypeId int8 not null, featureOfInterestType varchar(255) not null, primary key (featureOfInterestTypeId));
+create table featureRelation (parentFeatureId int8 not null, childFeatureId int8 not null, primary key (childFeatureId, parentFeatureId));
+create table geometryValue (observationId int8 not null, value GEOMETRY, primary key (observationId));
+create table numericValue (observationId int8 not null, value numeric(19, 2), primary key (observationId));
+create table observableProperty (observablePropertyId int8 not null, hibernateDiscriminator char(1) not null, identifier varchar(255) not null, description varchar(255), primary key (observablePropertyId));
+create table observation (observationId int8 not null, seriesId int8 not null, phenomenonTimeStart timestamp not null, phenomenonTimeEnd timestamp not null, resultTime timestamp not null, identifier varchar(255), codespaceId int8, description varchar(255), deleted char(1) default 'F' not null check (deleted in ('T','F')), validTimeStart timestamp, validTimeEnd timestamp, unitId int8, samplingGeometry GEOMETRY, primary key (observationId));
+create table observationConstellation (observationConstellationId int8 not null, observablePropertyId int8 not null, procedureId int8 not null, observationTypeId int8, offeringId int8 not null, deleted char(1) default 'F' not null check (deleted in ('T','F')), hiddenChild char(1) default 'F' not null check (hiddenChild in ('T','F')), primary key (observationConstellationId));
+create table observationHasOffering (observationId int8 not null, offeringId int8 not null, primary key (observationId, offeringId));
+create table observationType (observationTypeId int8 not null, observationType varchar(255) not null, primary key (observationTypeId));
+create table offering (offeringId int8 not null, hibernateDiscriminator char(1) not null, identifier varchar(255) not null, name varchar(255), primary key (offeringId));
+create table offeringAllowedFeatureType (offeringId int8 not null, featureOfInterestTypeId int8 not null, primary key (offeringId, featureOfInterestTypeId));
+create table offeringAllowedObservationType (offeringId int8 not null, observationTypeId int8 not null, primary key (offeringId, observationTypeId));
+create table offeringHasRelatedFeature (relatedFeatureId int8 not null, offeringId int8 not null, primary key (offeringId, relatedFeatureId));
+create table parameter (parameterId int8 not null, observationId int8 not null, definition varchar(255) not null, title varchar(255), value oid not null, primary key (parameterId));
+create table procedureDescriptionFormat (procedureDescriptionFormatId int8 not null, procedureDescriptionFormat varchar(255) not null, primary key (procedureDescriptionFormatId));
+create table relatedFeature (relatedFeatureId int8 not null, featureOfInterestId int8 not null, primary key (relatedFeatureId));
+create table relatedFeatureHasRole (relatedFeatureId int8 not null, relatedFeatureRoleId int8 not null, primary key (relatedFeatureId, relatedFeatureRoleId));
+create table relatedFeatureRole (relatedFeatureRoleId int8 not null, relatedFeatureRole varchar(255) not null, primary key (relatedFeatureRoleId));
+create table resultTemplate (resultTemplateId int8 not null, offeringId int8 not null, observablePropertyId int8 not null, procedureId int8 not null, featureOfInterestId int8 not null, identifier varchar(255) not null, resultStructure text not null, resultEncoding text not null, primary key (resultTemplateId));
+create table sensorSystem (parentSensorId int8 not null, childSensorId int8 not null, primary key (childSensorId, parentSensorId));
+create table series (seriesId int8 not null, featureOfInterestId int8 not null, observablePropertyId int8 not null, procedureId int8 not null, deleted char(1) default 'F' not null check (deleted in ('T','F')), firstTimeStamp timestamp, lastTimeStamp timestamp, firstNumericValue numeric(19, 2), lastNumericValue numeric(19, 2), unitId int8, primary key (seriesId));
+create table sweDataArrayValue (observationId int8 not null, value text, primary key (observationId));
+create table textValue (observationId int8 not null, value text, primary key (observationId));
+create table unit (unitId int8 not null, unit varchar(255) not null, primary key (unitId));
+create table validProcedureTime (validProcedureTimeId int8 not null, procedureId int8 not null, procedureDescriptionFormatId int8 not null, startTime timestamp not null, endTime timestamp, descriptionXml text not null, primary key (validProcedureTimeId));
+alter table public."procedure" add constraint procIdentifierUK unique (identifier);
+alter table codespace add constraint codespaceUK unique (codespace);
+alter table featureOfInterest add constraint foiIdentifierUK unique (identifier);
+alter table featureOfInterest add constraint obsUrl unique (url);
+create index featureGeomidx ON featureOfInterest USING GIST (geom);
+alter table featureOfInterestType add constraint featureTypeUK unique (featureOfInterestType);
+alter table observableProperty add constraint obsPropIdentifierUK unique (identifier);
+alter table observation add constraint observationIdentity unique (seriesId, phenomenonTimeStart, phenomenonTimeEnd, resultTime);
+alter table observation add constraint obsIdentifierUK unique (identifier);
+create index obsSeriesIdx on observation (seriesId);
+create index obsPhenTimeStartIdx on observation (phenomenonTimeStart);
+create index obsPhenTimeEndIdx on observation (phenomenonTimeEnd);
+create index obsResultTimeIdx on observation (resultTime);
+create index obsCodespaceIdx on observation (codespaceId);
+create index samplingGeomidx ON observation USING GIST (samplingGeometry);
+alter table observationConstellation add constraint obsnConstellationIdentity unique (observablePropertyId, procedureId, offeringId);
+create index obsConstObsPropIdx on observationConstellation (observablePropertyId);
+create index obsConstProcedureIdx on observationConstellation (procedureId);
+create index obsConstOfferingIdx on observationConstellation (offeringId);
+create index obshasoffobservationidx on observationHasOffering (observationId);
+create index obshasoffofferingidx on observationHasOffering (offeringId);
+alter table observationType add constraint observationTypeUK unique (observationType);
+alter table offering add constraint offIdentifierUK unique (identifier);
+alter table procedureDescriptionFormat add constraint procDescFormatUK unique (procedureDescriptionFormat);
+alter table relatedFeatureRole add constraint relFeatRoleUK unique (relatedFeatureRole);
+create index resultTempOfferingIdx on resultTemplate (offeringId);
+create index resultTempeObsPropIdx on resultTemplate (observablePropertyId);
+create index resultTempProcedureIdx on resultTemplate (procedureId);
+create index resultTempIdentifierIdx on resultTemplate (identifier);
+alter table series add constraint seriesIdentity unique (featureOfInterestId, observablePropertyId, procedureId);
+create index seriesFeatureIdx on series (featureOfInterestId);
+create index seriesObsPropIdx on series (observablePropertyId);
+create index seriesProcedureIdx on series (procedureId);
+alter table unit add constraint unitUK unique (unit);
+create index validProcedureTimeStartTimeIdx on validProcedureTime (startTime);
+create index validProcedureTimeEndTimeIdx on validProcedureTime (endTime);
+alter table public."procedure" add constraint procProcDescFormatFk foreign key (procedureDescriptionFormatId) references procedureDescriptionFormat;
+alter table blobValue add constraint observationBlobValueFk foreign key (observationId) references observation;
+alter table booleanValue add constraint observationBooleanValueFk foreign key (observationId) references observation;
+alter table categoryValue add constraint observationCategoryValueFk foreign key (observationId) references observation;
+alter table compositePhenomenon add constraint observablePropertyChildFk foreign key (childObservablePropertyId) references observableProperty;
+alter table compositePhenomenon add constraint observablePropertyParentFk foreign key (parentObservablePropertyId) references observableProperty;
+alter table countValue add constraint observationCountValueFk foreign key (observationId) references observation;
+alter table featureOfInterest add constraint featureFeatureTypeFk foreign key (featureOfInterestTypeId) references featureOfInterestType;
+alter table featureOfInterest add constraint featureCodespaceFk foreign key (codespaceId) references codespace;
+alter table featureRelation add constraint featureOfInterestChildFk foreign key (childFeatureId) references featureOfInterest;
+alter table featureRelation add constraint featureOfInterestParentFk foreign key (parentFeatureId) references featureOfInterest;
+alter table geometryValue add constraint observationGeometryValueFk foreign key (observationId) references observation;
+alter table numericValue add constraint observationNumericValueFk foreign key (observationId) references observation;
+alter table observation add constraint observationSeriesFk foreign key (seriesId) references series;
+alter table observation add constraint observationCodespaceFk foreign key (codespaceId) references codespace;
+alter table observation add constraint observationUnitFk foreign key (unitId) references unit;
+alter table observationConstellation add constraint obsConstObsPropFk foreign key (observablePropertyId) references observableProperty;
+alter table observationConstellation add constraint obsnConstProcedureFk foreign key (procedureId) references public."procedure";
+alter table observationConstellation add constraint obsConstObservationIypeFk foreign key (observationTypeId) references observationType;
+alter table observationConstellation add constraint obsConstOfferingFk foreign key (offeringId) references offering;
+alter table observationHasOffering add constraint observationOfferingFk foreign key (offeringId) references offering;
+alter table observationHasOffering add constraint FK_9ex7hawh3dbplkllmw5w3kvej foreign key (observationId) references observation;
+alter table offeringAllowedFeatureType add constraint offeringFeatureTypeFk foreign key (featureOfInterestTypeId) references featureOfInterestType;
+alter table offeringAllowedFeatureType add constraint FK_6vvrdxvd406n48gkm706ow1pt foreign key (offeringId) references offering;
+alter table offeringAllowedObservationType add constraint offeringObservationTypeFk foreign key (observationTypeId) references observationType;
+alter table offeringAllowedObservationType add constraint FK_lkljeohulvu7cr26pduyp5bd0 foreign key (offeringId) references offering;
+alter table offeringHasRelatedFeature add constraint relatedFeatureOfferingFk foreign key (offeringId) references offering;
+alter table offeringHasRelatedFeature add constraint offeringRelatedFeatureFk foreign key (relatedFeatureId) references relatedFeature;
+alter table relatedFeature add constraint relatedFeatureFeatureFk foreign key (featureOfInterestId) references featureOfInterest;
+alter table relatedFeatureHasRole add constraint relatedFeatRelatedFeatRoleFk foreign key (relatedFeatureRoleId) references relatedFeatureRole;
+alter table relatedFeatureHasRole add constraint FK_6ynwkk91xe8p1uibmjt98sog3 foreign key (relatedFeatureId) references relatedFeature;
+alter table resultTemplate add constraint resultTemplateOfferingIdx foreign key (offeringId) references offering;
+alter table resultTemplate add constraint resultTemplateObsPropFk foreign key (observablePropertyId) references observableProperty;
+alter table resultTemplate add constraint resultTemplateProcedureFk foreign key (procedureId) references public."procedure";
+alter table resultTemplate add constraint resultTemplateFeatureIdx foreign key (featureOfInterestId) references featureOfInterest;
+alter table sensorSystem add constraint procedureChildFk foreign key (childSensorId) references public."procedure";
+alter table sensorSystem add constraint procedureParenfFk foreign key (parentSensorId) references public."procedure";
+alter table series add constraint seriesFeatureFk foreign key (featureOfInterestId) references featureOfInterest;
+alter table series add constraint seriesObPropFk foreign key (observablePropertyId) references observableProperty;
+alter table series add constraint seriesProcedureFk foreign key (procedureId) references public."procedure";
+alter table series add constraint seriesUnitFk foreign key (unitId) references unit;
+alter table sweDataArrayValue add constraint observationSweDataArrayValueFk foreign key (observationId) references observation;
+alter table textValue add constraint observationTextValueFk foreign key (observationId) references observation;
+alter table validProcedureTime add constraint validProcedureTimeProcedureFk foreign key (procedureId) references public."procedure";
+alter table validProcedureTime add constraint validProcProcDescFormatFk foreign key (procedureDescriptionFormatId) references procedureDescriptionFormat;
+create sequence codespaceId_seq;
+create sequence featureOfInterestId_seq;
+create sequence featureOfInterestTypeId_seq;
+create sequence observablePropertyId_seq;
+create sequence observationConstellationId_seq;
+create sequence observationId_seq;
+create sequence observationTypeId_seq;
+create sequence offeringId_seq;
+create sequence parameterId_seq;
+create sequence procDescFormatId_seq;
+create sequence procedureId_seq;
+create sequence relatedFeatureId_seq;
+create sequence relatedFeatureRoleId_seq;
+create sequence resultTemplateId_seq;
+create sequence seriesId_seq;
+create sequence unitId_seq;
+create sequence validProcedureTimeId_seq;
\ No newline at end of file
diff --git a/misc/db/PostgreSQL/series/PG_series_script_drop.sql b/misc/db/PostgreSQL/series/PG_series_script_drop.sql
new file mode 100644
index 0000000000..b9f1f331f6
--- /dev/null
+++ b/misc/db/PostgreSQL/series/PG_series_script_drop.sql
@@ -0,0 +1,79 @@
+--
+-- Copyright (C) 2012-2014 52°North Initiative for Geospatial Open Source
+-- Software GmbH
+--
+-- This program is free software; you can redistribute it and/or modify it
+-- under the terms of the GNU General Public License version 2 as published
+-- by the Free Software Foundation.
+--
+-- If the program is linked with libraries which are licensed under one of
+-- the following licenses, the combination of the program with the linked
+-- library is not considered a "derivative work" of the program:
+--
+-- - Apache License, version 2.0
+-- - Apache Software License, version 1.0
+-- - GNU Lesser General Public License, version 3
+-- - Mozilla Public License, versions 1.0, 1.1 and 2.0
+-- - Common Development and Distribution License (CDDL), version 1.0
+--
+-- Therefore the distribution of the program linked with libraries licensed
+-- under the aforementioned licenses, is permitted by the copyright holders
+-- if the distribution is compliant with both the GNU General Public
+-- License version 2 and the aforementioned licenses.
+--
+-- This program is distributed in the hope that it will be useful, but
+-- WITHOUT ANY WARRANTY; without even the implied warranty of
+-- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General
+-- Public License for more details.
+--
+
+drop table if exists "procedure" cascade;
+drop table if exists blobValue cascade;
+drop table if exists booleanValue cascade;
+drop table if exists categoryValue cascade;
+drop table if exists codespace cascade;
+drop table if exists compositePhenomenon cascade;
+drop table if exists countValue cascade;
+drop table if exists featureOfInterest cascade;
+drop table if exists featureOfInterestType cascade;
+drop table if exists featureRelation cascade;
+drop table if exists geometryValue cascade;
+drop table if exists numericValue cascade;
+drop table if exists observableProperty cascade;
+drop table if exists observation cascade;
+drop table if exists observationConstellation cascade;
+drop table if exists observationHasOffering cascade;
+drop table if exists observationType cascade;
+drop table if exists offering cascade;
+drop table if exists offeringAllowedFeatureType cascade;
+drop table if exists offeringAllowedObservationType cascade;
+drop table if exists offeringHasRelatedFeature cascade;
+drop table if exists parameter cascade;
+drop table if exists procedureDescriptionFormat cascade;
+drop table if exists relatedFeature cascade;
+drop table if exists relatedFeatureHasRole cascade;
+drop table if exists relatedFeatureRole cascade;
+drop table if exists resultTemplate cascade;
+drop table if exists sensorSystem cascade;
+drop table if exists series cascade;
+drop table if exists sweDataArrayValue cascade;
+drop table if exists textValue cascade;
+drop table if exists unit cascade;
+drop table if exists validProcedureTime cascade;
+drop sequence codespaceId_seq;
+drop sequence featureOfInterestId_seq;
+drop sequence featureOfInterestTypeId_seq;
+drop sequence observablePropertyId_seq;
+drop sequence observationConstellationId_seq;
+drop sequence observationId_seq;
+drop sequence observationTypeId_seq;
+drop sequence offeringId_seq;
+drop sequence parameterId_seq;
+drop sequence procDescFormatId_seq;
+drop sequence procedureId_seq;
+drop sequence relatedFeatureId_seq;
+drop sequence relatedFeatureRoleId_seq;
+drop sequence resultTemplateId_seq;
+drop sequence seriesId_seq;
+drop sequence unitId_seq;
+drop sequence validProcedureTimeId_seq;
\ No newline at end of file
diff --git a/misc/db/PostgreSQL/series/PG_series_update_40_to_41.sql b/misc/db/PostgreSQL/series/PG_series_update_40_to_41.sql
new file mode 100644
index 0000000000..6491e49327
--- /dev/null
+++ b/misc/db/PostgreSQL/series/PG_series_update_40_to_41.sql
@@ -0,0 +1,40 @@
+--
+-- Copyright (C) 2012-2014 52°North Initiative for Geospatial Open Source
+-- Software GmbH
+--
+-- This program is free software; you can redistribute it and/or modify it
+-- under the terms of the GNU General Public License version 2 as published
+-- by the Free Software Foundation.
+--
+-- If the program is linked with libraries which are licensed under one of
+-- the following licenses, the combination of the program with the linked
+-- library is not considered a "derivative work" of the program:
+--
+-- - Apache License, version 2.0
+-- - Apache Software License, version 1.0
+-- - GNU Lesser General Public License, version 3
+-- - Mozilla Public License, versions 1.0, 1.1 and 2.0
+-- - Common Development and Distribution License (CDDL), version 1.0
+--
+-- Therefore the distribution of the program linked with libraries licensed
+-- under the aforementioned licenses, is permitted by the copyright holders
+-- if the distribution is compliant with both the GNU General Public
+-- License version 2 and the aforementioned licenses.
+--
+-- This program is distributed in the hope that it will be useful, but
+-- WITHOUT ANY WARRANTY; without even the implied warranty of
+-- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General
+-- Public License for more details.
+--
+
+ALTER TABLE series ADD COLUMN firstTimeStamp timestamp;
+ALTER TABLE series ADD COLUMN lastTimeStamp timestamp;
+ALTER TABLE series ADD COLUMN firstNumericValue numeric(19, 2);
+ALTER TABLE series ADD COLUMN lastNumericValue numeric(19, 2);
+ALTER TABLE series ADD COLUMN unitId int8;
+
+alter table series add constraint seriesUnitFk foreign key (unitId) references unit;
+
+ALTER TABLE procedure ADD COLUMN referenceFlag char(1) default 'F' check (referenceFlag in ('T','F'));
+
+ALTER TABLE observation ADD samplingGeometry GEOMETRY;
\ No newline at end of file
From 6fee4d6f517f881d14df479fbeceff74a4a4f9c7 Mon Sep 17 00:00:00 2001
From: CarstenHollmann
Date: Wed, 13 Aug 2014 10:22:56 +0200
Subject: [PATCH 194/229] Delete old observation concept SQL files
---
misc/db/MySQL/old/MySQL_clear_script.sql | 64 --------
misc/db/MySQL/old/MySQL_create_script.sql | 130 ---------------
misc/db/MySQL/old/MySQL_drop_script.sql | 63 --------
.../old/MySQL_update_obs_add_description.sql | 30 ----
.../MySQL/series/MySQL_update_401_to_402.sql | 38 -----
misc/db/Oracle/old/Oracle_clear_script.sql | 62 --------
misc/db/Oracle/old/Oracle_create_script.sql | 143 -----------------
misc/db/Oracle/old/Oracle_drop_script.sql | 79 ----------
.../old/Oracle_update_obs_add_description.sql | 30 ----
.../series/Oracle_update_401_to_402.sql | 38 -----
misc/db/PostgreSQL/old/script_20_create.sql | 143 -----------------
misc/db/PostgreSQL/old/script_20_drop.sql | 121 --------------
.../old/update_obs_add_description.sql | 30 ----
.../series/PG_series_script_20_create.sql | 148 ------------------
.../series/PG_series_script_20_drop.sql | 121 --------------
.../series/PG_update_401_to_402.sql | 38 -----
misc/db/update_beta2_to_rc1.sql | 30 ----
17 files changed, 1308 deletions(-)
delete mode 100644 misc/db/MySQL/old/MySQL_clear_script.sql
delete mode 100644 misc/db/MySQL/old/MySQL_create_script.sql
delete mode 100644 misc/db/MySQL/old/MySQL_drop_script.sql
delete mode 100644 misc/db/MySQL/old/MySQL_update_obs_add_description.sql
delete mode 100644 misc/db/MySQL/series/MySQL_update_401_to_402.sql
delete mode 100644 misc/db/Oracle/old/Oracle_clear_script.sql
delete mode 100644 misc/db/Oracle/old/Oracle_create_script.sql
delete mode 100644 misc/db/Oracle/old/Oracle_drop_script.sql
delete mode 100644 misc/db/Oracle/old/Oracle_update_obs_add_description.sql
delete mode 100644 misc/db/Oracle/series/Oracle_update_401_to_402.sql
delete mode 100644 misc/db/PostgreSQL/old/script_20_create.sql
delete mode 100644 misc/db/PostgreSQL/old/script_20_drop.sql
delete mode 100644 misc/db/PostgreSQL/old/update_obs_add_description.sql
delete mode 100644 misc/db/PostgreSQL/series/PG_series_script_20_create.sql
delete mode 100644 misc/db/PostgreSQL/series/PG_series_script_20_drop.sql
delete mode 100644 misc/db/PostgreSQL/series/PG_update_401_to_402.sql
delete mode 100644 misc/db/update_beta2_to_rc1.sql
diff --git a/misc/db/MySQL/old/MySQL_clear_script.sql b/misc/db/MySQL/old/MySQL_clear_script.sql
deleted file mode 100644
index 222c4748bf..0000000000
--- a/misc/db/MySQL/old/MySQL_clear_script.sql
+++ /dev/null
@@ -1,64 +0,0 @@
---
--- Copyright (C) 2012-2014 52°North Initiative for Geospatial Open Source
--- Software GmbH
---
--- This program is free software; you can redistribute it and/or modify it
--- under the terms of the GNU General Public License version 2 as published
--- by the Free Software Foundation.
---
--- If the program is linked with libraries which are licensed under one of
--- the following licenses, the combination of the program with the linked
--- library is not considered a "derivative work" of the program:
---
--- - Apache License, version 2.0
--- - Apache Software License, version 1.0
--- - GNU Lesser General Public License, version 3
--- - Mozilla Public License, versions 1.0, 1.1 and 2.0
--- - Common Development and Distribution License (CDDL), version 1.0
---
--- Therefore the distribution of the program linked with libraries licensed
--- under the aforementioned licenses, is permitted by the copyright holders
--- if the distribution is compliant with both the GNU General Public
--- License version 2 and the aforementioned licenses.
---
--- This program is distributed in the hope that it will be useful, but
--- WITHOUT ANY WARRANTY; without even the implied warranty of
--- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General
--- Public License for more details.
---
-
-SET FOREIGN_KEY_CHECKS = 0;
-TRUNCATE TABLE blobValue;
-TRUNCATE TABLE booleanValue;
-TRUNCATE TABLE categoryValue;
-TRUNCATE TABLE compositePhenomenon;
-TRUNCATE TABLE countValue;
-TRUNCATE TABLE featureRelation;
-TRUNCATE TABLE geometryValue;
-TRUNCATE TABLE numericValue;
-TRUNCATE TABLE observationConstellation;
-TRUNCATE TABLE observationHasOffering;
-TRUNCATE TABLE offeringAllowedFeatureType;
-TRUNCATE TABLE offeringAllowedObservationType;
-TRUNCATE TABLE offeringHasRelatedFeature;
-TRUNCATE TABLE relatedFeatureHasRole;
-TRUNCATE TABLE relatedFeatureRole;
-TRUNCATE TABLE resultTemplate;
-TRUNCATE TABLE offering;
-TRUNCATE TABLE sensorSystem;
-TRUNCATE TABLE spatialfilteringprofile;
-TRUNCATE TABLE parameter;
-TRUNCATE TABLE observation;
-TRUNCATE TABLE observableProperty;
-TRUNCATE TABLE swedataarrayvalue;
-TRUNCATE TABLE textValue;
-TRUNCATE TABLE unit;
-TRUNCATE TABLE validProcedureTime;
-TRUNCATE TABLE `procedure`;
-TRUNCATE TABLE featureOfInterest;
-TRUNCATE TABLE relatedFeature;
-TRUNCATE TABLE codespace;
-TRUNCATE TABLE procedureDescriptionFormat;
-TRUNCATE TABLE featureOfInterestType;
-TRUNCATE TABLE observationType;
-SET FOREIGN_KEY_CHECKS = 1;
\ No newline at end of file
diff --git a/misc/db/MySQL/old/MySQL_create_script.sql b/misc/db/MySQL/old/MySQL_create_script.sql
deleted file mode 100644
index 1df7012850..0000000000
--- a/misc/db/MySQL/old/MySQL_create_script.sql
+++ /dev/null
@@ -1,130 +0,0 @@
---
--- Copyright (C) 2012-2014 52°North Initiative for Geospatial Open Source
--- Software GmbH
---
--- This program is free software; you can redistribute it and/or modify it
--- under the terms of the GNU General Public License version 2 as published
--- by the Free Software Foundation.
---
--- If the program is linked with libraries which are licensed under one of
--- the following licenses, the combination of the program with the linked
--- library is not considered a "derivative work" of the program:
---
--- - Apache License, version 2.0
--- - Apache Software License, version 1.0
--- - GNU Lesser General Public License, version 3
--- - Mozilla Public License, versions 1.0, 1.1 and 2.0
--- - Common Development and Distribution License (CDDL), version 1.0
---
--- Therefore the distribution of the program linked with libraries licensed
--- under the aforementioned licenses, is permitted by the copyright holders
--- if the distribution is compliant with both the GNU General Public
--- License version 2 and the aforementioned licenses.
---
--- This program is distributed in the hope that it will be useful, but
--- WITHOUT ANY WARRANTY; without even the implied warranty of
--- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General
--- Public License for more details.
---
-
--- ###############################################################################################
--- # !!! Before you execute this scricpt we recommend to create a dump from the current database #
--- ###############################################################################################
-
-create table blobValue (observationId bigint not null, value longblob, primary key (observationId)) ENGINE=InnoDB;
-create table booleanValue (observationId bigint not null, value char(1), primary key (observationId), check (value in ('T','F'))) ENGINE=InnoDB;
-create table categoryValue (observationId bigint not null, value varchar(255), primary key (observationId)) ENGINE=InnoDB;
-create table codespace (codespaceId bigint not null auto_increment, codespace varchar(255) not null unique, primary key (codespaceId)) ENGINE=InnoDB;
-create table compositePhenomenon (parentObservablePropertyId bigint not null, childObservablePropertyId bigint not null, primary key (childObservablePropertyId, parentObservablePropertyId)) ENGINE=InnoDB;
-create table countValue (observationId bigint not null, value integer, primary key (observationId)) ENGINE=InnoDB;
-create table featureOfInterest (featureOfInterestId bigint not null auto_increment, hibernateDiscriminator char(1) not null, featureOfInterestTypeId bigint not null, identifier varchar(255) unique, codespaceId bigint, name longtext, geom GEOMETRY, descriptionXml longtext, url varchar(255) unique, primary key (featureOfInterestId)) ENGINE=InnoDB;
-create table featureOfInterestType (featureOfInterestTypeId bigint not null auto_increment, featureOfInterestType varchar(255) not null unique, primary key (featureOfInterestTypeId)) ENGINE=InnoDB;
-create table featureRelation (parentFeatureId bigint not null, childFeatureId bigint not null, primary key (childFeatureId, parentFeatureId)) ENGINE=InnoDB;
-create table geometryValue (observationId bigint not null, value GEOMETRY, primary key (observationId)) ENGINE=InnoDB;
-create table numericValue (observationId bigint not null, value decimal(19,2), primary key (observationId)) ENGINE=InnoDB;
-create table observableProperty (observablePropertyId bigint not null auto_increment, hibernateDiscriminator char(1) not null, identifier varchar(255) not null unique, description varchar(255), disabled char(1) not null default 'F', primary key (observablePropertyId), check (disabled in ('T','F'))) ENGINE=InnoDB;
-create table observation (observationId bigint not null auto_increment, featureOfInterestId bigint not null, observablePropertyId bigint not null, procedureId bigint not null, phenomenonTimeStart datetime not null, phenomenonTimeEnd datetime not null, resultTime datetime not null, identifier varchar(255) unique, codespaceId bigint, description varchar(255), deleted char(1) default 'F' not null, validTimeStart datetime, validTimeEnd datetime, unitId bigint, primary key (observationId), unique (featureOfInterestId, observablePropertyId, procedureId, phenomenonTimeStart, phenomenonTimeEnd, resultTime)) ENGINE=InnoDB;
-create table observationConstellation (observationConstellationId bigint not null auto_increment, observablePropertyId bigint not null, procedureId bigint not null, observationTypeId bigint, offeringId bigint not null, deleted char(1) default 'F' not null, hiddenChild char(1) default 'F' not null, primary key (observationConstellationId), unique (observablePropertyId, procedureId, offeringId)) ENGINE=InnoDB;
-create table observationHasOffering (observationId bigint not null, offeringId bigint not null, primary key (observationId, offeringId)) ENGINE=InnoDB;
-create table observationType (observationTypeId bigint not null auto_increment, observationType varchar(255) not null unique, primary key (observationTypeId)) ENGINE=InnoDB;
-create table offering (offeringId bigint not null auto_increment, hibernateDiscriminator char(1) not null, identifier varchar(255) not null unique, name varchar(255), disabled char(1) not null default 'F', primary key (offeringId), check (disabled in ('T','F'))) ENGINE=InnoDB;
-create table offeringAllowedFeatureType (offeringId bigint not null, featureOfInterestTypeId bigint not null, primary key (offeringId, featureOfInterestTypeId)) ENGINE=InnoDB;
-create table offeringAllowedObservationType (offeringId bigint not null, observationTypeId bigint not null, primary key (offeringId, observationTypeId)) ENGINE=InnoDB;
-create table offeringHasRelatedFeature (relatedFeatureId bigint not null, offeringId bigint not null, primary key (offeringId, relatedFeatureId)) ENGINE=InnoDB;
-create table parameter (parameterId bigint not null auto_increment, observationId bigint not null, definition varchar(255) not null, title varchar(255), value longblob not null, primary key (parameterId)) ENGINE=InnoDB;
-create table`procedure`(procedureId bigint not null auto_increment, hibernateDiscriminator char(1) not null, procedureDescriptionFormatId bigint not null, identifier varchar(255) not null unique, deleted char(1) default 'F' not null, descriptionFile longtext, disabled char(1) not null default 'F', primary key (procedureId), check (disabled in ('T','F'))) ENGINE=InnoDB;
-create table procedureDescriptionFormat (procedureDescriptionFormatId bigint not null auto_increment, procedureDescriptionFormat varchar(255) not null, primary key (procedureDescriptionFormatId)) ENGINE=InnoDB;
-create table relatedFeature (relatedFeatureId bigint not null auto_increment, featureOfInterestId bigint not null, primary key (relatedFeatureId)) ENGINE=InnoDB;
-create table relatedFeatureHasRole (relatedFeatureId bigint not null, relatedFeatureRoleId bigint not null, primary key (relatedFeatureId, relatedFeatureRoleId)) ENGINE=InnoDB;
-create table relatedFeatureRole (relatedFeatureRoleId bigint not null auto_increment, relatedFeatureRole varchar(255) not null unique, primary key (relatedFeatureRoleId)) ENGINE=InnoDB;
-create table resultTemplate (resultTemplateId bigint not null auto_increment, offeringId bigint not null, observablePropertyId bigint not null, procedureId bigint not null, featureOfInterestId bigint not null, identifier varchar(255) not null, resultStructure longtext not null, resultEncoding longtext not null, primary key (resultTemplateId)) ENGINE=InnoDB;
-create table sensorSystem (parentSensorId bigint not null, childSensorId bigint not null, primary key (childSensorId, parentSensorId)) ENGINE=InnoDB;
-create table spatialFilteringProfile (spatialFilteringProfileId bigint not null auto_increment, observation bigint not null, definition varchar(255) not null, title varchar(255), geom GEOMETRY not null, primary key (spatialFilteringProfileId)) ENGINE=InnoDB;
-create table sweDataArrayValue (observationId bigint not null, value longtext, primary key (observationId)) ENGINE=InnoDB;
-create table textValue (observationId bigint not null, value longtext, primary key (observationId)) ENGINE=InnoDB;
-create table unit (unitId bigint not null auto_increment, unit varchar(255) not null unique, primary key (unitId)) ENGINE=InnoDB;
-create table validProcedureTime (validProcedureTimeId bigint not null auto_increment, procedureId bigint not null, procedureDescriptionFormatId bigint not null, startTime datetime not null, endTime datetime, descriptionXml longtext not null, primary key (validProcedureTimeId)) ENGINE=InnoDB;
-alter table blobValue add index observationBlobValueFk (observationId), add constraint observationBlobValueFk foreign key (observationId) references observation (observationId);
-alter table booleanValue add index observationBooleanValueFk (observationId), add constraint observationBooleanValueFk foreign key (observationId) references observation (observationId);
-alter table categoryValue add index observationCategoryValueFk (observationId), add constraint observationCategoryValueFk foreign key (observationId) references observation (observationId);
-alter table compositePhenomenon add index observablePropertyChildFk (childObservablePropertyId), add constraint observablePropertyChildFk foreign key (childObservablePropertyId) references observableProperty (observablePropertyId);
-alter table compositePhenomenon add index observablePropertyParentFk (parentObservablePropertyId), add constraint observablePropertyParentFk foreign key (parentObservablePropertyId) references observableProperty (observablePropertyId);
-alter table countValue add index observationCountValueFk (observationId), add constraint observationCountValueFk foreign key (observationId) references observation (observationId);
-alter table featureOfInterest add index featureFeatureTypeFk (featureOfInterestTypeId), add constraint featureFeatureTypeFk foreign key (featureOfInterestTypeId) references featureOfInterestType (featureOfInterestTypeId);
-alter table featureOfInterest add index featureCodespaceFk (codespaceId), add constraint featureCodespaceFk foreign key (codespaceId) references codespace (codespaceId);
-alter table featureRelation add index featureOfInterestChildFk (childFeatureId), add constraint featureOfInterestChildFk foreign key (childFeatureId) references featureOfInterest (featureOfInterestId);
-alter table featureRelation add index featureOfInterestParentFk (parentFeatureId), add constraint featureOfInterestParentFk foreign key (parentFeatureId) references featureOfInterest (featureOfInterestId);
-alter table geometryValue add index observationGeometryValueFk (observationId), add constraint observationGeometryValueFk foreign key (observationId) references observation (observationId);
-alter table numericValue add index observationNumericValueFk (observationId), add constraint observationNumericValueFk foreign key (observationId) references observation (observationId);
-create index obsFeatureIdx on observation (featureOfInterestId);
-create index obsObsPropIdx on observation (observablePropertyId);
-create index obsProcedureIdx on observation (procedureId);
-create index obsPhenTimeStartIdx on observation (phenomenonTimeStart);
-create index obsPhenTimeEndIdx on observation (phenomenonTimeEnd);
-create index obsResultTimeIdx on observation (resultTime);
-create index obsCodespaceIdx on observation (codespaceId);
-alter table observation add index observationFeatureFk (featureOfInterestId), add constraint observationFeatureFk foreign key (featureOfInterestId) references featureOfInterest (featureOfInterestId);
-alter table observation add index observationObPropFk (observablePropertyId), add constraint observationObPropFk foreign key (observablePropertyId) references observableProperty (observablePropertyId);
-alter table observation add index observationProcedureFk (procedureId), add constraint observationProcedureFk foreign key (procedureId) references `procedure` (procedureId);
-alter table observation add index observationCodespaceFk (codespaceId), add constraint observationCodespaceFk foreign key (codespaceId) references codespace (codespaceId);
-alter table observation add index observationUnitFk (unitId), add constraint observationUnitFk foreign key (unitId) references unit (unitId);
-create index obsConstObsPropIdx on observationConstellation (observablePropertyId);
-create index obsConstProcedureIdx on observationConstellation (procedureId);
-create index obsConstOfferingIdx on observationConstellation (offeringId);
-alter table observationConstellation add index obsConstObsPropFk (observablePropertyId), add constraint obsConstObsPropFk foreign key (observablePropertyId) references observableProperty (observablePropertyId);
-alter table observationConstellation add index obsnConstProcedureFk (procedureId), add constraint obsnConstProcedureFk foreign key (procedureId) references`procedure`(procedureId);
-alter table observationConstellation add index obsConstObservationIypeFk (observationTypeId), add constraint obsConstObservationIypeFk foreign key (observationTypeId) references observationType (observationTypeId);
-alter table observationConstellation add index obsConstOfferingFk (offeringId), add constraint obsConstOfferingFk foreign key (offeringId) references offering (offeringId);
-create index obshasoffobservationidx on observationHasOffering (observationId);
-create index obshasoffofferingidx on observationHasOffering (offeringId);
-alter table observationHasOffering add index observationOfferingFk (offeringId), add constraint observationOfferingFk foreign key (offeringId) references offering (offeringId);
-alter table observationHasOffering add index FK7D7608F4A0D4D3BD (observationId), add constraint FK7D7608F4A0D4D3BD foreign key (observationId) references observation (observationId);
-alter table offeringAllowedFeatureType add index offeringFeatureTypeFk (featureOfInterestTypeId), add constraint offeringFeatureTypeFk foreign key (featureOfInterestTypeId) references featureOfInterestType (featureOfInterestTypeId);
-alter table offeringAllowedFeatureType add index FKF68CB72EE4EF3005 (offeringId), add constraint FKF68CB72EE4EF3005 foreign key (offeringId) references offering (offeringId);
-alter table offeringAllowedObservationType add index offeringObservationTypeFk (observationTypeId), add constraint offeringObservationTypeFk foreign key (observationTypeId) references observationType (observationTypeId);
-alter table offeringAllowedObservationType add index FK28E66A64E4EF3005 (offeringId), add constraint FK28E66A64E4EF3005 foreign key (offeringId) references offering (offeringId);
-alter table offeringHasRelatedFeature add index relatedFeatureOfferingFk (offeringId), add constraint relatedFeatureOfferingFk foreign key (offeringId) references offering (offeringId);
-alter table offeringHasRelatedFeature add index offeringRelatedFeatureFk (relatedFeatureId), add constraint offeringRelatedFeatureFk foreign key (relatedFeatureId) references relatedFeature (relatedFeatureId);
-alter table parameter add index parameterObservationFk (observationId), add constraint parameterObservationFk foreign key (observationId) references observation (observationId);
-alter table `procedure` add index procProcDescFormatFk (procedureDescriptionFormatId), add constraint procProcDescFormatFk foreign key (procedureDescriptionFormatId) references procedureDescriptionFormat (procedureDescriptionFormatId);
-alter table relatedFeature add index relatedFeatureFeatureFk (featureOfInterestId), add constraint relatedFeatureFeatureFk foreign key (featureOfInterestId) references featureOfInterest (featureOfInterestId);
-alter table relatedFeatureHasRole add index relatedFeatRelatedFeatRoleFk (relatedFeatureRoleId), add constraint relatedFeatRelatedFeatRoleFk foreign key (relatedFeatureRoleId) references relatedFeatureRole (relatedFeatureRoleId);
-alter table relatedFeatureHasRole add index FK5643E7654A79987 (relatedFeatureId), add constraint FK5643E7654A79987 foreign key (relatedFeatureId) references relatedFeature (relatedFeatureId);
-create index resultTempOfferingIdx on resultTemplate (offeringId);
-create index resultTempeObsPropIdx on resultTemplate (observablePropertyId);
-create index resultTempProcedureIdx on resultTemplate (procedureId);
-create index resultTempIdentifierIdx on resultTemplate (identifier);
-alter table resultTemplate add index resultTemplateOfferingIdx (offeringId), add constraint resultTemplateOfferingIdx foreign key (offeringId) references offering (offeringId);
-alter table resultTemplate add index resultTemplateObsPropFk (observablePropertyId), add constraint resultTemplateObsPropFk foreign key (observablePropertyId) references observableProperty (observablePropertyId);
-alter table resultTemplate add index resultTemplateProcedureFk (procedureId), add constraint resultTemplateProcedureFk foreign key (procedureId) references`procedure`(procedureId);
-alter table resultTemplate add index resultTemplateFeatureIdx (featureOfInterestId), add constraint resultTemplateFeatureIdx foreign key (featureOfInterestId) references featureOfInterest (featureOfInterestId);
-alter table sensorSystem add index procedureChildFk (childSensorId), add constraint procedureChildFk foreign key (childSensorId) references `procedure` (procedureId);
-alter table sensorSystem add index procedureParenfFk (parentSensorId), add constraint procedureParenfFk foreign key (parentSensorId) references`procedure`(procedureId);
-create index sfpObservationIdx on spatialFilteringProfile (observation);
-alter table spatialFilteringProfile add index sfpObservationFK (observation), add constraint sfpObservationFK foreign key (observation) references observation (observationId);
-alter table sweDataArrayValue add index observationSweDataArrayValueFk (observationId), add constraint observationSweDataArrayValueFk foreign key (observationId) references observation (observationId);
-alter table textValue add index observationTextValueFk (observationId), add constraint observationTextValueFk foreign key (observationId) references observation (observationId);
-create index validProcedureTimeStartTimeIdx on validProcedureTime (startTime);
-create index validProcedureTimeEndTimeIdx on validProcedureTime (endTime);
-alter table validProcedureTime add index validProcedureTimeProcedureFk (procedureId), add constraint validProcedureTimeProcedureFk foreign key (procedureId) references`procedure`(procedureId);
-alter table validProcedureTime add index validProcProcDescFormatFk (procedureDescriptionFormatId), add constraint validProcProcDescFormatFk foreign key (procedureDescriptionFormatId) references procedureDescriptionFormat (procedureDescriptionFormatId);
\ No newline at end of file
diff --git a/misc/db/MySQL/old/MySQL_drop_script.sql b/misc/db/MySQL/old/MySQL_drop_script.sql
deleted file mode 100644
index fadfd20ef3..0000000000
--- a/misc/db/MySQL/old/MySQL_drop_script.sql
+++ /dev/null
@@ -1,63 +0,0 @@
---
--- Copyright (C) 2012-2014 52°North Initiative for Geospatial Open Source
--- Software GmbH
---
--- This program is free software; you can redistribute it and/or modify it
--- under the terms of the GNU General Public License version 2 as published
--- by the Free Software Foundation.
---
--- If the program is linked with libraries which are licensed under one of
--- the following licenses, the combination of the program with the linked
--- library is not considered a "derivative work" of the program:
---
--- - Apache License, version 2.0
--- - Apache Software License, version 1.0
--- - GNU Lesser General Public License, version 3
--- - Mozilla Public License, versions 1.0, 1.1 and 2.0
--- - Common Development and Distribution License (CDDL), version 1.0
---
--- Therefore the distribution of the program linked with libraries licensed
--- under the aforementioned licenses, is permitted by the copyright holders
--- if the distribution is compliant with both the GNU General Public
--- License version 2 and the aforementioned licenses.
---
--- This program is distributed in the hope that it will be useful, but
--- WITHOUT ANY WARRANTY; without even the implied warranty of
--- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General
--- Public License for more details.
---
-
-
-drop table if exists blobValue;
-drop table if exists booleanValue;
-drop table if exists categoryValue;
-drop table if exists compositePhenomenon;
-drop table if exists countValue;
-drop table if exists featureRelation;
-drop table if exists geometryValue;
-drop table if exists numericValue;
-drop table if exists sweDataArrayValue;
-drop table if exists textValue;
-drop table if exists observationHasOffering;
-drop table if exists parameter;
-drop table if exists observation;
-drop table if exists observationConstellation;
-drop table if exists observationType;
-drop table if exists offeringAllowedFeatureType;
-drop table if exists offeringAllowedObservationType;
-drop table if exists offeringHasRelatedFeature;
-drop table if exists offering;
-drop table if exists `procedure`;
-drop table if exists procedureDescriptionFormat;
-drop table if exists relatedFeatureHasRole;
-drop table if exists relatedFeature;
-drop table if exists relatedFeatureRole;
-drop table if exists resultTemplate;
-drop table if exists sensorSystem;
-drop table if exists spatialFilteringProfile;
-drop table if exists unit;
-drop table if exists validProcedureTime;
-drop table if exists observableProperty;
-drop table if exists featureOfInterest;
-drop table if exists codespace;
-drop table if exists featureOfInterestType;
\ No newline at end of file
diff --git a/misc/db/MySQL/old/MySQL_update_obs_add_description.sql b/misc/db/MySQL/old/MySQL_update_obs_add_description.sql
deleted file mode 100644
index bc14724dfd..0000000000
--- a/misc/db/MySQL/old/MySQL_update_obs_add_description.sql
+++ /dev/null
@@ -1,30 +0,0 @@
---
--- Copyright (C) 2012-2014 52°North Initiative for Geospatial Open Source
--- Software GmbH
---
--- This program is free software; you can redistribute it and/or modify it
--- under the terms of the GNU General Public License version 2 as published
--- by the Free Software Foundation.
---
--- If the program is linked with libraries which are licensed under one of
--- the following licenses, the combination of the program with the linked
--- library is not considered a "derivative work" of the program:
---
--- - Apache License, version 2.0
--- - Apache Software License, version 1.0
--- - GNU Lesser General Public License, version 3
--- - Mozilla Public License, versions 1.0, 1.1 and 2.0
--- - Common Development and Distribution License (CDDL), version 1.0
---
--- Therefore the distribution of the program linked with libraries licensed
--- under the aforementioned licenses, is permitted by the copyright holders
--- if the distribution is compliant with both the GNU General Public
--- License version 2 and the aforementioned licenses.
---
--- This program is distributed in the hope that it will be useful, but
--- WITHOUT ANY WARRANTY; without even the implied warranty of
--- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General
--- Public License for more details.
---
-
-ALTER TABLE observation ADD COLUMN description character varying(255);
\ No newline at end of file
diff --git a/misc/db/MySQL/series/MySQL_update_401_to_402.sql b/misc/db/MySQL/series/MySQL_update_401_to_402.sql
deleted file mode 100644
index bbd1a5ee19..0000000000
--- a/misc/db/MySQL/series/MySQL_update_401_to_402.sql
+++ /dev/null
@@ -1,38 +0,0 @@
---
--- Copyright (C) 2012-2014 52°North Initiative for Geospatial Open Source
--- Software GmbH
---
--- This program is free software; you can redistribute it and/or modify it
--- under the terms of the GNU General Public License version 2 as published
--- by the Free Software Foundation.
---
--- If the program is linked with libraries which are licensed under one of
--- the following licenses, the combination of the program with the linked
--- library is not considered a "derivative work" of the program:
---
--- - Apache License, version 2.0
--- - Apache Software License, version 1.0
--- - GNU Lesser General Public License, version 3
--- - Mozilla Public License, versions 1.0, 1.1 and 2.0
--- - Common Development and Distribution License (CDDL), version 1.0
---
--- Therefore the distribution of the program linked with libraries licensed
--- under the aforementioned licenses, is permitted by the copyright holders
--- if the distribution is compliant with both the GNU General Public
--- License version 2 and the aforementioned licenses.
---
--- This program is distributed in the hope that it will be useful, but
--- WITHOUT ANY WARRANTY; without even the implied warranty of
--- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General
--- Public License for more details.
---
-
-ALTER TABLE series ADD COLUMN firstTimeStamp datetime;
-ALTER TABLE series ADD COLUMN lastTimeStamp datetime;
-ALTER TABLE series ADD COLUMN firstNumericValue decimal(19,2);
-ALTER TABLE series ADD COLUMN lastNumericValue decimal(19,2);
-ALTER TABLE series ADD COLUMN unitId bigint;
-
-alter table series add constraint seriesUnitFk foreign key (unitId) references unit;
-
-ALTER TABLE `procedure` ADD COLUMN referenceFlag char(1) default 'F';
\ No newline at end of file
diff --git a/misc/db/Oracle/old/Oracle_clear_script.sql b/misc/db/Oracle/old/Oracle_clear_script.sql
deleted file mode 100644
index 0d60835c15..0000000000
--- a/misc/db/Oracle/old/Oracle_clear_script.sql
+++ /dev/null
@@ -1,62 +0,0 @@
---
--- Copyright (C) 2012-2014 52°North Initiative for Geospatial Open Source
--- Software GmbH
---
--- This program is free software; you can redistribute it and/or modify it
--- under the terms of the GNU General Public License version 2 as published
--- by the Free Software Foundation.
---
--- If the program is linked with libraries which are licensed under one of
--- the following licenses, the combination of the program with the linked
--- library is not considered a "derivative work" of the program:
---
--- - Apache License, version 2.0
--- - Apache Software License, version 1.0
--- - GNU Lesser General Public License, version 3
--- - Mozilla Public License, versions 1.0, 1.1 and 2.0
--- - Common Development and Distribution License (CDDL), version 1.0
---
--- Therefore the distribution of the program linked with libraries licensed
--- under the aforementioned licenses, is permitted by the copyright holders
--- if the distribution is compliant with both the GNU General Public
--- License version 2 and the aforementioned licenses.
---
--- This program is distributed in the hope that it will be useful, but
--- WITHOUT ANY WARRANTY; without even the implied warranty of
--- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General
--- Public License for more details.
---
-
-TRUNCATE TABLE blobValue REUSE STORAGE;
-TRUNCATE TABLE booleanValue REUSE STORAGE;
-TRUNCATE TABLE categoryValue REUSE STORAGE;
-TRUNCATE TABLE codespace REUSE STORAGE;
-TRUNCATE TABLE compositePhenomenon REUSE STORAGE;
-TRUNCATE TABLE countValue REUSE STORAGE;
-TRUNCATE TABLE featureRelation REUSE STORAGE;
-TRUNCATE TABLE geometryValue REUSE STORAGE;
-TRUNCATE TABLE numericValue REUSE STORAGE;
-TRUNCATE TABLE observableProperty REUSE STORAGE;
-TRUNCATE TABLE observation REUSE STORAGE;
-TRUNCATE TABLE observationConstellation REUSE STORAGE;
-TRUNCATE TABLE observationHasOffering REUSE STORAGE;
-TRUNCATE TABLE observationType REUSE STORAGE;
-TRUNCATE TABLE offering REUSE STORAGE;
-TRUNCATE TABLE offeringAllowedFeatureType REUSE STORAGE;
-TRUNCATE TABLE offeringAllowedObservationType REUSE STORAGE;
-TRUNCATE TABLE offeringHasRelatedFeature REUSE STORAGE;
-TRUNCATE TABLE parameter REUSE STORAGE;
-TRUNCATE TABLE procedure REUSE STORAGE;
-TRUNCATE TABLE procedureDescriptionFormat REUSE STORAGE;
-TRUNCATE TABLE relatedFeature REUSE STORAGE;
-TRUNCATE TABLE relatedFeatureHasRole REUSE STORAGE;
-TRUNCATE TABLE relatedFeatureRole REUSE STORAGE;
-TRUNCATE TABLE resultTemplate REUSE STORAGE;
-TRUNCATE TABLE sensorSystem REUSE STORAGE;
-TRUNCATE TABLE spatialfilteringprofile REUSE STORAGE;
-TRUNCATE TABLE swedataarrayvalue REUSE STORAGE;
-TRUNCATE TABLE textValuev
-TRUNCATE TABLE unit REUSE STORAGE;
-TRUNCATE TABLE validProcedureTime REUSE STORAGE;
-TRUNCATE TABLE featureOfInterest REUSE STORAGE;
-TRUNCATE TABLE featureOfInterestType REUSE STORAGE;
\ No newline at end of file
diff --git a/misc/db/Oracle/old/Oracle_create_script.sql b/misc/db/Oracle/old/Oracle_create_script.sql
deleted file mode 100644
index adaf25b0f0..0000000000
--- a/misc/db/Oracle/old/Oracle_create_script.sql
+++ /dev/null
@@ -1,143 +0,0 @@
---
--- Copyright (C) 2012-2014 52°North Initiative for Geospatial Open Source
--- Software GmbH
---
--- This program is free software; you can redistribute it and/or modify it
--- under the terms of the GNU General Public License version 2 as published
--- by the Free Software Foundation.
---
--- If the program is linked with libraries which are licensed under one of
--- the following licenses, the combination of the program with the linked
--- library is not considered a "derivative work" of the program:
---
--- - Apache License, version 2.0
--- - Apache Software License, version 1.0
--- - GNU Lesser General Public License, version 3
--- - Mozilla Public License, versions 1.0, 1.1 and 2.0
--- - Common Development and Distribution License (CDDL), version 1.0
---
--- Therefore the distribution of the program linked with libraries licensed
--- under the aforementioned licenses, is permitted by the copyright holders
--- if the distribution is compliant with both the GNU General Public
--- License version 2 and the aforementioned licenses.
---
--- This program is distributed in the hope that it will be useful, but
--- WITHOUT ANY WARRANTY; without even the implied warranty of
--- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General
--- Public License for more details.
---
-
-create table parameter (parameterId number(19,0) not null, observationId number(19,0) not null, definition varchar2(255 char) not null, title varchar2(255 char), value blob not null, primary key (parameterId));
-create table blobValue (observationId number(19,0) not null, value blob, primary key (observationId));
-create table booleanValue (observationId number(19,0) not null, value char(1 char), primary key (observationId), check (value in ('T','F')));
-create table categoryValue (observationId number(19,0) not null, value varchar2(255 char), primary key (observationId));
-create table codespace (codespaceId number(19,0) not null, codespace varchar2(255 char) not null unique, primary key (codespaceId));
-create table compositePhenomenon (parentObservablePropertyId number(19,0) not null, childObservablePropertyId number(19,0) not null, primary key (childObservablePropertyId, parentObservablePropertyId));
-create table countValue (observationId number(19,0) not null, value number(10,0), primary key (observationId));
-create table featureOfInterest (featureOfInterestId number(19,0) not null, hibernateDiscriminator char(1 char) not null, featureOfInterestTypeId number(19,0) not null, identifier varchar2(255 char) unique, codespaceId number(19,0), name clob, geom SDO_GEOMETRY, descriptionXml clob, url varchar2(255 char) unique, primary key (featureOfInterestId));
-create table featureOfInterestType (featureOfInterestTypeId number(19,0) not null, featureOfInterestType varchar2(255 char) not null unique, primary key (featureOfInterestTypeId));
-create table featureRelation (parentFeatureId number(19,0) not null, childFeatureId number(19,0) not null, primary key (childFeatureId, parentFeatureId));
-create table geometryValue (observationId number(19,0) not null, value SDO_GEOMETRY, primary key (observationId));
-create table numericValue (observationId number(19,0) not null, value number(19,2), primary key (observationId));
-create table observableProperty (observablePropertyId number(19,0) not null, hibernateDiscriminator char(1 char) not null, identifier varchar2(255 char) not null unique, description varchar2(255 char), disabled char(1 char) default 'F' not null check (disabled in ('T','F')), primary key (observablePropertyId));
-create table observation (observationId number(19,0) not null, featureOfInterestId number(19,0) not null, observablePropertyId number(19,0) not null, procedureId number(19,0) not null, phenomenonTimeStart timestamp not null, phenomenonTimeEnd timestamp not null, resultTime timestamp not null, identifier varchar2(255 char) unique, codespaceId number(19,0), deleted char(1 char) default 'F' not null check (deleted in ('T','F')), validTimeStart timestamp, validTimeEnd timestamp, unitId number(19,0), primary key (observationId), unique (featureOfInterestId, observablePropertyId, procedureId, phenomenonTimeStart, phenomenonTimeEnd, resultTime));
-create table observationConstellation (observationConstellationId number(19,0) not null, observablePropertyId number(19,0) not null, procedureId number(19,0) not null, observationTypeId number(19,0), offeringId number(19,0) not null, deleted char(1 char) default 'F' not null check (deleted in ('T','F')), hiddenChild char(1 char) default 'F' not null check (hiddenChild in ('T','F')), primary key (observationConstellationId), unique (observablePropertyId, procedureId, offeringId));
-create table observationHasOffering (observationId number(19,0) not null, offeringId number(19,0) not null, primary key (observationId, offeringId));
-create table observationType (observationTypeId number(19,0) not null, observationType varchar2(255 char) not null unique, primary key (observationTypeId));
-create table offering (offeringId number(19,0) not null, hibernateDiscriminator char(1 char) not null, identifier varchar2(255 char) not null unique, name varchar2(255 char), disabled char(1 char) default 'F' not null check (disabled in ('T','F')), primary key (offeringId));
-create table offeringAllowedFeatureType (offeringId number(19,0) not null, featureOfInterestTypeId number(19,0) not null, primary key (offeringId, featureOfInterestTypeId));
-create table offeringAllowedObservationType (offeringId number(19,0) not null, observationTypeId number(19,0) not null, primary key (offeringId, observationTypeId));
-create table offeringHasRelatedFeature (relatedFeatureId number(19,0) not null, offeringId number(19,0) not null, primary key (offeringId, relatedFeatureId));
-create table procedure (procedureId number(19,0) not null, hibernateDiscriminator char(1 char) not null, procedureDescriptionFormatId number(19,0) not null, identifier varchar2(255 char) not null unique, deleted char(1 char) default 'F' not null check (deleted in ('T','F')), descriptionFile clob, disabled char(1 char) default 'F' not null check (disabled in ('T','F')), primary key (procedureId));
-create table procedureDescriptionFormat (procedureDescriptionFormatId number(19,0) not null, procedureDescriptionFormat varchar2(255 char) not null, primary key (procedureDescriptionFormatId));
-create table relatedFeature (relatedFeatureId number(19,0) not null, featureOfInterestId number(19,0) not null, primary key (relatedFeatureId));
-create table relatedFeatureHasRole (relatedFeatureId number(19,0) not null, relatedFeatureRoleId number(19,0) not null, primary key (relatedFeatureId, relatedFeatureRoleId));
-create table relatedFeatureRole (relatedFeatureRoleId number(19,0) not null, relatedFeatureRole varchar2(255 char) not null unique, primary key (relatedFeatureRoleId));
-create table resultTemplate (resultTemplateId number(19,0) not null, offeringId number(19,0) not null, observablePropertyId number(19,0) not null, procedureId number(19,0) not null, featureOfInterestId number(19,0) not null, identifier varchar2(255 char) not null, resultStructure clob not null, resultEncoding clob not null, primary key (resultTemplateId));
-create table sensorSystem (parentSensorId number(19,0) not null, childSensorId number(19,0) not null, primary key (childSensorId, parentSensorId));
-create table spatialFilteringProfile (spatialFilteringProfileId number(19,0) not null, observation number(19,0) not null, definition varchar2(255 char) not null, title varchar2(255 char), geom SDO_GEOMETRY not null, primary key (spatialFilteringProfileId));
-create table sweDataArrayValue (observationId number(19,0) not null, value clob, primary key (observationId));
-create table textValue (observationId number(19,0) not null, value clob, primary key (observationId));
-create table unit (unitId number(19,0) not null, unit varchar2(255 char) not null unique, primary key (unitId));
-create table validProcedureTime (validProcedureTimeId number(19,0) not null, procedureId number(19,0) not null, procedureDescriptionFormatId number(19,0) not null, startTime timestamp not null, endTime timestamp, descriptionXml clob not null, primary key (validProcedureTimeId));
-alter table blobValue add constraint observationBlobValueFk foreign key (observationId) references observation;
-alter table booleanValue add constraint observationBooleanValueFk foreign key (observationId) references observation;
-alter table categoryValue add constraint observationCategoryValueFk foreign key (observationId) references observation;
-alter table compositePhenomenon add constraint observablePropertyChildFk foreign key (childObservablePropertyId) references observableProperty;
-alter table compositePhenomenon add constraint observablePropertyParentFk foreign key (parentObservablePropertyId) references observableProperty;
-alter table countValue add constraint observationCountValueFk foreign key (observationId) references observation;
-alter table featureOfInterest add constraint featureFeatureTypeFk foreign key (featureOfInterestTypeId) references featureOfInterestType;
-alter table featureOfInterest add constraint featureCodespaceFk foreign key (codespaceId) references codespace;
-alter table featureRelation add constraint featureOfInterestChildFk foreign key (childFeatureId) references featureOfInterest;
-alter table featureRelation add constraint featureOfInterestParentFk foreign key (parentFeatureId) references featureOfInterest;
-alter table geometryValue add constraint observationGeometryValueFk foreign key (observationId) references observation;
-alter table numericValue add constraint observationNumericValueFk foreign key (observationId) references observation;
-create index obsFeatureIdx on observation (featureOfInterestId);
-create index obsObsPropIdx on observation (observablePropertyId);
-create index obsProcedureIdx on observation (procedureId);
-create index obsPhenTimeStartIdx on observation (phenomenonTimeStart);
-create index obsPhenTimeEndIdx on observation (phenomenonTimeEnd);
-create index obsResultTimeIdx on observation (resultTime);
-create index obsCodespaceIdx on observation (codespaceId);
-alter table observation add constraint observationFeatureFk foreign key (featureOfInterestId) references featureOfInterest;
-alter table observation add constraint observationObPropFk foreign key (observablePropertyId) references observableProperty;
-alter table observation add constraint observationProcedureFk foreign key (procedureId) references procedure;
-alter table observation add constraint observationCodespaceFk foreign key (codespaceId) references codespace;
-alter table observation add constraint observationUnitFk foreign key (unitId) references unit;
-create index obsConstObsPropIdx on observationConstellation (observablePropertyId);
-create index obsConstProcedureIdx on observationConstellation (procedureId);
-create index obsConstOfferingIdx on observationConstellation (offeringId);
-alter table observationConstellation add constraint obsConstObsPropFk foreign key (observablePropertyId) references observableProperty;
-alter table observationConstellation add constraint obsnConstProcedureFk foreign key (procedureId) references procedure;
-alter table observationConstellation add constraint obsConstObservationIypeFk foreign key (observationTypeId) references observationType;
-alter table observationConstellation add constraint obsConstOfferingFk foreign key (offeringId) references offering;
-create index obshasoffobservationidx on observationHasOffering (observationId);
-create index obshasoffofferingidx on observationHasOffering (offeringId);
-alter table observationHasOffering add constraint observationOfferingFk foreign key (offeringId) references offering;
-alter table observationHasOffering add constraint FK7D7608F4A0D4D3BD foreign key (observationId) references observation;
-alter table offeringAllowedFeatureType add constraint offeringFeatureTypeFk foreign key (featureOfInterestTypeId) references featureOfInterestType;
-alter table offeringAllowedFeatureType add constraint FKF68CB72EE4EF3005 foreign key (offeringId) references offering;
-alter table offeringAllowedObservationType add constraint offeringObservationTypeFk foreign key (observationTypeId) references observationType;
-alter table offeringAllowedObservationType add constraint FK28E66A64E4EF3005 foreign key (offeringId) references offering;
-alter table offeringHasRelatedFeature add constraint relatedFeatureOfferingFk foreign key (offeringId) references offering;
-alter table offeringHasRelatedFeature add constraint offeringRelatedFeatureFk foreign key (relatedFeatureId) references relatedFeature;
-alter table parameter add constraint parameterObservationFk foreign key (observationId) references observation;
-alter table procedure add constraint procProcDescFormatFk foreign key (procedureDescriptionFormatId) references procedureDescriptionFormat;
-alter table relatedFeature add constraint relatedFeatureFeatureFk foreign key (featureOfInterestId) references featureOfInterest;
-alter table relatedFeatureHasRole add constraint relatedFeatRelatedFeatRoleFk foreign key (relatedFeatureRoleId) references relatedFeatureRole;
-alter table relatedFeatureHasRole add constraint FK5643E7654A79987 foreign key (relatedFeatureId) references relatedFeature;
-create index resultTempOfferingIdx on resultTemplate (offeringId);
-create index resultTempeObsPropIdx on resultTemplate (observablePropertyId);
-create index resultTempProcedureIdx on resultTemplate (procedureId);
-create index resultTempIdentifierIdx on resultTemplate (identifier);
-alter table resultTemplate add constraint resultTemplateOfferingIdx foreign key (offeringId) references offering;
-alter table resultTemplate add constraint resultTemplateObsPropFk foreign key (observablePropertyId) references observableProperty;
-alter table resultTemplate add constraint resultTemplateProcedureFk foreign key (procedureId) references procedure;
-alter table resultTemplate add constraint resultTemplateFeatureIdx foreign key (featureOfInterestId) references featureOfInterest;
-alter table sensorSystem add constraint procedureChildFk foreign key (childSensorId) references procedure;
-alter table sensorSystem add constraint procedureParenfFk foreign key (parentSensorId) references procedure;
-create index sfpObservationIdx on spatialFilteringProfile (observation);
-alter table spatialFilteringProfile add constraint sfpObservationFK foreign key (observation) references observation;
-alter table sweDataArrayValue add constraint observationSweDataArrayValueFk foreign key (observationId) references observation;
-alter table textValue add constraint observationTextValueFk foreign key (observationId) references observation;
-create index validProcedureTimeStartTimeIdx on validProcedureTime (startTime);
-create index validProcedureTimeEndTimeIdx on validProcedureTime (endTime);
-alter table validProcedureTime add constraint validProcedureTimeProcedureFk foreign key (procedureId) references procedure;
-alter table validProcedureTime add constraint validProcProcDescFormatFk foreign key (procedureDescriptionFormatId) references procedureDescriptionFormat;
-create sequence codespaceId_seq;
-create sequence featureOfInterestId_seq;
-create sequence featureOfInterestTypeId_seq;
-create sequence observablePropertyId_seq;
-create sequence observationConstellationId_seq;
-create sequence observationId_seq;
-create sequence observationTypeId_seq;
-create sequence offeringId_seq;
-create sequence parameterId_seq;
-create sequence procDescFormatId_seq;
-create sequence procedureId_seq;
-create sequence relatedFeatureId_seq;
-create sequence relatedFeatureRoleId_seq;
-create sequence resultTemplateId_seq;
-create sequence spatialFilteringProfileId_seq;
-create sequence unitId_seq;
-create sequence validProcedureTimeId_seq;
\ No newline at end of file
diff --git a/misc/db/Oracle/old/Oracle_drop_script.sql b/misc/db/Oracle/old/Oracle_drop_script.sql
deleted file mode 100644
index 2fa638c1b1..0000000000
--- a/misc/db/Oracle/old/Oracle_drop_script.sql
+++ /dev/null
@@ -1,79 +0,0 @@
---
--- Copyright (C) 2012-2014 52°North Initiative for Geospatial Open Source
--- Software GmbH
---
--- This program is free software; you can redistribute it and/or modify it
--- under the terms of the GNU General Public License version 2 as published
--- by the Free Software Foundation.
---
--- If the program is linked with libraries which are licensed under one of
--- the following licenses, the combination of the program with the linked
--- library is not considered a "derivative work" of the program:
---
--- - Apache License, version 2.0
--- - Apache Software License, version 1.0
--- - GNU Lesser General Public License, version 3
--- - Mozilla Public License, versions 1.0, 1.1 and 2.0
--- - Common Development and Distribution License (CDDL), version 1.0
---
--- Therefore the distribution of the program linked with libraries licensed
--- under the aforementioned licenses, is permitted by the copyright holders
--- if the distribution is compliant with both the GNU General Public
--- License version 2 and the aforementioned licenses.
---
--- This program is distributed in the hope that it will be useful, but
--- WITHOUT ANY WARRANTY; without even the implied warranty of
--- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General
--- Public License for more details.
---
-
-drop table blobValue cascade constraints;
-drop table booleanValue cascade constraints;
-drop table categoryValue cascade constraints;
-drop table codespace cascade constraints;
-drop table compositePhenomenon cascade constraints;
-drop table countValue cascade constraints;
-drop table featureOfInterest cascade constraints;
-drop table featureOfInterestType cascade constraints;
-drop table featureRelation cascade constraints;
-drop table geometryValue cascade constraints;
-drop table numericValue cascade constraints;
-drop table observableProperty cascade constraints;
-drop table observation cascade constraints;
-drop table observationConstellation cascade constraints;
-drop table observationHasOffering cascade constraints;
-drop table observationType cascade constraints;
-drop table offering cascade constraints;
-drop table offeringAllowedFeatureType cascade constraints;
-drop table offeringAllowedObservationType cascade constraints;
-drop table offeringHasRelatedFeature cascade constraints;
-drop table parameter cascade constraints;
-drop table procedure cascade constraints;
-drop table procedureDescriptionFormat cascade constraints;
-drop table relatedFeature cascade constraints;
-drop table relatedFeatureHasRole cascade constraints;
-drop table relatedFeatureRole cascade constraints;
-drop table resultTemplate cascade constraints;
-drop table sensorSystem cascade constraints;
-drop table spatialFilteringProfile cascade constraints;
-drop table sweDataArrayValue cascade constraints;
-drop table textValue cascade constraints;
-drop table unit cascade constraints;
-drop table validProcedureTime cascade constraints;
-drop sequence codespaceId_seq;
-drop sequence featureOfInterestId_seq;
-drop sequence featureOfInterestTypeId_seq;
-drop sequence observablePropertyId_seq;
-drop sequence observationConstellationId_seq;
-drop sequence observationId_seq;
-drop sequence observationTypeId_seq;
-drop sequence offeringId_seq;
-drop sequence parameterId_seq;
-drop sequence procDescFormatId_seq;
-drop sequence procedureId_seq;
-drop sequence relatedFeatureId_seq;
-drop sequence relatedFeatureRoleId_seq;
-drop sequence resultTemplateId_seq;
-drop sequence spatialFilteringProfileId_seq;
-drop sequence unitId_seq;
-drop sequence validProcedureTimeId_seq;
\ No newline at end of file
diff --git a/misc/db/Oracle/old/Oracle_update_obs_add_description.sql b/misc/db/Oracle/old/Oracle_update_obs_add_description.sql
deleted file mode 100644
index e18eaa9bac..0000000000
--- a/misc/db/Oracle/old/Oracle_update_obs_add_description.sql
+++ /dev/null
@@ -1,30 +0,0 @@
---
--- Copyright (C) 2012-2014 52°North Initiative for Geospatial Open Source
--- Software GmbH
---
--- This program is free software; you can redistribute it and/or modify it
--- under the terms of the GNU General Public License version 2 as published
--- by the Free Software Foundation.
---
--- If the program is linked with libraries which are licensed under one of
--- the following licenses, the combination of the program with the linked
--- library is not considered a "derivative work" of the program:
---
--- - Apache License, version 2.0
--- - Apache Software License, version 1.0
--- - GNU Lesser General Public License, version 3
--- - Mozilla Public License, versions 1.0, 1.1 and 2.0
--- - Common Development and Distribution License (CDDL), version 1.0
---
--- Therefore the distribution of the program linked with libraries licensed
--- under the aforementioned licenses, is permitted by the copyright holders
--- if the distribution is compliant with both the GNU General Public
--- License version 2 and the aforementioned licenses.
---
--- This program is distributed in the hope that it will be useful, but
--- WITHOUT ANY WARRANTY; without even the implied warranty of
--- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General
--- Public License for more details.
---
-
-ALTER TABLE observation ADD description VARCHAR2(255 CHAR);
\ No newline at end of file
diff --git a/misc/db/Oracle/series/Oracle_update_401_to_402.sql b/misc/db/Oracle/series/Oracle_update_401_to_402.sql
deleted file mode 100644
index 197284811c..0000000000
--- a/misc/db/Oracle/series/Oracle_update_401_to_402.sql
+++ /dev/null
@@ -1,38 +0,0 @@
---
--- Copyright (C) 2012-2014 52°North Initiative for Geospatial Open Source
--- Software GmbH
---
--- This program is free software; you can redistribute it and/or modify it
--- under the terms of the GNU General Public License version 2 as published
--- by the Free Software Foundation.
---
--- If the program is linked with libraries which are licensed under one of
--- the following licenses, the combination of the program with the linked
--- library is not considered a "derivative work" of the program:
---
--- - Apache License, version 2.0
--- - Apache Software License, version 1.0
--- - GNU Lesser General Public License, version 3
--- - Mozilla Public License, versions 1.0, 1.1 and 2.0
--- - Common Development and Distribution License (CDDL), version 1.0
---
--- Therefore the distribution of the program linked with libraries licensed
--- under the aforementioned licenses, is permitted by the copyright holders
--- if the distribution is compliant with both the GNU General Public
--- License version 2 and the aforementioned licenses.
---
--- This program is distributed in the hope that it will be useful, but
--- WITHOUT ANY WARRANTY; without even the implied warranty of
--- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General
--- Public License for more details.
---
-
-ALTER TABLE series ADD firstTimeStamp timestamp;
-ALTER TABLE series ADD lastTimeStamp timestamp;
-ALTER TABLE series ADD firstNumericValue number(19,2);
-ALTER TABLE series ADD lastNumericValue number(19,2);
-ALTER TABLE series ADD unitId number(19,0);
-
-alter table series add constraint seriesUnitFk foreign key (unitId) references unit;
-
-ALTER TABLE procedure ADD referenceFlag char(1 char) default 'F' check (referenceFlag in ('T','F'));
\ No newline at end of file
diff --git a/misc/db/PostgreSQL/old/script_20_create.sql b/misc/db/PostgreSQL/old/script_20_create.sql
deleted file mode 100644
index bba6ff9c13..0000000000
--- a/misc/db/PostgreSQL/old/script_20_create.sql
+++ /dev/null
@@ -1,143 +0,0 @@
---
--- Copyright (C) 2012-2014 52°North Initiative for Geospatial Open Source
--- Software GmbH
---
--- This program is free software; you can redistribute it and/or modify it
--- under the terms of the GNU General Public License version 2 as published
--- by the Free Software Foundation.
---
--- If the program is linked with libraries which are licensed under one of
--- the following licenses, the combination of the program with the linked
--- library is not considered a "derivative work" of the program:
---
--- - Apache License, version 2.0
--- - Apache Software License, version 1.0
--- - GNU Lesser General Public License, version 3
--- - Mozilla Public License, versions 1.0, 1.1 and 2.0
--- - Common Development and Distribution License (CDDL), version 1.0
---
--- Therefore the distribution of the program linked with libraries licensed
--- under the aforementioned licenses, is permitted by the copyright holders
--- if the distribution is compliant with both the GNU General Public
--- License version 2 and the aforementioned licenses.
---
--- This program is distributed in the hope that it will be useful, but
--- WITHOUT ANY WARRANTY; without even the implied warranty of
--- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General
--- Public License for more details.
---
-
-create table blobValue (observationId int8 not null, value oid, primary key (observationId));
-create table booleanValue (observationId int8 not null, value char(1), primary key (observationId), check (value in ('T','F')));
-create table categoryValue (observationId int8 not null, value varchar(255), primary key (observationId));
-create table codespace (codespaceId int8 not null, codespace varchar(255) not null unique, primary key (codespaceId));
-create table compositePhenomenon (parentObservablePropertyId int8 not null, childObservablePropertyId int8 not null, primary key (childObservablePropertyId, parentObservablePropertyId));
-create table countValue (observationId int8 not null, value int4, primary key (observationId));
-create table featureOfInterest (featureOfInterestId int8 not null, hibernateDiscriminator char(1) not null, featureOfInterestTypeId int8 not null, identifier varchar(255) unique, codespaceId int8, name text, geom GEOMETRY, descriptionXml text, url varchar(255) unique, primary key (featureOfInterestId));
-create table featureOfInterestType (featureOfInterestTypeId int8 not null, featureOfInterestType varchar(255) not null unique, primary key (featureOfInterestTypeId));
-create table featureRelation (parentFeatureId int8 not null, childFeatureId int8 not null, primary key (childFeatureId, parentFeatureId));
-create table geometryValue (observationId int8 not null, value GEOMETRY, primary key (observationId));
-create table numericValue (observationId int8 not null, value numeric(19, 2), primary key (observationId));
-create table observableProperty (observablePropertyId int8 not null, hibernateDiscriminator char(1) not null, identifier varchar(255) not null unique, description varchar(255), disabled char(1) default 'F' not null check (disabled in ('T','F')), primary key (observablePropertyId));
-create table observation (observationId int8 not null, featureOfInterestId int8 not null, observablePropertyId int8 not null, procedureId int8 not null, phenomenonTimeStart timestamp not null, phenomenonTimeEnd timestamp not null, resultTime timestamp not null, identifier varchar(255) unique, codespaceId int8, deleted char(1) default 'F' not null check (deleted in ('T','F')), validTimeStart timestamp, validTimeEnd timestamp, unitId int8, primary key (observationId), unique (featureOfInterestId, observablePropertyId, procedureId, phenomenonTimeStart, phenomenonTimeEnd, resultTime));
-create table observationConstellation (observationConstellationId int8 not null, observablePropertyId int8 not null, procedureId int8 not null, observationTypeId int8, offeringId int8 not null, deleted char(1) default 'F' not null check (deleted in ('T','F')), hiddenChild char(1) default 'F' not null check (hiddenChild in ('T','F')), primary key (observationConstellationId), unique (observablePropertyId, procedureId, offeringId));
-create table observationHasOffering (observationId int8 not null, offeringId int8 not null, primary key (observationId, offeringId));
-create table observationType (observationTypeId int8 not null, observationType varchar(255) not null unique, primary key (observationTypeId));
-create table offering (offeringId int8 not null, hibernateDiscriminator char(1) not null, identifier varchar(255) not null unique, name varchar(255), disabled char(1) default 'F' not null check (disabled in ('T','F')), primary key (offeringId));
-create table offeringAllowedFeatureType (offeringId int8 not null, featureOfInterestTypeId int8 not null, primary key (offeringId, featureOfInterestTypeId));
-create table offeringAllowedObservationType (offeringId int8 not null, observationTypeId int8 not null, primary key (offeringId, observationTypeId));
-create table offeringHasRelatedFeature (relatedFeatureId int8 not null, offeringId int8 not null, primary key (offeringId, relatedFeatureId));
-create table parameter (parameterId int8 not null, observationId int8 not null, definition varchar(255) not null, title varchar(255), value oid not null, primary key (parameterId));
-create table "procedure" (procedureId int8 not null, hibernateDiscriminator char(1) not null, procedureDescriptionFormatId int8 not null, identifier varchar(255) not null unique, deleted char(1) default 'F' not null check (deleted in ('T','F')), descriptionFile text, disabled char(1) default 'F' not null check (disabled in ('T','F')), primary key (procedureId));
-create table procedureDescriptionFormat (procedureDescriptionFormatId int8 not null, procedureDescriptionFormat varchar(255) not null, primary key (procedureDescriptionFormatId));
-create table relatedFeature (relatedFeatureId int8 not null, featureOfInterestId int8 not null, primary key (relatedFeatureId));
-create table relatedFeatureHasRole (relatedFeatureId int8 not null, relatedFeatureRoleId int8 not null, primary key (relatedFeatureId, relatedFeatureRoleId));
-create table relatedFeatureRole (relatedFeatureRoleId int8 not null, relatedFeatureRole varchar(255) not null unique, primary key (relatedFeatureRoleId));
-create table resultTemplate (resultTemplateId int8 not null, offeringId int8 not null, observablePropertyId int8 not null, procedureId int8 not null, featureOfInterestId int8 not null, identifier varchar(255) not null, resultStructure text not null, resultEncoding text not null, primary key (resultTemplateId));
-create table sensorSystem (parentSensorId int8 not null, childSensorId int8 not null, primary key (childSensorId, parentSensorId));
-create table spatialFilteringProfile (spatialFilteringProfileId int8 not null, observation int8 not null, definition varchar(255) not null, title varchar(255), geom GEOMETRY not null, primary key (spatialFilteringProfileId));
-create table sweDataArrayValue (observationId int8 not null, value text, primary key (observationId));
-create table textValue (observationId int8 not null, value text, primary key (observationId));
-create table unit (unitId int8 not null, unit varchar(255) not null unique, primary key (unitId));
-create table validProcedureTime (validProcedureTimeId int8 not null, procedureId int8 not null, procedureDescriptionFormatId int8 not null, startTime timestamp not null, endTime timestamp, descriptionXml text not null, primary key (validProcedureTimeId));
-alter table blobValue add constraint observationBlobValueFk foreign key (observationId) references observation;
-alter table booleanValue add constraint observationBooleanValueFk foreign key (observationId) references observation;
-alter table categoryValue add constraint observationCategoryValueFk foreign key (observationId) references observation;
-alter table compositePhenomenon add constraint observablePropertyChildFk foreign key (childObservablePropertyId) references observableProperty;
-alter table compositePhenomenon add constraint observablePropertyParentFk foreign key (parentObservablePropertyId) references observableProperty;
-alter table countValue add constraint observationCountValueFk foreign key (observationId) references observation;
-alter table featureOfInterest add constraint featureFeatureTypeFk foreign key (featureOfInterestTypeId) references featureOfInterestType;
-alter table featureOfInterest add constraint featureCodespaceFk foreign key (codespaceId) references codespace;
-alter table featureRelation add constraint featureOfInterestChildFk foreign key (childFeatureId) references featureOfInterest;
-alter table featureRelation add constraint featureOfInterestParentFk foreign key (parentFeatureId) references featureOfInterest;
-alter table geometryValue add constraint observationGeometryValueFk foreign key (observationId) references observation;
-alter table numericValue add constraint observationNumericValueFk foreign key (observationId) references observation;
-create index obsFeatureIdx on observation (featureOfInterestId);
-create index obsObsPropIdx on observation (observablePropertyId);
-create index obsProcedureIdx on observation (procedureId);
-create index obsPhenTimeStartIdx on observation (phenomenonTimeStart);
-create index obsPhenTimeEndIdx on observation (phenomenonTimeEnd);
-create index obsResultTimeIdx on observation (resultTime);
-create index obsCodespaceIdx on observation (codespaceId);
-alter table observation add constraint observationFeatureFk foreign key (featureOfInterestId) references featureOfInterest;
-alter table observation add constraint observationObPropFk foreign key (observablePropertyId) references observableProperty;
-alter table observation add constraint observationProcedureFk foreign key (procedureId) references "procedure";
-alter table observation add constraint observationCodespaceFk foreign key (codespaceId) references codespace;
-alter table observation add constraint observationUnitFk foreign key (unitId) references unit;
-create index obsConstObsPropIdx on observationConstellation (observablePropertyId);
-create index obsConstProcedureIdx on observationConstellation (procedureId);
-create index obsConstOfferingIdx on observationConstellation (offeringId);
-alter table observationConstellation add constraint obsConstObsPropFk foreign key (observablePropertyId) references observableProperty;
-alter table observationConstellation add constraint obsnConstProcedureFk foreign key (procedureId) references procedure;
-alter table observationConstellation add constraint obsConstObservationIypeFk foreign key (observationTypeId) references observationType;
-alter table observationConstellation add constraint obsConstOfferingFk foreign key (offeringId) references offering;
-create index obshasoffobservationidx on observationHasOffering (observationId);
-create index obshasoffofferingidx on observationHasOffering (offeringId);
-alter table observationHasOffering add constraint observationOfferingFk foreign key (offeringId) references offering;
-alter table observationHasOffering add constraint FK7D7608F4A0D4D3BD foreign key (observationId) references observation;
-alter table offeringAllowedFeatureType add constraint offeringFeatureTypeFk foreign key (featureOfInterestTypeId) references featureOfInterestType;
-alter table offeringAllowedFeatureType add constraint FKF68CB72EE4EF3005 foreign key (offeringId) references offering;
-alter table offeringAllowedObservationType add constraint offeringObservationTypeFk foreign key (observationTypeId) references observationType;
-alter table offeringAllowedObservationType add constraint FK28E66A64E4EF3005 foreign key (offeringId) references offering;
-alter table offeringHasRelatedFeature add constraint relatedFeatureOfferingFk foreign key (offeringId) references offering;
-alter table offeringHasRelatedFeature add constraint offeringRelatedFeatureFk foreign key (relatedFeatureId) references relatedFeature;
-alter table parameter add constraint parameterObservationFk foreign key (observationId) references observation;
-alter table procedure add constraint procProcDescFormatFk foreign key (procedureDescriptionFormatId) references procedureDescriptionFormat;
-alter table relatedFeature add constraint relatedFeatureFeatureFk foreign key (featureOfInterestId) references featureOfInterest;
-alter table relatedFeatureHasRole add constraint relatedFeatRelatedFeatRoleFk foreign key (relatedFeatureRoleId) references relatedFeatureRole;
-alter table relatedFeatureHasRole add constraint FK5643E7654A79987 foreign key (relatedFeatureId) references relatedFeature;
-create index resultTempOfferingIdx on resultTemplate (offeringId);
-create index resultTempeObsPropIdx on resultTemplate (observablePropertyId);
-create index resultTempProcedureIdx on resultTemplate (procedureId);
-create index resultTempIdentifierIdx on resultTemplate (identifier);
-alter table resultTemplate add constraint resultTemplateOfferingIdx foreign key (offeringId) references offering;
-alter table resultTemplate add constraint resultTemplateObsPropFk foreign key (observablePropertyId) references observableProperty;
-alter table resultTemplate add constraint resultTemplateProcedureFk foreign key (procedureId) references "procedure";
-alter table resultTemplate add constraint resultTemplateFeatureIdx foreign key (featureOfInterestId) references featureOfInterest;
-alter table sensorSystem add constraint procedureChildFk foreign key (childSensorId) references "procedure";
-alter table sensorSystem add constraint procedureParenfFk foreign key (parentSensorId) references "procedure";
-create index sfpObservationIdx on spatialFilteringProfile (observation);
-alter table spatialFilteringProfile add constraint sfpObservationFK foreign key (observation) references observation;
-alter table sweDataArrayValue add constraint observationSweDataArrayValueFk foreign key (observationId) references observation;
-alter table textValue add constraint observationTextValueFk foreign key (observationId) references observation;
-create index validProcedureTimeStartTimeIdx on validProcedureTime (startTime);
-create index validProcedureTimeEndTimeIdx on validProcedureTime (endTime);
-alter table validProcedureTime add constraint validProcedureTimeProcedureFk foreign key (procedureId) references "procedure";
-alter table validProcedureTime add constraint validProcProcDescFormatFk foreign key (procedureDescriptionFormatId) references procedureDescriptionFormat;
-create sequence codespaceId_seq;
-create sequence featureOfInterestId_seq;
-create sequence featureOfInterestTypeId_seq;
-create sequence observablePropertyId_seq;
-create sequence observationConstellationId_seq;
-create sequence observationId_seq;
-create sequence observationTypeId_seq;
-create sequence offeringId_seq;
-create sequence parameterId_seq;
-create sequence procDescFormatId_seq;
-create sequence procedureId_seq;
-create sequence relatedFeatureId_seq;
-create sequence relatedFeatureRoleId_seq;
-create sequence resultTemplateId_seq;
-create sequence spatialFilteringProfileId_seq;
-create sequence unitId_seq;
-create sequence validProcedureTimeId_seq;
\ No newline at end of file
diff --git a/misc/db/PostgreSQL/old/script_20_drop.sql b/misc/db/PostgreSQL/old/script_20_drop.sql
deleted file mode 100644
index 72b62dbe46..0000000000
--- a/misc/db/PostgreSQL/old/script_20_drop.sql
+++ /dev/null
@@ -1,121 +0,0 @@
---
--- Copyright (C) 2012-2014 52°North Initiative for Geospatial Open Source
--- Software GmbH
---
--- This program is free software; you can redistribute it and/or modify it
--- under the terms of the GNU General Public License version 2 as published
--- by the Free Software Foundation.
---
--- If the program is linked with libraries which are licensed under one of
--- the following licenses, the combination of the program with the linked
--- library is not considered a "derivative work" of the program:
---
--- - Apache License, version 2.0
--- - Apache Software License, version 1.0
--- - GNU Lesser General Public License, version 3
--- - Mozilla Public License, versions 1.0, 1.1 and 2.0
--- - Common Development and Distribution License (CDDL), version 1.0
---
--- Therefore the distribution of the program linked with libraries licensed
--- under the aforementioned licenses, is permitted by the copyright holders
--- if the distribution is compliant with both the GNU General Public
--- License version 2 and the aforementioned licenses.
---
--- This program is distributed in the hope that it will be useful, but
--- WITHOUT ANY WARRANTY; without even the implied warranty of
--- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General
--- Public License for more details.
---
-
-alter table blobValue drop constraint observationBlobValueFk;
-alter table booleanValue drop constraint observationBooleanValueFk;
-alter table categoryValue drop constraint observationCategoryValueFk;
-alter table compositePhenomenon drop constraint observablePropertyChildFk;
-alter table compositePhenomenon drop constraint observablePropertyParentFk;
-alter table countValue drop constraint observationCountValueFk;
-alter table featureOfInterest drop constraint featureFeatureTypeFk;
-alter table featureOfInterest drop constraint featureCodespaceFk;
-alter table featureRelation drop constraint featureOfInterestChildFk;
-alter table featureRelation drop constraint featureOfInterestParentFk;
-alter table geometryValue drop constraint observationGeometryValueFk;
-alter table numericValue drop constraint observationNumericValueFk;
-alter table observation drop constraint observationFeatureFk;
-alter table observation drop constraint observationObPropFk;
-alter table observation drop constraint observationProcedureFk;
-alter table observation drop constraint observationCodespaceFk;
-alter table observation drop constraint observationUnitFk;
-alter table observationConstellation drop constraint obsConstObsPropFk;
-alter table observationConstellation drop constraint obsnConstProcedureFk;
-alter table observationConstellation drop constraint obsConstObservationIypeFk;
-alter table observationConstellation drop constraint obsConstOfferingFk;
-alter table observationHasOffering drop constraint observationOfferingFk;
-alter table offeringAllowedFeatureType drop constraint offeringFeatureTypeFk;
-alter table offeringAllowedObservationType drop constraint offeringObservationTypeFk;
-alter table offeringHasRelatedFeature drop constraint relatedFeatureOfferingFk;
-alter table offeringHasRelatedFeature drop constraint offeringRelatedFeatureFk;
-alter table parameter drop constraint parameterObservationFk;
-alter table procedure drop constraint procProcDescFormatFk;
-alter table relatedFeature drop constraint relatedFeatureFeatureFk;
-alter table relatedFeatureHasRole drop constraint relatedFeatRelatedFeatRoleFk;
-alter table relatedFeatureHasRole drop constraint FK5643E7654A79987;
-alter table resultTemplate drop constraint resultTemplateOfferingIdx;
-alter table resultTemplate drop constraint resultTemplateObsPropFk;
-alter table resultTemplate drop constraint resultTemplateProcedureFk;
-alter table resultTemplate drop constraint resultTemplateFeatureIdx;
-alter table sensorSystem drop constraint procedureChildFk;
-alter table sensorSystem drop constraint procedureParenfFk;
-alter table spatialFilteringProfile drop constraint sfpObservationFK;
-alter table sweDataArrayValue drop constraint observationSweDataArrayValueFk;
-alter table textValue drop constraint observationTextValueFk;
-alter table validProcedureTime drop constraint validProcedureTimeProcedureFk;
-alter table validProcedureTime drop constraint validProcProcDescFormatFk;
-drop table if exists blobValue cascade;
-drop table if exists booleanValue cascade;
-drop table if exists categoryValue cascade;
-drop table if exists codespace cascade;
-drop table if exists compositePhenomenon cascade;
-drop table if exists countValue cascade;
-drop table if exists featureOfInterest cascade;
-drop table if exists featureOfInterestType cascade;
-drop table if exists featureRelation cascade;
-drop table if exists geometryValue cascade;
-drop table if exists numericValue cascade;
-drop table if exists observableProperty cascade;
-drop table if exists observation cascade;
-drop table if exists observationConstellation cascade;
-drop table if exists observationHasOffering cascade;
-drop table if exists observationType cascade;
-drop table if exists offering cascade;
-drop table if exists offeringAllowedFeatureType cascade;
-drop table if exists offeringAllowedObservationType cascade;
-drop table if exists offeringHasRelatedFeature cascade;
-drop table if exists parameter cascade;
-drop table if exists procedure cascade;
-drop table if exists procedureDescriptionFormat cascade;
-drop table if exists relatedFeature cascade;
-drop table if exists relatedFeatureHasRole cascade;
-drop table if exists relatedFeatureRole cascade;
-drop table if exists resultTemplate cascade;
-drop table if exists sensorSystem cascade;
-drop table if exists spatialFilteringProfile cascade;
-drop table if exists sweDataArrayValue cascade;
-drop table if exists textValue cascade;
-drop table if exists unit cascade;
-drop table if exists validProcedureTime cascade;
-drop sequence codespaceId_seq;
-drop sequence featureOfInterestId_seq;
-drop sequence featureOfInterestTypeId_seq;
-drop sequence observablePropertyId_seq;
-drop sequence observationConstellationId_seq;
-drop sequence observationId_seq;
-drop sequence observationTypeId_seq;
-drop sequence offeringId_seq;
-drop sequence parameterId_seq;
-drop sequence procDescFormatId_seq;
-drop sequence procedureId_seq;
-drop sequence relatedFeatureId_seq;
-drop sequence relatedFeatureRoleId_seq;
-drop sequence resultTemplateId_seq;
-drop sequence spatialFilteringProfileId_seq;
-drop sequence unitId_seq;
-drop sequence validProcedureTimeId_seq;
\ No newline at end of file
diff --git a/misc/db/PostgreSQL/old/update_obs_add_description.sql b/misc/db/PostgreSQL/old/update_obs_add_description.sql
deleted file mode 100644
index bc14724dfd..0000000000
--- a/misc/db/PostgreSQL/old/update_obs_add_description.sql
+++ /dev/null
@@ -1,30 +0,0 @@
---
--- Copyright (C) 2012-2014 52°North Initiative for Geospatial Open Source
--- Software GmbH
---
--- This program is free software; you can redistribute it and/or modify it
--- under the terms of the GNU General Public License version 2 as published
--- by the Free Software Foundation.
---
--- If the program is linked with libraries which are licensed under one of
--- the following licenses, the combination of the program with the linked
--- library is not considered a "derivative work" of the program:
---
--- - Apache License, version 2.0
--- - Apache Software License, version 1.0
--- - GNU Lesser General Public License, version 3
--- - Mozilla Public License, versions 1.0, 1.1 and 2.0
--- - Common Development and Distribution License (CDDL), version 1.0
---
--- Therefore the distribution of the program linked with libraries licensed
--- under the aforementioned licenses, is permitted by the copyright holders
--- if the distribution is compliant with both the GNU General Public
--- License version 2 and the aforementioned licenses.
---
--- This program is distributed in the hope that it will be useful, but
--- WITHOUT ANY WARRANTY; without even the implied warranty of
--- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General
--- Public License for more details.
---
-
-ALTER TABLE observation ADD COLUMN description character varying(255);
\ No newline at end of file
diff --git a/misc/db/PostgreSQL/series/PG_series_script_20_create.sql b/misc/db/PostgreSQL/series/PG_series_script_20_create.sql
deleted file mode 100644
index 2ebdc420d9..0000000000
--- a/misc/db/PostgreSQL/series/PG_series_script_20_create.sql
+++ /dev/null
@@ -1,148 +0,0 @@
---
--- Copyright (C) 2012-2014 52°North Initiative for Geospatial Open Source
--- Software GmbH
---
--- This program is free software; you can redistribute it and/or modify it
--- under the terms of the GNU General Public License version 2 as published
--- by the Free Software Foundation.
---
--- If the program is linked with libraries which are licensed under one of
--- the following licenses, the combination of the program with the linked
--- library is not considered a "derivative work" of the program:
---
--- - Apache License, version 2.0
--- - Apache Software License, version 1.0
--- - GNU Lesser General Public License, version 3
--- - Mozilla Public License, versions 1.0, 1.1 and 2.0
--- - Common Development and Distribution License (CDDL), version 1.0
---
--- Therefore the distribution of the program linked with libraries licensed
--- under the aforementioned licenses, is permitted by the copyright holders
--- if the distribution is compliant with both the GNU General Public
--- License version 2 and the aforementioned licenses.
---
--- This program is distributed in the hope that it will be useful, but
--- WITHOUT ANY WARRANTY; without even the implied warranty of
--- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General
--- Public License for more details.
---
-
-create table blobValue (observationId int8 not null, value oid, primary key (observationId));
-create table booleanValue (observationId int8 not null, value char(1), primary key (observationId), check (value in ('T','F')));
-create table categoryValue (observationId int8 not null, value varchar(255), primary key (observationId));
-create table codespace (codespaceId int8 not null, codespace varchar(255) not null unique, primary key (codespaceId));
-create table compositePhenomenon (parentObservablePropertyId int8 not null, childObservablePropertyId int8 not null, primary key (childObservablePropertyId, parentObservablePropertyId));
-create table countValue (observationId int8 not null, value int4, primary key (observationId));
-create table featureOfInterest (featureOfInterestId int8 not null, hibernateDiscriminator char(1) not null, featureOfInterestTypeId int8 not null, identifier varchar(255) unique, codespaceId int8, name text, geom GEOMETRY, descriptionXml text, url varchar(255) unique, primary key (featureOfInterestId));
-create table featureOfInterestType (featureOfInterestTypeId int8 not null, featureOfInterestType varchar(255) not null unique, primary key (featureOfInterestTypeId));
-create table featureRelation (parentFeatureId int8 not null, childFeatureId int8 not null, primary key (childFeatureId, parentFeatureId));
-create table geometryValue (observationId int8 not null, value GEOMETRY, primary key (observationId));
-create table numericValue (observationId int8 not null, value numeric(19, 2), primary key (observationId));
-create table observableProperty (observablePropertyId int8 not null, hibernateDiscriminator char(1) not null, identifier varchar(255) not null unique, description varchar(255), disabled char(1) default 'F' not null check (disabled in ('T','F')), primary key (observablePropertyId));
-create table observation (observationId int8 not null, seriesId int8 not null, phenomenonTimeStart timestamp not null, phenomenonTimeEnd timestamp not null, resultTime timestamp not null, identifier varchar(255) unique, codespaceId int8, description varchar(255), deleted char(1) default 'F' not null check (deleted in ('T','F')), validTimeStart timestamp, validTimeEnd timestamp, unitId int8, primary key (observationId), unique (seriesId, phenomenonTimeStart, phenomenonTimeEnd, resultTime));
-create table observationConstellation (observationConstellationId int8 not null, observablePropertyId int8 not null, procedureId int8 not null, observationTypeId int8, offeringId int8 not null, deleted char(1) default 'F' not null check (deleted in ('T','F')), hiddenChild char(1) default 'F' not null check (hiddenChild in ('T','F')), primary key (observationConstellationId), unique (observablePropertyId, procedureId, offeringId));
-create table observationHasOffering (observationId int8 not null, offeringId int8 not null, primary key (observationId, offeringId));
-create table observationType (observationTypeId int8 not null, observationType varchar(255) not null unique, primary key (observationTypeId));
-create table offering (offeringId int8 not null, hibernateDiscriminator char(1) not null, identifier varchar(255) not null unique, name varchar(255), disabled char(1) default 'F' not null check (disabled in ('T','F')), primary key (offeringId));
-create table offeringAllowedFeatureType (offeringId int8 not null, featureOfInterestTypeId int8 not null, primary key (offeringId, featureOfInterestTypeId));
-create table offeringAllowedObservationType (offeringId int8 not null, observationTypeId int8 not null, primary key (offeringId, observationTypeId));
-create table offeringHasRelatedFeature (relatedFeatureId int8 not null, offeringId int8 not null, primary key (offeringId, relatedFeatureId));
-create table parameter (parameterId int8 not null, observationId int8 not null, definition varchar(255) not null, title varchar(255), value oid not null, primary key (parameterId));
-create table "procedure" (procedureId int8 not null, hibernateDiscriminator char(1) not null, procedureDescriptionFormatId int8 not null, identifier varchar(255) not null unique, deleted char(1) default 'F' not null check (deleted in ('T','F')), descriptionFile text, referenceFlag char(1) default 'F' check (referenceFlag in ('T','F')), disabled char(1) default 'F' check (disabled in ('T','F')), primary key (procedureId));
-create table procedureDescriptionFormat (procedureDescriptionFormatId int8 not null, procedureDescriptionFormat varchar(255) not null, primary key (procedureDescriptionFormatId));
-create table relatedFeature (relatedFeatureId int8 not null, featureOfInterestId int8 not null, primary key (relatedFeatureId));
-create table relatedFeatureHasRole (relatedFeatureId int8 not null, relatedFeatureRoleId int8 not null, primary key (relatedFeatureId, relatedFeatureRoleId));
-create table relatedFeatureRole (relatedFeatureRoleId int8 not null, relatedFeatureRole varchar(255) not null unique, primary key (relatedFeatureRoleId));
-create table resultTemplate (resultTemplateId int8 not null, offeringId int8 not null, observablePropertyId int8 not null, procedureId int8 not null, featureOfInterestId int8 not null, identifier varchar(255) not null, resultStructure text not null, resultEncoding text not null, primary key (resultTemplateId));
-create table sensorSystem (parentSensorId int8 not null, childSensorId int8 not null, primary key (childSensorId, parentSensorId));
-create table series (seriesId int8 not null, featureOfInterestId int8 not null, observablePropertyId int8 not null, procedureId int8 not null, deleted char(1) default 'F' not null check (deleted in ('T','F')), firstTimeStamp timestamp, lastTimeStamp timestamp, firstNumericValue numeric(19, 2), lastNumericValue numeric(19, 2), unitId int8, primary key (seriesId), unique (featureOfInterestId, observablePropertyId, procedureId));
-create table spatialFilteringProfile (spatialFilteringProfileId int8 not null, observation int8 not null, definition varchar(255) not null, title varchar(255), geom GEOMETRY not null, primary key (spatialFilteringProfileId));
-create table sweDataArrayValue (observationId int8 not null, value text, primary key (observationId));
-create table textValue (observationId int8 not null, value text, primary key (observationId));
-create table unit (unitId int8 not null, unit varchar(255) not null unique, primary key (unitId));
-create table validProcedureTime (validProcedureTimeId int8 not null, procedureId int8 not null, procedureDescriptionFormatId int8 not null, startTime timestamp not null, endTime timestamp, descriptionXml text not null, primary key (validProcedureTimeId));
-alter table blobValue add constraint observationBlobValueFk foreign key (observationId) references observation;
-alter table booleanValue add constraint observationBooleanValueFk foreign key (observationId) references observation;
-alter table categoryValue add constraint observationCategoryValueFk foreign key (observationId) references observation;
-alter table compositePhenomenon add constraint observablePropertyChildFk foreign key (childObservablePropertyId) references observableProperty;
-alter table compositePhenomenon add constraint observablePropertyParentFk foreign key (parentObservablePropertyId) references observableProperty;
-alter table countValue add constraint observationCountValueFk foreign key (observationId) references observation;
-alter table featureOfInterest add constraint featureFeatureTypeFk foreign key (featureOfInterestTypeId) references featureOfInterestType;
-alter table featureOfInterest add constraint featureCodespaceFk foreign key (codespaceId) references codespace;
-alter table featureRelation add constraint featureOfInterestChildFk foreign key (childFeatureId) references featureOfInterest;
-alter table featureRelation add constraint featureOfInterestParentFk foreign key (parentFeatureId) references featureOfInterest;
-alter table geometryValue add constraint observationGeometryValueFk foreign key (observationId) references observation;
-alter table numericValue add constraint observationNumericValueFk foreign key (observationId) references observation;
-create index obsSeriesIdx on observation (seriesId);
-create index obsPhenTimeStartIdx on observation (phenomenonTimeStart);
-create index obsPhenTimeEndIdx on observation (phenomenonTimeEnd);
-create index obsResultTimeIdx on observation (resultTime);
-create index obsCodespaceIdx on observation (codespaceId);
-alter table observation add constraint observationSeriesFk foreign key (seriesId) references series;
-alter table observation add constraint observationCodespaceFk foreign key (codespaceId) references codespace;
-alter table observation add constraint observationUnitFk foreign key (unitId) references unit;
-create index obsConstObsPropIdx on observationConstellation (observablePropertyId);
-create index obsConstProcedureIdx on observationConstellation (procedureId);
-create index obsConstOfferingIdx on observationConstellation (offeringId);
-alter table observationConstellation add constraint obsConstObsPropFk foreign key (observablePropertyId) references observableProperty;
-alter table observationConstellation add constraint obsnConstProcedureFk foreign key (procedureId) references "procedure";
-alter table observationConstellation add constraint obsConstObservationIypeFk foreign key (observationTypeId) references observationType;
-alter table observationConstellation add constraint obsConstOfferingFk foreign key (offeringId) references offering;
-create index obshasoffobservationidx on observationHasOffering (observationId);
-create index obshasoffofferingidx on observationHasOffering (offeringId);
-alter table observationHasOffering add constraint observationOfferingFk foreign key (offeringId) references offering;
-alter table observationHasOffering add constraint FK7D7608F472D74E7B foreign key (observationId) references observation;
-alter table offeringAllowedFeatureType add constraint offeringFeatureTypeFk foreign key (featureOfInterestTypeId) references featureOfInterestType;
-alter table offeringAllowedFeatureType add constraint FKF68CB72EE4EF3005 foreign key (offeringId) references offering;
-alter table offeringAllowedObservationType add constraint offeringObservationTypeFk foreign key (observationTypeId) references observationType;
-alter table offeringAllowedObservationType add constraint FK28E66A64E4EF3005 foreign key (offeringId) references offering;
-alter table offeringHasRelatedFeature add constraint relatedFeatureOfferingFk foreign key (offeringId) references offering;
-alter table offeringHasRelatedFeature add constraint offeringRelatedFeatureFk foreign key (relatedFeatureId) references relatedFeature;
-alter table parameter add constraint parameterObservationFk foreign key (observationId) references observation;
-alter table "procedure" add constraint procProcDescFormatFk foreign key (procedureDescriptionFormatId) references procedureDescriptionFormat;
-alter table relatedFeature add constraint relatedFeatureFeatureFk foreign key (featureOfInterestId) references featureOfInterest;
-alter table relatedFeatureHasRole add constraint relatedFeatRelatedFeatRoleFk foreign key (relatedFeatureRoleId) references relatedFeatureRole;
-alter table relatedFeatureHasRole add constraint FK5643E7654A79987 foreign key (relatedFeatureId) references relatedFeature;
-create index resultTempOfferingIdx on resultTemplate (offeringId);
-create index resultTempeObsPropIdx on resultTemplate (observablePropertyId);
-create index resultTempProcedureIdx on resultTemplate (procedureId);
-create index resultTempIdentifierIdx on resultTemplate (identifier);
-alter table resultTemplate add constraint resultTemplateOfferingIdx foreign key (offeringId) references offering;
-alter table resultTemplate add constraint resultTemplateObsPropFk foreign key (observablePropertyId) references observableProperty;
-alter table resultTemplate add constraint resultTemplateProcedureFk foreign key (procedureId) references procedure;
-alter table resultTemplate add constraint resultTemplateFeatureIdx foreign key (featureOfInterestId) references featureOfInterest;
-alter table sensorSystem add constraint procedureChildFk foreign key (childSensorId) references procedure;
-alter table sensorSystem add constraint procedureParenfFk foreign key (parentSensorId) references procedure;
-create index seriesFeatureIdx on series (featureOfInterestId);
-create index seriesObsPropIdx on series (observablePropertyId);
-create index seriesProcedureIdx on series (procedureId);
-alter table series add constraint seriesFeatureFk foreign key (featureOfInterestId) references featureOfInterest;
-alter table series add constraint seriesObPropFk foreign key (observablePropertyId) references observableProperty;
-alter table series add constraint seriesProcedureFk foreign key (procedureId) references "procedure";
-alter table series add constraint seriesUnitFk foreign key (unitId) references unit;
-create index sfpObservationIdx on spatialFilteringProfile (observation);
-alter table spatialFilteringProfile add constraint sfpObservationFK foreign key (observation) references observation;
-alter table sweDataArrayValue add constraint observationSweDataArrayValueFk foreign key (observationId) references observation;
-alter table textValue add constraint observationTextValueFk foreign key (observationId) references observation;
-create index validProcedureTimeStartTimeIdx on validProcedureTime (startTime);
-create index validProcedureTimeEndTimeIdx on validProcedureTime (endTime);
-alter table validProcedureTime add constraint validProcedureTimeProcedureFk foreign key (procedureId) references "procedure";
-alter table validProcedureTime add constraint validProcProcDescFormatFk foreign key (procedureDescriptionFormatId) references procedureDescriptionFormat;
-create sequence codespaceId_seq;
-create sequence featureOfInterestId_seq;
-create sequence featureOfInterestTypeId_seq;
-create sequence observablePropertyId_seq;
-create sequence observationConstellationId_seq;
-create sequence observationId_seq;
-create sequence observationTypeId_seq;
-create sequence offeringId_seq;
-create sequence parameterId_seq;
-create sequence procDescFormatId_seq;
-create sequence procedureId_seq;
-create sequence relatedFeatureId_seq;
-create sequence relatedFeatureRoleId_seq;
-create sequence resultTemplateId_seq;
-create sequence seriesId_seq;
-create sequence spatialFilteringProfileId_seq;
-create sequence unitId_seq;
-create sequence validProcedureTimeId_seq;
\ No newline at end of file
diff --git a/misc/db/PostgreSQL/series/PG_series_script_20_drop.sql b/misc/db/PostgreSQL/series/PG_series_script_20_drop.sql
deleted file mode 100644
index 481679df45..0000000000
--- a/misc/db/PostgreSQL/series/PG_series_script_20_drop.sql
+++ /dev/null
@@ -1,121 +0,0 @@
---
--- Copyright (C) 2012-2014 52°North Initiative for Geospatial Open Source
--- Software GmbH
---
--- This program is free software; you can redistribute it and/or modify it
--- under the terms of the GNU General Public License version 2 as published
--- by the Free Software Foundation.
---
--- If the program is linked with libraries which are licensed under one of
--- the following licenses, the combination of the program with the linked
--- library is not considered a "derivative work" of the program:
---
--- - Apache License, version 2.0
--- - Apache Software License, version 1.0
--- - GNU Lesser General Public License, version 3
--- - Mozilla Public License, versions 1.0, 1.1 and 2.0
--- - Common Development and Distribution License (CDDL), version 1.0
---
--- Therefore the distribution of the program linked with libraries licensed
--- under the aforementioned licenses, is permitted by the copyright holders
--- if the distribution is compliant with both the GNU General Public
--- License version 2 and the aforementioned licenses.
---
--- This program is distributed in the hope that it will be useful, but
--- WITHOUT ANY WARRANTY; without even the implied warranty of
--- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General
--- Public License for more details.
---
-
-alter table blobValue drop constraint observationBlobValueFk;
-alter table booleanValue drop constraint observationBooleanValueFk;
-alter table categoryValue drop constraint observationCategoryValueFk;
-alter table compositePhenomenon drop constraint observablePropertyChildFk;
-alter table compositePhenomenon drop constraint observablePropertyParentFk;
-alter table countValue drop constraint observationCountValueFk;
-alter table featureOfInterest drop constraint featureFeatureTypeFk;
-alter table featureOfInterest drop constraint featureCodespaceFk;
-alter table featureRelation drop constraint featureOfInterestChildFk;
-alter table featureRelation drop constraint featureOfInterestParentFk;
-alter table geometryValue drop constraint observationGeometryValueFk;
-alter table numericValue drop constraint observationNumericValueFk;
-alter table observation drop constraint observationSeriesFk;
-alter table observation drop constraint observationCodespaceFk;
-alter table observation drop constraint observationUnitFk;
-alter table observationConstellation drop constraint obsConstObsPropFk;
-alter table observationConstellation drop constraint obsnConstProcedureFk;
-alter table observationConstellation drop constraint obsConstObservationIypeFk;
-alter table observationConstellation drop constraint obsConstOfferingFk;
-alter table observationHasOffering drop constraint observationOfferingFk;
-alter table offeringAllowedFeatureType drop constraint offeringFeatureTypeFk;
-alter table offeringAllowedObservationType drop constraint offeringObservationTypeFk;
-alter table offeringHasRelatedFeature drop constraint relatedFeatureOfferingFk;
-alter table offeringHasRelatedFeature drop constraint offeringRelatedFeatureFk;
-alter table parameter drop constraint parameterObservationFk;
-alter table procedure drop constraint procProcDescFormatFk;
-alter table relatedFeature drop constraint relatedFeatureFeatureFk;
-alter table relatedFeatureHasRole drop constraint relatedFeatRelatedFeatRoleFk;
-alter table relatedFeatureHasRole drop constraint FK5643E7654A79987;
-alter table resultTemplate drop constraint resultTemplateOfferingIdx;
-alter table resultTemplate drop constraint resultTemplateObsPropFk;
-alter table resultTemplate drop constraint resultTemplateProcedureFk;
-alter table resultTemplate drop constraint resultTemplateFeatureIdx;
-alter table sensorSystem drop constraint procedureChildFk;
-alter table sensorSystem drop constraint procedureParenfFk;
-alter table spatialFilteringProfile drop constraint sfpObservationFK;
-alter table sweDataArrayValue drop constraint observationSweDataArrayValueFk;
-alter table textValue drop constraint observationTextValueFk;
-alter table validProcedureTime drop constraint validProcedureTimeProcedureFk;
-alter table validProcedureTime drop constraint validProcProcDescFormatFk;
-drop table if exists blobValue cascade;
-drop table if exists booleanValue cascade;
-drop table if exists categoryValue cascade;
-drop table if exists codespace cascade;
-drop table if exists compositePhenomenon cascade;
-drop table if exists countValue cascade;
-drop table if exists featureOfInterest cascade;
-drop table if exists featureOfInterestType cascade;
-drop table if exists featureRelation cascade;
-drop table if exists geometryValue cascade;
-drop table if exists numericValue cascade;
-drop table if exists observableProperty cascade;
-drop table if exists observation cascade;
-drop table if exists observationConstellation cascade;
-drop table if exists observationHasOffering cascade;
-drop table if exists observationType cascade;
-drop table if exists offering cascade;
-drop table if exists offeringAllowedFeatureType cascade;
-drop table if exists offeringAllowedObservationType cascade;
-drop table if exists offeringHasRelatedFeature cascade;
-drop table if exists parameter cascade;
-drop table if exists procedure cascade;
-drop table if exists procedureDescriptionFormat cascade;
-drop table if exists relatedFeature cascade;
-drop table if exists relatedFeatureHasRole cascade;
-drop table if exists relatedFeatureRole cascade;
-drop table if exists resultTemplate cascade;
-drop table if exists sensorSystem cascade;
-drop table if exists series cascade;
-drop table if exists spatialFilteringProfile cascade;
-drop table if exists sweDataArrayValue cascade;
-drop table if exists textValue cascade;
-drop table if exists unit cascade;
-drop table if exists validProcedureTime cascade;
-drop sequence codespaceId_seq;
-drop sequence featureOfInterestId_seq;
-drop sequence featureOfInterestTypeId_seq;
-drop sequence observablePropertyId_seq;
-drop sequence observationConstellationId_seq;
-drop sequence observationId_seq;
-drop sequence observationTypeId_seq;
-drop sequence offeringId_seq;
-drop sequence parameterId_seq;
-drop sequence procDescFormatId_seq;
-drop sequence procedureId_seq;
-drop sequence relatedFeatureId_seq;
-drop sequence relatedFeatureRoleId_seq;
-drop sequence resultTemplateId_seq;
-drop sequence seriesid_seq;
-drop sequence spatialFilteringProfileId_seq;
-drop sequence unitId_seq;
-drop sequence validProcedureTimeId_seq;
\ No newline at end of file
diff --git a/misc/db/PostgreSQL/series/PG_update_401_to_402.sql b/misc/db/PostgreSQL/series/PG_update_401_to_402.sql
deleted file mode 100644
index 40841d832c..0000000000
--- a/misc/db/PostgreSQL/series/PG_update_401_to_402.sql
+++ /dev/null
@@ -1,38 +0,0 @@
---
--- Copyright (C) 2012-2014 52°North Initiative for Geospatial Open Source
--- Software GmbH
---
--- This program is free software; you can redistribute it and/or modify it
--- under the terms of the GNU General Public License version 2 as published
--- by the Free Software Foundation.
---
--- If the program is linked with libraries which are licensed under one of
--- the following licenses, the combination of the program with the linked
--- library is not considered a "derivative work" of the program:
---
--- - Apache License, version 2.0
--- - Apache Software License, version 1.0
--- - GNU Lesser General Public License, version 3
--- - Mozilla Public License, versions 1.0, 1.1 and 2.0
--- - Common Development and Distribution License (CDDL), version 1.0
---
--- Therefore the distribution of the program linked with libraries licensed
--- under the aforementioned licenses, is permitted by the copyright holders
--- if the distribution is compliant with both the GNU General Public
--- License version 2 and the aforementioned licenses.
---
--- This program is distributed in the hope that it will be useful, but
--- WITHOUT ANY WARRANTY; without even the implied warranty of
--- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General
--- Public License for more details.
---
-
-ALTER TABLE series ADD COLUMN firstTimeStamp timestamp;
-ALTER TABLE series ADD COLUMN lastTimeStamp timestamp;
-ALTER TABLE series ADD COLUMN firstNumericValue numeric(19, 2);
-ALTER TABLE series ADD COLUMN lastNumericValue numeric(19, 2);
-ALTER TABLE series ADD COLUMN unitId int8;
-
-alter table series add constraint seriesUnitFk foreign key (unitId) references unit;
-
-ALTER TABLE procedure ADD COLUMN referenceFlag char(1) default 'F' check (referenceFlag in ('T','F'));
\ No newline at end of file
diff --git a/misc/db/update_beta2_to_rc1.sql b/misc/db/update_beta2_to_rc1.sql
deleted file mode 100644
index 5897669543..0000000000
--- a/misc/db/update_beta2_to_rc1.sql
+++ /dev/null
@@ -1,30 +0,0 @@
---
--- Copyright (C) 2012-2014 52°North Initiative for Geospatial Open Source
--- Software GmbH
---
--- This program is free software; you can redistribute it and/or modify it
--- under the terms of the GNU General Public License version 2 as published
--- by the Free Software Foundation.
---
--- If the program is linked with libraries which are licensed under one of
--- the following licenses, the combination of the program with the linked
--- library is not considered a "derivative work" of the program:
---
--- - Apache License, version 2.0
--- - Apache Software License, version 1.0
--- - GNU Lesser General Public License, version 3
--- - Mozilla Public License, versions 1.0, 1.1 and 2.0
--- - Common Development and Distribution License (CDDL), version 1.0
---
--- Therefore the distribution of the program linked with libraries licensed
--- under the aforementioned licenses, is permitted by the copyright holders
--- if the distribution is compliant with both the GNU General Public
--- License version 2 and the aforementioned licenses.
---
--- This program is distributed in the hope that it will be useful, but
--- WITHOUT ANY WARRANTY; without even the implied warranty of
--- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General
--- Public License for more details.
---
-
-ALTER TABLE featureOfInterest RENAME COLUMN names TO name;
\ No newline at end of file
From 2a059602485c2b8a8e3d6f4122e481c47e141b88 Mon Sep 17 00:00:00 2001
From: CarstenHollmann
Date: Wed, 13 Aug 2014 10:24:23 +0200
Subject: [PATCH 195/229] Add/update SQL scripts
---
misc/db/MySQL/old/MySQL_update_40_to_41.sql | 32 ++++
.../series/MySQL_convert_old_to_series.sql | 5 +-
.../series/MySQL_series_clear_script.sql | 1 -
.../series/MySQL_series_create_script.sql | 135 ++++++++--------
.../MySQL/series/MySQL_series_drop_script.sql | 47 +-----
...pdate_spatialfilteringprofile_handling.sql | 6 +-
misc/db/Oracle/old/Oracle_update_40_to_41.sql | 32 ++++
.../series/Oracle_convert_old_to_series.sql | 6 +-
.../series/Oracle_series_clear_script.sql | 5 +-
.../series/Oracle_series_create_script.sql | 130 +++++++++-------
.../series/Oracle_series_drop_script.sql | 6 +-
...pdate_spatialfilteringprofile_handling.sql | 6 +-
misc/db/PostgreSQL/old/clear_database.sql | 3 +-
misc/db/PostgreSQL/old/update_40_to_41.sql | 32 ++++
.../series/PG_convert_old_to_series.sql | 11 +-
.../series/PG_series_clear_database.sql | 3 +-
...pdate_spatialfilteringprofile_handling.sql | 8 +-
.../series/SqlServer_series_create_script.sql | 147 ++++++++++++++++++
.../series/SqlServer_series_drop_script.sql | 62 ++++++++
...pdate_spatialfilteringprofile_handling.sql | 2 +
20 files changed, 483 insertions(+), 196 deletions(-)
create mode 100644 misc/db/MySQL/old/MySQL_update_40_to_41.sql
create mode 100644 misc/db/Oracle/old/Oracle_update_40_to_41.sql
create mode 100644 misc/db/PostgreSQL/old/update_40_to_41.sql
create mode 100644 misc/db/SqlServer/series/SqlServer_series_create_script.sql
create mode 100644 misc/db/SqlServer/series/SqlServer_series_drop_script.sql
diff --git a/misc/db/MySQL/old/MySQL_update_40_to_41.sql b/misc/db/MySQL/old/MySQL_update_40_to_41.sql
new file mode 100644
index 0000000000..6b0a36a0b4
--- /dev/null
+++ b/misc/db/MySQL/old/MySQL_update_40_to_41.sql
@@ -0,0 +1,32 @@
+--
+-- Copyright (C) 2012-2014 52°North Initiative for Geospatial Open Source
+-- Software GmbH
+--
+-- This program is free software; you can redistribute it and/or modify it
+-- under the terms of the GNU General Public License version 2 as published
+-- by the Free Software Foundation.
+--
+-- If the program is linked with libraries which are licensed under one of
+-- the following licenses, the combination of the program with the linked
+-- library is not considered a "derivative work" of the program:
+--
+-- - Apache License, version 2.0
+-- - Apache Software License, version 1.0
+-- - GNU Lesser General Public License, version 3
+-- - Mozilla Public License, versions 1.0, 1.1 and 2.0
+-- - Common Development and Distribution License (CDDL), version 1.0
+--
+-- Therefore the distribution of the program linked with libraries licensed
+-- under the aforementioned licenses, is permitted by the copyright holders
+-- if the distribution is compliant with both the GNU General Public
+-- License version 2 and the aforementioned licenses.
+--
+-- This program is distributed in the hope that it will be useful, but
+-- WITHOUT ANY WARRANTY; without even the implied warranty of
+-- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General
+-- Public License for more details.
+--
+
+ALTER TABLE `procedure` ADD COLUMN referenceFlag char(1) default 'F';
+
+ALTER TABLE observation ADD COLUMN samplingGeometry GEOMETRY;
\ No newline at end of file
diff --git a/misc/db/MySQL/series/MySQL_convert_old_to_series.sql b/misc/db/MySQL/series/MySQL_convert_old_to_series.sql
index a21f68ab62..3f0db7cc71 100644
--- a/misc/db/MySQL/series/MySQL_convert_old_to_series.sql
+++ b/misc/db/MySQL/series/MySQL_convert_old_to_series.sql
@@ -32,13 +32,14 @@
-- ###############################################################################################
-- create series table and sequence add constraints to series
-create table series (seriesId bigint not null auto_increment, featureOfInterestId bigint not null, observablePropertyId bigint not null, procedureId bigint not null, deleted char(1) default 'F' not null, primary key (seriesId), unique (featureOfInterestId, observablePropertyId, procedureId)) ENGINE=InnoDB;
+create table series (seriesId bigint not null auto_increment, featureOfInterestId bigint not null, observablePropertyId bigint not null, procedureId bigint not null, deleted char(1) default 'F' not null, firstTimeStamp datetime, lastTimeStamp datetime, firstNumericValue decimal(19,2), lastNumericValue decimal(19,2), unitId bigint, primary key (seriesId)) ENGINE=InnoDB;
create index seriesFeatureIdx on series (featureOfInterestId);
create index seriesObsPropIdx on series (observablePropertyId);
create index seriesProcedureIdx on series (procedureId);
alter table series add index seriesFeatureFk (featureOfInterestId), add constraint seriesFeatureFk foreign key (featureOfInterestId) references featureOfInterest (featureOfInterestId);
alter table series add index seriesObPropFk (observablePropertyId), add constraint seriesObPropFk foreign key (observablePropertyId) references observableProperty (observablePropertyId);
alter table series add index seriesProcedureFk (procedureId), add constraint seriesProcedureFk foreign key (procedureId) references `procedure` (procedureId);
+alter table series add index seriesUnitFk (unitId), add constraint seriesUnitFk foreign key (unitId) references unit (unitId);
-- add series column to observation table
ALTER TABLE observation ADD COLUMN seriesId int8;
@@ -64,4 +65,4 @@ alter table observation drop foreign key observationProcedureFk;
ALTER TABLE observation DROP INDEX featureofinterestid;
ALTER TABLE observation DROP COLUMN featureofinterestid;
ALTER TABLE observation DROP COLUMN observablepropertyid;
-ALTER TABLE observation DROP COLUMN procedureid;
\ No newline at end of file
+ALTER TABLE observation DROP COLUMN procedureid;
diff --git a/misc/db/MySQL/series/MySQL_series_clear_script.sql b/misc/db/MySQL/series/MySQL_series_clear_script.sql
index 9ce94a217a..5586c9e0f0 100644
--- a/misc/db/MySQL/series/MySQL_series_clear_script.sql
+++ b/misc/db/MySQL/series/MySQL_series_clear_script.sql
@@ -46,7 +46,6 @@ TRUNCATE TABLE relatedFeatureRole;
TRUNCATE TABLE resultTemplate;
TRUNCATE TABLE offering;
TRUNCATE TABLE sensorSystem;
-TRUNCATE TABLE spatialfilteringprofile;
TRUNCATE TABLE parameter;
TRUNCATE TABLE observation;
TRUNCATE TABLE observableProperty;
diff --git a/misc/db/MySQL/series/MySQL_series_create_script.sql b/misc/db/MySQL/series/MySQL_series_create_script.sql
index 6beec7632a..1e27ef5b7d 100644
--- a/misc/db/MySQL/series/MySQL_series_create_script.sql
+++ b/misc/db/MySQL/series/MySQL_series_create_script.sql
@@ -27,104 +27,115 @@
-- Public License for more details.
--
+create table `procedure` (procedureId bigint not null auto_increment, hibernateDiscriminator char(1) not null, procedureDescriptionFormatId bigint not null, identifier varchar(255) not null, deleted char(1) default 'F' not null, descriptionFile longtext, referenceFlag char(1) default 'F', primary key (procedureId)) ENGINE=InnoDB;
create table blobValue (observationId bigint not null, value longblob, primary key (observationId)) ENGINE=InnoDB;
-create table booleanValue (observationId bigint not null, value char(1), primary key (observationId), check (value in ('T','F'))) ENGINE=InnoDB;
+create table booleanValue (observationId bigint not null, value char(1), primary key (observationId), check (value in ('T','F')), check (value in ('T','F'))) ENGINE=InnoDB;
create table categoryValue (observationId bigint not null, value varchar(255), primary key (observationId)) ENGINE=InnoDB;
-create table codespace (codespaceId bigint not null auto_increment, codespace varchar(255) not null unique, primary key (codespaceId)) ENGINE=InnoDB;
+create table codespace (codespaceId bigint not null auto_increment, codespace varchar(255) not null, primary key (codespaceId)) ENGINE=InnoDB;
create table compositePhenomenon (parentObservablePropertyId bigint not null, childObservablePropertyId bigint not null, primary key (childObservablePropertyId, parentObservablePropertyId)) ENGINE=InnoDB;
create table countValue (observationId bigint not null, value integer, primary key (observationId)) ENGINE=InnoDB;
-create table featureOfInterest (featureOfInterestId bigint not null auto_increment, hibernateDiscriminator char(1) not null, featureOfInterestTypeId bigint not null, identifier varchar(255) unique, codespaceId bigint, name longtext, geom GEOMETRY, descriptionXml longtext, url varchar(255) unique, primary key (featureOfInterestId)) ENGINE=InnoDB;
-create table featureOfInterestType (featureOfInterestTypeId bigint not null auto_increment, featureOfInterestType varchar(255) not null unique, primary key (featureOfInterestTypeId)) ENGINE=InnoDB;
+create table featureOfInterest (featureOfInterestId bigint not null auto_increment, hibernateDiscriminator char(1) not null, featureOfInterestTypeId bigint not null, identifier varchar(255), codespaceId bigint, name longtext, geom GEOMETRY, descriptionXml longtext, url varchar(255), primary key (featureOfInterestId)) ENGINE=InnoDB;
+create table featureOfInterestType (featureOfInterestTypeId bigint not null auto_increment, featureOfInterestType varchar(255) not null, primary key (featureOfInterestTypeId)) ENGINE=InnoDB;
create table featureRelation (parentFeatureId bigint not null, childFeatureId bigint not null, primary key (childFeatureId, parentFeatureId)) ENGINE=InnoDB;
create table geometryValue (observationId bigint not null, value GEOMETRY, primary key (observationId)) ENGINE=InnoDB;
create table numericValue (observationId bigint not null, value decimal(19,2), primary key (observationId)) ENGINE=InnoDB;
-create table observableProperty (observablePropertyId bigint not null auto_increment, hibernateDiscriminator char(1) not null, identifier varchar(255) not null unique, description varchar(255), disabled char(1) not null default 'F', primary key (observablePropertyId), check (disabled in ('T','F'))) ENGINE=InnoDB;
-create table observation (observationId bigint not null auto_increment, seriesId bigint not null, phenomenonTimeStart datetime not null, phenomenonTimeEnd datetime not null, resultTime datetime not null, identifier varchar(255) unique, codespaceId bigint, description varchar(255), deleted char(1) default 'F' not null, validTimeStart datetime, validTimeEnd datetime, unitId bigint, primary key (observationId), unique (seriesId, phenomenonTimeStart, phenomenonTimeEnd, resultTime)) ENGINE=InnoDB;
-create table observationConstellation (observationConstellationId bigint not null auto_increment, observablePropertyId bigint not null, procedureId bigint not null, observationTypeId bigint, offeringId bigint not null, deleted char(1) default 'F' not null, hiddenChild char(1) default 'F' not null, primary key (observationConstellationId), unique (observablePropertyId, procedureId, offeringId)) ENGINE=InnoDB;
+create table observableProperty (observablePropertyId bigint not null auto_increment, hibernateDiscriminator char(1) not null, identifier varchar(255) not null, description varchar(255), primary key (observablePropertyId)) ENGINE=InnoDB;
+create table observation (observationId bigint not null auto_increment, seriesId bigint not null, phenomenonTimeStart datetime not null, phenomenonTimeEnd datetime not null, resultTime datetime not null, identifier varchar(255), codespaceId bigint, description varchar(255), deleted char(1) default 'F' not null, validTimeStart datetime, validTimeEnd datetime, unitId bigint, samplingGeometry GEOMETRY, primary key (observationId)) ENGINE=InnoDB;
+create table observationConstellation (observationConstellationId bigint not null auto_increment, observablePropertyId bigint not null, procedureId bigint not null, observationTypeId bigint, offeringId bigint not null, deleted char(1) default 'F' not null, hiddenChild char(1) default 'F' not null, primary key (observationConstellationId)) ENGINE=InnoDB;
create table observationHasOffering (observationId bigint not null, offeringId bigint not null, primary key (observationId, offeringId)) ENGINE=InnoDB;
-create table observationType (observationTypeId bigint not null auto_increment, observationType varchar(255) not null unique, primary key (observationTypeId)) ENGINE=InnoDB;
-create table offering (offeringId bigint not null auto_increment, hibernateDiscriminator char(1) not null, identifier varchar(255) not null unique, name varchar(255), disabled char(1) not null default 'F', primary key (offeringId), check (disabled in ('T','F'))) ENGINE=InnoDB;
+create table observationType (observationTypeId bigint not null auto_increment, observationType varchar(255) not null, primary key (observationTypeId)) ENGINE=InnoDB;
+create table offering (offeringId bigint not null auto_increment, hibernateDiscriminator char(1) not null, identifier varchar(255) not null, name varchar(255), primary key (offeringId)) ENGINE=InnoDB;
create table offeringAllowedFeatureType (offeringId bigint not null, featureOfInterestTypeId bigint not null, primary key (offeringId, featureOfInterestTypeId)) ENGINE=InnoDB;
create table offeringAllowedObservationType (offeringId bigint not null, observationTypeId bigint not null, primary key (offeringId, observationTypeId)) ENGINE=InnoDB;
create table offeringHasRelatedFeature (relatedFeatureId bigint not null, offeringId bigint not null, primary key (offeringId, relatedFeatureId)) ENGINE=InnoDB;
create table parameter (parameterId bigint not null auto_increment, observationId bigint not null, definition varchar(255) not null, title varchar(255), value longblob not null, primary key (parameterId)) ENGINE=InnoDB;
-create table `procedure` (procedureId bigint not null auto_increment, hibernateDiscriminator char(1) not null, procedureDescriptionFormatId bigint not null, identifier varchar(255) not null unique, deleted char(1) default 'F' not null, descriptionFile longtext, disabled char(1) not null default 'F', primary key (procedureId), referenceFlag char(1) default 'F', primary key (procedureId), check (disabled in ('T','F'))) ENGINE=InnoDB;
create table procedureDescriptionFormat (procedureDescriptionFormatId bigint not null auto_increment, procedureDescriptionFormat varchar(255) not null, primary key (procedureDescriptionFormatId)) ENGINE=InnoDB;
create table relatedFeature (relatedFeatureId bigint not null auto_increment, featureOfInterestId bigint not null, primary key (relatedFeatureId)) ENGINE=InnoDB;
create table relatedFeatureHasRole (relatedFeatureId bigint not null, relatedFeatureRoleId bigint not null, primary key (relatedFeatureId, relatedFeatureRoleId)) ENGINE=InnoDB;
-create table relatedFeatureRole (relatedFeatureRoleId bigint not null auto_increment, relatedFeatureRole varchar(255) not null unique, primary key (relatedFeatureRoleId)) ENGINE=InnoDB;
+create table relatedFeatureRole (relatedFeatureRoleId bigint not null auto_increment, relatedFeatureRole varchar(255) not null, primary key (relatedFeatureRoleId)) ENGINE=InnoDB;
create table resultTemplate (resultTemplateId bigint not null auto_increment, offeringId bigint not null, observablePropertyId bigint not null, procedureId bigint not null, featureOfInterestId bigint not null, identifier varchar(255) not null, resultStructure longtext not null, resultEncoding longtext not null, primary key (resultTemplateId)) ENGINE=InnoDB;
create table sensorSystem (parentSensorId bigint not null, childSensorId bigint not null, primary key (childSensorId, parentSensorId)) ENGINE=InnoDB;
-create table series (seriesId bigint not null auto_increment, featureOfInterestId bigint not null, observablePropertyId bigint not null, procedureId bigint not null, deleted char(1) default 'F' not null, firstTimeStamp datetime, lastTimeStamp datetime, firstNumericValue decimal(19,2), lastNumericValue decimal(19,2), unitId bigint, primary key (seriesId), unique (featureOfInterestId, observablePropertyId, procedureId)) ENGINE=InnoDB;
-create table spatialFilteringProfile (spatialFilteringProfileId bigint not null auto_increment, observation bigint not null, definition varchar(255) not null, title varchar(255), geom GEOMETRY not null, primary key (spatialFilteringProfileId)) ENGINE=InnoDB;
+create table series (seriesId bigint not null auto_increment, featureOfInterestId bigint not null, observablePropertyId bigint not null, procedureId bigint not null, deleted char(1) default 'F' not null, firstTimeStamp datetime, lastTimeStamp datetime, firstNumericValue decimal(19,2), lastNumericValue decimal(19,2), unitId bigint, primary key (seriesId)) ENGINE=InnoDB;
create table sweDataArrayValue (observationId bigint not null, value longtext, primary key (observationId)) ENGINE=InnoDB;
create table textValue (observationId bigint not null, value longtext, primary key (observationId)) ENGINE=InnoDB;
-create table unit (unitId bigint not null auto_increment, unit varchar(255) not null unique, primary key (unitId)) ENGINE=InnoDB;
+create table unit (unitId bigint not null auto_increment, unit varchar(255) not null, primary key (unitId)) ENGINE=InnoDB;
create table validProcedureTime (validProcedureTimeId bigint not null auto_increment, procedureId bigint not null, procedureDescriptionFormatId bigint not null, startTime datetime not null, endTime datetime, descriptionXml longtext not null, primary key (validProcedureTimeId)) ENGINE=InnoDB;
-alter table blobValue add index observationBlobValueFk (observationId), add constraint observationBlobValueFk foreign key (observationId) references observation (observationId);
-alter table booleanValue add index observationBooleanValueFk (observationId), add constraint observationBooleanValueFk foreign key (observationId) references observation (observationId);
-alter table categoryValue add index observationCategoryValueFk (observationId), add constraint observationCategoryValueFk foreign key (observationId) references observation (observationId);
-alter table compositePhenomenon add index observablePropertyChildFk (childObservablePropertyId), add constraint observablePropertyChildFk foreign key (childObservablePropertyId) references observableProperty (observablePropertyId);
-alter table compositePhenomenon add index observablePropertyParentFk (parentObservablePropertyId), add constraint observablePropertyParentFk foreign key (parentObservablePropertyId) references observableProperty (observablePropertyId);
-alter table countValue add index observationCountValueFk (observationId), add constraint observationCountValueFk foreign key (observationId) references observation (observationId);
-alter table featureOfInterest add index featureFeatureTypeFk (featureOfInterestTypeId), add constraint featureFeatureTypeFk foreign key (featureOfInterestTypeId) references featureOfInterestType (featureOfInterestTypeId);
-alter table featureOfInterest add index featureCodespaceFk (codespaceId), add constraint featureCodespaceFk foreign key (codespaceId) references codespace (codespaceId);
-alter table featureRelation add index featureOfInterestChildFk (childFeatureId), add constraint featureOfInterestChildFk foreign key (childFeatureId) references featureOfInterest (featureOfInterestId);
-alter table featureRelation add index featureOfInterestParentFk (parentFeatureId), add constraint featureOfInterestParentFk foreign key (parentFeatureId) references featureOfInterest (featureOfInterestId);
-alter table geometryValue add index observationGeometryValueFk (observationId), add constraint observationGeometryValueFk foreign key (observationId) references observation (observationId);
-alter table numericValue add index observationNumericValueFk (observationId), add constraint observationNumericValueFk foreign key (observationId) references observation (observationId);
+alter table `procedure` add constraint procIdentifierUK unique (identifier);
+alter table codespace add constraint codespaceUK unique (codespace);
+alter table featureOfInterest add constraint foiIdentifierUK unique (identifier);
+alter table featureOfInterest add constraint obsUrl unique (url);
+alter table featureOfInterestType add constraint featureTypeUK unique (featureOfInterestType);
+alter table observableProperty add constraint obsPropIdentifierUK unique (identifier);
+alter table observation add constraint observationIdentity unique (seriesId, phenomenonTimeStart, phenomenonTimeEnd, resultTime);
+alter table observation add constraint obsIdentifierUK unique (identifier);
create index obsSeriesIdx on observation (seriesId);
create index obsPhenTimeStartIdx on observation (phenomenonTimeStart);
create index obsPhenTimeEndIdx on observation (phenomenonTimeEnd);
create index obsResultTimeIdx on observation (resultTime);
create index obsCodespaceIdx on observation (codespaceId);
-alter table observation add index observationSeriesFk (seriesId), add constraint observationSeriesFk foreign key (seriesId) references series (seriesId);
-alter table observation add index observationCodespaceFk (codespaceId), add constraint observationCodespaceFk foreign key (codespaceId) references codespace (codespaceId);
-alter table observation add index observationUnitFk (unitId), add constraint observationUnitFk foreign key (unitId) references unit (unitId);
+alter table observationConstellation add constraint obsnConstellationIdentity unique (observablePropertyId, procedureId, offeringId);
create index obsConstObsPropIdx on observationConstellation (observablePropertyId);
create index obsConstProcedureIdx on observationConstellation (procedureId);
create index obsConstOfferingIdx on observationConstellation (offeringId);
-alter table observationConstellation add index obsConstObsPropFk (observablePropertyId), add constraint obsConstObsPropFk foreign key (observablePropertyId) references observableProperty (observablePropertyId);
-alter table observationConstellation add index obsnConstProcedureFk (procedureId), add constraint obsnConstProcedureFk foreign key (procedureId) references `procedure` (procedureId);
-alter table observationConstellation add index obsConstObservationIypeFk (observationTypeId), add constraint obsConstObservationIypeFk foreign key (observationTypeId) references observationType (observationTypeId);
-alter table observationConstellation add index obsConstOfferingFk (offeringId), add constraint obsConstOfferingFk foreign key (offeringId) references offering (offeringId);
create index obshasoffobservationidx on observationHasOffering (observationId);
create index obshasoffofferingidx on observationHasOffering (offeringId);
-alter table observationHasOffering add index observationOfferingFk (offeringId), add constraint observationOfferingFk foreign key (offeringId) references offering (offeringId);
-alter table observationHasOffering add index FK7D7608F472D74E7B (observationId), add constraint FK7D7608F472D74E7B foreign key (observationId) references observation (observationId);
-alter table offeringAllowedFeatureType add index offeringFeatureTypeFk (featureOfInterestTypeId), add constraint offeringFeatureTypeFk foreign key (featureOfInterestTypeId) references featureOfInterestType (featureOfInterestTypeId);
-alter table offeringAllowedFeatureType add index FKF68CB72EE4EF3005 (offeringId), add constraint FKF68CB72EE4EF3005 foreign key (offeringId) references offering (offeringId);
-alter table offeringAllowedObservationType add index offeringObservationTypeFk (observationTypeId), add constraint offeringObservationTypeFk foreign key (observationTypeId) references observationType (observationTypeId);
-alter table offeringAllowedObservationType add index FK28E66A64E4EF3005 (offeringId), add constraint FK28E66A64E4EF3005 foreign key (offeringId) references offering (offeringId);
-alter table offeringHasRelatedFeature add index relatedFeatureOfferingFk (offeringId), add constraint relatedFeatureOfferingFk foreign key (offeringId) references offering (offeringId);
-alter table offeringHasRelatedFeature add index offeringRelatedFeatureFk (relatedFeatureId), add constraint offeringRelatedFeatureFk foreign key (relatedFeatureId) references relatedFeature (relatedFeatureId);
-alter table parameter add index parameterObservationFk (observationId), add constraint parameterObservationFk foreign key (observationId) references observation (observationId);
-alter table `procedure` add index procProcDescFormatFk (procedureDescriptionFormatId), add constraint procProcDescFormatFk foreign key (procedureDescriptionFormatId) references procedureDescriptionFormat (procedureDescriptionFormatId);
-alter table relatedFeature add index relatedFeatureFeatureFk (featureOfInterestId), add constraint relatedFeatureFeatureFk foreign key (featureOfInterestId) references featureOfInterest (featureOfInterestId);
-alter table relatedFeatureHasRole add index relatedFeatRelatedFeatRoleFk (relatedFeatureRoleId), add constraint relatedFeatRelatedFeatRoleFk foreign key (relatedFeatureRoleId) references relatedFeatureRole (relatedFeatureRoleId);
-alter table relatedFeatureHasRole add index FK5643E7654A79987 (relatedFeatureId), add constraint FK5643E7654A79987 foreign key (relatedFeatureId) references relatedFeature (relatedFeatureId);
+alter table observationType add constraint observationTypeUK unique (observationType);
+alter table offering add constraint offIdentifierUK unique (identifier);
+alter table procedureDescriptionFormat add constraint procDescFormatUK unique (procedureDescriptionFormat);
+alter table relatedFeatureRole add constraint relFeatRoleUK unique (relatedFeatureRole);
create index resultTempOfferingIdx on resultTemplate (offeringId);
create index resultTempeObsPropIdx on resultTemplate (observablePropertyId);
create index resultTempProcedureIdx on resultTemplate (procedureId);
create index resultTempIdentifierIdx on resultTemplate (identifier);
-alter table resultTemplate add index resultTemplateOfferingIdx (offeringId), add constraint resultTemplateOfferingIdx foreign key (offeringId) references offering (offeringId);
-alter table resultTemplate add index resultTemplateObsPropFk (observablePropertyId), add constraint resultTemplateObsPropFk foreign key (observablePropertyId) references observableProperty (observablePropertyId);
-alter table resultTemplate add index resultTemplateProcedureFk (procedureId), add constraint resultTemplateProcedureFk foreign key (procedureId) references `procedure` (procedureId);
-alter table resultTemplate add index resultTemplateFeatureIdx (featureOfInterestId), add constraint resultTemplateFeatureIdx foreign key (featureOfInterestId) references featureOfInterest (featureOfInterestId);
-alter table sensorSystem add index procedureChildFk (childSensorId), add constraint procedureChildFk foreign key (childSensorId) references `procedure` (procedureId);
-alter table sensorSystem add index procedureParenfFk (parentSensorId), add constraint procedureParenfFk foreign key (parentSensorId) references `procedure` (procedureId);
+alter table series add constraint seriesIdentity unique (featureOfInterestId, observablePropertyId, procedureId);
create index seriesFeatureIdx on series (featureOfInterestId);
create index seriesObsPropIdx on series (observablePropertyId);
create index seriesProcedureIdx on series (procedureId);
-alter table series add index seriesFeatureFk (featureOfInterestId), add constraint seriesFeatureFk foreign key (featureOfInterestId) references featureOfInterest (featureOfInterestId);
-alter table series add index seriesObPropFk (observablePropertyId), add constraint seriesObPropFk foreign key (observablePropertyId) references observableProperty (observablePropertyId);
-alter table series add index seriesProcedureFk (procedureId), add constraint seriesProcedureFk foreign key (procedureId) references `procedure` (procedureId);
-alter table series add constraint seriesUnitFk foreign key (unitId) references unit;
-create index sfpObservationIdx on spatialFilteringProfile (observation);
-alter table spatialFilteringProfile add index sfpObservationFK (observation), add constraint sfpObservationFK foreign key (observation) references observation (observationId);
-alter table sweDataArrayValue add index observationSweDataArrayValueFk (observationId), add constraint observationSweDataArrayValueFk foreign key (observationId) references observation (observationId);
-alter table textValue add index observationTextValueFk (observationId), add constraint observationTextValueFk foreign key (observationId) references observation (observationId);
+alter table unit add constraint unitUK unique (unit);
create index validProcedureTimeStartTimeIdx on validProcedureTime (startTime);
create index validProcedureTimeEndTimeIdx on validProcedureTime (endTime);
-alter table validProcedureTime add index validProcedureTimeProcedureFk (procedureId), add constraint validProcedureTimeProcedureFk foreign key (procedureId) references `procedure` (procedureId);
-alter table validProcedureTime add index validProcProcDescFormatFk (procedureDescriptionFormatId), add constraint validProcProcDescFormatFk foreign key (procedureDescriptionFormatId) references procedureDescriptionFormat (procedureDescriptionFormatId)
\ No newline at end of file
+alter table `procedure` add constraint procProcDescFormatFk foreign key (procedureDescriptionFormatId) references procedureDescriptionFormat (procedureDescriptionFormatId);
+alter table blobValue add constraint observationBlobValueFk foreign key (observationId) references observation (observationId);
+alter table booleanValue add constraint observationBooleanValueFk foreign key (observationId) references observation (observationId);
+alter table categoryValue add constraint observationCategoryValueFk foreign key (observationId) references observation (observationId);
+alter table compositePhenomenon add constraint observablePropertyChildFk foreign key (childObservablePropertyId) references observableProperty (observablePropertyId);
+alter table compositePhenomenon add constraint observablePropertyParentFk foreign key (parentObservablePropertyId) references observableProperty (observablePropertyId);
+alter table countValue add constraint observationCountValueFk foreign key (observationId) references observation (observationId);
+alter table featureOfInterest add constraint featureFeatureTypeFk foreign key (featureOfInterestTypeId) references featureOfInterestType (featureOfInterestTypeId);
+alter table featureOfInterest add constraint featureCodespaceFk foreign key (codespaceId) references codespace (codespaceId);
+alter table featureRelation add constraint featureOfInterestChildFk foreign key (childFeatureId) references featureOfInterest (featureOfInterestId);
+alter table featureRelation add constraint featureOfInterestParentFk foreign key (parentFeatureId) references featureOfInterest (featureOfInterestId);
+alter table geometryValue add constraint observationGeometryValueFk foreign key (observationId) references observation (observationId);
+alter table numericValue add constraint observationNumericValueFk foreign key (observationId) references observation (observationId);
+alter table observation add constraint observationSeriesFk foreign key (seriesId) references series (seriesId);
+alter table observation add constraint observationCodespaceFk foreign key (codespaceId) references codespace (codespaceId);
+alter table observation add constraint observationUnitFk foreign key (unitId) references unit (unitId);
+alter table observationConstellation add constraint obsConstObsPropFk foreign key (observablePropertyId) references observableProperty (observablePropertyId);
+alter table observationConstellation add constraint obsnConstProcedureFk foreign key (procedureId) references `procedure` (procedureId);
+alter table observationConstellation add constraint obsConstObservationIypeFk foreign key (observationTypeId) references observationType (observationTypeId);
+alter table observationConstellation add constraint obsConstOfferingFk foreign key (offeringId) references offering (offeringId);
+alter table observationHasOffering add constraint observationOfferingFk foreign key (offeringId) references offering (offeringId);
+alter table observationHasOffering add constraint FK_9ex7hawh3dbplkllmw5w3kvej foreign key (observationId) references observation (observationId);
+alter table offeringAllowedFeatureType add constraint offeringFeatureTypeFk foreign key (featureOfInterestTypeId) references featureOfInterestType (featureOfInterestTypeId);
+alter table offeringAllowedFeatureType add constraint FK_6vvrdxvd406n48gkm706ow1pt foreign key (offeringId) references offering (offeringId);
+alter table offeringAllowedObservationType add constraint offeringObservationTypeFk foreign key (observationTypeId) references observationType (observationTypeId);
+alter table offeringAllowedObservationType add constraint FK_lkljeohulvu7cr26pduyp5bd0 foreign key (offeringId) references offering (offeringId);
+alter table offeringHasRelatedFeature add constraint relatedFeatureOfferingFk foreign key (offeringId) references offering (offeringId);
+alter table offeringHasRelatedFeature add constraint offeringRelatedFeatureFk foreign key (relatedFeatureId) references relatedFeature (relatedFeatureId);
+alter table relatedFeature add constraint relatedFeatureFeatureFk foreign key (featureOfInterestId) references featureOfInterest (featureOfInterestId);
+alter table relatedFeatureHasRole add constraint relatedFeatRelatedFeatRoleFk foreign key (relatedFeatureRoleId) references relatedFeatureRole (relatedFeatureRoleId);
+alter table relatedFeatureHasRole add constraint FK_6ynwkk91xe8p1uibmjt98sog3 foreign key (relatedFeatureId) references relatedFeature (relatedFeatureId);
+alter table resultTemplate add constraint resultTemplateOfferingIdx foreign key (offeringId) references offering (offeringId);
+alter table resultTemplate add constraint resultTemplateObsPropFk foreign key (observablePropertyId) references observableProperty (observablePropertyId);
+alter table resultTemplate add constraint resultTemplateProcedureFk foreign key (procedureId) references `procedure` (procedureId);
+alter table resultTemplate add constraint resultTemplateFeatureIdx foreign key (featureOfInterestId) references featureOfInterest (featureOfInterestId);
+alter table sensorSystem add constraint procedureChildFk foreign key (childSensorId) references `procedure` (procedureId);
+alter table sensorSystem add constraint procedureParenfFk foreign key (parentSensorId) references `procedure` (procedureId);
+alter table series add constraint seriesFeatureFk foreign key (featureOfInterestId) references featureOfInterest (featureOfInterestId);
+alter table series add constraint seriesObPropFk foreign key (observablePropertyId) references observableProperty (observablePropertyId);
+alter table series add constraint seriesProcedureFk foreign key (procedureId) references `procedure` (procedureId);
+alter table series add constraint seriesUnitFk foreign key (unitId) references unit (unitId);
+alter table sweDataArrayValue add constraint observationSweDataArrayValueFk foreign key (observationId) references observation (observationId);
+alter table textValue add constraint observationTextValueFk foreign key (observationId) references observation (observationId);
+alter table validProcedureTime add constraint validProcedureTimeProcedureFk foreign key (procedureId) references `procedure` (procedureId);
+alter table validProcedureTime add constraint validProcProcDescFormatFk foreign key (procedureDescriptionFormatId) references procedureDescriptionFormat (procedureDescriptionFormatId);
\ No newline at end of file
diff --git a/misc/db/MySQL/series/MySQL_series_drop_script.sql b/misc/db/MySQL/series/MySQL_series_drop_script.sql
index 06aa020bf3..3dfa14ce69 100644
--- a/misc/db/MySQL/series/MySQL_series_drop_script.sql
+++ b/misc/db/MySQL/series/MySQL_series_drop_script.sql
@@ -27,48 +27,7 @@
-- Public License for more details.
--
-alter table blobValue drop foreign key observationBlobValueFk;
-alter table booleanValue drop foreign key observationBooleanValueFk;
-alter table categoryValue drop foreign key observationCategoryValueFk;
-alter table compositePhenomenon drop foreign key observablePropertyChildFk;
-alter table compositePhenomenon drop foreign key observablePropertyParentFk;
-alter table countValue drop foreign key observationCountValueFk;
-alter table featureOfInterest drop foreign key featureFeatureTypeFk;
-alter table featureOfInterest drop foreign key featureCodespaceFk;
-alter table featureRelation drop foreign key featureOfInterestChildFk;
-alter table featureRelation drop foreign key featureOfInterestParentFk;
-alter table geometryValue drop foreign key observationGeometryValueFk;
-alter table numericValue drop foreign key observationNumericValueFk;
-alter table observation drop foreign key observationSeriesFk;
-alter table observation drop foreign key observationCodespaceFk;
-alter table observation drop foreign key observationUnitFk;
-alter table observationConstellation drop foreign key obsConstObsPropFk;
-alter table observationConstellation drop foreign key obsnConstProcedureFk;
-alter table observationConstellation drop foreign key obsConstObservationIypeFk;
-alter table observationConstellation drop foreign key obsConstOfferingFk;
-alter table observationHasOffering drop foreign key observationOfferingFk;
-alter table offeringAllowedFeatureType drop foreign key offeringFeatureTypeFk;
-alter table offeringAllowedObservationType drop foreign key offeringObservationTypeFk;
-alter table offeringHasRelatedFeature drop foreign key relatedFeatureOfferingFk;
-alter table offeringHasRelatedFeature drop foreign key offeringRelatedFeatureFk;
-alter table parameter drop foreign key parameterObservationFk;
-alter table `procedure` drop foreign key procProcDescFormatFk;
-alter table relatedFeature drop foreign key relatedFeatureFeatureFk;
-alter table relatedFeatureHasRole drop foreign key relatedFeatRelatedFeatRoleFk;
-alter table resultTemplate drop foreign key resultTemplateOfferingIdx;
-alter table resultTemplate drop foreign key resultTemplateObsPropFk;
-alter table resultTemplate drop foreign key resultTemplateProcedureFk;
-alter table resultTemplate drop foreign key resultTemplateFeatureIdx;
-alter table sensorSystem drop foreign key procedureChildFk;
-alter table sensorSystem drop foreign key procedureParenfFk;
-alter table series drop foreign key seriesFeatureFk;
-alter table series drop foreign key seriesObPropFk;
-alter table series drop foreign key seriesProcedureFk;
-alter table spatialFilteringProfile drop foreign key sfpObservationFK;
-alter table sweDataArrayValue drop foreign key observationSweDataArrayValueFk;
-alter table textValue drop foreign key observationTextValueFk;
-alter table validProcedureTime drop foreign key validProcedureTimeProcedureFk;
-alter table validProcedureTime drop foreign key validProcProcDescFormatFk;
+SET foreign_key_checks = 0;
drop table if exists blobValue;
drop table if exists booleanValue;
drop table if exists categoryValue;
@@ -100,6 +59,6 @@ drop table if exists relatedFeature;
drop table if exists relatedFeatureRole;
drop table if exists resultTemplate;
drop table if exists sensorSystem;
-drop table if exists spatialFilteringProfile;
drop table if exists unit;
-drop table if exists validProcedureTime;
\ No newline at end of file
+drop table if exists validProcedureTime;
+SET foreign_key_checks = 1;
\ No newline at end of file
diff --git a/misc/db/MySQL/update_spatialfilteringprofile_handling.sql b/misc/db/MySQL/update_spatialfilteringprofile_handling.sql
index 0a3ea015fc..f4b93d05f2 100644
--- a/misc/db/MySQL/update_spatialfilteringprofile_handling.sql
+++ b/misc/db/MySQL/update_spatialfilteringprofile_handling.sql
@@ -27,10 +27,10 @@
-- Public License for more details.
--
-ALTER TABLE observation ADD COLUMN samplingGeometry GEOMETRY;
-
SET SQL_SAFE_UPDATES=0;
UPDATE observation SET observation.samplingGeometry = (Select spf.geom FROM spatialFilteringProfile spf WHERE observation.observationid = spf.observation);
SET SQL_SAFE_UPDATES=1;
-DROP TABLE spatialFilteringProfile;
\ No newline at end of file
+DROP TABLE spatialFilteringProfile;
+
+DROP sequence spatialFilteringProfileId_seq;
\ No newline at end of file
diff --git a/misc/db/Oracle/old/Oracle_update_40_to_41.sql b/misc/db/Oracle/old/Oracle_update_40_to_41.sql
new file mode 100644
index 0000000000..cfcf528b0f
--- /dev/null
+++ b/misc/db/Oracle/old/Oracle_update_40_to_41.sql
@@ -0,0 +1,32 @@
+--
+-- Copyright (C) 2012-2014 52°North Initiative for Geospatial Open Source
+-- Software GmbH
+--
+-- This program is free software; you can redistribute it and/or modify it
+-- under the terms of the GNU General Public License version 2 as published
+-- by the Free Software Foundation.
+--
+-- If the program is linked with libraries which are licensed under one of
+-- the following licenses, the combination of the program with the linked
+-- library is not considered a "derivative work" of the program:
+--
+-- - Apache License, version 2.0
+-- - Apache Software License, version 1.0
+-- - GNU Lesser General Public License, version 3
+-- - Mozilla Public License, versions 1.0, 1.1 and 2.0
+-- - Common Development and Distribution License (CDDL), version 1.0
+--
+-- Therefore the distribution of the program linked with libraries licensed
+-- under the aforementioned licenses, is permitted by the copyright holders
+-- if the distribution is compliant with both the GNU General Public
+-- License version 2 and the aforementioned licenses.
+--
+-- This program is distributed in the hope that it will be useful, but
+-- WITHOUT ANY WARRANTY; without even the implied warranty of
+-- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General
+-- Public License for more details.
+--
+
+ALTER TABLE procedure ADD referenceFlag char(1 char) default 'F' check (referenceFlag in ('T','F'));
+
+ALTER TABLE observation ADD samplingGeometry GEOMETRY;
\ No newline at end of file
diff --git a/misc/db/Oracle/series/Oracle_convert_old_to_series.sql b/misc/db/Oracle/series/Oracle_convert_old_to_series.sql
index bbd674e2fb..0d403f4f91 100644
--- a/misc/db/Oracle/series/Oracle_convert_old_to_series.sql
+++ b/misc/db/Oracle/series/Oracle_convert_old_to_series.sql
@@ -33,10 +33,12 @@
-- create series table and sequence add constraints to series
CREATE sequence seriesId_seq;
-create table series (seriesId number(19,0) not null, featureOfInterestId number(19,0) not null, observablePropertyId number(19,0) not null, procedureId number(19,0) not null, deleted char(1 char) default 'F' not null check (deleted in ('T','F')), primary key (seriesId), unique (featureOfInterestId, observablePropertyId, procedureId));
+create table series (seriesId number(19,0) not null, featureOfInterestId number(19,0) not null, observablePropertyId number(19,0) not null, procedureId number(19,0) not null, deleted char(1 char) default 'F' not null check (deleted in ('T','F')), firstTimeStamp timestamp, lastTimeStamp timestamp, firstNumericValue number(19,2), lastNumericValue number(19,2), unitId number(19,0), primary key (seriesId))
ALTER TABLE series add constraint seriesFeatureFk foreign key (featureOfInterestId) references featureOfInterest;
ALTER TABLE series add constraint seriesObPropFk foreign key (observablePropertyId) references observableProperty;
ALTER TABLE series add constraint seriesProcedureFk foreign key (procedureId) references procedure;
+alter table series add constraint seriesUnitFk foreign key (unitId) references unit;
+alter table series add constraint seriesIdentity unique (featureOfInterestId, observablePropertyId, procedureId);
-- add series column to observation table
ALTER TABLE observation ADD seriesId number(19,0);
@@ -55,4 +57,4 @@ ALTER TABLE observation ADD unique (seriesId, phenomenonTimeStart, phenomenonTim
-- drop old constraints and drop old columns
ALTER TABLE observation DROP COLUMN featureofinterestid CASCADE CONSTRAINTS ;
ALTER TABLE observation DROP COLUMN observablepropertyid CASCADE CONSTRAINTS ;
-ALTER TABLE observation DROP COLUMN procedureid CASCADE CONSTRAINTS ;
\ No newline at end of file
+ALTER TABLE observation DROP COLUMN procedureid CASCADE CONSTRAINTS ;
diff --git a/misc/db/Oracle/series/Oracle_series_clear_script.sql b/misc/db/Oracle/series/Oracle_series_clear_script.sql
index 783aa62075..9bd83b84c6 100644
--- a/misc/db/Oracle/series/Oracle_series_clear_script.sql
+++ b/misc/db/Oracle/series/Oracle_series_clear_script.sql
@@ -46,7 +46,7 @@ TRUNCATE TABLE offeringAllowedFeatureType REUSE STORAGE;
TRUNCATE TABLE offeringAllowedObservationType REUSE STORAGE;
TRUNCATE TABLE offeringHasRelatedFeature REUSE STORAGE;
TRUNCATE TABLE parameter REUSE STORAGE;
-TRUNCATE TABLE procedure REUSE STORAGE;
+TRUNCATE TABLE "procedure" REUSE STORAGE;
TRUNCATE TABLE procedureDescriptionFormat REUSE STORAGE;
TRUNCATE TABLE relatedFeature REUSE STORAGE;
TRUNCATE TABLE relatedFeatureHasRole REUSE STORAGE;
@@ -54,9 +54,8 @@ TRUNCATE TABLE relatedFeatureRole REUSE STORAGE;
TRUNCATE TABLE resultTemplate REUSE STORAGE;
TRUNCATE TABLE sensorSystem REUSE STORAGE;
TRUNCATE TABLE series REUSE STORAGE;
-TRUNCATE TABLE spatialfilteringprofile REUSE STORAGE;
TRUNCATE TABLE swedataarrayvalue REUSE STORAGE;
-TRUNCATE TABLE textValuev
+TRUNCATE TABLE textValue REUSE STORAGE;
TRUNCATE TABLE unit REUSE STORAGE;
TRUNCATE TABLE validProcedureTime REUSE STORAGE;
TRUNCATE TABLE featureOfInterest REUSE STORAGE;
diff --git a/misc/db/Oracle/series/Oracle_series_create_script.sql b/misc/db/Oracle/series/Oracle_series_create_script.sql
index d6e1fe3231..9207bf6245 100644
--- a/misc/db/Oracle/series/Oracle_series_create_script.sql
+++ b/misc/db/Oracle/series/Oracle_series_create_script.sql
@@ -27,40 +27,74 @@
-- Public License for more details.
--
+create table "procedure" (procedureId number(19,0) not null, hibernateDiscriminator char(1 char) not null, procedureDescriptionFormatId number(19,0) not null, identifier varchar2(255 char) not null, deleted char(1 char) default 'F' not null check (deleted in ('T','F')), descriptionFile clob, referenceFlag char(1 char) default 'F' check (referenceFlag in ('T','F')), primary key (procedureId));
create table blobValue (observationId number(19,0) not null, value blob, primary key (observationId));
-create table booleanValue (observationId number(19,0) not null, value char(1 char), primary key (observationId), check (value in ('T','F')));
+create table booleanValue (observationId number(19,0) not null, value char(1 char), primary key (observationId), check (value in ('T','F')), check (value in ('T','F')));
create table categoryValue (observationId number(19,0) not null, value varchar2(255 char), primary key (observationId));
-create table codespace (codespaceId number(19,0) not null, codespace varchar2(255 char) not null unique, primary key (codespaceId));
+create table codespace (codespaceId number(19,0) not null, codespace varchar2(255 char) not null, primary key (codespaceId));
create table compositePhenomenon (parentObservablePropertyId number(19,0) not null, childObservablePropertyId number(19,0) not null, primary key (childObservablePropertyId, parentObservablePropertyId));
create table countValue (observationId number(19,0) not null, value number(10,0), primary key (observationId));
-create table featureOfInterest (featureOfInterestId number(19,0) not null, hibernateDiscriminator char(1 char) not null, featureOfInterestTypeId number(19,0) not null, identifier varchar2(255 char) unique, codespaceId number(19,0), name clob, geom SDO_GEOMETRY, descriptionXml clob, url varchar2(255 char) unique, primary key (featureOfInterestId));
-create table featureOfInterestType (featureOfInterestTypeId number(19,0) not null, featureOfInterestType varchar2(255 char) not null unique, primary key (featureOfInterestTypeId));
+create table featureOfInterest (featureOfInterestId number(19,0) not null, hibernateDiscriminator char(1 char) not null, featureOfInterestTypeId number(19,0) not null, identifier varchar2(255 char), codespaceId number(19,0), name clob, geom SDO_GEOMETRY, descriptionXml clob, url varchar2(255 char), primary key (featureOfInterestId));
+create table featureOfInterestType (featureOfInterestTypeId number(19,0) not null, featureOfInterestType varchar2(255 char) not null, primary key (featureOfInterestTypeId));
create table featureRelation (parentFeatureId number(19,0) not null, childFeatureId number(19,0) not null, primary key (childFeatureId, parentFeatureId));
create table geometryValue (observationId number(19,0) not null, value SDO_GEOMETRY, primary key (observationId));
create table numericValue (observationId number(19,0) not null, value number(19,2), primary key (observationId));
-create table observableProperty (observablePropertyId number(19,0) not null, hibernateDiscriminator char(1 char) not null, identifier varchar2(255 char) not null unique, description varchar2(255 char), disabled char(1 char) default 'F' not null check (disabled in ('T','F'), primary key (observablePropertyId));
-create table observation (observationId number(19,0) not null, seriesId number(19,0) not null, phenomenonTimeStart timestamp not null, phenomenonTimeEnd timestamp not null, resultTime timestamp not null, identifier varchar2(255 char) unique, codespaceId number(19,0), description varchar2(255 char), deleted char(1 char) default 'F' not null check (deleted in ('T','F')), validTimeStart timestamp, validTimeEnd timestamp, unitId number(19,0), primary key (observationId), unique (seriesId, phenomenonTimeStart, phenomenonTimeEnd, resultTime));
-create table observationConstellation (observationConstellationId number(19,0) not null, observablePropertyId number(19,0) not null, procedureId number(19,0) not null, observationTypeId number(19,0), offeringId number(19,0) not null, deleted char(1 char) default 'F' not null check (deleted in ('T','F')), hiddenChild char(1 char) default 'F' not null check (hiddenChild in ('T','F')), primary key (observationConstellationId), unique (observablePropertyId, procedureId, offeringId));
+create table observableProperty (observablePropertyId number(19,0) not null, hibernateDiscriminator char(1 char) not null, identifier varchar2(255 char) not null, description varchar2(255 char), primary key (observablePropertyId));
+create table observation (observationId number(19,0) not null, seriesId number(19,0) not null, phenomenonTimeStart timestamp not null, phenomenonTimeEnd timestamp not null, resultTime timestamp not null, identifier varchar2(255 char), codespaceId number(19,0), description varchar2(255 char), deleted char(1 char) default 'F' not null check (deleted in ('T','F')), validTimeStart timestamp, validTimeEnd timestamp, unitId number(19,0), samplingGeometry SDO_GEOMETRY, primary key (observationId));
+create table observationConstellation (observationConstellationId number(19,0) not null, observablePropertyId number(19,0) not null, procedureId number(19,0) not null, observationTypeId number(19,0), offeringId number(19,0) not null, deleted char(1 char) default 'F' not null check (deleted in ('T','F')), hiddenChild char(1 char) default 'F' not null check (hiddenChild in ('T','F')), primary key (observationConstellationId));
create table observationHasOffering (observationId number(19,0) not null, offeringId number(19,0) not null, primary key (observationId, offeringId));
-create table observationType (observationTypeId number(19,0) not null, observationType varchar2(255 char) not null unique, primary key (observationTypeId));
-create table offering (offeringId number(19,0) not null, hibernateDiscriminator char(1 char) not null, identifier varchar2(255 char) not null unique, name varchar2(255 char), disabled char(1 char) default 'F' not null check (disabled in ('T','F'), primary key (offeringId));
+create table observationType (observationTypeId number(19,0) not null, observationType varchar2(255 char) not null, primary key (observationTypeId));
+create table offering (offeringId number(19,0) not null, hibernateDiscriminator char(1 char) not null, identifier varchar2(255 char) not null, name varchar2(255 char), primary key (offeringId));
create table offeringAllowedFeatureType (offeringId number(19,0) not null, featureOfInterestTypeId number(19,0) not null, primary key (offeringId, featureOfInterestTypeId));
create table offeringAllowedObservationType (offeringId number(19,0) not null, observationTypeId number(19,0) not null, primary key (offeringId, observationTypeId));
create table offeringHasRelatedFeature (relatedFeatureId number(19,0) not null, offeringId number(19,0) not null, primary key (offeringId, relatedFeatureId));
create table parameter (parameterId number(19,0) not null, observationId number(19,0) not null, definition varchar2(255 char) not null, title varchar2(255 char), value blob not null, primary key (parameterId));
-create table procedure (procedureId number(19,0) not null, hibernateDiscriminator char(1 char) not null, procedureDescriptionFormatId number(19,0) not null, identifier varchar2(255 char) not null unique, deleted char(1 char) default 'F' not null check (deleted in ('T','F')), descriptionFile clob, disabled char(1 char) default 'F' not null check (disabled in ('T','F'), referenceFlag char(1 char) default 'F' check (referenceFlag in ('T','F')), primary key (procedureId));
create table procedureDescriptionFormat (procedureDescriptionFormatId number(19,0) not null, procedureDescriptionFormat varchar2(255 char) not null, primary key (procedureDescriptionFormatId));
create table relatedFeature (relatedFeatureId number(19,0) not null, featureOfInterestId number(19,0) not null, primary key (relatedFeatureId));
create table relatedFeatureHasRole (relatedFeatureId number(19,0) not null, relatedFeatureRoleId number(19,0) not null, primary key (relatedFeatureId, relatedFeatureRoleId));
-create table relatedFeatureRole (relatedFeatureRoleId number(19,0) not null, relatedFeatureRole varchar2(255 char) not null unique, primary key (relatedFeatureRoleId));
+create table relatedFeatureRole (relatedFeatureRoleId number(19,0) not null, relatedFeatureRole varchar2(255 char) not null, primary key (relatedFeatureRoleId));
create table resultTemplate (resultTemplateId number(19,0) not null, offeringId number(19,0) not null, observablePropertyId number(19,0) not null, procedureId number(19,0) not null, featureOfInterestId number(19,0) not null, identifier varchar2(255 char) not null, resultStructure clob not null, resultEncoding clob not null, primary key (resultTemplateId));
create table sensorSystem (parentSensorId number(19,0) not null, childSensorId number(19,0) not null, primary key (childSensorId, parentSensorId));
-create table series (seriesId number(19,0) not null, featureOfInterestId number(19,0) not null, observablePropertyId number(19,0) not null, procedureId number(19,0) not null, deleted char(1 char) default 'F' not null check (deleted in ('T','F')), firstTimeStamp timestamp, lastTimeStamp timestamp, firstNumericValue number(19,2), lastNumericValue number(19,2), unitId number(19,0), primary key (seriesId), unique (featureOfInterestId, observablePropertyId, procedureId));
-create table spatialFilteringProfile (spatialFilteringProfileId number(19,0) not null, observation number(19,0) not null, definition varchar2(255 char) not null, title varchar2(255 char), geom SDO_GEOMETRY not null, primary key (spatialFilteringProfileId));
+create table series (seriesId number(19,0) not null, featureOfInterestId number(19,0) not null, observablePropertyId number(19,0) not null, procedureId number(19,0) not null, deleted char(1 char) default 'F' not null check (deleted in ('T','F')), firstTimeStamp timestamp, lastTimeStamp timestamp, firstNumericValue number(19,2), lastNumericValue number(19,2), unitId number(19,0), primary key (seriesId));
create table sweDataArrayValue (observationId number(19,0) not null, value clob, primary key (observationId));
create table textValue (observationId number(19,0) not null, value clob, primary key (observationId));
-create table unit (unitId number(19,0) not null, unit varchar2(255 char) not null unique, primary key (unitId));
+create table unit (unitId number(19,0) not null, unit varchar2(255 char) not null, primary key (unitId));
create table validProcedureTime (validProcedureTimeId number(19,0) not null, procedureId number(19,0) not null, procedureDescriptionFormatId number(19,0) not null, startTime timestamp not null, endTime timestamp, descriptionXml clob not null, primary key (validProcedureTimeId));
+alter table "procedure" add constraint procIdentifierUK unique (identifier);
+alter table codespace add constraint codespaceUK unique (codespace);
+alter table featureOfInterest add constraint foiIdentifierUK unique (identifier);
+alter table featureOfInterest add constraint obsUrl unique (url);
+alter table featureOfInterestType add constraint featureTypeUK unique (featureOfInterestType);
+alter table observableProperty add constraint obsPropIdentifierUK unique (identifier);
+alter table observation add constraint observationIdentity unique (seriesId, phenomenonTimeStart, phenomenonTimeEnd, resultTime);
+alter table observation add constraint obsIdentifierUK unique (identifier);
+create index obsSeriesIdx on observation (seriesId);
+create index obsPhenTimeStartIdx on observation (phenomenonTimeStart);
+create index obsPhenTimeEndIdx on observation (phenomenonTimeEnd);
+create index obsResultTimeIdx on observation (resultTime);
+create index obsCodespaceIdx on observation (codespaceId);
+alter table observationConstellation add constraint obsnConstellationIdentity unique (observablePropertyId, procedureId, offeringId);
+create index obsConstObsPropIdx on observationConstellation (observablePropertyId);
+create index obsConstProcedureIdx on observationConstellation (procedureId);
+create index obsConstOfferingIdx on observationConstellation (offeringId);
+create index obshasoffobservationidx on observationHasOffering (observationId);
+create index obshasoffofferingidx on observationHasOffering (offeringId);
+alter table observationType add constraint observationTypeUK unique (observationType);
+alter table offering add constraint offIdentifierUK unique (identifier);
+alter table procedureDescriptionFormat add constraint procDescFormatUK unique (procedureDescriptionFormat);
+alter table relatedFeatureRole add constraint relFeatRoleUK unique (relatedFeatureRole);
+create index resultTempOfferingIdx on resultTemplate (offeringId);
+create index resultTempeObsPropIdx on resultTemplate (observablePropertyId);
+create index resultTempProcedureIdx on resultTemplate (procedureId);
+create index resultTempIdentifierIdx on resultTemplate (identifier);
+alter table series add constraint seriesIdentity unique (featureOfInterestId, observablePropertyId, procedureId);
+create index seriesFeatureIdx on series (featureOfInterestId);
+create index seriesObsPropIdx on series (observablePropertyId);
+create index seriesProcedureIdx on series (procedureId);
+alter table unit add constraint unitUK unique (unit);
+create index validProcedureTimeStartTimeIdx on validProcedureTime (startTime);
+create index validProcedureTimeEndTimeIdx on validProcedureTime (endTime);
+alter table "procedure" add constraint procProcDescFormatFk foreign key (procedureDescriptionFormatId) references procedureDescriptionFormat;
alter table blobValue add constraint observationBlobValueFk foreign key (observationId) references observation;
alter table booleanValue add constraint observationBooleanValueFk foreign key (observationId) references observation;
alter table categoryValue add constraint observationCategoryValueFk foreign key (observationId) references observation;
@@ -73,76 +107,52 @@ alter table featureRelation add constraint featureOfInterestChildFk foreign key
alter table featureRelation add constraint featureOfInterestParentFk foreign key (parentFeatureId) references featureOfInterest;
alter table geometryValue add constraint observationGeometryValueFk foreign key (observationId) references observation;
alter table numericValue add constraint observationNumericValueFk foreign key (observationId) references observation;
-create index obsSeriesIdx on observation (seriesId);
-create index obsPhenTimeStartIdx on observation (phenomenonTimeStart);
-create index obsPhenTimeEndIdx on observation (phenomenonTimeEnd);
-create index obsResultTimeIdx on observation (resultTime);
-create index obsCodespaceIdx on observation (codespaceId);
alter table observation add constraint observationSeriesFk foreign key (seriesId) references series;
alter table observation add constraint observationCodespaceFk foreign key (codespaceId) references codespace;
alter table observation add constraint observationUnitFk foreign key (unitId) references unit;
-create index obsConstObsPropIdx on observationConstellation (observablePropertyId);
-create index obsConstProcedureIdx on observationConstellation (procedureId);
-create index obsConstOfferingIdx on observationConstellation (offeringId);
alter table observationConstellation add constraint obsConstObsPropFk foreign key (observablePropertyId) references observableProperty;
-alter table observationConstellation add constraint obsnConstProcedureFk foreign key (procedureId) references procedure;
+alter table observationConstellation add constraint obsnConstProcedureFk foreign key (procedureId) references "procedure";
alter table observationConstellation add constraint obsConstObservationIypeFk foreign key (observationTypeId) references observationType;
alter table observationConstellation add constraint obsConstOfferingFk foreign key (offeringId) references offering;
-create index obshasoffobservationidx on observationHasOffering (observationId);
-create index obshasoffofferingidx on observationHasOffering (offeringId);
alter table observationHasOffering add constraint observationOfferingFk foreign key (offeringId) references offering;
-alter table observationHasOffering add constraint FK7D7608F472D74E7B foreign key (observationId) references observation;
+alter table observationHasOffering add constraint FK_9ex7hawh3dbplkllmw5w3kvej foreign key (observationId) references observation;
alter table offeringAllowedFeatureType add constraint offeringFeatureTypeFk foreign key (featureOfInterestTypeId) references featureOfInterestType;
-alter table offeringAllowedFeatureType add constraint FKF68CB72EE4EF3005 foreign key (offeringId) references offering;
+alter table offeringAllowedFeatureType add constraint FK_6vvrdxvd406n48gkm706ow1pt foreign key (offeringId) references offering;
alter table offeringAllowedObservationType add constraint offeringObservationTypeFk foreign key (observationTypeId) references observationType;
-alter table offeringAllowedObservationType add constraint FK28E66A64E4EF3005 foreign key (offeringId) references offering;
+alter table offeringAllowedObservationType add constraint FK_lkljeohulvu7cr26pduyp5bd0 foreign key (offeringId) references offering;
alter table offeringHasRelatedFeature add constraint relatedFeatureOfferingFk foreign key (offeringId) references offering;
alter table offeringHasRelatedFeature add constraint offeringRelatedFeatureFk foreign key (relatedFeatureId) references relatedFeature;
-alter table parameter add constraint parameterObservationFk foreign key (observationId) references observation;
-alter table procedure add constraint procProcDescFormatFk foreign key (procedureDescriptionFormatId) references procedureDescriptionFormat;
alter table relatedFeature add constraint relatedFeatureFeatureFk foreign key (featureOfInterestId) references featureOfInterest;
alter table relatedFeatureHasRole add constraint relatedFeatRelatedFeatRoleFk foreign key (relatedFeatureRoleId) references relatedFeatureRole;
-alter table relatedFeatureHasRole add constraint FK5643E7654A79987 foreign key (relatedFeatureId) references relatedFeature;
-create index resultTempOfferingIdx on resultTemplate (offeringId);
-create index resultTempeObsPropIdx on resultTemplate (observablePropertyId);
-create index resultTempProcedureIdx on resultTemplate (procedureId);
-create index resultTempIdentifierIdx on resultTemplate (identifier);
+alter table relatedFeatureHasRole add constraint FK_6ynwkk91xe8p1uibmjt98sog3 foreign key (relatedFeatureId) references relatedFeature;
alter table resultTemplate add constraint resultTemplateOfferingIdx foreign key (offeringId) references offering;
alter table resultTemplate add constraint resultTemplateObsPropFk foreign key (observablePropertyId) references observableProperty;
-alter table resultTemplate add constraint resultTemplateProcedureFk foreign key (procedureId) references procedure;
+alter table resultTemplate add constraint resultTemplateProcedureFk foreign key (procedureId) references "procedure";
alter table resultTemplate add constraint resultTemplateFeatureIdx foreign key (featureOfInterestId) references featureOfInterest;
-alter table sensorSystem add constraint procedureChildFk foreign key (childSensorId) references procedure;
-alter table sensorSystem add constraint procedureParenfFk foreign key (parentSensorId) references procedure;
-create index seriesFeatureIdx on series (featureOfInterestId);
-create index seriesObsPropIdx on series (observablePropertyId);
-create index seriesProcedureIdx on series (procedureId);
+alter table sensorSystem add constraint procedureChildFk foreign key (childSensorId) references "procedure";
+alter table sensorSystem add constraint procedureParenfFk foreign key (parentSensorId) references "procedure";
alter table series add constraint seriesFeatureFk foreign key (featureOfInterestId) references featureOfInterest;
alter table series add constraint seriesObPropFk foreign key (observablePropertyId) references observableProperty;
-alter table series add constraint seriesProcedureFk foreign key (procedureId) references procedure;
+alter table series add constraint seriesProcedureFk foreign key (procedureId) references "procedure";
alter table series add constraint seriesUnitFk foreign key (unitId) references unit;
-create index sfpObservationIdx on spatialFilteringProfile (observation);
-alter table spatialFilteringProfile add constraint sfpObservationFK foreign key (observation) references observation;
alter table sweDataArrayValue add constraint observationSweDataArrayValueFk foreign key (observationId) references observation;
alter table textValue add constraint observationTextValueFk foreign key (observationId) references observation;
-create index validProcedureTimeStartTimeIdx on validProcedureTime (startTime);
-create index validProcedureTimeEndTimeIdx on validProcedureTime (endTime);
-alter table validProcedureTime add constraint validProcedureTimeProcedureFk foreign key (procedureId) references procedure;
+alter table validProcedureTime add constraint validProcedureTimeProcedureFk foreign key (procedureId) references "procedure";
alter table validProcedureTime add constraint validProcProcDescFormatFk foreign key (procedureDescriptionFormatId) references procedureDescriptionFormat;
create sequence codespaceId_seq;
create sequence featureOfInterestId_seq;
create sequence featureOfInterestTypeId_seq;
create sequence observablePropertyId_seq;
create sequence observationConstellationId_seq;
-create sequence observationId_seq;
-create sequence observationTypeId_seq;
-create sequence offeringId_seq;
-create sequence parameterId_seq;
-create sequence procDescFormatId_seq;
-create sequence procedureId_seq;
-create sequence relatedFeatureId_seq;
-create sequence relatedFeatureRoleId_seq;
-create sequence resultTemplateId_seq;
-create sequence seriesId_seq;
-create sequence spatialFilteringProfileId_seq;
-create sequence unitId_seq;
-create sequence validProcedureTimeId_seq;
\ No newline at end of file
+523 create sequence observationId_seq;
+533 create sequence observationTypeId_seq;
+543 create sequence offeringId_seq;
+543 create sequence parameterId_seq;
+553 create sequence procDescFormatId_seq;
+553 create sequence procedureId_seq;
+573 create sequence relatedFeatureId_seq;
+583 create sequence relatedFeatureRoleId_seq;
+593 create sequence resultTemplateId_seq;
+603 create sequence seriesId_seq;
+603 create sequence unitId_seq;
+613 create sequence validProcedureTimeId_seq;
\ No newline at end of file
diff --git a/misc/db/Oracle/series/Oracle_series_drop_script.sql b/misc/db/Oracle/series/Oracle_series_drop_script.sql
index 13e3335bb5..519c89db46 100644
--- a/misc/db/Oracle/series/Oracle_series_drop_script.sql
+++ b/misc/db/Oracle/series/Oracle_series_drop_script.sql
@@ -27,6 +27,7 @@
-- Public License for more details.
--
+drop table "procedure" cascade constraints;
drop table blobValue cascade constraints;
drop table booleanValue cascade constraints;
drop table categoryValue cascade constraints;
@@ -48,7 +49,6 @@ drop table offeringAllowedFeatureType cascade constraints;
drop table offeringAllowedObservationType cascade constraints;
drop table offeringHasRelatedFeature cascade constraints;
drop table parameter cascade constraints;
-drop table procedure cascade constraints;
drop table procedureDescriptionFormat cascade constraints;
drop table relatedFeature cascade constraints;
drop table relatedFeatureHasRole cascade constraints;
@@ -56,7 +56,6 @@ drop table relatedFeatureRole cascade constraints;
drop table resultTemplate cascade constraints;
drop table sensorSystem cascade constraints;
drop table series cascade constraints;
-drop table spatialFilteringProfile cascade constraints;
drop table sweDataArrayValue cascade constraints;
drop table textValue cascade constraints;
drop table unit cascade constraints;
@@ -75,7 +74,6 @@ drop sequence procedureId_seq;
drop sequence relatedFeatureId_seq;
drop sequence relatedFeatureRoleId_seq;
drop sequence resultTemplateId_seq;
-drop sequence seriesid_seq;
-drop sequence spatialFilteringProfileId_seq;
+drop sequence seriesId_seq;
drop sequence unitId_seq;
drop sequence validProcedureTimeId_seq;
\ No newline at end of file
diff --git a/misc/db/Oracle/update_spatialfilteringprofile_handling.sql b/misc/db/Oracle/update_spatialfilteringprofile_handling.sql
index 89b6e0ca29..1883a32e90 100644
--- a/misc/db/Oracle/update_spatialfilteringprofile_handling.sql
+++ b/misc/db/Oracle/update_spatialfilteringprofile_handling.sql
@@ -27,9 +27,9 @@
-- Public License for more details.
--
-ALTER TABLE observation ADD samplingGeometry SDO_GEOMETRY;
-
UPDATE observation o SET (samplingGeometry) = (SELECT spf.geom FROM spatialFilteringProfile spf WHERE o.observationid = spf.observation)
WHERE EXISTS (SELECT * FROM spatialFilteringProfile spf WHERE o.observationid = spf.observation);
-DROP TABLE spatialFilteringProfile;
\ No newline at end of file
+DROP TABLE spatialFilteringProfile;
+
+DROP sequence spatialFilteringProfileId_seq;
\ No newline at end of file
diff --git a/misc/db/PostgreSQL/old/clear_database.sql b/misc/db/PostgreSQL/old/clear_database.sql
index bf5c153684..27f98acb57 100644
--- a/misc/db/PostgreSQL/old/clear_database.sql
+++ b/misc/db/PostgreSQL/old/clear_database.sql
@@ -49,14 +49,13 @@ TRUNCATE
offeringAllowedObservationType,
offeringHasRelatedFeature,
parameter,
- procedure,
+ "procedure",
procedureDescriptionFormat,
relatedFeature,
relatedFeatureHasRole,
relatedFeatureRole,
resultTemplate,
sensorSystem,
- spatialfilteringprofile,
swedataarrayvalue,
textValue,
unit,
diff --git a/misc/db/PostgreSQL/old/update_40_to_41.sql b/misc/db/PostgreSQL/old/update_40_to_41.sql
new file mode 100644
index 0000000000..3f9b40fc73
--- /dev/null
+++ b/misc/db/PostgreSQL/old/update_40_to_41.sql
@@ -0,0 +1,32 @@
+--
+-- Copyright (C) 2012-2014 52°North Initiative for Geospatial Open Source
+-- Software GmbH
+--
+-- This program is free software; you can redistribute it and/or modify it
+-- under the terms of the GNU General Public License version 2 as published
+-- by the Free Software Foundation.
+--
+-- If the program is linked with libraries which are licensed under one of
+-- the following licenses, the combination of the program with the linked
+-- library is not considered a "derivative work" of the program:
+--
+-- - Apache License, version 2.0
+-- - Apache Software License, version 1.0
+-- - GNU Lesser General Public License, version 3
+-- - Mozilla Public License, versions 1.0, 1.1 and 2.0
+-- - Common Development and Distribution License (CDDL), version 1.0
+--
+-- Therefore the distribution of the program linked with libraries licensed
+-- under the aforementioned licenses, is permitted by the copyright holders
+-- if the distribution is compliant with both the GNU General Public
+-- License version 2 and the aforementioned licenses.
+--
+-- This program is distributed in the hope that it will be useful, but
+-- WITHOUT ANY WARRANTY; without even the implied warranty of
+-- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General
+-- Public License for more details.
+--
+
+ALTER TABLE procedure ADD COLUMN referenceFlag char(1) default 'F' check (referenceFlag in ('T','F'));
+
+ALTER TABLE observation ADD samplingGeometry GEOMETRY;
\ No newline at end of file
diff --git a/misc/db/PostgreSQL/series/PG_convert_old_to_series.sql b/misc/db/PostgreSQL/series/PG_convert_old_to_series.sql
index a1e8436fed..ac479f18d1 100644
--- a/misc/db/PostgreSQL/series/PG_convert_old_to_series.sql
+++ b/misc/db/PostgreSQL/series/PG_convert_old_to_series.sql
@@ -33,10 +33,15 @@
-- create series table and sequence add constraints to series
CREATE sequence seriesId_seq;
-CREATE TABLE series (seriesId int8 not null, featureOfInterestId int8 not null, observablePropertyId int8 not null, procedureId int8 not null, deleted char(1) default 'F' not null check (deleted in ('T','F')), primary key (seriesId), unique (featureOfInterestId, observablePropertyId, procedureId));
+create table series (seriesId int8 not null, featureOfInterestId int8 not null, observablePropertyId int8 not null, procedureId int8 not null, deleted char(1) default 'F' not null check (deleted in ('T','F')), firstTimeStamp timestamp, lastTimeStamp timestamp, firstNumericValue numeric(19, 2), lastNumericValue numeric(19, 2), unitId int8, primary key (seriesId));
+ALTER TABLE series add constraint seriesIdentity unique (featureOfInterestId, observablePropertyId, procedureId);
+CREATE INDEX seriesFeatureIdx on series (featureOfInterestId);
+CREATE INDEX seriesObsPropIdx on series (observablePropertyId);
+CREATE INDEX seriesProcedureIdx on series (procedureId);
ALTER TABLE series add constraint seriesFeatureFk foreign key (featureOfInterestId) references featureOfInterest;
ALTER TABLE series add constraint seriesObPropFk foreign key (observablePropertyId) references observableProperty;
-ALTER TABLE series add constraint seriesProcedureFk foreign key (procedureId) references procedure;
+ALTER TABLE series add constraint seriesProcedureFk foreign key (procedureId) references "procedure";
+ALTER TABLE series add constraint seriesUnitFk foreign key (unitId) references unit;
-- add series column to observation table
ALTER TABLE observation ADD COLUMN seriesId int8;
@@ -50,7 +55,7 @@ UPDATE observation o SET seriesid = s.seriesid FROM series s WHERE o.featureofin
-- set series column to not null and add unique constraint
ALTER TABLE observation ALTER COLUMN seriesId SET NOT NULL;
-ALTER TABLE observation ADD unique (seriesId, phenomenonTimeStart, phenomenonTimeEnd, resultTime);
+ALTER TABLE observation add constraint observationIdentity unique (seriesId, phenomenonTimeStart, phenomenonTimeEnd, resultTime);
-- drop old constraints and drop old columns
ALTER TABLE observation DROP CONSTRAINT IF EXISTS observation_featureofinterestid_observablepropertyid_proced_key;
diff --git a/misc/db/PostgreSQL/series/PG_series_clear_database.sql b/misc/db/PostgreSQL/series/PG_series_clear_database.sql
index f3818e729d..7c1b02318f 100644
--- a/misc/db/PostgreSQL/series/PG_series_clear_database.sql
+++ b/misc/db/PostgreSQL/series/PG_series_clear_database.sql
@@ -49,7 +49,7 @@ TRUNCATE
offeringAllowedObservationType,
offeringHasRelatedFeature,
parameter,
- procedure,
+ "procedure",
procedureDescriptionFormat,
relatedFeature,
relatedFeatureHasRole,
@@ -57,7 +57,6 @@ TRUNCATE
resultTemplate,
sensorSystem,
series,
- spatialfilteringprofile,
swedataarrayvalue,
textValue,
unit,
diff --git a/misc/db/PostgreSQL/update_spatialfilteringprofile_handling.sql b/misc/db/PostgreSQL/update_spatialfilteringprofile_handling.sql
index d35e2bd355..a642ae82ec 100644
--- a/misc/db/PostgreSQL/update_spatialfilteringprofile_handling.sql
+++ b/misc/db/PostgreSQL/update_spatialfilteringprofile_handling.sql
@@ -27,10 +27,8 @@
-- Public License for more details.
--
-ALTER TABLE observation ADD samplingGeometry GEOMETRY;
-
-CREATE INDEX samplingGeomidx ON observation (samplingGeometry);
-
UPDATE observation SET samplingGeometry = spf.geom FROM spatialFilteringProfile spf WHERE observationId = spf.observation;
-DROP TABLE spatialFilteringProfile;
\ No newline at end of file
+DROP TABLE spatialFilteringProfile;
+
+DROP sequence spatialFilteringProfileId_seq;
\ No newline at end of file
diff --git a/misc/db/SqlServer/series/SqlServer_series_create_script.sql b/misc/db/SqlServer/series/SqlServer_series_create_script.sql
new file mode 100644
index 0000000000..c1864ed8cc
--- /dev/null
+++ b/misc/db/SqlServer/series/SqlServer_series_create_script.sql
@@ -0,0 +1,147 @@
+--
+-- Copyright (C) 2012-2014 52°North Initiative for Geospatial Open Source
+-- Software GmbH
+--
+-- This program is free software; you can redistribute it and/or modify it
+-- under the terms of the GNU General Public License version 2 as published
+-- by the Free Software Foundation.
+--
+-- If the program is linked with libraries which are licensed under one of
+-- the following licenses, the combination of the program with the linked
+-- library is not considered a "derivative work" of the program:
+--
+-- - Apache License, version 2.0
+-- - Apache Software License, version 1.0
+-- - GNU Lesser General Public License, version 3
+-- - Mozilla Public License, versions 1.0, 1.1 and 2.0
+-- - Common Development and Distribution License (CDDL), version 1.0
+--
+-- Therefore the distribution of the program linked with libraries licensed
+-- under the aforementioned licenses, is permitted by the copyright holders
+-- if the distribution is compliant with both the GNU General Public
+-- License version 2 and the aforementioned licenses.
+--
+-- This program is distributed in the hope that it will be useful, but
+-- WITHOUT ANY WARRANTY; without even the implied warranty of
+-- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General
+-- Public License for more details.
+--
+
+create table dbo.[procedure] (procedureId bigint identity not null, hibernateDiscriminator char(1) not null, procedureDescriptionFormatId bigint not null, identifier varchar(255) not null, deleted char(1) default 'F' not null check (deleted in ('T','F')), descriptionFile varchar(MAX), referenceFlag char(1) default 'F' check (referenceFlag in ('T','F')), primary key (procedureId));
+create table dbo.blobValue (observationId bigint not null, value varbinary(MAX), primary key (observationId));
+create table dbo.booleanValue (observationId bigint not null, value char(1), primary key (observationId), check (value in ('T','F')), check (value in ('T','F')));
+create table dbo.categoryValue (observationId bigint not null, value varchar(255), primary key (observationId));
+create table dbo.codespace (codespaceId bigint identity not null, codespace varchar(255) not null, primary key (codespaceId));
+create table dbo.compositePhenomenon (parentObservablePropertyId bigint not null, childObservablePropertyId bigint not null, primary key (childObservablePropertyId, parentObservablePropertyId));
+create table dbo.countValue (observationId bigint not null, value int, primary key (observationId));
+create table dbo.featureOfInterest (featureOfInterestId bigint identity not null, hibernateDiscriminator char(1) not null, featureOfInterestTypeId bigint not null, identifier varchar(255), codespaceId bigint, name varchar(MAX), geom GEOMETRY, descriptionXml varchar(MAX), url varchar(255), primary key (featureOfInterestId));
+create table dbo.featureOfInterestType (featureOfInterestTypeId bigint identity not null, featureOfInterestType varchar(255) not null, primary key (featureOfInterestTypeId));
+create table dbo.featureRelation (parentFeatureId bigint not null, childFeatureId bigint not null, primary key (childFeatureId, parentFeatureId));
+create table dbo.geometryValue (observationId bigint not null, value GEOMETRY, primary key (observationId));
+create table dbo.numericValue (observationId bigint not null, value numeric(19,2), primary key (observationId));
+create table dbo.observableProperty (observablePropertyId bigint identity not null, hibernateDiscriminator char(1) not null, identifier varchar(255) not null, description varchar(255), primary key (observablePropertyId));
+create table dbo.observation (observationId bigint identity not null, seriesId bigint not null, phenomenonTimeStart datetime2 not null, phenomenonTimeEnd datetime2 not null, resultTime datetime2 not null, identifier varchar(255), codespaceId bigint, description varchar(255), deleted char(1) default 'F' not null check (deleted in ('T','F')), validTimeStart datetime2, validTimeEnd datetime2, unitId bigint, samplingGeometry GEOMETRY, primary key (observationId));
+create table dbo.observationConstellation (observationConstellationId bigint identity not null, observablePropertyId bigint not null, procedureId bigint not null, observationTypeId bigint, offeringId bigint not null, deleted char(1) default 'F' not null check (deleted in ('T','F')), hiddenChild char(1) default 'F' not null check (hiddenChild in ('T','F')), primary key (observationConstellationId));
+create table dbo.observationHasOffering (observationId bigint not null, offeringId bigint not null, primary key (observationId, offeringId));
+create table dbo.observationType (observationTypeId bigint identity not null, observationType varchar(255) not null, primary key (observationTypeId));
+create table dbo.offering (offeringId bigint identity not null, hibernateDiscriminator char(1) not null, identifier varchar(255) not null, name varchar(255), primary key (offeringId));
+create table dbo.offeringAllowedFeatureType (offeringId bigint not null, featureOfInterestTypeId bigint not null, primary key (offeringId, featureOfInterestTypeId));
+create table dbo.offeringAllowedObservationType (offeringId bigint not null, observationTypeId bigint not null, primary key (offeringId, observationTypeId));
+create table dbo.offeringHasRelatedFeature (relatedFeatureId bigint not null, offeringId bigint not null, primary key (offeringId, relatedFeatureId));
+create table dbo.parameter (parameterId bigint identity not null, observationId bigint not null, definition varchar(255) not null, title varchar(255), value varbinary(MAX) not null, primary key (parameterId));
+create table dbo.procedureDescriptionFormat (procedureDescriptionFormatId bigint identity not null, procedureDescriptionFormat varchar(255) not null, primary key (procedureDescriptionFormatId));
+create table dbo.relatedFeature (relatedFeatureId bigint identity not null, featureOfInterestId bigint not null, primary key (relatedFeatureId));
+create table dbo.relatedFeatureHasRole (relatedFeatureId bigint not null, relatedFeatureRoleId bigint not null, primary key (relatedFeatureId, relatedFeatureRoleId));
+create table dbo.relatedFeatureRole (relatedFeatureRoleId bigint identity not null, relatedFeatureRole varchar(255) not null, primary key (relatedFeatureRoleId));
+create table dbo.resultTemplate (resultTemplateId bigint identity not null, offeringId bigint not null, observablePropertyId bigint not null, procedureId bigint not null, featureOfInterestId bigint not null, identifier varchar(255) not null, resultStructure varchar(MAX) not null, resultEncoding varchar(MAX) not null, primary key (resultTemplateId));
+create table dbo.sensorSystem (parentSensorId bigint not null, childSensorId bigint not null, primary key (childSensorId, parentSensorId));
+create table dbo.series (seriesId bigint identity not null, featureOfInterestId bigint not null, observablePropertyId bigint not null, procedureId bigint not null, deleted char(1) default 'F' not null check (deleted in ('T','F')), firstTimeStamp datetime2, lastTimeStamp datetime2, firstNumericValue numeric(19,2), lastNumericValue numeric(19,2), unitId bigint, primary key (seriesId));
+create table dbo.sweDataArrayValue (observationId bigint not null, value varchar(MAX), primary key (observationId));
+create table dbo.textValue (observationId bigint not null, value varchar(MAX), primary key (observationId));
+create table dbo.unit (unitId bigint identity not null, unit varchar(255) not null, primary key (unitId));
+create table dbo.validProcedureTime (validProcedureTimeId bigint identity not null, procedureId bigint not null, procedureDescriptionFormatId bigint not null, startTime datetime2 not null, endTime datetime2, descriptionXml varchar(MAX) not null, primary key (validProcedureTimeId));
+alter table dbo.[procedure] add constraint procIdentifierUK unique (identifier);
+alter table dbo.codespace add constraint codespaceUK unique (codespace);
+alter table dbo.featureOfInterest add constraint foiIdentifierUK unique (identifier);
+alter table dbo.featureOfInterest add constraint obsUrl unique (url);
+alter table dbo.featureOfInterestType add constraint featureTypeUK unique (featureOfInterestType);
+alter table dbo.observableProperty add constraint obsPropIdentifierUK unique (identifier);
+alter table dbo.observation add constraint observationIdentity unique (seriesId, phenomenonTimeStart, phenomenonTimeEnd, resultTime);
+alter table dbo.observation add constraint obsIdentifierUK unique (identifier);
+create index obsSeriesIdx on dbo.observation (seriesId);
+create index obsPhenTimeStartIdx on dbo.observation (phenomenonTimeStart);
+create index obsPhenTimeEndIdx on dbo.observation (phenomenonTimeEnd);
+create index obsResultTimeIdx on dbo.observation (resultTime);
+create index obsCodespaceIdx on dbo.observation (codespaceId);
+alter table dbo.observationConstellation add constraint obsnConstellationIdentity unique (observablePropertyId, procedureId, offeringId);
+create index obsConstObsPropIdx on dbo.observationConstellation (observablePropertyId);
+create index obsConstProcedureIdx on dbo.observationConstellation (procedureId);
+create index obsConstOfferingIdx on dbo.observationConstellation (offeringId);
+create index obshasoffobservationidx on dbo.observationHasOffering (observationId);
+create index obshasoffofferingidx on dbo.observationHasOffering (offeringId);
+alter table dbo.observationType add constraint observationTypeUK unique (observationType);
+alter table dbo.offering add constraint offIdentifierUK unique (identifier);
+alter table dbo.procedureDescriptionFormat add constraint procDescFormatUK unique (procedureDescriptionFormat);
+alter table dbo.relatedFeatureRole add constraint relFeatRoleUK unique (relatedFeatureRole);
+create index resultTempOfferingIdx on dbo.resultTemplate (offeringId);
+create index resultTempeObsPropIdx on dbo.resultTemplate (observablePropertyId);
+create index resultTempProcedureIdx on dbo.resultTemplate (procedureId);
+create index resultTempIdentifierIdx on dbo.resultTemplate (identifier);
+alter table dbo.series add constraint seriesIdentity unique (featureOfInterestId, observablePropertyId, procedureId);
+create index seriesFeatureIdx on dbo.series (featureOfInterestId);
+create index seriesObsPropIdx on dbo.series (observablePropertyId);
+create index seriesProcedureIdx on dbo.series (procedureId);
+alter table dbo.unit add constraint unitUK unique (unit);
+create index validProcedureTimeStartTimeIdx on dbo.validProcedureTime (startTime);
+create index validProcedureTimeEndTimeIdx on dbo.validProcedureTime (endTime);
+alter table dbo.[procedure] add constraint procProcDescFormatFk foreign key (procedureDescriptionFormatId) references dbo.procedureDescriptionFormat;
+alter table dbo.blobValue add constraint observationBlobValueFk foreign key (observationId) references dbo.observation;
+alter table dbo.booleanValue add constraint observationBooleanValueFk foreign key (observationId) references dbo.observation;
+alter table dbo.categoryValue add constraint observationCategoryValueFk foreign key (observationId) references dbo.observation;
+alter table dbo.compositePhenomenon add constraint observablePropertyChildFk foreign key (childObservablePropertyId) references dbo.observableProperty;
+alter table dbo.compositePhenomenon add constraint observablePropertyParentFk foreign key (parentObservablePropertyId) references dbo.observableProperty;
+alter table dbo.countValue add constraint observationCountValueFk foreign key (observationId) references dbo.observation;
+alter table dbo.featureOfInterest add constraint featureFeatureTypeFk foreign key (featureOfInterestTypeId) references dbo.featureOfInterestType;
+alter table dbo.featureOfInterest add constraint featureCodespaceFk foreign key (codespaceId) references dbo.codespace;
+alter table dbo.featureRelation add constraint featureOfInterestChildFk foreign key (childFeatureId) references dbo.featureOfInterest;
+alter table dbo.featureRelation add constraint featureOfInterestParentFk foreign key (parentFeatureId) references dbo.featureOfInterest;
+alter table dbo.geometryValue add constraint observationGeometryValueFk foreign key (observationId) references dbo.observation;
+alter table dbo.numericValue add constraint observationNumericValueFk foreign key (observationId) references dbo.observation;
+alter table dbo.observation add constraint observationSeriesFk foreign key (seriesId) references dbo.series;
+alter table dbo.observation add constraint observationCodespaceFk foreign key (codespaceId) references dbo.codespace;
+alter table dbo.observation add constraint observationUnitFk foreign key (unitId) references dbo.unit;
+alter table dbo.observationConstellation add constraint obsConstObsPropFk foreign key (observablePropertyId) references dbo.observableProperty;
+alter table dbo.observationConstellation add constraint obsnConstProcedureFk foreign key (procedureId) references dbo.[procedure];
+alter table dbo.observationConstellation add constraint obsConstObservationIypeFk foreign key (observationTypeId) references dbo.observationType;
+alter table dbo.observationConstellation add constraint obsConstOfferingFk foreign key (offeringId) references dbo.offering;
+alter table dbo.observationHasOffering add constraint observationOfferingFk foreign key (offeringId) references dbo.offering;
+alter table dbo.observationHasOffering add constraint FK_9ex7hawh3dbplkllmw5w3kvej foreign key (observationId) references dbo.observation;
+alter table dbo.offeringAllowedFeatureType add constraint offeringFeatureTypeFk foreign key (featureOfInterestTypeId) references dbo.featureOfInterestType;
+alter table dbo.offeringAllowedFeatureType add constraint FK_6vvrdxvd406n48gkm706ow1pt foreign key (offeringId) references dbo.offering;
+alter table dbo.offeringAllowedObservationType add constraint offeringObservationTypeFk foreign key (observationTypeId) references dbo.observationType;
+alter table dbo.offeringAllowedObservationType add constraint FK_lkljeohulvu7cr26pduyp5bd0 foreign key (offeringId) references dbo.offering;
+alter table dbo.offeringHasRelatedFeature add constraint relatedFeatureOfferingFk foreign key (offeringId) references dbo.offering;
+alter table dbo.offeringHasRelatedFeature add constraint offeringRelatedFeatureFk foreign key (relatedFeatureId) references dbo.relatedFeature;
+alter table dbo.relatedFeature add constraint relatedFeatureFeatureFk foreign key (featureOfInterestId) references dbo.featureOfInterest;
+alter table dbo.relatedFeatureHasRole add constraint relatedFeatRelatedFeatRoleFk foreign key (relatedFeatureRoleId) references dbo.relatedFeatureRole;
+alter table dbo.relatedFeatureHasRole add constraint FK_6ynwkk91xe8p1uibmjt98sog3 foreign key (relatedFeatureId) references dbo.relatedFeature;
+alter table dbo.resultTemplate add constraint resultTemplateOfferingIdx foreign key (offeringId) references dbo.offering;
+alter table dbo.resultTemplate add constraint resultTemplateObsPropFk foreign key (observablePropertyId) references dbo.observableProperty;
+alter table dbo.resultTemplate add constraint resultTemplateProcedureFk foreign key (procedureId) references dbo.[procedure];
+alter table dbo.resultTemplate add constraint resultTemplateFeatureIdx foreign key (featureOfInterestId) references dbo.featureOfInterest;
+alter table dbo.sensorSystem add constraint procedureChildFk foreign key (childSensorId) references dbo.[procedure];
+alter table dbo.sensorSystem add constraint procedureParenfFk foreign key (parentSensorId) references dbo.[procedure];
+alter table dbo.series add constraint seriesFeatureFk foreign key (featureOfInterestId) references dbo.featureOfInterest;
+alter table dbo.series add constraint seriesObPropFk foreign key (observablePropertyId) references dbo.observableProperty;
+alter table dbo.series add constraint seriesProcedureFk foreign key (procedureId) references dbo.[procedure];
+alter table dbo.series add constraint seriesUnitFk foreign key (unitId) references dbo.unit;
+alter table dbo.sweDataArrayValue add constraint observationSweDataArrayValueFk foreign key (observationId) references dbo.observation;
+alter table dbo.textValue add constraint observationTextValueFk foreign key (observationId) references dbo.observation;
+alter table dbo.validProcedureTime add constraint validProcedureTimeProcedureFk foreign key (procedureId) references dbo.[procedure];
+alter table dbo.validProcedureTime add constraint validProcProcDescFormatFk foreign key (procedureDescriptionFormatId) references dbo.procedureDescriptionFormat;
+DECLARE @ObjectName NVARCHAR(100);SELECT @ObjectName = ccu.CONSTRAINT_NAME FROM INFORMATION_SCHEMA.CONSTRAINT_COLUMN_USAGE ccu, INFORMATION_SCHEMA.TABLE_CONSTRAINTS tc WHERE ccu.CONSTRAINT_NAME = tc.CONSTRAINT_NAME AND ccu.TABLE_NAME='featureOfInterest' AND ccu.COLUMN_NAME='url';IF (OBJECT_ID(@ObjectName, 'UQ') IS NOT NULL) BEGIN EXEC('ALTER TABLE sos.dbo.featureOfInterest DROP CONSTRAINT ' + @ObjectName); END;
+CREATE UNIQUE NONCLUSTERED INDEX featureOfInterest_url ON sos.dbo.featureOfInterest(url)WHERE url IS NOT NULL;
+DECLARE @ObjectName2 NVARCHAR(100);SELECT @ObjectName2 = ccu.CONSTRAINT_NAME FROM INFORMATION_SCHEMA.CONSTRAINT_COLUMN_USAGE ccu, INFORMATION_SCHEMA.TABLE_CONSTRAINTS tc WHERE ccu.CONSTRAINT_NAME = tc.CONSTRAINT_NAME AND ccu.TABLE_NAME='featureOfInterest' AND ccu.COLUMN_NAME='identifier';IF (OBJECT_ID(@ObjectName2, 'UQ') IS NOT NULL) BEGIN EXEC('ALTER TABLE sos.dbo.featureOfInterest DROP CONSTRAINT ' + @ObjectName2); END;
+CREATE UNIQUE NONCLUSTERED INDEX featureOfInterest_identifier ON sos.dbo.featureOfInterest(identifier)WHERE identifier IS NOT NULL;
+DECLARE @ObjectName3 NVARCHAR(100);SELECT @ObjectName3 = ccu.CONSTRAINT_NAME FROM INFORMATION_SCHEMA.CONSTRAINT_COLUMN_USAGE ccu, INFORMATION_SCHEMA.TABLE_CONSTRAINTS tc WHERE ccu.CONSTRAINT_NAME = tc.CONSTRAINT_NAME AND ccu.TABLE_NAME='observation' AND ccu.COLUMN_NAME='identifier';IF (OBJECT_ID(@ObjectName3, 'UQ') IS NOT NULL) BEGIN EXEC('ALTER TABLE sos.dbo.observation DROP CONSTRAINT ' + @ObjectName3); END;
+CREATE UNIQUE NONCLUSTERED INDEX observation_identifier ON sos.dbo.observation(identifier)WHERE identifier IS NOT NULL;
diff --git a/misc/db/SqlServer/series/SqlServer_series_drop_script.sql b/misc/db/SqlServer/series/SqlServer_series_drop_script.sql
new file mode 100644
index 0000000000..6e37aa1380
--- /dev/null
+++ b/misc/db/SqlServer/series/SqlServer_series_drop_script.sql
@@ -0,0 +1,62 @@
+--
+-- Copyright (C) 2012-2014 52°North Initiative for Geospatial Open Source
+-- Software GmbH
+--
+-- This program is free software; you can redistribute it and/or modify it
+-- under the terms of the GNU General Public License version 2 as published
+-- by the Free Software Foundation.
+--
+-- If the program is linked with libraries which are licensed under one of
+-- the following licenses, the combination of the program with the linked
+-- library is not considered a "derivative work" of the program:
+--
+-- - Apache License, version 2.0
+-- - Apache Software License, version 1.0
+-- - GNU Lesser General Public License, version 3
+-- - Mozilla Public License, versions 1.0, 1.1 and 2.0
+-- - Common Development and Distribution License (CDDL), version 1.0
+--
+-- Therefore the distribution of the program linked with libraries licensed
+-- under the aforementioned licenses, is permitted by the copyright holders
+-- if the distribution is compliant with both the GNU General Public
+-- License version 2 and the aforementioned licenses.
+--
+-- This program is distributed in the hope that it will be useful, but
+-- WITHOUT ANY WARRANTY; without even the implied warranty of
+-- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General
+-- Public License for more details.
+--
+
+drop table dbo.blobValue;
+drop table dbo.booleanValue;
+drop table dbo.categoryValue;
+drop table dbo.countValue;
+drop table dbo.geometryValue;
+drop table dbo.numericValue;
+drop table dbo.sweDataArrayValue;
+drop table dbo.textValue;
+drop table dbo.compositePhenomenon;
+drop table dbo.parameter;
+drop table dbo.observationHasOffering;
+drop table dbo.offeringAllowedFeatureType;
+drop table dbo.offeringAllowedObservationType;
+drop table dbo.offeringHasRelatedFeature;
+drop table dbo.relatedFeatureHasRole;
+drop table dbo.relatedFeatureRole;
+drop table dbo.relatedFeature;
+drop table dbo.sensorSystem;
+drop table dbo.validProcedureTime;
+drop table dbo.resultTemplate;
+drop table dbo.featureRelation;
+drop table dbo.observationConstellation;
+drop table dbo.observation;
+drop table dbo.series;
+drop table dbo.unit;
+drop table dbo.observationType;
+drop table dbo.featureOfInterest;
+drop table dbo.observableProperty;
+drop table dbo.offering;
+drop table dbo.[procedure];
+drop table dbo.featureOfInterestType;
+drop table dbo.procedureDescriptionFormat;
+drop table dbo.codespace;
\ No newline at end of file
diff --git a/misc/db/SqlServer/update_spatialfilteringprofile_handling.sql b/misc/db/SqlServer/update_spatialfilteringprofile_handling.sql
index adc2107edd..20d3f89de9 100644
--- a/misc/db/SqlServer/update_spatialfilteringprofile_handling.sql
+++ b/misc/db/SqlServer/update_spatialfilteringprofile_handling.sql
@@ -27,6 +27,8 @@
-- Public License for more details.
--
+-- change schema 'sos' to your schema if necessary
+
ALTER TABLE sos.dbo.observation ADD samplingGeometry GEOMETRY;
UPDATE sos.dbo.observation SET sos.dbo.observation.samplingGeometry = spf.geom FROM sos.dbo.spatialFilteringProfile spf WHERE sos.dbo.observation.observationid = spf.observation;
From 3b35f04ee0123b73c90cecf23305d4b36af09c57 Mon Sep 17 00:00:00 2001
From: CarstenHollmann
Date: Wed, 13 Aug 2014 10:26:11 +0200
Subject: [PATCH 196/229] Remove samplingGeomIdx from samplingGeometry column
definition because of problem with other DBMS except PostgreSQL
---
.../main/resources/mapping/old/observation/Observation.hbm.xml | 2 +-
.../resources/mapping/old/observation/ObservationInfo.hbm.xml | 2 +-
.../resources/mapping/old/observation/ObservationValue.hbm.xml | 2 +-
.../mapping/old/observation/ObservationValueTime.hbm.xml | 2 +-
.../mapping/series/observation/SeriesObservation.hbm.xml | 2 +-
.../mapping/series/observation/SeriesObservationInfo.hbm.xml | 2 +-
.../mapping/series/observation/SeriesObservationTime.hbm.xml | 2 +-
.../resources/mapping/series/observation/SeriesValue.hbm.xml | 2 +-
.../mapping/series/observation/SeriesValueTime.hbm.xml | 2 +-
9 files changed, 9 insertions(+), 9 deletions(-)
diff --git a/hibernate/mappings/src/main/resources/mapping/old/observation/Observation.hbm.xml b/hibernate/mappings/src/main/resources/mapping/old/observation/Observation.hbm.xml
index 86d7932b86..1071d92fa4 100644
--- a/hibernate/mappings/src/main/resources/mapping/old/observation/Observation.hbm.xml
+++ b/hibernate/mappings/src/main/resources/mapping/old/observation/Observation.hbm.xml
@@ -57,7 +57,7 @@
-
+
diff --git a/hibernate/mappings/src/main/resources/mapping/old/observation/ObservationInfo.hbm.xml b/hibernate/mappings/src/main/resources/mapping/old/observation/ObservationInfo.hbm.xml
index b9a2f54a84..ad802da1fd 100644
--- a/hibernate/mappings/src/main/resources/mapping/old/observation/ObservationInfo.hbm.xml
+++ b/hibernate/mappings/src/main/resources/mapping/old/observation/ObservationInfo.hbm.xml
@@ -62,7 +62,7 @@
-
+
diff --git a/hibernate/mappings/src/main/resources/mapping/old/observation/ObservationValue.hbm.xml b/hibernate/mappings/src/main/resources/mapping/old/observation/ObservationValue.hbm.xml
index afe52822b7..a71a1ea9e6 100644
--- a/hibernate/mappings/src/main/resources/mapping/old/observation/ObservationValue.hbm.xml
+++ b/hibernate/mappings/src/main/resources/mapping/old/observation/ObservationValue.hbm.xml
@@ -57,7 +57,7 @@
-
+
diff --git a/hibernate/mappings/src/main/resources/mapping/old/observation/ObservationValueTime.hbm.xml b/hibernate/mappings/src/main/resources/mapping/old/observation/ObservationValueTime.hbm.xml
index 7c01d6a0eb..06bb8486d9 100644
--- a/hibernate/mappings/src/main/resources/mapping/old/observation/ObservationValueTime.hbm.xml
+++ b/hibernate/mappings/src/main/resources/mapping/old/observation/ObservationValueTime.hbm.xml
@@ -45,7 +45,7 @@
-
+
diff --git a/hibernate/mappings/src/main/resources/mapping/series/observation/SeriesObservation.hbm.xml b/hibernate/mappings/src/main/resources/mapping/series/observation/SeriesObservation.hbm.xml
index ed16828493..ed7a2c2f31 100644
--- a/hibernate/mappings/src/main/resources/mapping/series/observation/SeriesObservation.hbm.xml
+++ b/hibernate/mappings/src/main/resources/mapping/series/observation/SeriesObservation.hbm.xml
@@ -51,7 +51,7 @@
-
+
diff --git a/hibernate/mappings/src/main/resources/mapping/series/observation/SeriesObservationInfo.hbm.xml b/hibernate/mappings/src/main/resources/mapping/series/observation/SeriesObservationInfo.hbm.xml
index e344f46f5e..fa0b3ef055 100644
--- a/hibernate/mappings/src/main/resources/mapping/series/observation/SeriesObservationInfo.hbm.xml
+++ b/hibernate/mappings/src/main/resources/mapping/series/observation/SeriesObservationInfo.hbm.xml
@@ -51,7 +51,7 @@
-
+
diff --git a/hibernate/mappings/src/main/resources/mapping/series/observation/SeriesObservationTime.hbm.xml b/hibernate/mappings/src/main/resources/mapping/series/observation/SeriesObservationTime.hbm.xml
index 05bfc7fe1f..d86dccf9f3 100644
--- a/hibernate/mappings/src/main/resources/mapping/series/observation/SeriesObservationTime.hbm.xml
+++ b/hibernate/mappings/src/main/resources/mapping/series/observation/SeriesObservationTime.hbm.xml
@@ -39,7 +39,7 @@
-
+
diff --git a/hibernate/mappings/src/main/resources/mapping/series/observation/SeriesValue.hbm.xml b/hibernate/mappings/src/main/resources/mapping/series/observation/SeriesValue.hbm.xml
index 5dd1fa790f..7d85a1bc39 100644
--- a/hibernate/mappings/src/main/resources/mapping/series/observation/SeriesValue.hbm.xml
+++ b/hibernate/mappings/src/main/resources/mapping/series/observation/SeriesValue.hbm.xml
@@ -51,7 +51,7 @@
-
+
diff --git a/hibernate/mappings/src/main/resources/mapping/series/observation/SeriesValueTime.hbm.xml b/hibernate/mappings/src/main/resources/mapping/series/observation/SeriesValueTime.hbm.xml
index bc230cf4f7..84f45c166c 100644
--- a/hibernate/mappings/src/main/resources/mapping/series/observation/SeriesValueTime.hbm.xml
+++ b/hibernate/mappings/src/main/resources/mapping/series/observation/SeriesValueTime.hbm.xml
@@ -39,7 +39,7 @@
-
+
From 4e74a5efa3e074bf366ce83ea920f6f12c570cde Mon Sep 17 00:00:00 2001
From: CarstenHollmann
Date: Wed, 13 Aug 2014 10:26:37 +0200
Subject: [PATCH 197/229] Add log statements
---
.../org/n52/sos/web/install/InstallFinishController.java | 5 +++++
1 file changed, 5 insertions(+)
diff --git a/spring/install-controller/src/main/java/org/n52/sos/web/install/InstallFinishController.java b/spring/install-controller/src/main/java/org/n52/sos/web/install/InstallFinishController.java
index d664587a92..7c48fb52f5 100644
--- a/spring/install-controller/src/main/java/org/n52/sos/web/install/InstallFinishController.java
+++ b/spring/install-controller/src/main/java/org/n52/sos/web/install/InstallFinishController.java
@@ -95,15 +95,19 @@ protected void process(Map param, InstallationConfiguration c) t
try {
if (c.isDropSchema()) {
String[] dropSchema = datasource.dropSchema(c.getDatabaseSettings());
+ LOG.debug("Drop database with the following statements!");
datasource.execute(dropSchema, c.getDatabaseSettings());
+ LOG.debug("Dropping the database finished!");
}
datasource.prepare(c.getDatabaseSettings());
if (c.isCreateSchema()) {
String[] createSchema = datasource.createSchema(c.getDatabaseSettings());
+ LOG.debug("Create database with the following statements!");
datasource.execute(createSchema, c.getDatabaseSettings());
if (datasource.isPostCreateSchema()) {
datasource.executePostCreateSchema(c.getDatabaseSettings());
}
+ LOG.debug("Database creation finished!");
}
if (c.isForceUpdateSchema()) {
String[] updateSchema = datasource.updateSchema(c.getDatabaseSettings());
@@ -115,6 +119,7 @@ protected void process(Map param, InstallationConfiguration c) t
}
}
datasource.execute(updateSchema, c.getDatabaseSettings());
+ LOG.debug("Updating the database finished!");
}
} catch (Throwable e) {
throw new InstallationSettingsError(c, String.format(ErrorMessages.COULD_NOT_CONNECT_TO_THE_DATABASE,
From 848d6a790b926e62d795c4f7bd2d21f7cde8eb2f Mon Sep 17 00:00:00 2001
From: CarstenHollmann
Date: Wed, 13 Aug 2014 10:27:35 +0200
Subject: [PATCH 198/229] Set default value of
SpatialFiltieringProfileDefinition to false.
---
.../java/org/n52/sos/ds/datasource/PostgresCoreDatasource.java | 1 -
.../java/org/n52/sos/ds/datasource/PostgresCustomDatasource.java | 1 -
2 files changed, 2 deletions(-)
diff --git a/hibernate/datasource/postgres/src/main/java/org/n52/sos/ds/datasource/PostgresCoreDatasource.java b/hibernate/datasource/postgres/src/main/java/org/n52/sos/ds/datasource/PostgresCoreDatasource.java
index c9642b8988..9ef17c8eb1 100644
--- a/hibernate/datasource/postgres/src/main/java/org/n52/sos/ds/datasource/PostgresCoreDatasource.java
+++ b/hibernate/datasource/postgres/src/main/java/org/n52/sos/ds/datasource/PostgresCoreDatasource.java
@@ -52,7 +52,6 @@ public PostgresCoreDatasource() {
setPortDescription(PORT_DESCRIPTION);
setSchemaDefault(SCHEMA_DEFAULT_VALUE);
setSchemaDescription(SCHEMA_DESCRIPTION);
- getSpatialFilteringProfileDefiniton().setDefaultValue(false);
super.setTransactional(false);
}
diff --git a/hibernate/datasource/postgres/src/main/java/org/n52/sos/ds/datasource/PostgresCustomDatasource.java b/hibernate/datasource/postgres/src/main/java/org/n52/sos/ds/datasource/PostgresCustomDatasource.java
index 21aae46ca2..6a2ccd6b2c 100644
--- a/hibernate/datasource/postgres/src/main/java/org/n52/sos/ds/datasource/PostgresCustomDatasource.java
+++ b/hibernate/datasource/postgres/src/main/java/org/n52/sos/ds/datasource/PostgresCustomDatasource.java
@@ -53,7 +53,6 @@ public PostgresCustomDatasource() {
setPortDescription(PORT_DESCRIPTION);
setSchemaDefault(SCHEMA_DEFAULT_VALUE);
setSchemaDescription(SCHEMA_DESCRIPTION);
- getSpatialFilteringProfileDefiniton().setDefaultValue(false);
super.setTransactional(false);
}
From 6a95084ec27df78427ed4aff84e1993decedc660 Mon Sep 17 00:00:00 2001
From: CarstenHollmann
Date: Wed, 13 Aug 2014 14:39:32 +0200
Subject: [PATCH 199/229] Throw exception if the swe:DataArray elementType
element is not a swe:DataRecord for Swe Common 1.0.1 because other elements
are not yet supported.
---
.../java/org/n52/sos/decode/SweCommonDecoderV101.java | 11 ++++++++++-
1 file changed, 10 insertions(+), 1 deletion(-)
diff --git a/coding/sensorML-v101/src/main/java/org/n52/sos/decode/SweCommonDecoderV101.java b/coding/sensorML-v101/src/main/java/org/n52/sos/decode/SweCommonDecoderV101.java
index df2349f378..69b04304b9 100644
--- a/coding/sensorML-v101/src/main/java/org/n52/sos/decode/SweCommonDecoderV101.java
+++ b/coding/sensorML-v101/src/main/java/org/n52/sos/decode/SweCommonDecoderV101.java
@@ -103,6 +103,8 @@
import org.n52.sos.service.ServiceConstants.SupportedTypeKey;
import org.n52.sos.util.CodingHelper;
import org.n52.sos.util.DateTimeHelper;
+import org.n52.sos.util.XmlHelper;
+import org.n52.sos.util.XmlOptionsHelper;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
@@ -295,8 +297,15 @@ private SweSimpleDataRecord parseSimpleDataRecord(final SimpleDataRecordType sim
}
private SweDataArray parseSweDataArrayType(final DataArrayType xbDataArray) throws OwsExceptionReport {
+ if (!xbDataArray.getElementType().isSetAbstractDataRecord()) {
+ throw new InvalidParameterValueException().at(XmlHelper.getLocalName(xbDataArray.getElementType())).withMessage(
+ "The swe:DataArray contains a not yet supported elementType element. Currently only 'swe:DataRecord' is supported as elementType element.");
+ }
+ // TODO implement full support
final SweDataArray dataArray = new SweDataArray();
- // TODO
+ DataArrayDocument xbDataArrayDoc = DataArrayDocument.Factory.newInstance(XmlOptionsHelper.getInstance().getXmlOptions());
+ xbDataArrayDoc.setDataArray1(xbDataArray);
+ dataArray.setXml(xbDataArrayDoc.xmlText());
return dataArray;
}
From 39a00ad8998ee391f91cdd75b47f0f9c871e7125 Mon Sep 17 00:00:00 2001
From: CarstenHollmann
Date: Wed, 13 Aug 2014 14:54:38 +0200
Subject: [PATCH 200/229] Add TODO comment
---
.../src/main/java/org/n52/sos/encode/SweCommonEncoderv20.java | 1 +
1 file changed, 1 insertion(+)
diff --git a/coding/sos-v20/src/main/java/org/n52/sos/encode/SweCommonEncoderv20.java b/coding/sos-v20/src/main/java/org/n52/sos/encode/SweCommonEncoderv20.java
index 90d8253ed9..17d14d91f7 100644
--- a/coding/sos-v20/src/main/java/org/n52/sos/encode/SweCommonEncoderv20.java
+++ b/coding/sos-v20/src/main/java/org/n52/sos/encode/SweCommonEncoderv20.java
@@ -301,6 +301,7 @@ private DataArrayType createDataArray(final SweDataArray sosDataArray) throws Ow
elementType.addNewAbstractDataComponent().set(
createDataRecord((SweDataRecord) sosDataArray.getElementType()));
+ // TODO allow other dataComponents.
elementType.getAbstractDataComponent().substitute(
new QName(SweConstants.NS_SWE_20, SweConstants.EN_DATA_RECORD, SweConstants.NS_SWE_PREFIX),
DataRecordType.type);
From 62ccaeccb9f6b949f1abcbcab9ff2c0c39b68f73 Mon Sep 17 00:00:00 2001
From: CarstenHollmann
Date: Wed, 13 Aug 2014 14:57:39 +0200
Subject: [PATCH 201/229] Add QName for Swe Common 1.0.1 DataArray
---
core/api/src/main/java/org/n52/sos/ogc/swe/SweConstants.java | 2 ++
1 file changed, 2 insertions(+)
diff --git a/core/api/src/main/java/org/n52/sos/ogc/swe/SweConstants.java b/core/api/src/main/java/org/n52/sos/ogc/swe/SweConstants.java
index 169ac18509..0bcd21174e 100644
--- a/core/api/src/main/java/org/n52/sos/ogc/swe/SweConstants.java
+++ b/core/api/src/main/java/org/n52/sos/ogc/swe/SweConstants.java
@@ -185,6 +185,8 @@ public interface SweConstants {
QName QN_VALUE_SWE_200 = new QName(NS_SWE_20, EN_VALUE, NS_SWE_PREFIX);
+ QName QN_DATA_ARRAY_SWE_101 = new QName(NS_SWE_101, EN_DATA_ARRAY, NS_SWE_PREFIX);
+
/**
* Enum for SensorML types
*/
From 7051fddd5eae6b8b86b12728d1b02caa9fb06c1d Mon Sep 17 00:00:00 2001
From: CarstenHollmann
Date: Wed, 13 Aug 2014 14:58:44 +0200
Subject: [PATCH 202/229] Update test to use DateRecord as elementType element
---
.../test/java/org/n52/sos/decode/SensorMLDecoderV101Test.java | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/coding/sensorML-v101/src/test/java/org/n52/sos/decode/SensorMLDecoderV101Test.java b/coding/sensorML-v101/src/test/java/org/n52/sos/decode/SensorMLDecoderV101Test.java
index 7a80fdce11..6618c2ff22 100644
--- a/coding/sensorML-v101/src/test/java/org/n52/sos/decode/SensorMLDecoderV101Test.java
+++ b/coding/sensorML-v101/src/test/java/org/n52/sos/decode/SensorMLDecoderV101Test.java
@@ -435,7 +435,7 @@ private DataArrayType getDataArray() {
dataArray.addNewElementCount().addNewCount().setValue(new BigInteger("1"));
DataComponentPropertyType addNewElementType = dataArray.addNewElementType();
addNewElementType.setName("elementType");
- addNewElementType.addNewBoolean();
+ addNewElementType.addNewAbstractDataRecord();
return dataArray;
}
From 049f6b95eb30c9a86173629bcc7db14002ab6b84 Mon Sep 17 00:00:00 2001
From: CarstenHollmann
Date: Wed, 13 Aug 2014 15:00:57 +0200
Subject: [PATCH 203/229] Substitute encoded complex objects when adding to
SensorML 1.0.1 output.
---
.../java/org/n52/sos/encode/SensorMLEncoderv101.java | 11 +++++++++--
1 file changed, 9 insertions(+), 2 deletions(-)
diff --git a/coding/sensorML-v101/src/main/java/org/n52/sos/encode/SensorMLEncoderv101.java b/coding/sensorML-v101/src/main/java/org/n52/sos/encode/SensorMLEncoderv101.java
index a958ca5ceb..ec31ab4c5c 100644
--- a/coding/sensorML-v101/src/main/java/org/n52/sos/encode/SensorMLEncoderv101.java
+++ b/coding/sensorML-v101/src/main/java/org/n52/sos/encode/SensorMLEncoderv101.java
@@ -84,6 +84,9 @@
import net.opengis.sensorML.x101.SystemType;
import net.opengis.sensorML.x101.TermDocument.Term;
import net.opengis.swe.x101.AnyScalarPropertyType;
+import net.opengis.swe.x101.DataArrayDocument;
+import net.opengis.swe.x101.DataArrayType;
+import net.opengis.swe.x101.DataRecordType;
import net.opengis.swe.x101.PositionType;
import net.opengis.swe.x101.SimpleDataRecordType;
import net.opengis.swe.x101.VectorType;
@@ -1263,10 +1266,14 @@ private void addIoComponentPropertyType(final IoComponentPropertyType ioComponen
ioComponentPropertyType.addNewTimeRange().set(encodeObjectToXml);
break;
case DataArray:
- ioComponentPropertyType.addNewAbstractDataArray1().set(encodeObjectToXml);
+ if (encodeObjectToXml instanceof DataArrayDocument) {
+ ioComponentPropertyType.addNewAbstractDataArray1().set(((DataArrayDocument)encodeObjectToXml).getDataArray1()).substitute(SweConstants.QN_DATA_ARRAY_SWE_101, DataArrayType.type);
+ } else {
+ ioComponentPropertyType.addNewAbstractDataArray1().set(encodeObjectToXml).substitute(SweConstants.QN_DATA_ARRAY_SWE_101, DataArrayType.type);
+ }
break;
case DataRecord:
- ioComponentPropertyType.addNewAbstractDataRecord().set(encodeObjectToXml);
+ ioComponentPropertyType.addNewAbstractDataRecord().set(encodeObjectToXml).substitute(SweConstants.QN_DATA_RECORD_SWE_101, DataRecordType.type);
break;
default:
From 71b6dc912d57f975a7d08bfadd3368be4d5394f0 Mon Sep 17 00:00:00 2001
From: CarstenHollmann
Date: Wed, 13 Aug 2014 15:03:07 +0200
Subject: [PATCH 204/229] - Add support for encoding swe:DataRecord and
swe:DataArray as swe:Field. - Add definition encoding for swe:DataRecord -
Add swe:DataArray encoding from XML string support
---
.../n52/sos/encode/SweCommonEncoderv101.java | 105 +++++++++++-------
1 file changed, 66 insertions(+), 39 deletions(-)
diff --git a/coding/sensorML-v101/src/main/java/org/n52/sos/encode/SweCommonEncoderv101.java b/coding/sensorML-v101/src/main/java/org/n52/sos/encode/SweCommonEncoderv101.java
index 4502f350f6..ab13cef675 100644
--- a/coding/sensorML-v101/src/main/java/org/n52/sos/encode/SweCommonEncoderv101.java
+++ b/coding/sensorML-v101/src/main/java/org/n52/sos/encode/SweCommonEncoderv101.java
@@ -275,6 +275,14 @@ private DataComponentPropertyType createField(final SweField sweField) throws Ow
final EnvelopeType xbEnvelope = (EnvelopeType) xbField.addNewAbstractDataRecord()
.substitute(SweConstants.QN_ENVELOPE_SWE_101, EnvelopeType.type);
xbEnvelope.set(createEnvelope((SweEnvelope) sosElement));
+ } else if (sosElement instanceof SweDataRecord) {
+ final DataRecordType xbEnvelope = (DataRecordType) xbField.addNewAbstractDataRecord()
+ .substitute(SweConstants.QN_DATA_RECORD_SWE_101, DataRecordType.type);
+ xbEnvelope.set(createDataRecord((SweDataRecord) sosElement));
+ } else if (sosElement instanceof SweDataArray) {
+ final DataArrayType xbEnvelope = (DataArrayType) xbField.addNewAbstractDataRecord()
+ .substitute(SweConstants.QN_DATA_RECORD_SWE_101, DataArrayType.type);
+ xbEnvelope.set(createDataArray((SweDataArray) sosElement).getDataArray1());
} else {
throw new NoApplicableCodeException().withMessage(
"The element type '%s' of the received '%s' is not supported by this encoder '%s'.",
@@ -536,7 +544,11 @@ private DataRecordType createDataRecord(final SweDataRecord sosDataRecord) throw
final DataRecordType xbDataRecord =
DataRecordType.Factory.newInstance(XmlOptionsHelper.getInstance().getXmlOptions());
-
+
+ if (sosDataRecord.isSetDefinition()) {
+ xbDataRecord.setDefinition(sosDataRecord.getDefinition());
+ }
+
if (sosDataRecord.isSetFields()) {
final DataComponentPropertyType[] xbFields = new DataComponentPropertyType[sosFields.size()];
int xbFieldIndex = 0;
@@ -552,44 +564,59 @@ private DataRecordType createDataRecord(final SweDataRecord sosDataRecord) throw
private DataArrayDocument createDataArray(final SweDataArray sosDataArray) throws OwsExceptionReport {
if (sosDataArray != null) {
-
- final DataArrayDocument xbDataArrayDoc =
- DataArrayDocument.Factory.newInstance(XmlOptionsHelper.getInstance().getXmlOptions());
- final DataArrayType xbDataArray = xbDataArrayDoc.addNewDataArray1();
-
- // set element count
- if (sosDataArray.getElementCount() != null) {
- xbDataArray.addNewElementCount().addNewCount().set(createCount(sosDataArray.getElementCount()));
- }
-
- if (sosDataArray.getElementType() != null) {
- final DataComponentPropertyType xbElementType = xbDataArray.addNewElementType();
- xbDataArray.getElementType().setName("Components");
-
- final DataRecordType xbDataRecord = createDataRecord((SweDataRecord) sosDataArray.getElementType());
- xbElementType.set(xbDataRecord);
- }
-
- if (sosDataArray.getEncoding() != null) {
-
- final BlockEncodingPropertyType xbEncoding = xbDataArray.addNewEncoding();
- xbEncoding.set(createBlockEncoding(sosDataArray.getEncoding()));
- // xbDataArray.getEncoding().substitute(
- // new QName(SWEConstants.NS_SWE_101,
- // SWEConstants.EN_TEXT_ENCODING,
- // SWEConstants.NS_SWE_PREFIX), TextBlock.type);
- }
- final DataValuePropertyType xbValues = xbDataArray.addNewValues();
- // if (absObs.getObservationTemplateIDs() == null
- // || (absObs.getObservationTemplateIDs() != null &&
- // absObs.getObservationTemplateIDs().isEmpty())) {
- // xbValues.newCursor().setTextValue(createResultString(phenComponents,
- // absObs));
- // }
- if (sosDataArray.isSetValues()) {
- xbValues.set(createValues(sosDataArray.getValues(), sosDataArray.getEncoding()));
- }
- return xbDataArrayDoc;
+ if (sosDataArray.isSetElementTyp()) {
+ final DataArrayDocument xbDataArrayDoc =
+ DataArrayDocument.Factory.newInstance(XmlOptionsHelper.getInstance().getXmlOptions());
+ final DataArrayType xbDataArray = xbDataArrayDoc.addNewDataArray1();
+
+ // set element count
+ if (sosDataArray.isSetElementCount()) {
+ xbDataArray.addNewElementCount().addNewCount().set(createCount(sosDataArray.getElementCount()));
+ }
+
+ if (sosDataArray.isSetElementTyp()) {
+ final DataComponentPropertyType xbElementType = xbDataArray.addNewElementType();
+ xbDataArray.getElementType().setName("Components");
+//
+// final DataRecordType xbDataRecord = createDataRecord((SweDataRecord) sosDataArray.getElementType());
+ xbElementType.set(encode(sosDataArray.getElementType()));
+ }
+
+ if (sosDataArray.isSetEncoding()) {
+
+ final BlockEncodingPropertyType xbEncoding = xbDataArray.addNewEncoding();
+ xbEncoding.set(createBlockEncoding(sosDataArray.getEncoding()));
+ // xbDataArray.getEncoding().substitute(
+ // new QName(SWEConstants.NS_SWE_101,
+ // SWEConstants.EN_TEXT_ENCODING,
+ // SWEConstants.NS_SWE_PREFIX), TextBlock.type);
+ }
+ final DataValuePropertyType xbValues = xbDataArray.addNewValues();
+ // if (absObs.getObservationTemplateIDs() == null
+ // || (absObs.getObservationTemplateIDs() != null &&
+ // absObs.getObservationTemplateIDs().isEmpty())) {
+ // xbValues.newCursor().setTextValue(createResultString(phenComponents,
+ // absObs));
+ // }
+ if (sosDataArray.isSetValues()) {
+ xbValues.set(createValues(sosDataArray.getValues(), sosDataArray.getEncoding()));
+ }
+ return xbDataArrayDoc;
+ } else if (sosDataArray.isSetXml()) {
+ try {
+ XmlObject xmlObject = XmlObject.Factory.parse(sosDataArray.getXml().trim());
+ if (xmlObject instanceof DataArrayDocument) {
+ return (DataArrayDocument)xmlObject;
+ } else {
+ DataArrayDocument xbDataArrayDoc =
+ DataArrayDocument.Factory.newInstance(XmlOptionsHelper.getInstance().getXmlOptions());
+ xbDataArrayDoc.setDataArray1(DataArrayType.Factory.parse(sosDataArray.getXml().trim()));
+ return xbDataArrayDoc;
+ }
+ } catch (XmlException e) {
+ throw new NoApplicableCodeException().causedBy(e).withMessage("Error while encoding SweDataArray!");
+ }
+ }
}
return null;
}
From f8d6d602f5cab3713e4aad3f9f3a1e112e45e7d5 Mon Sep 17 00:00:00 2001
From: CarstenHollmann
Date: Wed, 13 Aug 2014 16:34:35 +0200
Subject: [PATCH 205/229] Update release notes
---
RELEASE-NOTES | 27 +++++++++++++++++++++++++--
1 file changed, 25 insertions(+), 2 deletions(-)
diff --git a/RELEASE-NOTES b/RELEASE-NOTES
index b9e3453ff2..0f2820c1aa 100644
--- a/RELEASE-NOTES
+++ b/RELEASE-NOTES
@@ -6,7 +6,7 @@ RELEASE NOTES
SensorML instance document), and information about the sensor mounting platform
(SensorML as well).
-Changes since last release
+Release 52n-sos-4.1
==================================
--- New features ---
@@ -42,6 +42,8 @@ Changes since last release
* Corresponding to the selected datasource, the required DAOs and ConnectionProvider are loaded during
the initialization.
* https://github.com/52North/SOS/commit/d906f74267e8efcc51e53703a391aafb29119178
+ * If featureOfInterest geometry is missing, create the geometry from existing samplingGeometries
+ * https://github.com/52North/SOS/commit/dc8ce1eb00de99b09e4a60574be96c34bf441eb2
--- Changes ---
@@ -78,6 +80,8 @@ Changes since last release
* For each supported DBMS an update script is available (/misc/db/..) to add the new column, copy the
samplingGeometries and remove the spatialfilteringprofile table.
* https://github.com/52North/SOS/commit/65e8a4d7867f3e19c3c444438f79df5a3616fb8d
+ * Change offering fetch mode to lazy to reduce the number of subqueries when querying the observations.
+ * https://github.com/52North/SOS/commit/67475c6d3741641d02a4be4fb6c466526152c09f
--- Fixed bugs ---
@@ -99,7 +103,26 @@ Changes since last release
* Fix problem with duplicated entries in generated SQL scripts.
* https://github.com/52North/SOS/commit/6e70d910e6f8f7140d79f65c83250cf5370b73fc
* Fix #74: Exception when executing SOS 1.0.0 DescribeSensor requests
- * https://github.com/52North/SOS/commit/
+ * https://github.com/CarstenHollmann/SOS/commit/7e0e6a2ca8670e8f7ec632d899d9781391a04bbd
+ * Throw exception if the inserted sensor description has swe:DataArray sml:output element without a swe:DataRecord elementType element.
+ * https://github.com/52North/SOS/commit/5c55aeeb92a8ed60a12449c1171b757a38fc57bc
+ * Fix GetObservation invalid srs exception code.
+ * https://github.com/52North/SOS/commit/0b20dd424be7556a767170ba8392897b36cdd8c8
+ * Fix #81: GetDataAvailability returns invalid times and value counts
+ * https://github.com/52North/SOS/commit/49c004ff8a7255aed677bef05c913254070387e1
+ * Fix #83: Update GetInvolved link on client landing page
+ * https://github.com/52North/SOS/commit/c710a08dcdc05545d5515a24e643bc191bf71a94
+ * Fix #84: AbstractSettingsDefinition equals() returns true if all variables are the same except key, title and description
+ * https://github.com/52North/SOS/commit/c710a08dcdc05545d5515a24e643bc191bf71a94
+ * Fix used Hibernate mapping path constants
+ * https://github.com/52North/SOS/commit/8be9ad0d4bb6e388e9b8a5f9ed05ed6423b994d4
+ * Fix #79: File-based H2/GeoDB fails on sampling geometry index
+ * https://github.com/52North/SOS/commit/a5814ee539f25ada7eeedd75e63a37e68c6682cf
+ * Fix #87: Inform user about javascript requirement for the webapp
+ * https://github.com/52North/SOS/commit/5014f1fa00199e573b80ca931928fa53542602f7
+ * Fix #80: Resetting the SOS does not delete the cache file
+ * https://github.com/52North/SOS/commit/a43b945940963ec4152da7769de242213e219a70
+
Release 52n-sos-4.0.1
From 4c00c3826a4aa09e06c4a0bfda0aee48471bc91c Mon Sep 17 00:00:00 2001
From: CarstenHollmann
Date: Wed, 13 Aug 2014 16:37:44 +0200
Subject: [PATCH 206/229] Set version from 4.1.0-SNAPSHOT to 4.1.0 for all
modules including modules that previously had a different version
(0.2.0-SNAPSHOT).
---
bindings/json/pom.xml | 2 +-
bindings/kvp/pom.xml | 2 +-
bindings/pom.xml | 2 +-
bindings/pox/pom.xml | 2 +-
bindings/rest/code/pom.xml | 2 +-
bindings/rest/pom.xml | 4 ++--
bindings/rest/xml/pom.xml | 2 +-
bindings/soap/pom.xml | 2 +-
coding/json-common/pom.xml | 2 +-
coding/json/pom.xml | 2 +-
coding/ows-v110/pom.xml | 2 +-
coding/pom.xml | 2 +-
coding/sensorML-v101/pom.xml | 2 +-
coding/sos-v100/pom.xml | 2 +-
coding/sos-v20/pom.xml | 2 +-
coding/wml-v20/pom.xml | 2 +-
core/admin/pom.xml | 2 +-
core/api/pom.xml | 2 +-
core/cache/pom.xml | 2 +-
core/gc-dao/pom.xml | 2 +-
core/pom.xml | 2 +-
core/profile/coding/pom.xml | 2 +-
core/profile/pom.xml | 2 +-
core/profile/xml/pom.xml | 2 +-
core/sqlite-config/pom.xml | 2 +-
core/test/pom.xml | 2 +-
extensions/do/core/pom.xml | 2 +-
extensions/do/hibernate/pom.xml | 2 +-
extensions/do/json/pom.xml | 2 +-
extensions/do/kvp/pom.xml | 2 +-
extensions/do/pom.xml | 4 ++--
extensions/do/xml/pom.xml | 2 +-
extensions/gda/hibernate/pom.xml | 2 +-
extensions/gda/operation/pom.xml | 2 +-
extensions/gda/pom.xml | 2 +-
extensions/pom.xml | 2 +-
hibernate/common/pom.xml | 2 +-
hibernate/dao/pom.xml | 2 +-
hibernate/datasource/common/pom.xml | 2 +-
hibernate/datasource/h2/pom.xml | 2 +-
hibernate/datasource/mysql/pom.xml | 2 +-
hibernate/datasource/oracle/pom.xml | 2 +-
hibernate/datasource/pom.xml | 2 +-
hibernate/datasource/postgres/pom.xml | 2 +-
hibernate/datasource/sqlserver/pom.xml | 2 +-
hibernate/feature/pom.xml | 2 +-
hibernate/h2/pom.xml | 2 +-
hibernate/mappings/pom.xml | 2 +-
hibernate/pom.xml | 2 +-
hibernate/session-factory/pom.xml | 2 +-
operations/core-v100/pom.xml | 2 +-
operations/core-v20/pom.xml | 2 +-
operations/enhanced-v20/pom.xml | 2 +-
operations/pom.xml | 2 +-
operations/resultHandling-v20/pom.xml | 2 +-
operations/transactional-v20/pom.xml | 2 +-
pom.xml | 8 ++++----
spring/admin-controller/pom.xml | 2 +-
spring/client-controller/pom.xml | 2 +-
spring/common-controller/pom.xml | 2 +-
spring/install-controller/pom.xml | 2 +-
spring/pom.xml | 2 +-
spring/views/pom.xml | 2 +-
third-party/pom.xml | 2 +-
third-party/third-party-ncname-resolver/pom.xml | 2 +-
webapp/pom.xml | 2 +-
66 files changed, 71 insertions(+), 71 deletions(-)
diff --git a/bindings/json/pom.xml b/bindings/json/pom.xml
index 2bdb35b4d4..48894f4bf3 100644
--- a/bindings/json/pom.xml
+++ b/bindings/json/pom.xml
@@ -5,7 +5,7 @@
org.n52.sensorweb.sos
bindings
- 4.1.0-SNAPSHOT
+ 4.1.0
binding-json
52°North SOS - JSON Binding
diff --git a/bindings/kvp/pom.xml b/bindings/kvp/pom.xml
index ccb20c8797..5498050255 100644
--- a/bindings/kvp/pom.xml
+++ b/bindings/kvp/pom.xml
@@ -4,7 +4,7 @@
org.n52.sensorweb.sos
bindings
- 4.1.0-SNAPSHOT
+ 4.1.0
4.0.0
binding-kvp
diff --git a/bindings/pom.xml b/bindings/pom.xml
index 6dd53577b3..a6ffdcfeda 100644
--- a/bindings/pom.xml
+++ b/bindings/pom.xml
@@ -4,7 +4,7 @@
org.n52.sensorweb.sos
52n-sos
- 4.1.0-SNAPSHOT
+ 4.1.0
bindings
pom
diff --git a/bindings/pox/pom.xml b/bindings/pox/pom.xml
index 37f031bb1e..eb299c7e4f 100644
--- a/bindings/pox/pom.xml
+++ b/bindings/pox/pom.xml
@@ -4,7 +4,7 @@
org.n52.sensorweb.sos
bindings
- 4.1.0-SNAPSHOT
+ 4.1.0
4.0.0
binding-pox
diff --git a/bindings/rest/code/pom.xml b/bindings/rest/code/pom.xml
index 43af48950e..b95bc81934 100644
--- a/bindings/rest/code/pom.xml
+++ b/bindings/rest/code/pom.xml
@@ -5,7 +5,7 @@
org.n52.sensorweb.sos
rest
- 0.2.0-SNAPSHOT
+ 4.1.0
rest-code
52°North SOS - Extension REST Binding - Core
diff --git a/bindings/rest/pom.xml b/bindings/rest/pom.xml
index 28cce5a91b..b4322ace71 100644
--- a/bindings/rest/pom.xml
+++ b/bindings/rest/pom.xml
@@ -4,12 +4,12 @@
org.n52.sensorweb.sos
bindings
- 4.1.0-SNAPSHOT
+ 4.1.0
4.0.0
rest
pom
- 0.2.0-SNAPSHOT
+ 4.1.0
52°North SOS - Extension REST Binding
RESTful binding for the 52°North SOS
http://52north.org/communities/sensorweb/sosREST/
diff --git a/bindings/rest/xml/pom.xml b/bindings/rest/xml/pom.xml
index b0c907d5c1..316405590d 100644
--- a/bindings/rest/xml/pom.xml
+++ b/bindings/rest/xml/pom.xml
@@ -5,7 +5,7 @@
org.n52.sensorweb.sos
rest
- 0.2.0-SNAPSHOT
+ 4.1.0
rest-xml
52°North SOS - Extension REST Binding - XML
diff --git a/bindings/soap/pom.xml b/bindings/soap/pom.xml
index e7562cbc77..b4e6720bea 100644
--- a/bindings/soap/pom.xml
+++ b/bindings/soap/pom.xml
@@ -4,7 +4,7 @@
org.n52.sensorweb.sos
bindings
- 4.1.0-SNAPSHOT
+ 4.1.0
4.0.0
binding-soap
diff --git a/coding/json-common/pom.xml b/coding/json-common/pom.xml
index 3a203c3abc..befc35fbbf 100644
--- a/coding/json-common/pom.xml
+++ b/coding/json-common/pom.xml
@@ -4,7 +4,7 @@
org.n52.sensorweb.sos
coding
- 4.1.0-SNAPSHOT
+ 4.1.0
4.0.0
coding-json-common
diff --git a/coding/json/pom.xml b/coding/json/pom.xml
index 5ba678320d..7cb9a95512 100644
--- a/coding/json/pom.xml
+++ b/coding/json/pom.xml
@@ -4,7 +4,7 @@
org.n52.sensorweb.sos
coding
- 4.1.0-SNAPSHOT
+ 4.1.0
4.0.0
coding-json
diff --git a/coding/ows-v110/pom.xml b/coding/ows-v110/pom.xml
index 922cffc666..c158133ea7 100644
--- a/coding/ows-v110/pom.xml
+++ b/coding/ows-v110/pom.xml
@@ -4,7 +4,7 @@
org.n52.sensorweb.sos
coding
- 4.1.0-SNAPSHOT
+ 4.1.0
4.0.0
coding-ows-v110
diff --git a/coding/pom.xml b/coding/pom.xml
index a5630c2021..e3e5e5a267 100644
--- a/coding/pom.xml
+++ b/coding/pom.xml
@@ -5,7 +5,7 @@
org.n52.sensorweb.sos
52n-sos
- 4.1.0-SNAPSHOT
+ 4.1.0
coding
pom
diff --git a/coding/sensorML-v101/pom.xml b/coding/sensorML-v101/pom.xml
index 71b1078ca6..7f2df345d8 100644
--- a/coding/sensorML-v101/pom.xml
+++ b/coding/sensorML-v101/pom.xml
@@ -4,7 +4,7 @@
org.n52.sensorweb.sos
coding
- 4.1.0-SNAPSHOT
+ 4.1.0
4.0.0
coding-sensorML-v101
diff --git a/coding/sos-v100/pom.xml b/coding/sos-v100/pom.xml
index 4e82fe5c7e..31c966de49 100644
--- a/coding/sos-v100/pom.xml
+++ b/coding/sos-v100/pom.xml
@@ -4,7 +4,7 @@
org.n52.sensorweb.sos
coding
- 4.1.0-SNAPSHOT
+ 4.1.0
4.0.0
coding-sos-v100
diff --git a/coding/sos-v20/pom.xml b/coding/sos-v20/pom.xml
index 2c2f7c5cd4..637ab4af44 100644
--- a/coding/sos-v20/pom.xml
+++ b/coding/sos-v20/pom.xml
@@ -4,7 +4,7 @@
org.n52.sensorweb.sos
coding
- 4.1.0-SNAPSHOT
+ 4.1.0
4.0.0
coding-sos-v20
diff --git a/coding/wml-v20/pom.xml b/coding/wml-v20/pom.xml
index 87248c6dd9..83f2a59690 100644
--- a/coding/wml-v20/pom.xml
+++ b/coding/wml-v20/pom.xml
@@ -4,7 +4,7 @@
org.n52.sensorweb.sos
coding
- 4.1.0-SNAPSHOT
+ 4.1.0
4.0.0
coding-wml-v20
diff --git a/core/admin/pom.xml b/core/admin/pom.xml
index d1c8fa3fef..c87fb85112 100644
--- a/core/admin/pom.xml
+++ b/core/admin/pom.xml
@@ -5,7 +5,7 @@
org.n52.sensorweb.sos
core
- 4.1.0-SNAPSHOT
+ 4.1.0
admin
52°North SOS - Administrator Service Operator
diff --git a/core/api/pom.xml b/core/api/pom.xml
index 515b9e5c4a..2247d3ef3f 100644
--- a/core/api/pom.xml
+++ b/core/api/pom.xml
@@ -4,7 +4,7 @@
org.n52.sensorweb.sos
core
- 4.1.0-SNAPSHOT
+ 4.1.0
4.0.0
api
diff --git a/core/cache/pom.xml b/core/cache/pom.xml
index 33bbfd7ba0..8d9ef40081 100644
--- a/core/cache/pom.xml
+++ b/core/cache/pom.xml
@@ -5,7 +5,7 @@
org.n52.sensorweb.sos
core
- 4.1.0-SNAPSHOT
+ 4.1.0
cache
52°North SOS - Cache
diff --git a/core/gc-dao/pom.xml b/core/gc-dao/pom.xml
index a8cfe41411..35af0226e9 100644
--- a/core/gc-dao/pom.xml
+++ b/core/gc-dao/pom.xml
@@ -4,7 +4,7 @@
org.n52.sensorweb.sos
core
- 4.1.0-SNAPSHOT
+ 4.1.0
4.0.0
gc-dao
diff --git a/core/pom.xml b/core/pom.xml
index 9f279ad19c..b8fcd43cdf 100644
--- a/core/pom.xml
+++ b/core/pom.xml
@@ -5,7 +5,7 @@
org.n52.sensorweb.sos
52n-sos
- 4.1.0-SNAPSHOT
+ 4.1.0
core
pom
diff --git a/core/profile/coding/pom.xml b/core/profile/coding/pom.xml
index 76f9548178..a16d6dd8d5 100644
--- a/core/profile/coding/pom.xml
+++ b/core/profile/coding/pom.xml
@@ -4,7 +4,7 @@
profile
org.n52.sensorweb.sos
- 4.1.0-SNAPSHOT
+ 4.1.0
4.0.0
profile-coding
diff --git a/core/profile/pom.xml b/core/profile/pom.xml
index 45029d3dca..190e3cebcd 100644
--- a/core/profile/pom.xml
+++ b/core/profile/pom.xml
@@ -4,7 +4,7 @@
org.n52.sensorweb.sos
core
- 4.1.0-SNAPSHOT
+ 4.1.0
4.0.0
profile
diff --git a/core/profile/xml/pom.xml b/core/profile/xml/pom.xml
index 57fcbc7d11..e4f38c9332 100644
--- a/core/profile/xml/pom.xml
+++ b/core/profile/xml/pom.xml
@@ -4,7 +4,7 @@
profile
org.n52.sensorweb.sos
- 4.1.0-SNAPSHOT
+ 4.1.0
4.0.0
profile-xml
diff --git a/core/sqlite-config/pom.xml b/core/sqlite-config/pom.xml
index 7d6c848c10..e71e1391c5 100644
--- a/core/sqlite-config/pom.xml
+++ b/core/sqlite-config/pom.xml
@@ -5,7 +5,7 @@
org.n52.sensorweb.sos
core
- 4.1.0-SNAPSHOT
+ 4.1.0
sqlite-config
52°North SOS - SQLite Configuration
diff --git a/core/test/pom.xml b/core/test/pom.xml
index 4d147bea9d..e03e5e3781 100644
--- a/core/test/pom.xml
+++ b/core/test/pom.xml
@@ -5,7 +5,7 @@
org.n52.sensorweb.sos
core
- 4.1.0-SNAPSHOT
+ 4.1.0
test
52°North SOS - Test Module
diff --git a/extensions/do/core/pom.xml b/extensions/do/core/pom.xml
index dd2237e902..a78273125a 100644
--- a/extensions/do/core/pom.xml
+++ b/extensions/do/core/pom.xml
@@ -4,7 +4,7 @@
org.n52.sensorweb.sos
do
- 0.2.0-SNAPSHOT
+ 4.1.0
4.0.0
do-core
diff --git a/extensions/do/hibernate/pom.xml b/extensions/do/hibernate/pom.xml
index dd2dd7b44c..d99840a23f 100644
--- a/extensions/do/hibernate/pom.xml
+++ b/extensions/do/hibernate/pom.xml
@@ -4,7 +4,7 @@
org.n52.sensorweb.sos
do
- 0.2.0-SNAPSHOT
+ 4.1.0
4.0.0
do-hibernate
diff --git a/extensions/do/json/pom.xml b/extensions/do/json/pom.xml
index 0950b54914..5f65ae0216 100644
--- a/extensions/do/json/pom.xml
+++ b/extensions/do/json/pom.xml
@@ -4,7 +4,7 @@
org.n52.sensorweb.sos
do
- 0.2.0-SNAPSHOT
+ 4.1.0
4.0.0
do-json
diff --git a/extensions/do/kvp/pom.xml b/extensions/do/kvp/pom.xml
index 64bc5adf98..c2eb7e44f0 100644
--- a/extensions/do/kvp/pom.xml
+++ b/extensions/do/kvp/pom.xml
@@ -4,7 +4,7 @@
org.n52.sensorweb.sos
do
- 0.2.0-SNAPSHOT
+ 4.1.0
4.0.0
do-kvp
diff --git a/extensions/do/pom.xml b/extensions/do/pom.xml
index 17105181bb..d97bcfd7ed 100644
--- a/extensions/do/pom.xml
+++ b/extensions/do/pom.xml
@@ -3,12 +3,12 @@
org.n52.sensorweb.sos
extensions
- 4.1.0-SNAPSHOT
+ 4.1.0
4.0.0
pom
do
- 0.2.0-SNAPSHOT
+ 4.1.0
52°North SOS - Extension Delete Observation
52°North SOS Extension Delete Observation
diff --git a/extensions/do/xml/pom.xml b/extensions/do/xml/pom.xml
index 9a6c90a209..27545dbe3e 100644
--- a/extensions/do/xml/pom.xml
+++ b/extensions/do/xml/pom.xml
@@ -3,7 +3,7 @@
org.n52.sensorweb.sos
do
- 0.2.0-SNAPSHOT
+ 4.1.0
4.0.0
do-xml
diff --git a/extensions/gda/hibernate/pom.xml b/extensions/gda/hibernate/pom.xml
index 0737c28e67..a8831f3f08 100644
--- a/extensions/gda/hibernate/pom.xml
+++ b/extensions/gda/hibernate/pom.xml
@@ -5,7 +5,7 @@
org.n52.sensorweb.sos
gda
- 4.1.0-SNAPSHOT
+ 4.1.0
gda-hibernate
52°North SOS - Extension GetDataAvailability - Hibernate DAO
diff --git a/extensions/gda/operation/pom.xml b/extensions/gda/operation/pom.xml
index 15f09d7f97..7ecc51aba0 100644
--- a/extensions/gda/operation/pom.xml
+++ b/extensions/gda/operation/pom.xml
@@ -5,7 +5,7 @@
org.n52.sensorweb.sos
gda
- 4.1.0-SNAPSHOT
+ 4.1.0
gda-operation
52°North SOS - Extension GetDataAvailability - SOS 2.0 Operation
diff --git a/extensions/gda/pom.xml b/extensions/gda/pom.xml
index be45cdf188..e2ab0b2c3b 100644
--- a/extensions/gda/pom.xml
+++ b/extensions/gda/pom.xml
@@ -4,7 +4,7 @@
org.n52.sensorweb.sos
extensions
- 4.1.0-SNAPSHOT
+ 4.1.0
4.0.0
gda
diff --git a/extensions/pom.xml b/extensions/pom.xml
index 6279285285..5556a6d5ea 100644
--- a/extensions/pom.xml
+++ b/extensions/pom.xml
@@ -5,7 +5,7 @@
org.n52.sensorweb.sos
52n-sos
- 4.1.0-SNAPSHOT
+ 4.1.0
extensions
pom
diff --git a/hibernate/common/pom.xml b/hibernate/common/pom.xml
index 4e831c8009..9e1a5066f3 100644
--- a/hibernate/common/pom.xml
+++ b/hibernate/common/pom.xml
@@ -4,7 +4,7 @@
org.n52.sensorweb.sos
hibernate
- 4.1.0-SNAPSHOT
+ 4.1.0
4.0.0
hibernate-common
diff --git a/hibernate/dao/pom.xml b/hibernate/dao/pom.xml
index c7097f1138..a919b8f3f1 100644
--- a/hibernate/dao/pom.xml
+++ b/hibernate/dao/pom.xml
@@ -4,7 +4,7 @@
org.n52.sensorweb.sos
hibernate
- 4.1.0-SNAPSHOT
+ 4.1.0
4.0.0
hibernate-dao
diff --git a/hibernate/datasource/common/pom.xml b/hibernate/datasource/common/pom.xml
index 6e67ff2a2d..ae344d7c2a 100644
--- a/hibernate/datasource/common/pom.xml
+++ b/hibernate/datasource/common/pom.xml
@@ -4,7 +4,7 @@
org.n52.sensorweb.sos
hibernate-datasource
- 4.1.0-SNAPSHOT
+ 4.1.0
4.0.0
hibernate-datasource-common
diff --git a/hibernate/datasource/h2/pom.xml b/hibernate/datasource/h2/pom.xml
index 283366d376..01e4116655 100644
--- a/hibernate/datasource/h2/pom.xml
+++ b/hibernate/datasource/h2/pom.xml
@@ -4,7 +4,7 @@
org.n52.sensorweb.sos
hibernate-datasource
- 4.1.0-SNAPSHOT
+ 4.1.0
4.0.0
hibernate-datasource-h2
diff --git a/hibernate/datasource/mysql/pom.xml b/hibernate/datasource/mysql/pom.xml
index d0f724e2ee..f5e4b781f1 100644
--- a/hibernate/datasource/mysql/pom.xml
+++ b/hibernate/datasource/mysql/pom.xml
@@ -4,7 +4,7 @@
org.n52.sensorweb.sos
hibernate-datasource
- 4.1.0-SNAPSHOT
+ 4.1.0
4.0.0
hibernate-datasource-mysql
diff --git a/hibernate/datasource/oracle/pom.xml b/hibernate/datasource/oracle/pom.xml
index d0995a4376..45dbc6b98a 100644
--- a/hibernate/datasource/oracle/pom.xml
+++ b/hibernate/datasource/oracle/pom.xml
@@ -4,7 +4,7 @@
org.n52.sensorweb.sos
hibernate-datasource
- 4.1.0-SNAPSHOT
+ 4.1.0
4.0.0
hibernate-datasource-oracle
diff --git a/hibernate/datasource/pom.xml b/hibernate/datasource/pom.xml
index 78fbd5ef6f..e108489d8a 100644
--- a/hibernate/datasource/pom.xml
+++ b/hibernate/datasource/pom.xml
@@ -4,7 +4,7 @@
org.n52.sensorweb.sos
hibernate
- 4.1.0-SNAPSHOT
+ 4.1.0
4.0.0
hibernate-datasource
diff --git a/hibernate/datasource/postgres/pom.xml b/hibernate/datasource/postgres/pom.xml
index 030a02884c..5893f532ab 100644
--- a/hibernate/datasource/postgres/pom.xml
+++ b/hibernate/datasource/postgres/pom.xml
@@ -4,7 +4,7 @@
org.n52.sensorweb.sos
hibernate-datasource
- 4.1.0-SNAPSHOT
+ 4.1.0
4.0.0
hibernate-datasource-postgres
diff --git a/hibernate/datasource/sqlserver/pom.xml b/hibernate/datasource/sqlserver/pom.xml
index 06fdcc6bff..b0396f1a0e 100644
--- a/hibernate/datasource/sqlserver/pom.xml
+++ b/hibernate/datasource/sqlserver/pom.xml
@@ -4,7 +4,7 @@
org.n52.sensorweb.sos
hibernate-datasource
- 4.1.0-SNAPSHOT
+ 4.1.0
4.0.0
hibernate-datasource-sqlserver
diff --git a/hibernate/feature/pom.xml b/hibernate/feature/pom.xml
index 70ae1da291..7537bcc2f5 100644
--- a/hibernate/feature/pom.xml
+++ b/hibernate/feature/pom.xml
@@ -4,7 +4,7 @@
org.n52.sensorweb.sos
hibernate
- 4.1.0-SNAPSHOT
+ 4.1.0
4.0.0
hibernate-feature
diff --git a/hibernate/h2/pom.xml b/hibernate/h2/pom.xml
index 89760bc4e8..cce4ae503a 100644
--- a/hibernate/h2/pom.xml
+++ b/hibernate/h2/pom.xml
@@ -5,7 +5,7 @@
org.n52.sensorweb.sos
hibernate
- 4.1.0-SNAPSHOT
+ 4.1.0
hibernate-h2
52°North SOS - Hibernate H2
diff --git a/hibernate/mappings/pom.xml b/hibernate/mappings/pom.xml
index 78fdaba38e..e2326aa4fd 100644
--- a/hibernate/mappings/pom.xml
+++ b/hibernate/mappings/pom.xml
@@ -5,7 +5,7 @@
org.n52.sensorweb.sos
hibernate
- 4.1.0-SNAPSHOT
+ 4.1.0
hibernate-mappings
52°North SOS - Hibernate Mappings
diff --git a/hibernate/pom.xml b/hibernate/pom.xml
index 1a72518ae4..4f2aabe3f5 100644
--- a/hibernate/pom.xml
+++ b/hibernate/pom.xml
@@ -4,7 +4,7 @@
org.n52.sensorweb.sos
52n-sos
- 4.1.0-SNAPSHOT
+ 4.1.0
hibernate
pom
diff --git a/hibernate/session-factory/pom.xml b/hibernate/session-factory/pom.xml
index 17e2d60233..5e9452f715 100644
--- a/hibernate/session-factory/pom.xml
+++ b/hibernate/session-factory/pom.xml
@@ -4,7 +4,7 @@
org.n52.sensorweb.sos
hibernate
- 4.1.0-SNAPSHOT
+ 4.1.0
4.0.0
hibernate-session-factory
diff --git a/operations/core-v100/pom.xml b/operations/core-v100/pom.xml
index f06608c116..7c4016a4a7 100644
--- a/operations/core-v100/pom.xml
+++ b/operations/core-v100/pom.xml
@@ -4,7 +4,7 @@
org.n52.sensorweb.sos
operations
- 4.1.0-SNAPSHOT
+ 4.1.0
4.0.0
core-v100
diff --git a/operations/core-v20/pom.xml b/operations/core-v20/pom.xml
index f9da96cf87..1852659ae8 100644
--- a/operations/core-v20/pom.xml
+++ b/operations/core-v20/pom.xml
@@ -4,7 +4,7 @@
org.n52.sensorweb.sos
operations
- 4.1.0-SNAPSHOT
+ 4.1.0
4.0.0
core-v20
diff --git a/operations/enhanced-v20/pom.xml b/operations/enhanced-v20/pom.xml
index 7eabc16b7d..f72c433505 100644
--- a/operations/enhanced-v20/pom.xml
+++ b/operations/enhanced-v20/pom.xml
@@ -4,7 +4,7 @@
org.n52.sensorweb.sos
operations
- 4.1.0-SNAPSHOT
+ 4.1.0
4.0.0
enhanced-v20
diff --git a/operations/pom.xml b/operations/pom.xml
index a69c0fa31c..535b79bc1b 100644
--- a/operations/pom.xml
+++ b/operations/pom.xml
@@ -5,7 +5,7 @@
org.n52.sensorweb.sos
52n-sos
- 4.1.0-SNAPSHOT
+ 4.1.0
operations
pom
diff --git a/operations/resultHandling-v20/pom.xml b/operations/resultHandling-v20/pom.xml
index c0da787ce0..a7e3a56281 100644
--- a/operations/resultHandling-v20/pom.xml
+++ b/operations/resultHandling-v20/pom.xml
@@ -4,7 +4,7 @@
org.n52.sensorweb.sos
operations
- 4.1.0-SNAPSHOT
+ 4.1.0
4.0.0
resultHandling-v20
diff --git a/operations/transactional-v20/pom.xml b/operations/transactional-v20/pom.xml
index 8bb1ead8be..c0dd06c889 100644
--- a/operations/transactional-v20/pom.xml
+++ b/operations/transactional-v20/pom.xml
@@ -4,7 +4,7 @@
org.n52.sensorweb.sos
operations
- 4.1.0-SNAPSHOT
+ 4.1.0
4.0.0
transactional-v20
diff --git a/pom.xml b/pom.xml
index 209b753a75..1736f66dbb 100644
--- a/pom.xml
+++ b/pom.xml
@@ -10,7 +10,7 @@
4.0.0
org.n52.sensorweb.sos
52n-sos
- 4.1.0-SNAPSHOT
+ 4.1.0
52°North Sensor Observation Service
52°North Sensor Observation Service - Parent POM for defining dependency versions
https://wiki.52north.org/bin/view/SensorWeb/SensorObservationServiceIVDocumentation
@@ -76,9 +76,9 @@
- 4.1.0-SNAPSHOT
- 0.2.0-SNAPSHOT
- 0.2.0-SNAPSHOT
+ 4.1.0
+ 0.2.0
+ 0.2.0
3.1.4.RELEASE
3.2.6.RELEASE
9.1.0.8
diff --git a/spring/admin-controller/pom.xml b/spring/admin-controller/pom.xml
index 3912f82366..b57aad7951 100644
--- a/spring/admin-controller/pom.xml
+++ b/spring/admin-controller/pom.xml
@@ -5,7 +5,7 @@
org.n52.sensorweb.sos
spring
- 4.1.0-SNAPSHOT
+ 4.1.0
admin-controller
52°North SOS - Web Admin Controller
diff --git a/spring/client-controller/pom.xml b/spring/client-controller/pom.xml
index bb26b1375c..4206798fd5 100644
--- a/spring/client-controller/pom.xml
+++ b/spring/client-controller/pom.xml
@@ -5,7 +5,7 @@
org.n52.sensorweb.sos
spring
- 4.1.0-SNAPSHOT
+ 4.1.0
client-controller
52°North SOS - Web Client Controller
diff --git a/spring/common-controller/pom.xml b/spring/common-controller/pom.xml
index 7b4479eca8..284f1da4a7 100644
--- a/spring/common-controller/pom.xml
+++ b/spring/common-controller/pom.xml
@@ -5,7 +5,7 @@
org.n52.sensorweb.sos
spring
- 4.1.0-SNAPSHOT
+ 4.1.0
common-controller
52°North SOS - Web Common Controller
diff --git a/spring/install-controller/pom.xml b/spring/install-controller/pom.xml
index 690d0ab032..13ad6841aa 100644
--- a/spring/install-controller/pom.xml
+++ b/spring/install-controller/pom.xml
@@ -5,7 +5,7 @@
org.n52.sensorweb.sos
spring
- 4.1.0-SNAPSHOT
+ 4.1.0
install-controller
52°North SOS - Web Install Controller
diff --git a/spring/pom.xml b/spring/pom.xml
index a9201e3790..edbaaa6cb0 100644
--- a/spring/pom.xml
+++ b/spring/pom.xml
@@ -5,7 +5,7 @@
52n-sos
org.n52.sensorweb.sos
- 4.1.0-SNAPSHOT
+ 4.1.0
spring
pom
diff --git a/spring/views/pom.xml b/spring/views/pom.xml
index 92a3bea111..dc4999b702 100644
--- a/spring/views/pom.xml
+++ b/spring/views/pom.xml
@@ -5,7 +5,7 @@
org.n52.sensorweb.sos
spring
- 4.1.0-SNAPSHOT
+ 4.1.0
views
52°North SOS - Web Views
diff --git a/third-party/pom.xml b/third-party/pom.xml
index 9bf0a59494..4914e6df7e 100644
--- a/third-party/pom.xml
+++ b/third-party/pom.xml
@@ -3,7 +3,7 @@
org.n52.sensorweb.sos
52n-sos
- 4.1.0-SNAPSHOT
+ 4.1.0
52n-sos-third-party
52°North Aggregated Third Party modules
diff --git a/third-party/third-party-ncname-resolver/pom.xml b/third-party/third-party-ncname-resolver/pom.xml
index 8f73b4dda1..640059fa75 100644
--- a/third-party/third-party-ncname-resolver/pom.xml
+++ b/third-party/third-party-ncname-resolver/pom.xml
@@ -3,7 +3,7 @@
org.n52.sensorweb.sos
52n-sos-third-party
- 4.1.0-SNAPSHOT
+ 4.1.0
third-party-ncname-resolver
52°North Third Party - NCName resolver
diff --git a/webapp/pom.xml b/webapp/pom.xml
index 05188eced6..dbd7b3f163 100644
--- a/webapp/pom.xml
+++ b/webapp/pom.xml
@@ -4,7 +4,7 @@
52n-sos
org.n52.sensorweb.sos
- 4.1.0-SNAPSHOT
+ 4.1.0
4.0.0
webapp
From 3f0fa2613ad0d32b574adb39039cbbd3660225c1 Mon Sep 17 00:00:00 2001
From: CarstenHollmann
Date: Thu, 14 Aug 2014 15:47:22 +0200
Subject: [PATCH 207/229] Update example requests
---
.../webapp/static/conf/client-config.json | 26 ++++++
.../requests_soap/GetDataAvailability.xml | 2 +-
.../ResultHandling/GetResult.xml | 4 +-
.../ResultHandling/GetResultTemplate.xml | 4 +-
.../InsertObservation_Multiple.xml | 2 +-
.../InsertObservation_Split_SweArray.xml | 85 +++++++++++++++++++
.../InsertObservation_SweArray.xml | 22 ++---
.../Transactional/InsertSensor.xml | 55 +++++++++---
.../requests_xml/GetDataAvailability.xml | 2 +-
.../requests_xml/ResultHandling/GetResult.xml | 4 +-
.../ResultHandling/GetResultTemplate.xml | 4 +-
.../InsertObservation_Multiple.xml | 2 +-
.../InsertObservation_Split_SweArray.xml | 81 ++++++++++++++++++
.../InsertObservation_SweArray.xml | 22 ++---
.../Transactional/InsertSensor.xml | 78 ++++++++++++-----
15 files changed, 317 insertions(+), 76 deletions(-)
create mode 100644 webapp/src/main/webapp/static/examples/sos_v20/requests_soap/Transactional/InsertObservation_Split_SweArray.xml
create mode 100644 webapp/src/main/webapp/static/examples/sos_v20/requests_xml/Transactional/InsertObservation_Split_SweArray.xml
diff --git a/webapp/src/main/webapp/static/conf/client-config.json b/webapp/src/main/webapp/static/conf/client-config.json
index f7428d9704..5f4a40736c 100644
--- a/webapp/src/main/webapp/static/conf/client-config.json
+++ b/webapp/src/main/webapp/static/conf/client-config.json
@@ -1285,6 +1285,19 @@
},
"method":"POST"
},
+ {
+ "request":"static/examples/sos_v20/requests_xml/Transactional/InsertObservation_Split_SweArray.xml",
+ "service":"SOS",
+ "version":"2.0.0",
+ "binding": "application/xml",
+ "operation":"InsertObservation",
+ "title":"Split SweArray",
+ "headers":{
+ "Accept":"application/xml",
+ "Content-Type":"application/xml"
+ },
+ "method":"POST"
+ },
{
"request":"static/examples/sos_v20/requests_xml/Transactional/InsertObservation_SweArray.xml",
"service":"SOS",
@@ -1674,6 +1687,19 @@
},
"method":"POST"
},
+ {
+ "request":"static/examples/sos_v20/requests_soap/Transactional/InsertObservation_Split_SweArray.xml",
+ "service":"SOS",
+ "version":"2.0.0",
+ "binding": "application/soap+xml",
+ "operation":"InsertObservation",
+ "title":"Split SweArray",
+ "headers":{
+ "Accept":"application/soap+xml",
+ "Content-Type":"application/soap+xml"
+ },
+ "method":"POST"
+ },
{
"request":"static/examples/sos_v20/requests_soap/Transactional/InsertObservation_SweArray.xml",
"service":"SOS",
diff --git a/webapp/src/main/webapp/static/examples/sos_v20/requests_soap/GetDataAvailability.xml b/webapp/src/main/webapp/static/examples/sos_v20/requests_soap/GetDataAvailability.xml
index 12146a0464..e2449bc381 100644
--- a/webapp/src/main/webapp/static/examples/sos_v20/requests_soap/GetDataAvailability.xml
+++ b/webapp/src/main/webapp/static/examples/sos_v20/requests_soap/GetDataAvailability.xml
@@ -32,7 +32,7 @@
phenomenonTime
2012-11-19T12:59:59.000Z
- 2012-11-19T013:05:00.000Z
+ 2012-11-19T13:05:00.000Z
-->
diff --git a/webapp/src/main/webapp/static/examples/sos_v20/requests_soap/ResultHandling/GetResult.xml b/webapp/src/main/webapp/static/examples/sos_v20/requests_soap/ResultHandling/GetResult.xml
index 51a3f921c7..163c9023ec 100644
--- a/webapp/src/main/webapp/static/examples/sos_v20/requests_soap/ResultHandling/GetResult.xml
+++ b/webapp/src/main/webapp/static/examples/sos_v20/requests_soap/ResultHandling/GetResult.xml
@@ -4,8 +4,8 @@
- http://www.52north.org/test/offering/9
- http://www.52north.org/test/observableProperty/9_3
+ http://www.52north.org/test/offering/6
+ http://www.52north.org/test/observableProperty/6
diff --git a/webapp/src/main/webapp/static/examples/sos_v20/requests_soap/ResultHandling/GetResultTemplate.xml b/webapp/src/main/webapp/static/examples/sos_v20/requests_soap/ResultHandling/GetResultTemplate.xml
index ab9c82eed4..592b1c0035 100644
--- a/webapp/src/main/webapp/static/examples/sos_v20/requests_soap/ResultHandling/GetResultTemplate.xml
+++ b/webapp/src/main/webapp/static/examples/sos_v20/requests_soap/ResultHandling/GetResultTemplate.xml
@@ -4,8 +4,8 @@
- http://www.52north.org/test/offering/9
- http://www.52north.org/test/observableProperty/9_3
+ http://www.52north.org/test/offering/6
+ http://www.52north.org/test/observableProperty/6
diff --git a/webapp/src/main/webapp/static/examples/sos_v20/requests_soap/Transactional/InsertObservation_Multiple.xml b/webapp/src/main/webapp/static/examples/sos_v20/requests_soap/Transactional/InsertObservation_Multiple.xml
index 16873772ea..2e4dee4fc7 100644
--- a/webapp/src/main/webapp/static/examples/sos_v20/requests_soap/Transactional/InsertObservation_Multiple.xml
+++ b/webapp/src/main/webapp/static/examples/sos_v20/requests_soap/Transactional/InsertObservation_Multiple.xml
@@ -22,7 +22,7 @@
- 2012-11-19T17:46:15.000+00:00
+ 2012-11-19T17:47:15.000+00:00
diff --git a/webapp/src/main/webapp/static/examples/sos_v20/requests_soap/Transactional/InsertObservation_Split_SweArray.xml b/webapp/src/main/webapp/static/examples/sos_v20/requests_soap/Transactional/InsertObservation_Split_SweArray.xml
new file mode 100644
index 0000000000..b45b0ef5b4
--- /dev/null
+++ b/webapp/src/main/webapp/static/examples/sos_v20/requests_soap/Transactional/InsertObservation_Split_SweArray.xml
@@ -0,0 +1,85 @@
+
+
+
+
+
+
+ true
+
+
+ http://www.52north.org/test/offering/6
+
+
+
+
+
+ 2012-11-19T13:30:00+02:00
+ 2012-11-19T13:44:00+02:00
+
+
+
+
+ 2012-11-19T13:50:00+02:00
+
+
+
+
+
+
+ http://www.52north.org/test/featureOfInterest/6
+ 52°North
+
+
+
+
+ 51.935101100104916 7.651968812254194
+
+
+
+
+
+
+
+
+ 15
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ 2012-11-19T13:30:00+02:00#159.15@2012-11-19T13:31:00+02:00#159.15@2012-11-19T13:32:00+02:00#159.85@2012-11-19T13:33:00+02:00#160.5@2012-11-19T13:34:00+02:00#160.9@2012-11-19T13:35:00+02:00#160.7@2012-11-19T13:36:00+02:00#160.5@2012-11-19T13:37:00+02:00#160.6@2012-11-19T13:38:00+02:00#160.5@2012-11-19T13:39:00+02:00#160.4@2012-11-19T13:40:00+02:00#160.34@2012-11-19T13:41:00+02:00#160.25@2012-11-19T13:42:00+02:00#159.79@2012-11-19T13:43:00+02:00#159.56@2012-11-19T13:44:00+02:00#159.25
+
+
+
+
+
+
+
+
diff --git a/webapp/src/main/webapp/static/examples/sos_v20/requests_soap/Transactional/InsertObservation_SweArray.xml b/webapp/src/main/webapp/static/examples/sos_v20/requests_soap/Transactional/InsertObservation_SweArray.xml
index 21e13bf579..45a4c795bb 100644
--- a/webapp/src/main/webapp/static/examples/sos_v20/requests_soap/Transactional/InsertObservation_SweArray.xml
+++ b/webapp/src/main/webapp/static/examples/sos_v20/requests_soap/Transactional/InsertObservation_SweArray.xml
@@ -14,14 +14,8 @@
xmlns:sf="http://www.opengis.net/sampling/2.0"
xsi:schemaLocation="http://www.opengis.net/sos/2.0 http://schemas.opengis.net/sos/2.0/sos.xsd
http://www.opengis.net/samplingSpatial/2.0 http://schemas.opengis.net/samplingSpatial/2.0/spatialSamplingFeature.xsd">
-
-
- http://www.52north.org/test/offering/6
+ http://www.52north.org/test/offering/9
@@ -36,16 +30,16 @@
2012-11-19T13:50:00+02:00
-
-
+
+
-
- http://www.52north.org/test/featureOfInterest/6
+
+ http://www.52north.org/test/featureOfInterest/9
52°North
-
-
+
+
51.935101100104916 7.651968812254194
@@ -66,7 +60,7 @@
-
+
diff --git a/webapp/src/main/webapp/static/examples/sos_v20/requests_soap/Transactional/InsertSensor.xml b/webapp/src/main/webapp/static/examples/sos_v20/requests_soap/Transactional/InsertSensor.xml
index c19c08cb98..2e1f0fba59 100644
--- a/webapp/src/main/webapp/static/examples/sos_v20/requests_soap/Transactional/InsertSensor.xml
+++ b/webapp/src/main/webapp/static/examples/sos_v20/requests_soap/Transactional/InsertSensor.xml
@@ -15,19 +15,19 @@
-
+
- http://www.52north.org/test/procedure/9
-
+ http://www.52north.org/test/procedure/9
- 52°North Initiative for Geospatial Open Source Software GmbH (http://52north.org)
+ 52°North Initiative for Geospatial Open Source
+ Software GmbH (http://52north.org)
@@ -37,11 +37,12 @@
-
+
-
-
+
+
@@ -53,7 +54,8 @@
-
+
@@ -64,16 +66,18 @@
-
+
- http://www.52north.org/test/featureOfInterest/9
+ http://www.52north.org/test/featureOfInterest/9
+
-
+
@@ -117,8 +121,7 @@
-
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
@@ -146,6 +173,7 @@
http://www.52north.org/test/observableProperty/9_4
http://www.52north.org/test/observableProperty/9_5
http://www.52north.org/test/observableProperty/9_6
+ http://www.52north.org/test/observableProperty/9_7
http://www.opengis.net/def/observationType/OGC-OM/2.0/OM_Measurement
@@ -154,6 +182,7 @@
http://www.opengis.net/def/observationType/OGC-OM/2.0/OM_TextObservation
http://www.opengis.net/def/observationType/OGC-OM/2.0/OM_TruthObservation
http://www.opengis.net/def/observationType/OGC-OM/2.0/OM_GeometryObservation
+ http://www.opengis.net/def/observationType/OGC-OM/2.0/OM_SWEArrayObservation
http://www.opengis.net/def/samplingFeatureType/OGC-OM/2.0/SF_SamplingPoint
diff --git a/webapp/src/main/webapp/static/examples/sos_v20/requests_xml/GetDataAvailability.xml b/webapp/src/main/webapp/static/examples/sos_v20/requests_xml/GetDataAvailability.xml
index 6555f81e9d..b11ccc48a4 100644
--- a/webapp/src/main/webapp/static/examples/sos_v20/requests_xml/GetDataAvailability.xml
+++ b/webapp/src/main/webapp/static/examples/sos_v20/requests_xml/GetDataAvailability.xml
@@ -21,7 +21,7 @@
phenomenonTime
2012-11-19T12:59:59.000Z
- 2012-11-19T013:05:00.000Z
+ 2012-11-19T13:05:00.000Z
-->
diff --git a/webapp/src/main/webapp/static/examples/sos_v20/requests_xml/ResultHandling/GetResult.xml b/webapp/src/main/webapp/static/examples/sos_v20/requests_xml/ResultHandling/GetResult.xml
index 40a5aeac62..641866ec38 100644
--- a/webapp/src/main/webapp/static/examples/sos_v20/requests_xml/ResultHandling/GetResult.xml
+++ b/webapp/src/main/webapp/static/examples/sos_v20/requests_xml/ResultHandling/GetResult.xml
@@ -2,6 +2,6 @@
- http://www.52north.org/test/offering/9
- http://www.52north.org/test/observableProperty/9_3
+ http://www.52north.org/test/offering/6
+ http://www.52north.org/test/observableProperty/6
diff --git a/webapp/src/main/webapp/static/examples/sos_v20/requests_xml/ResultHandling/GetResultTemplate.xml b/webapp/src/main/webapp/static/examples/sos_v20/requests_xml/ResultHandling/GetResultTemplate.xml
index 7f9a17311b..fea15f89be 100644
--- a/webapp/src/main/webapp/static/examples/sos_v20/requests_xml/ResultHandling/GetResultTemplate.xml
+++ b/webapp/src/main/webapp/static/examples/sos_v20/requests_xml/ResultHandling/GetResultTemplate.xml
@@ -2,6 +2,6 @@
- http://www.52north.org/test/offering/9
- http://www.52north.org/test/observableProperty/9_3
+ http://www.52north.org/test/offering/6
+ http://www.52north.org/test/observableProperty/6
diff --git a/webapp/src/main/webapp/static/examples/sos_v20/requests_xml/Transactional/InsertObservation_Multiple.xml b/webapp/src/main/webapp/static/examples/sos_v20/requests_xml/Transactional/InsertObservation_Multiple.xml
index ac836b0d0c..ec315906e2 100644
--- a/webapp/src/main/webapp/static/examples/sos_v20/requests_xml/Transactional/InsertObservation_Multiple.xml
+++ b/webapp/src/main/webapp/static/examples/sos_v20/requests_xml/Transactional/InsertObservation_Multiple.xml
@@ -20,7 +20,7 @@
- 2012-11-19T17:46:15.000+00:00
+ 2012-11-19T17:47:15.000+00:00
diff --git a/webapp/src/main/webapp/static/examples/sos_v20/requests_xml/Transactional/InsertObservation_Split_SweArray.xml b/webapp/src/main/webapp/static/examples/sos_v20/requests_xml/Transactional/InsertObservation_Split_SweArray.xml
new file mode 100644
index 0000000000..c73cb931f2
--- /dev/null
+++ b/webapp/src/main/webapp/static/examples/sos_v20/requests_xml/Transactional/InsertObservation_Split_SweArray.xml
@@ -0,0 +1,81 @@
+
+
+
+
+ true
+
+
+ http://www.52north.org/test/offering/6
+
+
+
+
+
+ 2012-11-19T13:30:00+02:00
+ 2012-11-19T13:44:00+02:00
+
+
+
+
+ 2012-11-19T13:50:00+02:00
+
+
+
+
+
+
+ http://www.52north.org/test/featureOfInterest/6
+ 52°North
+
+
+
+
+ 51.935101100104916 7.651968812254194
+
+
+
+
+
+
+
+
+ 15
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ 2012-11-19T13:30:00+02:00#159.15@2012-11-19T13:31:00+02:00#159.15@2012-11-19T13:32:00+02:00#159.85@2012-11-19T13:33:00+02:00#160.5@2012-11-19T13:34:00+02:00#160.9@2012-11-19T13:35:00+02:00#160.7@2012-11-19T13:36:00+02:00#160.5@2012-11-19T13:37:00+02:00#160.6@2012-11-19T13:38:00+02:00#160.5@2012-11-19T13:39:00+02:00#160.4@2012-11-19T13:40:00+02:00#160.34@2012-11-19T13:41:00+02:00#160.25@2012-11-19T13:42:00+02:00#159.79@2012-11-19T13:43:00+02:00#159.56@2012-11-19T13:44:00+02:00#159.25
+
+
+
+
+
+
\ No newline at end of file
diff --git a/webapp/src/main/webapp/static/examples/sos_v20/requests_xml/Transactional/InsertObservation_SweArray.xml b/webapp/src/main/webapp/static/examples/sos_v20/requests_xml/Transactional/InsertObservation_SweArray.xml
index fbc352d4a7..ab7c73c0f1 100644
--- a/webapp/src/main/webapp/static/examples/sos_v20/requests_xml/Transactional/InsertObservation_SweArray.xml
+++ b/webapp/src/main/webapp/static/examples/sos_v20/requests_xml/Transactional/InsertObservation_SweArray.xml
@@ -12,14 +12,8 @@
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://www.opengis.net/sos/2.0 http://schemas.opengis.net/sos/2.0/sos.xsd
http://www.opengis.net/samplingSpatial/2.0 http://schemas.opengis.net/samplingSpatial/2.0/spatialSamplingFeature.xsd">
-
-
- http://www.52north.org/test/offering/6
+ http://www.52north.org/test/offering/9
@@ -34,16 +28,16 @@
2012-11-19T13:50:00+02:00
-
-
+
+
-
- http://www.52north.org/test/featureOfInterest/6
+
+ http://www.52north.org/test/featureOfInterest/9
52°North
-
-
+
+
51.935101100104916 7.651968812254194
@@ -64,7 +58,7 @@
-
+
diff --git a/webapp/src/main/webapp/static/examples/sos_v20/requests_xml/Transactional/InsertSensor.xml b/webapp/src/main/webapp/static/examples/sos_v20/requests_xml/Transactional/InsertSensor.xml
index b0238b6e98..eb972cb36e 100644
--- a/webapp/src/main/webapp/static/examples/sos_v20/requests_xml/Transactional/InsertSensor.xml
+++ b/webapp/src/main/webapp/static/examples/sos_v20/requests_xml/Transactional/InsertSensor.xml
@@ -1,20 +1,17 @@
http://www.opengis.net/sensorML/1.0.1
-
+
-
+
@@ -25,7 +22,8 @@
- 52°North Initiative for Geospatial Open Source Software GmbH (http://52north.org)
+ 52°North Initiative for Geospatial Open Source
+ Software GmbH (http://52north.org)
@@ -38,8 +36,9 @@
-
-
+
+
@@ -51,7 +50,8 @@
-
+
@@ -62,11 +62,13 @@
-
+
- http://www.52north.org/test/featureOfInterest/9
+ http://www.52north.org/test/featureOfInterest/9
+
@@ -78,7 +80,7 @@
-
+
7.651968812254194
@@ -90,7 +92,7 @@
-
+
52.0
@@ -101,36 +103,64 @@
-
+
-
-
+
+
-
-
+
+
-
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
-
+
http://www.52north.org/test/observableProperty/9_1
@@ -139,6 +169,7 @@
http://www.52north.org/test/observableProperty/9_4
http://www.52north.org/test/observableProperty/9_5
http://www.52north.org/test/observableProperty/9_6
+ http://www.52north.org/test/observableProperty/9_7
http://www.opengis.net/def/observationType/OGC-OM/2.0/OM_Measurement
@@ -147,6 +178,7 @@
http://www.opengis.net/def/observationType/OGC-OM/2.0/OM_TextObservation
http://www.opengis.net/def/observationType/OGC-OM/2.0/OM_TruthObservation
http://www.opengis.net/def/observationType/OGC-OM/2.0/OM_GeometryObservation
+ http://www.opengis.net/def/observationType/OGC-OM/2.0/OM_SWEArrayObservation
http://www.opengis.net/def/samplingFeatureType/OGC-OM/2.0/SF_SamplingPoint
From abe311d67ffe9d2c148a2dc993ab2b47b96ba95e Mon Sep 17 00:00:00 2001
From: CarstenHollmann
Date: Thu, 14 Aug 2014 15:51:27 +0200
Subject: [PATCH 208/229] Update used versions form 0.2.0 to 4.1.0
---
pom.xml | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/pom.xml b/pom.xml
index 1736f66dbb..98abc248fc 100644
--- a/pom.xml
+++ b/pom.xml
@@ -77,8 +77,8 @@
4.1.0
- 0.2.0
- 0.2.0
+ 4.1.0
+ 4.1.0
3.1.4.RELEASE
3.2.6.RELEASE
9.1.0.8
From 8769890ddc6628142829c3168e18877f3a84ee2e Mon Sep 17 00:00:00 2001
From: CarstenHollmann
Date: Thu, 14 Aug 2014 15:56:08 +0200
Subject: [PATCH 209/229] Organize imports
---
.../main/java/org/n52/sos/ds/hibernate/H2Configuration.java | 3 ---
1 file changed, 3 deletions(-)
diff --git a/hibernate/h2/src/main/java/org/n52/sos/ds/hibernate/H2Configuration.java b/hibernate/h2/src/main/java/org/n52/sos/ds/hibernate/H2Configuration.java
index b5e8ee9c58..75ae873c1d 100644
--- a/hibernate/h2/src/main/java/org/n52/sos/ds/hibernate/H2Configuration.java
+++ b/hibernate/h2/src/main/java/org/n52/sos/ds/hibernate/H2Configuration.java
@@ -54,10 +54,7 @@
import org.n52.sos.cache.ctrl.ScheduledContentCacheControllerSettings;
import org.n52.sos.config.sqlite.SQLiteSessionFactory;
import org.n52.sos.ds.ConnectionProviderException;
-import org.n52.sos.ds.ConnectionProviderIdentificator;
import org.n52.sos.ds.Datasource;
-import org.n52.sos.ds.DatasourceDaoIdentifier;
-import org.n52.sos.ds.HibernateDatasourceConstants;
import org.n52.sos.exception.ConfigurationException;
import org.n52.sos.ogc.ows.OwsExceptionReport;
import org.n52.sos.service.Configurator;
From 1e0b589f68bd330dc0ba82ab2d4c00c6c29a5109 Mon Sep 17 00:00:00 2001
From: CarstenHollmann
Date: Thu, 14 Aug 2014 15:56:19 +0200
Subject: [PATCH 210/229] Typo
---
.../n52/sos/ds/hibernate/values/HibernateStreamingSettings.java | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/hibernate/dao/src/main/java/org/n52/sos/ds/hibernate/values/HibernateStreamingSettings.java b/hibernate/dao/src/main/java/org/n52/sos/ds/hibernate/values/HibernateStreamingSettings.java
index 31da4905f8..13ab4f3983 100644
--- a/hibernate/dao/src/main/java/org/n52/sos/ds/hibernate/values/HibernateStreamingSettings.java
+++ b/hibernate/dao/src/main/java/org/n52/sos/ds/hibernate/values/HibernateStreamingSettings.java
@@ -73,7 +73,7 @@ public class HibernateStreamingSettings implements SettingDefinitionProvider {
.setTitle(
"Should this service query the streaming datasource values (currently only GetObservation) as chunk of x (true) ora as scrollable values?")
.setDescription(
- "Whether the service should query the streaming stream datasource values (currently only GetObservation) as chunk of x (true) ora as scrollable values.");
+ "Whether the service should query the streaming stream datasource values (currently only GetObservation) as chunk of x (true) or as scrollable values.");
public static final IntegerSettingDefinition CHUNK_SIZE_DEFINITION =
new IntegerSettingDefinition()
From 50f090a63e786edcbe84d37acd054971b0c98b24 Mon Sep 17 00:00:00 2001
From: CarstenHollmann
Date: Thu, 14 Aug 2014 15:57:21 +0200
Subject: [PATCH 211/229] Add SensorML 1.0.1 MimeTypes to ConverterKeyTypes
---
.../n52/sos/convert/WaterMLv20SensorMLv101Converter.java | 6 ++++--
1 file changed, 4 insertions(+), 2 deletions(-)
diff --git a/coding/wml-v20/src/main/java/org/n52/sos/convert/WaterMLv20SensorMLv101Converter.java b/coding/wml-v20/src/main/java/org/n52/sos/convert/WaterMLv20SensorMLv101Converter.java
index 6c7406f18f..c4838373e7 100644
--- a/coding/wml-v20/src/main/java/org/n52/sos/convert/WaterMLv20SensorMLv101Converter.java
+++ b/coding/wml-v20/src/main/java/org/n52/sos/convert/WaterMLv20SensorMLv101Converter.java
@@ -75,8 +75,10 @@ public class WaterMLv20SensorMLv101Converter implements Converter CONVERTER_KEY_TYPES = CollectionHelper.list(
- new ConverterKeyType(WaterMLConstants.NS_WML_20_PROCEDURE_ENCODING, SensorMLConstants.NS_SML),
- new ConverterKeyType(SensorMLConstants.NS_SML,WaterMLConstants.NS_WML_20_PROCEDURE_ENCODING));
+ new ConverterKeyType(WaterMLConstants.NS_WML_20_PROCEDURE_ENCODING, SensorMLConstants.SENSORML_OUTPUT_FORMAT_URL),
+ new ConverterKeyType(WaterMLConstants.NS_WML_20_PROCEDURE_ENCODING, SensorMLConstants.SENSORML_OUTPUT_FORMAT_MIME_TYPE),
+ new ConverterKeyType(SensorMLConstants.SENSORML_OUTPUT_FORMAT_URL,WaterMLConstants.NS_WML_20_PROCEDURE_ENCODING),
+ new ConverterKeyType(SensorMLConstants.SENSORML_OUTPUT_FORMAT_MIME_TYPE,WaterMLConstants.NS_WML_20_PROCEDURE_ENCODING));
public WaterMLv20SensorMLv101Converter() {
LOGGER.debug("Converter for the following keys initialized successfully: {}!",
From 119b81ae7b513c17c15e786e0398a82741531720 Mon Sep 17 00:00:00 2001
From: CarstenHollmann
Date: Thu, 14 Aug 2014 16:04:34 +0200
Subject: [PATCH 212/229] Remove MAX_GET_OBSERVATION_RESULTS_DEFINITION and use
instead HYDRO_MAX_NUMBER_OF_RETURNED_VALUES. Update
HYDRO_MAX_NUMBER_OF_RETURNED_VALUES definition that 0 is no restriction. The
same for HYDRO_MAX_NUMBER_OF_RETURNED_TIME_SERIES. Update related check
methods .
---
.../org/n52/sos/service/MiscSettings.java | 15 +++++-------
.../org/n52/sos/service/ServiceSettings.java | 23 +++++++++----------
.../sos/ds/hibernate/GetObservationDAO.java | 5 ++--
.../util/HibernateGetObservationHelper.java | 6 ++---
4 files changed, 22 insertions(+), 27 deletions(-)
diff --git a/core/api/src/main/java/org/n52/sos/service/MiscSettings.java b/core/api/src/main/java/org/n52/sos/service/MiscSettings.java
index e49b1dbc27..527be822f3 100644
--- a/core/api/src/main/java/org/n52/sos/service/MiscSettings.java
+++ b/core/api/src/main/java/org/n52/sos/service/MiscSettings.java
@@ -168,11 +168,9 @@ public class MiscSettings implements SettingDefinitionProvider {
new IntegerSettingDefinition()
.setGroup(GROUP)
.setKey(HYDRO_MAX_NUMBER_OF_RETURNED_VALUES)
- .setDefaultValue(Integer.MAX_VALUE)
- .setTitle(
- String.format("Maximum number of returned observation values Integer.max = %s",
- Integer.MAX_VALUE))
- .setDescription("Set the maximum number of returned observation values for the Hydrology-Profile.")
+ .setDefaultValue(0)
+ .setTitle("Maximum number of returned observation values")
+ .setDescription("Set the maximum number of returned observation values for the Hydrology-Profile. Set to 0
(zero) for unlimited number of observations.")
.setOrder(ORDER_14);
// TODO move to Profile settings if implemented
@@ -180,10 +178,9 @@ public class MiscSettings implements SettingDefinitionProvider {
new IntegerSettingDefinition()
.setGroup(GROUP)
.setKey(HYDRO_MAX_NUMBER_OF_RETURNED_TIME_SERIES)
- .setDefaultValue(Integer.MAX_VALUE)
- .setTitle(
- String.format("Maximum number of returned time series Integer.max = %s", Integer.MAX_VALUE))
- .setDescription("Set the maximum number of returned time series for the Hydrology-Profile.")
+ .setDefaultValue(0)
+ .setTitle("Maximum number of returned time series")
+ .setDescription("Set the maximum number of returned time series for the Hydrology-Profile. Set to 0
(zero) for unlimited number of observations.")
.setOrder(ORDER_15);
// TODO move to Profile settings if implemented
diff --git a/core/api/src/main/java/org/n52/sos/service/ServiceSettings.java b/core/api/src/main/java/org/n52/sos/service/ServiceSettings.java
index e8834f9a68..30c3e879da 100644
--- a/core/api/src/main/java/org/n52/sos/service/ServiceSettings.java
+++ b/core/api/src/main/java/org/n52/sos/service/ServiceSettings.java
@@ -35,7 +35,6 @@
import org.n52.sos.config.SettingDefinitionGroup;
import org.n52.sos.config.SettingDefinitionProvider;
import org.n52.sos.config.settings.BooleanSettingDefinition;
-import org.n52.sos.config.settings.IntegerSettingDefinition;
import org.n52.sos.config.settings.StringSettingDefinition;
import org.n52.sos.config.settings.UriSettingDefinition;
@@ -80,16 +79,16 @@ public class ServiceSettings implements SettingDefinitionProvider {
+ " The path to a specific binding (like /soap
) will appended to this URL."
+ " For detailed information, please read the documentation ");
- public static final IntegerSettingDefinition MAX_GET_OBSERVATION_RESULTS_DEFINITION =
- new IntegerSettingDefinition()
- .setGroup(GROUP)
- .setOrder(ORDER_4)
- .setKey(MAX_GET_OBSERVATION_RESULTS)
- .setDefaultValue(0)
- .setTitle("Maximum number of observations")
- .setDescription(
- "Maximum number of observation in GetObservation responses. "
- + "Set to 0
(zero) for unlimited number of observations.");
+// public static final IntegerSettingDefinition MAX_GET_OBSERVATION_RESULTS_DEFINITION =
+// new IntegerSettingDefinition()
+// .setGroup(GROUP)
+// .setOrder(ORDER_4)
+// .setKey(MAX_GET_OBSERVATION_RESULTS)
+// .setDefaultValue(0)
+// .setTitle("Maximum number of observations")
+// .setDescription(
+// "Maximum number of observation in GetObservation responses. "
+// + "Set to 0
(zero) for unlimited number of observations.");
// TODO quality is not yet supported
// public static final BooleanSettingDefinition SUPPORTS_QUALITY_DEFINITION
@@ -171,7 +170,7 @@ public class ServiceSettings implements SettingDefinitionProvider {
private static final Set> DEFINITIONS = Sets.> newHashSet(
SERVICE_URL_DEFINITION,
- MAX_GET_OBSERVATION_RESULTS_DEFINITION,
+// MAX_GET_OBSERVATION_RESULTS_DEFINITION,
// SUPPORTS_QUALITY_DEFINITION,
SENSOR_DIRECTORY_DEFINITION, USE_DEFAULT_PREFIXES_DEFINITION,
ENCODE_FULL_CHILDREN_IN_DESCRIBE_SENSOR_DEFINITION, DEREGISTER_JDBC_DRIVER_DEFINITION,
diff --git a/hibernate/dao/src/main/java/org/n52/sos/ds/hibernate/GetObservationDAO.java b/hibernate/dao/src/main/java/org/n52/sos/ds/hibernate/GetObservationDAO.java
index 941b89e574..a11ac7b1bd 100644
--- a/hibernate/dao/src/main/java/org/n52/sos/ds/hibernate/GetObservationDAO.java
+++ b/hibernate/dao/src/main/java/org/n52/sos/ds/hibernate/GetObservationDAO.java
@@ -208,8 +208,7 @@ public GetObservationResponse getObservation(final GetObservationRequest sosRequ
public Set getConformanceClasses() {
try {
Session session = sessionHolder.getSession();
- if (ServiceConfiguration.getInstance().isStrictSpatialFilteringProfile()
- && DaoFactory.getInstance().getSpatialFilteringProfileDAO(session) != null) {
+ if (ServiceConfiguration.getInstance().isStrictSpatialFilteringProfile()) {
return Sets.newHashSet(ConformanceClasses.SOS_V2_SPATIAL_FILTERING_PROFILE);
}
sessionHolder.returnSession(session);
@@ -285,7 +284,7 @@ else if (CollectionHelper.isNotEmpty(sosIndeterminateTimeFilters)) {
request.getResultModel(), session);
Set timeSeries = Sets.newHashSet();
if (getConfigurator().getProfileHandler().getActiveProfile().isShowMetadataOfEmptyObservations()
- || Integer.MAX_VALUE != ServiceConfiguration.getInstance().getMaxNumberOfReturnedTimeSeries()) {
+ || ServiceConfiguration.getInstance().getMaxNumberOfReturnedTimeSeries() > 0) {
for (OmObservation omObservation : result) {
timeSeries.add(omObservation.getObservationConstellation());
}
diff --git a/hibernate/dao/src/main/java/org/n52/sos/ds/hibernate/util/HibernateGetObservationHelper.java b/hibernate/dao/src/main/java/org/n52/sos/ds/hibernate/util/HibernateGetObservationHelper.java
index 5cf6e49257..db4a480be4 100644
--- a/hibernate/dao/src/main/java/org/n52/sos/ds/hibernate/util/HibernateGetObservationHelper.java
+++ b/hibernate/dao/src/main/java/org/n52/sos/ds/hibernate/util/HibernateGetObservationHelper.java
@@ -123,7 +123,7 @@ public static List getAndCheckObservationConstellation
*/
public static void checkMaxNumberOfReturnedTimeSeries(Collection seriesObservations,
int metadataObservationsCount) throws CodedException {
- if (Integer.MAX_VALUE != ServiceConfiguration.getInstance().getMaxNumberOfReturnedTimeSeries()) {
+ if (ServiceConfiguration.getInstance().getMaxNumberOfReturnedTimeSeries() > 0) {
Set seriesIds = Sets.newHashSet();
for (SeriesObservation seriesObs : seriesObservations) {
seriesIds.add(seriesObs.getSeries().getSeriesId());
@@ -142,7 +142,7 @@ public static void checkMaxNumberOfReturnedTimeSeries(Collection ServiceConfiguration.getInstance().getMaxNumberOfReturnedTimeSeries()) {
+ if (ServiceConfiguration.getInstance().getMaxNumberOfReturnedTimeSeries() > 0 && size > ServiceConfiguration.getInstance().getMaxNumberOfReturnedTimeSeries()) {
throw new ResponseExceedsSizeLimitException().at("maxNumberOfReturnedTimeSeries");
}
}
@@ -157,7 +157,7 @@ public static void checkMaxNumberOfReturnedSeriesSize(int size) throws CodedExce
*/
public static void checkMaxNumberOfReturnedValues(int size) throws CodedException {
// FIXME refactor profile handling
- if (size > ServiceConfiguration.getInstance().getMaxNumberOfReturnedValues()) {
+ if (ServiceConfiguration.getInstance().getMaxNumberOfReturnedValues() > 0 && size > ServiceConfiguration.getInstance().getMaxNumberOfReturnedValues()) {
throw new ResponseExceedsSizeLimitException().at("maxNumberOfReturnedValues");
}
}
From 024db3f735a409fe3688ca0227745a3f2afee986 Mon Sep 17 00:00:00 2001
From: CarstenHollmann
Date: Thu, 14 Aug 2014 16:09:00 +0200
Subject: [PATCH 213/229] Fix obsolete SpatialFilteringProfile entity check and
add feature geometry as samplingGeometry to observaiton if
SpatialFilteringProfile is strict and default samlingGeometry is missing.
---
.../util/observation/ObservationOmObservationCreator.java | 8 ++++++++
.../main/java/org/n52/sos/ds/hibernate/GetResultDAO.java | 6 +-----
.../org/n52/sos/ds/hibernate/InsertObservationDAO.java | 5 +----
3 files changed, 10 insertions(+), 9 deletions(-)
diff --git a/hibernate/common/src/main/java/org/n52/sos/ds/hibernate/util/observation/ObservationOmObservationCreator.java b/hibernate/common/src/main/java/org/n52/sos/ds/hibernate/util/observation/ObservationOmObservationCreator.java
index 27183f1e91..bd6af5fe49 100644
--- a/hibernate/common/src/main/java/org/n52/sos/ds/hibernate/util/observation/ObservationOmObservationCreator.java
+++ b/hibernate/common/src/main/java/org/n52/sos/ds/hibernate/util/observation/ObservationOmObservationCreator.java
@@ -65,6 +65,7 @@
import org.n52.sos.ogc.om.OmObservation;
import org.n52.sos.ogc.om.OmObservationConstellation;
import org.n52.sos.ogc.om.SingleObservationValue;
+import org.n52.sos.ogc.om.features.samplingFeatures.SamplingFeature;
import org.n52.sos.ogc.om.values.QuantityValue;
import org.n52.sos.ogc.om.values.SweDataArrayValue;
import org.n52.sos.ogc.om.values.UnknownValue;
@@ -74,6 +75,7 @@
import org.n52.sos.ogc.sos.SosProcedureDescription;
import org.n52.sos.ogc.sos.SosProcedureDescriptionUnknowType;
import org.n52.sos.ogc.swe.SweDataArray;
+import org.n52.sos.service.ServiceConfiguration;
import org.n52.sos.util.CodingHelper;
import org.n52.sos.util.SosHelper;
import org.n52.sos.util.StringHelper;
@@ -364,6 +366,12 @@ private void createValue(AbstractObservation hObservation, String phenomenonId,
sosObservation.addParameter(createSpatialFilteringProfileParameter(hObservation.getSamplingGeometry()));
} else if (isSetSpatialFilteringProfileAdder()) {
getSpatialFilteringProfileAdder().add(hObservation.getObservationId(), sosObservation);
+ } else {
+ if (ServiceConfiguration.getInstance().isStrictSpatialFilteringProfile()) {
+ AbstractFeature feature = getFeature(featureId);
+ if (feature != null && feature instanceof SamplingFeature && ((SamplingFeature)feature).isSetGeometry())
+ sosObservation.addParameter(createSpatialFilteringProfileParameter(((SamplingFeature)feature).getGeometry()));
+ }
}
observationCollection.add(sosObservation);
getSession().evict(hObservation);
diff --git a/hibernate/dao/src/main/java/org/n52/sos/ds/hibernate/GetResultDAO.java b/hibernate/dao/src/main/java/org/n52/sos/ds/hibernate/GetResultDAO.java
index bfa589e857..395e07e521 100644
--- a/hibernate/dao/src/main/java/org/n52/sos/ds/hibernate/GetResultDAO.java
+++ b/hibernate/dao/src/main/java/org/n52/sos/ds/hibernate/GetResultDAO.java
@@ -60,16 +60,13 @@
import org.n52.sos.ds.hibernate.util.ResultHandlingHelper;
import org.n52.sos.ds.hibernate.util.SpatialRestrictions;
import org.n52.sos.ds.hibernate.util.TemporalRestrictions;
-import org.n52.sos.exception.CodedException;
import org.n52.sos.exception.ows.NoApplicableCodeException;
-import org.n52.sos.exception.ows.OptionNotSupportedException;
import org.n52.sos.exception.ows.concrete.UnsupportedOperatorException;
import org.n52.sos.exception.ows.concrete.UnsupportedTimeException;
import org.n52.sos.exception.ows.concrete.UnsupportedValueReferenceException;
import org.n52.sos.ogc.filter.TemporalFilter;
import org.n52.sos.ogc.ows.OwsExceptionReport;
import org.n52.sos.ogc.sos.ConformanceClasses;
-import org.n52.sos.ogc.sos.Sos2Constants;
import org.n52.sos.ogc.sos.SosConstants;
import org.n52.sos.ogc.sos.SosResultEncoding;
import org.n52.sos.ogc.sos.SosResultStructure;
@@ -145,8 +142,7 @@ public GetResultResponse getResult(final GetResultRequest request) throws OwsExc
public Set getConformanceClasses() {
try {
Session session = sessionHolder.getSession();
- if (ServiceConfiguration.getInstance().isStrictSpatialFilteringProfile()
- && HibernateHelper.isEntitySupported(SpatialFilteringProfile.class, session)) {
+ if (ServiceConfiguration.getInstance().isStrictSpatialFilteringProfile()) {
return Sets.newHashSet(ConformanceClasses.SOS_V2_SPATIAL_FILTERING_PROFILE);
}
sessionHolder.returnSession(session);
diff --git a/hibernate/dao/src/main/java/org/n52/sos/ds/hibernate/InsertObservationDAO.java b/hibernate/dao/src/main/java/org/n52/sos/ds/hibernate/InsertObservationDAO.java
index 875cf93ecd..420719bb60 100644
--- a/hibernate/dao/src/main/java/org/n52/sos/ds/hibernate/InsertObservationDAO.java
+++ b/hibernate/dao/src/main/java/org/n52/sos/ds/hibernate/InsertObservationDAO.java
@@ -48,9 +48,7 @@
import org.n52.sos.ds.hibernate.entities.Codespace;
import org.n52.sos.ds.hibernate.entities.FeatureOfInterest;
import org.n52.sos.ds.hibernate.entities.ObservationConstellation;
-import org.n52.sos.ds.hibernate.entities.SpatialFilteringProfile;
import org.n52.sos.ds.hibernate.entities.Unit;
-import org.n52.sos.ds.hibernate.util.HibernateHelper;
import org.n52.sos.exception.ows.MissingParameterValueException;
import org.n52.sos.exception.ows.NoApplicableCodeException;
import org.n52.sos.ogc.gml.AbstractFeature;
@@ -137,9 +135,8 @@ public synchronized InsertObservationResponse insertObservation(final InsertObse
int obsCount = 0;
for (final OmObservation sosObservation : request.getObservations()) {
- // check
+ // check strict spatial filtering profile
if (ServiceConfiguration.getInstance().isStrictSpatialFilteringProfile()
- && HibernateHelper.isEntitySupported(SpatialFilteringProfile.class, session)
&& !sosObservation.isSetSpatialFilteringProfileParameter()) {
throw new MissingParameterValueException(Sos2Constants.InsertObservationParams.parameter)
.withMessage("The sampling geometry definition is missing in the observation because"
From 1e421f4594ca79df2c9219f432d3ea8c7d464d81 Mon Sep 17 00:00:00 2001
From: CarstenHollmann
Date: Thu, 14 Aug 2014 16:13:30 +0200
Subject: [PATCH 214/229] Fix for DescribeSensor requests with non SensorML
1.0.1 procedureDescriptionFormat (e.g. Hydrology Profile): - Before the check
in the convertProcedureDescription method was invalid.
---
.../sos/ds/hibernate/DescribeSensorDAO.java | 22 ++++++++++++-------
1 file changed, 14 insertions(+), 8 deletions(-)
diff --git a/hibernate/dao/src/main/java/org/n52/sos/ds/hibernate/DescribeSensorDAO.java b/hibernate/dao/src/main/java/org/n52/sos/ds/hibernate/DescribeSensorDAO.java
index d97e6e5e03..8e542fa0e4 100644
--- a/hibernate/dao/src/main/java/org/n52/sos/ds/hibernate/DescribeSensorDAO.java
+++ b/hibernate/dao/src/main/java/org/n52/sos/ds/hibernate/DescribeSensorDAO.java
@@ -199,13 +199,7 @@ protected void setOperationsMetadata(OwsOperation opsMeta, String service, Strin
* @return All possible procedure description formats
*/
private Set getPossibleProcedureDescriptionFormats(String procedureDescriptionFormat) {
- Set possibleFormats = Sets.newHashSet();
- possibleFormats.add(procedureDescriptionFormat);
- if (SensorMLConstants.SENSORML_OUTPUT_FORMAT_MIME_TYPE.equalsIgnoreCase(procedureDescriptionFormat)) {
- possibleFormats.add(SensorMLConstants.SENSORML_OUTPUT_FORMAT_URL);
- } else if (SensorMLConstants.SENSORML_OUTPUT_FORMAT_URL.equalsIgnoreCase(procedureDescriptionFormat)) {
- possibleFormats.add(SensorMLConstants.SENSORML_OUTPUT_FORMAT_MIME_TYPE);
- }
+ Set possibleFormats = checkForUrlVsMimeType(procedureDescriptionFormat);
String procedureDescriptionFormatMatchingString =
getProcedureDescriptionFormatMatchingString(procedureDescriptionFormat);
for (Entry> pdfByServiceOperatorKey : CodingRepository.getInstance()
@@ -234,10 +228,22 @@ private String getProcedureDescriptionFormatMatchingString(String procedureDescr
// match against lowercase string, ignoring whitespace
return procedureDescriptionFormat.toLowerCase().replaceAll("\\s", "");
}
+
+ private Set checkForUrlVsMimeType(String procedureDescriptionFormat) {
+ Set possibleFormats = Sets.newHashSet();
+ possibleFormats.add(procedureDescriptionFormat);
+ if (SensorMLConstants.SENSORML_OUTPUT_FORMAT_MIME_TYPE.equalsIgnoreCase(procedureDescriptionFormat)) {
+ possibleFormats.add(SensorMLConstants.SENSORML_OUTPUT_FORMAT_URL);
+ } else if (SensorMLConstants.SENSORML_OUTPUT_FORMAT_URL.equalsIgnoreCase(procedureDescriptionFormat)) {
+ possibleFormats.add(SensorMLConstants.SENSORML_OUTPUT_FORMAT_MIME_TYPE);
+ }
+ return possibleFormats;
+ }
+
private SosProcedureDescription convertProcedureDescription(SosProcedureDescription procedureDescription,
DescribeSensorRequest request) throws CodedException {
- if (!getPossibleProcedureDescriptionFormats(request.getProcedureDescriptionFormat()).contains(procedureDescription.getDescriptionFormat())) {
+ if (!checkForUrlVsMimeType(procedureDescription.getDescriptionFormat()).contains(request.getProcedureDescriptionFormat())) {
Converter converter =
ConverterRepository.getInstance().getConverter(procedureDescription.getDescriptionFormat(),
request.getProcedureDescriptionFormat());
From 4972a4e0a13bc0e3e5cb951f4d322c064a22e8de Mon Sep 17 00:00:00 2001
From: CarstenHollmann
Date: Thu, 14 Aug 2014 16:28:47 +0200
Subject: [PATCH 215/229] Fix for # 101 SOS 1.0.0 GetObservation SOAP request -
Proble: SOS 1.0.0 GetObservation SOAP request fails because the contentType
is set in the AbstractRequestOperator from the requested responseFormat if it
is a MimeType. - Solution: remove the contentType setting from
responseFormat.
---
.../operator/AbstractRequestOperator.java | 19 +++++++++----------
1 file changed, 9 insertions(+), 10 deletions(-)
diff --git a/core/api/src/main/java/org/n52/sos/request/operator/AbstractRequestOperator.java b/core/api/src/main/java/org/n52/sos/request/operator/AbstractRequestOperator.java
index d44ac05cce..552d7f793b 100644
--- a/core/api/src/main/java/org/n52/sos/request/operator/AbstractRequestOperator.java
+++ b/core/api/src/main/java/org/n52/sos/request/operator/AbstractRequestOperator.java
@@ -64,7 +64,6 @@
import org.n52.sos.service.operator.ServiceOperatorRepository;
import org.n52.sos.service.profile.Profile;
import org.n52.sos.util.CollectionHelper;
-import org.n52.sos.util.http.MediaType;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
@@ -507,15 +506,15 @@ protected void setObservationResponseResponseFormatAndContentType(AbstractObserv
// don't normalize response format with MediaType parsing here, that's the job of the v1 decoders
obsResponse.setResponseFormat(obsRequest.getResponseFormat());
- MediaType contentTypeFromResponseFormat = null;
- try {
- contentTypeFromResponseFormat = MediaType.parse(obsRequest.getResponseFormat()).withoutParameters();
- } catch (IllegalArgumentException iae) {
- LOGGER.debug("Requested responseFormat {} is not a MediaType", obsRequest.getResponseFormat());
- }
- if (contentTypeFromResponseFormat != null) {
- obsResponse.setContentType(contentTypeFromResponseFormat);
- }
+// MediaType contentTypeFromResponseFormat = null;
+// try {
+// contentTypeFromResponseFormat = MediaType.parse(obsRequest.getResponseFormat()).withoutParameters();
+// } catch (IllegalArgumentException iae) {
+// LOGGER.debug("Requested responseFormat {} is not a MediaType", obsRequest.getResponseFormat());
+// }
+// if (contentTypeFromResponseFormat != null) {
+// obsResponse.setContentType(contentTypeFromResponseFormat);
+// }
}
}
From 930573e3bbb47d2668383b9bddddee37ea53552c Mon Sep 17 00:00:00 2001
From: Shane StClair
Date: Thu, 14 Aug 2014 23:39:46 -0700
Subject: [PATCH 216/229] Add BinaryAttachmentResponseWriter, enhance
ResponseWriters
Make all ResponseWriters extend AbstractResposneWriter.
Make ResponseWriters able to supply response headers and content length
via GenericWritable in HTTPUtils
---
.../n52/sos/encode/SoapResponseWriter.java | 2 +-
.../sos/encode/json/JSONResponseWriter.java | 4 +-
.../sos/encode/AbstractResponseWriter.java | 32 ++++++-
.../encode/AbstractServiceResponseWriter.java | 3 +-
.../BinaryAttachmentResponseWriter.java | 95 +++++++++++++++++++
.../org/n52/sos/encode/ResponseWriter.java | 15 +++
.../org/n52/sos/encode/XmlResponseWriter.java | 2 +-
.../response/BinaryAttachmentResponse.java | 86 +++++++++++++++++
.../org/n52/sos/response/ServiceResponse.java | 31 ------
.../java/org/n52/sos/util/http/HTTPUtils.java | 28 +++++-
.../org.n52.sos.encode.ResponseWriter | 3 +-
11 files changed, 258 insertions(+), 43 deletions(-)
create mode 100644 core/api/src/main/java/org/n52/sos/encode/BinaryAttachmentResponseWriter.java
create mode 100644 core/api/src/main/java/org/n52/sos/response/BinaryAttachmentResponse.java
diff --git a/bindings/soap/src/main/java/org/n52/sos/encode/SoapResponseWriter.java b/bindings/soap/src/main/java/org/n52/sos/encode/SoapResponseWriter.java
index 34bdddbd8f..7ce4b2ab7d 100644
--- a/bindings/soap/src/main/java/org/n52/sos/encode/SoapResponseWriter.java
+++ b/bindings/soap/src/main/java/org/n52/sos/encode/SoapResponseWriter.java
@@ -43,7 +43,7 @@
* @author Christian Autermann
* @since 4.0.0
*/
-public class SoapResponseWriter implements ResponseWriter {
+public class SoapResponseWriter extends AbstractResponseWriter {
@Override
public Class getType() {
return SOAPMessage.class;
diff --git a/coding/json-common/src/main/java/org/n52/sos/encode/json/JSONResponseWriter.java b/coding/json-common/src/main/java/org/n52/sos/encode/json/JSONResponseWriter.java
index 94fa764878..28ccb90461 100644
--- a/coding/json-common/src/main/java/org/n52/sos/encode/json/JSONResponseWriter.java
+++ b/coding/json-common/src/main/java/org/n52/sos/encode/json/JSONResponseWriter.java
@@ -32,7 +32,7 @@
import java.io.OutputStream;
import org.n52.sos.coding.json.JSONUtils;
-import org.n52.sos.encode.ResponseWriter;
+import org.n52.sos.encode.AbstractResponseWriter;
import org.n52.sos.util.http.MediaType;
import org.n52.sos.util.http.MediaTypes;
@@ -45,7 +45,7 @@
*
* @since 4.0.0
*/
-public class JSONResponseWriter implements ResponseWriter {
+public class JSONResponseWriter extends AbstractResponseWriter {
@Override
public Class getType() {
return JsonNode.class;
diff --git a/core/api/src/main/java/org/n52/sos/encode/AbstractResponseWriter.java b/core/api/src/main/java/org/n52/sos/encode/AbstractResponseWriter.java
index 04274c04e1..4ff687725b 100644
--- a/core/api/src/main/java/org/n52/sos/encode/AbstractResponseWriter.java
+++ b/core/api/src/main/java/org/n52/sos/encode/AbstractResponseWriter.java
@@ -28,9 +28,14 @@
*/
package org.n52.sos.encode;
+import java.util.Collections;
+import java.util.Map;
+
import org.n52.sos.coding.CodingRepository;
import org.n52.sos.util.http.MediaType;
+import com.google.common.collect.Maps;
+
/**
* Abstract {@link ResponseWriter} class for response streaming
*
@@ -40,10 +45,9 @@
* @param
* generic for the element to write
*/
-public abstract class AbstractResponseWriter implements ResponseWriter {
-
+public abstract class AbstractResponseWriter implements ResponseWriter {
private MediaType contentType;
-
+
@Override
public MediaType getContentType() {
return contentType;
@@ -72,4 +76,26 @@ protected boolean isSetContentType() {
protected Encoder getEncoder(EncoderKey key) {
return CodingRepository.getInstance().getEncoder(key);
}
+
+ /**
+ * Return type specific response headers (e.g. filename for downloadable binary attachments)
+ *
+ * @return Map of response headers to add to response
+ */
+ @Override
+ public Map getResponseHeaders(T t) {
+ //return empty map by default
+ return Collections.unmodifiableMap(Maps.newHashMap());
+ }
+
+ /**
+ * Return content length of written response, or -1 for unknown
+ *
+ * @return Content length of written response, or -1 for unknown
+ */
+ @Override
+ public int getContentLength(T t) {
+ //return unknown content length by default
+ return -1;
+ }
}
diff --git a/core/api/src/main/java/org/n52/sos/encode/AbstractServiceResponseWriter.java b/core/api/src/main/java/org/n52/sos/encode/AbstractServiceResponseWriter.java
index 49827902c7..fa29cfa879 100644
--- a/core/api/src/main/java/org/n52/sos/encode/AbstractServiceResponseWriter.java
+++ b/core/api/src/main/java/org/n52/sos/encode/AbstractServiceResponseWriter.java
@@ -70,7 +70,7 @@ public void write(AbstractServiceResponse asr, OutputStream out) throws IOExcept
ResponseWriter writer =
ResponseWriterRepository.getInstance().getWriter(encode.getClass());
if (writer == null) {
- throw new RuntimeException("no writer for " + asr.getClass() + " found!");
+ throw new RuntimeException("no writer for " + encode.getClass() + " found!");
}
writer.write(encode, out);
}
@@ -121,5 +121,4 @@ private Encoder getEncoder(AbstractServiceRespo
private boolean isStreaming(AbstractServiceResponse asr) {
return ServiceConfiguration.getInstance().isForceStreamingEncoding() && getEncoder(asr) instanceof StreamingEncoder;
}
-
}
diff --git a/core/api/src/main/java/org/n52/sos/encode/BinaryAttachmentResponseWriter.java b/core/api/src/main/java/org/n52/sos/encode/BinaryAttachmentResponseWriter.java
new file mode 100644
index 0000000000..d1589d2647
--- /dev/null
+++ b/core/api/src/main/java/org/n52/sos/encode/BinaryAttachmentResponseWriter.java
@@ -0,0 +1,95 @@
+/**
+ * Copyright (C) 2012-2014 52°North Initiative for Geospatial Open Source
+ * Software GmbH
+ *
+ * This program is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU General Public License version 2 as published
+ * by the Free Software Foundation.
+ *
+ * If the program is linked with libraries which are licensed under one of
+ * the following licenses, the combination of the program with the linked
+ * library is not considered a "derivative work" of the program:
+ *
+ * - Apache License, version 2.0
+ * - Apache Software License, version 1.0
+ * - GNU Lesser General Public License, version 3
+ * - Mozilla Public License, versions 1.0, 1.1 and 2.0
+ * - Common Development and Distribution License (CDDL), version 1.0
+ *
+ * Therefore the distribution of the program linked with libraries licensed
+ * under the aforementioned licenses, is permitted by the copyright holders
+ * if the distribution is compliant with both the GNU General Public
+ * License version 2 and the aforementioned licenses.
+ *
+ * This program is distributed in the hope that it will be useful, but
+ * WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General
+ * Public License for more details.
+ */
+package org.n52.sos.encode;
+
+import java.io.IOException;
+import java.io.OutputStream;
+import java.util.Collections;
+import java.util.Map;
+
+import org.n52.sos.response.BinaryAttachmentResponse;
+
+import com.google.common.base.Strings;
+import com.google.common.collect.Maps;
+
+/**
+ * Writer for ServiceResponse (containing ByteArrayOutputStream)
+ *
+ * @author Shane StClair
+ *
+ * @since 4.1.0
+ */
+public class BinaryAttachmentResponseWriter extends AbstractResponseWriter {
+ public class HeaderCode {
+ public static final String CONTENT_TRANSFER_ENCODING = "Content-Transfer-Encoding";
+ public static final String CONTENT_TRANSFER_ENCODING_BINARY = "binary";
+
+ public static final String CONTENT_DISPOSITION = "Content-Disposition";
+ public static final String CONTENT_ATTACHMENT_FILENAME_FORMAT = "attachment; filename=\"%s\"";
+ }
+
+ @Override
+ public Class getType() {
+ return BinaryAttachmentResponse.class;
+ }
+
+ @Override
+ public void write(BinaryAttachmentResponse binaryAttachmentResponse, OutputStream out) throws IOException {
+ out.write(binaryAttachmentResponse.getBytes());
+ }
+
+ @Override
+ public boolean supportsGZip(BinaryAttachmentResponse t) {
+ return false;
+ }
+
+ @Override
+ public Map getResponseHeaders(BinaryAttachmentResponse binaryAttachmentResponse) {
+ Map responseHeaders = Maps.newHashMap();
+
+ //binary
+ responseHeaders.put(HeaderCode.CONTENT_DISPOSITION, String.format(
+ HeaderCode.CONTENT_ATTACHMENT_FILENAME_FORMAT, binaryAttachmentResponse.getFilename()));
+
+ if (binaryAttachmentResponse != null) {
+ //filename
+ if (!Strings.isNullOrEmpty(binaryAttachmentResponse.getFilename())) {
+ responseHeaders.put(HeaderCode.CONTENT_DISPOSITION, String.format(
+ HeaderCode.CONTENT_ATTACHMENT_FILENAME_FORMAT, binaryAttachmentResponse.getFilename()));
+ }
+ }
+
+ return Collections.unmodifiableMap(responseHeaders);
+ }
+
+ @Override
+ public int getContentLength(BinaryAttachmentResponse t) {
+ return t.getSize();
+ }
+}
diff --git a/core/api/src/main/java/org/n52/sos/encode/ResponseWriter.java b/core/api/src/main/java/org/n52/sos/encode/ResponseWriter.java
index 2cc6678dbb..49940f36f6 100644
--- a/core/api/src/main/java/org/n52/sos/encode/ResponseWriter.java
+++ b/core/api/src/main/java/org/n52/sos/encode/ResponseWriter.java
@@ -30,6 +30,7 @@
import java.io.IOException;
import java.io.OutputStream;
+import java.util.Map;
import org.n52.sos.util.http.MediaType;
@@ -85,4 +86,18 @@ public interface ResponseWriter {
*/
boolean supportsGZip(T t);
+ /**
+ * Return type specific response headers (e.g. filename for downloadable binary attachments)
+ *
+ * @return Map of response headers to add to response
+ */
+ Map getResponseHeaders(T t);
+
+ /**
+ * Return content length of written response, or -1 for unknown
+ *
+ * @return Content length of written response, or -1 for unknown
+ */
+ //TODO return content length in write(T t, OutputStream out) instead?
+ int getContentLength(T t);
}
\ No newline at end of file
diff --git a/core/api/src/main/java/org/n52/sos/encode/XmlResponseWriter.java b/core/api/src/main/java/org/n52/sos/encode/XmlResponseWriter.java
index 08c87a9877..cc63d95405 100644
--- a/core/api/src/main/java/org/n52/sos/encode/XmlResponseWriter.java
+++ b/core/api/src/main/java/org/n52/sos/encode/XmlResponseWriter.java
@@ -42,7 +42,7 @@
*
* @since 4.0.0
*/
-public class XmlResponseWriter implements ResponseWriter {
+public class XmlResponseWriter extends AbstractResponseWriter {
private MediaType contentType;
diff --git a/core/api/src/main/java/org/n52/sos/response/BinaryAttachmentResponse.java b/core/api/src/main/java/org/n52/sos/response/BinaryAttachmentResponse.java
new file mode 100644
index 0000000000..b6865585dc
--- /dev/null
+++ b/core/api/src/main/java/org/n52/sos/response/BinaryAttachmentResponse.java
@@ -0,0 +1,86 @@
+/**
+ * Copyright (C) 2012-2014 52°North Initiative for Geospatial Open Source
+ * Software GmbH
+ *
+ * This program is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU General Public License version 2 as published
+ * by the Free Software Foundation.
+ *
+ * If the program is linked with libraries which are licensed under one of
+ * the following licenses, the combination of the program with the linked
+ * library is not considered a "derivative work" of the program:
+ *
+ * - Apache License, version 2.0
+ * - Apache Software License, version 1.0
+ * - GNU Lesser General Public License, version 3
+ * - Mozilla Public License, versions 1.0, 1.1 and 2.0
+ * - Common Development and Distribution License (CDDL), version 1.0
+ *
+ * Therefore the distribution of the program linked with libraries licensed
+ * under the aforementioned licenses, is permitted by the copyright holders
+ * if the distribution is compliant with both the GNU General Public
+ * License version 2 and the aforementioned licenses.
+ *
+ * This program is distributed in the hope that it will be useful, but
+ * WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General
+ * Public License for more details.
+ */
+package org.n52.sos.response;
+
+import org.n52.sos.util.http.MediaType;
+
+
+/**
+ * Simple response class for binary data to be included as a response attachment (for download)
+ *
+ * @author Shane StClair
+ *
+ * @since 4.1.0
+ */
+public class BinaryAttachmentResponse {
+ private byte[] bytes;
+ private MediaType contentType;
+ private String filename;
+
+ public BinaryAttachmentResponse(byte[] bytes, MediaType contentType, String filename) {
+ this.bytes = bytes;
+ this.contentType = contentType;
+ this.filename = filename;
+ }
+
+ public byte[] getBytes() {
+ return bytes;
+ }
+
+ public void setBytes(byte[] bytes) {
+ this.bytes = bytes;
+ }
+
+ public MediaType getContentType() {
+ return contentType;
+ }
+
+ public void setContentType(MediaType contentType) {
+ this.contentType = contentType;
+ }
+
+ public String getFilename() {
+ return filename;
+ }
+
+ public void setFilename(String filename) {
+ this.filename = filename;
+ }
+
+ public int getSize() {
+ return bytes == null ? -1 : bytes.length;
+ }
+
+ @Override
+ public String toString() {
+ return "BinaryAttachmentResponse [size = " + getSize()
+ + ", contentType=" + contentType
+ + ", filename=" + filename + "]";
+ }
+}
diff --git a/core/api/src/main/java/org/n52/sos/response/ServiceResponse.java b/core/api/src/main/java/org/n52/sos/response/ServiceResponse.java
index 7a1bf90523..b11bec3d8b 100644
--- a/core/api/src/main/java/org/n52/sos/response/ServiceResponse.java
+++ b/core/api/src/main/java/org/n52/sos/response/ServiceResponse.java
@@ -48,22 +48,9 @@
import com.google.common.collect.Maps;
/**
- * TODO add generic field for headers
- * v0.1 with enumeration and set of default headers
- * private Map httpHeaders;
- * could be extended in future versions
- *
* @since 4.0.0
*/
public class ServiceResponse implements CommunicationObjectWithSoapHeader {
- public class HeaderCode {
- public static final String CONTENT_TRANSFER_ENCODING = "Content-Transfer-Encoding";
- public static final String CONTENT_TRANSFER_ENCODING_BINARY = "binary";
-
- public static final String CONTENT_DISPOSITION = "Content-Disposition";
- public static final String CONTENT_ATTACHMENT_FILENAME_FORMAT = "attachment; filename=\"%s\"";
- }
-
private static final Logger LOGGER = LoggerFactory.getLogger(ServiceResponse.class);
/**
@@ -157,11 +144,6 @@ public void setHeader(String headerIdentifier, String headerValue) {
public Map getHeaderMap() {
return Collections.unmodifiableMap(headerMap);
}
-
- public void setAttachmentFilename(String filename) {
- headerMap.put(HeaderCode.CONTENT_DISPOSITION,
- String.format(HeaderCode.CONTENT_ATTACHMENT_FILENAME_FORMAT, filename));
- }
/**
* @param outputStream
@@ -193,19 +175,6 @@ public void writeToOutputStream(OutputStream outputStream) {
}
}
- /**
- * @return the content of this response as byte[]
, or
- * null
, if this response is content less.
- *
- * @see #isContentLess()
- */
- public byte[] getByteArray() {
- if (byteArrayOutputStream != null) {
- return byteArrayOutputStream.toByteArray();
- }
- return null;
- }
-
/**
* Check, if this response contains content to be written.
*
diff --git a/core/api/src/main/java/org/n52/sos/util/http/HTTPUtils.java b/core/api/src/main/java/org/n52/sos/util/http/HTTPUtils.java
index 36242026d5..b0d054dc03 100644
--- a/core/api/src/main/java/org/n52/sos/util/http/HTTPUtils.java
+++ b/core/api/src/main/java/org/n52/sos/util/http/HTTPUtils.java
@@ -35,6 +35,7 @@
import java.util.Collections;
import java.util.Enumeration;
import java.util.List;
+import java.util.Map;
import java.util.Map.Entry;
import java.util.zip.GZIPInputStream;
import java.util.zip.GZIPOutputStream;
@@ -46,6 +47,7 @@
import org.n52.sos.encode.ResponseWriterRepository;
import org.n52.sos.exception.HTTPException;
import org.n52.sos.response.ServiceResponse;
+import org.n52.sos.util.CollectionHelper;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
@@ -120,7 +122,20 @@ public static InputStream getInputStream(HttpServletRequest req) throws IOExcept
public static void writeObject(HttpServletRequest request, HttpServletResponse response, MediaType contentType,
Object object) throws IOException {
- writeObject(request, response, contentType, new GenericWritable(object, contentType));
+ GenericWritable genericWritable = new GenericWritable(object, contentType);
+
+ // add extra headers from ResponseWriter (via GenericWritable)
+ if (!CollectionHelper.isEmpty(genericWritable.getResponseHeaders())) {
+ for (Entry responseHeader : genericWritable.getResponseHeaders().entrySet()) {
+ response.addHeader(responseHeader.getKey(), responseHeader.getValue());
+ }
+ }
+
+ if (genericWritable.getContentLength() > -1) {
+ response.setContentLength(genericWritable.getContentLength());
+ }
+
+ writeObject(request, response, contentType, genericWritable);
}
public static void writeObject(HttpServletRequest request, HttpServletResponse response, ServiceResponse sr)
@@ -145,6 +160,7 @@ public static void writeObject(HttpServletRequest request, HttpServletResponse r
Writable writable) throws IOException {
OutputStream out = null;
response.setContentType(contentType.toString());
+
try {
out = response.getOutputStream();
if (supportsGzipEncoding(request) && writable.supportsGZip()) {
@@ -194,6 +210,14 @@ public boolean supportsGZip() {
public void write(OutputStream out) throws IOException {
writer.write(o, out);
}
+
+ public Map getResponseHeaders() {
+ return writer.getResponseHeaders(o);
+ }
+
+ public int getContentLength() {
+ return writer.getContentLength(o);
+ }
}
private static class ServiceResponseWritable implements Writable {
@@ -217,7 +241,7 @@ public boolean supportsGZip() {
public interface Writable {
void write(OutputStream out) throws IOException;
- boolean supportsGZip();
+ boolean supportsGZip();
}
}
diff --git a/core/api/src/main/resources/META-INF/services/org.n52.sos.encode.ResponseWriter b/core/api/src/main/resources/META-INF/services/org.n52.sos.encode.ResponseWriter
index 8358d48e47..d2508be3f1 100644
--- a/core/api/src/main/resources/META-INF/services/org.n52.sos.encode.ResponseWriter
+++ b/core/api/src/main/resources/META-INF/services/org.n52.sos.encode.ResponseWriter
@@ -1,2 +1,3 @@
org.n52.sos.encode.XmlResponseWriter
-org.n52.sos.encode.AbstractServiceResponseWriter
\ No newline at end of file
+org.n52.sos.encode.AbstractServiceResponseWriter
+org.n52.sos.encode.BinaryAttachmentResponseWriter
\ No newline at end of file
From 1f1ab07a59634fe56ec92aa235d631efa7d7c6d6 Mon Sep 17 00:00:00 2001
From: CarstenHollmann
Date: Fri, 15 Aug 2014 14:49:34 +0200
Subject: [PATCH 217/229] Add ResponseFormat interface to identify classes with
responseFormat setter/getter
---
.../request/AbstractObservationRequest.java | 5 +-
.../org/n52/sos/request/ResponseFormat.java | 62 +++++++++++++++++++
.../response/AbstractObservationResponse.java | 11 +++-
3 files changed, 76 insertions(+), 2 deletions(-)
create mode 100644 core/api/src/main/java/org/n52/sos/request/ResponseFormat.java
diff --git a/core/api/src/main/java/org/n52/sos/request/AbstractObservationRequest.java b/core/api/src/main/java/org/n52/sos/request/AbstractObservationRequest.java
index 609ddacfd0..d6214257a6 100644
--- a/core/api/src/main/java/org/n52/sos/request/AbstractObservationRequest.java
+++ b/core/api/src/main/java/org/n52/sos/request/AbstractObservationRequest.java
@@ -35,7 +35,7 @@
*
* @since 4.0.0
*/
-public abstract class AbstractObservationRequest extends AbstractServiceRequest {
+public abstract class AbstractObservationRequest extends AbstractServiceRequest implements ResponseFormat {
/**
* Response format
*/
@@ -56,6 +56,7 @@ public abstract class AbstractObservationRequest extends AbstractServiceRequest
*
* @return response format
*/
+ @Override
public String getResponseFormat() {
return responseFormat;
}
@@ -66,6 +67,7 @@ public String getResponseFormat() {
* @param responseFormat
* response format
*/
+ @Override
public void setResponseFormat(String responseFormat) {
this.responseFormat = responseFormat;
}
@@ -75,6 +77,7 @@ public void setResponseFormat(String responseFormat) {
*
* @return True if response format is set
*/
+ @Override
public boolean isSetResponseFormat() {
return StringHelper.isNotEmpty(getResponseFormat());
}
diff --git a/core/api/src/main/java/org/n52/sos/request/ResponseFormat.java b/core/api/src/main/java/org/n52/sos/request/ResponseFormat.java
new file mode 100644
index 0000000000..32f41211ca
--- /dev/null
+++ b/core/api/src/main/java/org/n52/sos/request/ResponseFormat.java
@@ -0,0 +1,62 @@
+/**
+ * Copyright (C) 2012-2014 52°North Initiative for Geospatial Open Source
+ * Software GmbH
+ *
+ * This program is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU General Public License version 2 as published
+ * by the Free Software Foundation.
+ *
+ * If the program is linked with libraries which are licensed under one of
+ * the following licenses, the combination of the program with the linked
+ * library is not considered a "derivative work" of the program:
+ *
+ * - Apache License, version 2.0
+ * - Apache Software License, version 1.0
+ * - GNU Lesser General Public License, version 3
+ * - Mozilla Public License, versions 1.0, 1.1 and 2.0
+ * - Common Development and Distribution License (CDDL), version 1.0
+ *
+ * Therefore the distribution of the program linked with libraries licensed
+ * under the aforementioned licenses, is permitted by the copyright holders
+ * if the distribution is compliant with both the GNU General Public
+ * License version 2 and the aforementioned licenses.
+ *
+ * This program is distributed in the hope that it will be useful, but
+ * WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General
+ * Public License for more details.
+ */
+package org.n52.sos.request;
+
+/**
+ * Marker interface to responseFormat
+ *
+ * @author Carsten Hollmann