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 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 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 = $("