diff --git a/.gitignore b/.gitignore index f60dadb94f..2e3b1e0013 100644 --- a/.gitignore +++ b/.gitignore @@ -13,3 +13,4 @@ extensions/do/core/configuration.db **.*~ *.tern-project extensions/inspire/coding/configuration.db +console.log diff --git a/.travis.yml b/.travis.yml index 2d5175b3f7..7a6893470c 100644 --- a/.travis.yml +++ b/.travis.yml @@ -1,7 +1,6 @@ language: java jdk: - openjdk7 - - oraclejdk7 - oraclejdk8 addons: hosts: diff --git a/NOTICE b/NOTICE index dcf0b2da9d..251697c4ec 100644 --- a/NOTICE +++ b/NOTICE @@ -234,6 +234,7 @@ This project includes: Main module under GNU Lesser General Public License (LGPL) version 2.1 mchange-commons-java under GNU Lesser General Public License, Version 2.1 or Eclipse Public License, Version 1.0 Metadata under GNU Lesser General Public License (LGPL) version 2.1 + Microsoft JDBC Driver for SQL Server under MIT License Mockito under The MIT License Mozilla Rhino under Mozilla Public License, Version 2.0 MySQL Connector/J under The GNU General Public License, Version 2 @@ -307,7 +308,6 @@ This project includes: spring-security-taglibs under The Apache Software License, Version 2.0 spring-security-web under The Apache Software License, Version 2.0 SQLite JDBC under The Apache Software License, Version 2.0 - sqljdbc4 under MICROSOFT SOFTWARE LICENSE TERMS, http://download.microsoft.com/download/0/2/A/02AAE597-3865-456C-AE7F-613F99F850A8/license.txt StAX API under The Apache Software License, Version 2.0 udunits under (MIT-style) netCDF C library license vecmath under GPL 2.0 license w/ CPE diff --git a/README.md b/README.md index ab2a7ce350..f4faef9fc8 100644 --- a/README.md +++ b/README.md @@ -1,84 +1,197 @@ -# 52°North SOS [![OpenHUB](https://www.openhub.net/p/SensorObservationService/widgets/project_thin_badge.gif)](https://www.openhub.net/p/SensorObservationService) -README file for the 52°North Sensor Observation Service (SOS) version 4.4.x +# 52°North Sensor Observation Service (SOS) +| Master | Develop | OpenHUB | +| ------------- | ------------- | ------------- | +| [![Master Build Status](https://travis-ci.org/52North/SOS.png?branch=master)](https://travis-ci.org/52North/SOS) | [![Develop Build Status](https://travis-ci.org/52North/SOS.png?branch=develop)](https://travis-ci.org/52North/SOS) | [![OpenHUB](https://www.openhub.net/p/SensorObservationService/widgets/project_thin_badge.gif)](https://www.openhub.net/p/SensorObservationService) | -This is the repository of the [52°North Sensor Observation Service (SOS)][1]. +## Description + +### Standardized, web-based upload and download of sensor data and sensor metadata + +**The 52°North Sensor Observation Service (SOS) provides an interoperable web-based interface for inserting and querying sensor data and sensor descriptions. It aggregates observations from live in-situ sensors as well as historical data sets (time series data).** The 52°North SOS is a reference implementation of the -[OGC Sensor Observation Service specification (version 2.0)][2]. It was -implemented during the [OGC Web Services Testbed, Phase 9 (OWS-9)][3] and -tested to be compliant to this specification within the [OGC CITE testing][4] -in December of 2012. +[OGC Sensor Observation Service specification (version 2.0)](https://portal.opengeospatial.org/files/?artifact_id=47599), an interoperable interface for publishing and querying sensor data and metadata. +It was implemented during the [OGC Web Services Testbed, Phase 9 (OWS-9)](http://www.ogcnetwork.net/ows-9) +and tested to be compliant to this specification within the [OGC CITE testing](http://cite.opengeospatial.org/test_engine) in December of 2012. -## Build Status +The 52°North SOS enables the user to: -* Master: [![Master Build Status](https://travis-ci.org/52North/SOS.png?branch=master)](https://travis-ci.org/52North/SOS) -* Develop: [![Develop Build Status](https://travis-ci.org/52North/SOS.png?branch=develop)](https://travis-ci.org/52North/SOS) + - insert and retrieve georeferenced observation data + - access georeferenced measurement data in a standardized format (ISO/OGC Observation and Measurement - O&M 2.0, OGC WaterML 2.0) + - insert and retrieve sensor descriptions (encoded according to the OGC SensorML standard - SML 1.0.1, SML 2.0) + - publish measurement data (near real-time, as well as archived data) -## Branches +An extension accommodates additional INSPIRE Directive requirements, thus ensuring interoperable exchange of any kind of observation data across political, administrative and organizational boundaries. Client applications, such as [Helgoland](http://www-neu.52north.org/software/software-projects/helgoland/) enable analysis and visualization of the measurement data provided via the SOS server. + +### Features -This project follows the [Gitflow branching model](http://nvie.com/posts/a-successful-git-branching-model/). "master" reflects the latest stable release. -Ongoing development is done in branch [develop](../../tree/develop) and dedicated feature branches (feature-*). + - [INSPIRE Download Service](http://inspire.ec.europa.eu/id/document/tg/download-sos) for measurement data + - [Guidelines for the use of Observations & Measurements and Sensor Web Enablement-related standards in INSPIRE (D2.9)](http://inspire.ec.europa.eu/id/document/tg/d2.9-o%26m-swe) + - [OGC Hydro Profile] (http://docs.opengeospatial.org/bp/14-004r1/14-004r1.html), including GetDataAvailability operation + - [SensorML 1.0.1 and 2.0](http://www.opengeospatial.org/standards/sensorml) + - [WaterML 2.0](http://www.opengeospatial.org/standards/waterml) + - [AQD e-Reporting flows E](https://www.eionet.europa.eu/aqportal/requirements/dataflows) + - Multiple DB support (by using the [Hibernate ORM framework](http://hibernate.org/orm/)) + - Bundle including [Sensor Web REST-API](https://github.com/52North/series-rest-api) and [helgoland](https://github.com/52North/helgoland/) + - DeleteObservation operation, to delete observation by identifier (not part of the SOS 2.0 specification) + - [Efficient XML Interchange (EXI) 1.0 format](http://52north.org/communities/sensorweb/sos/index.html#www.w3.orgTRexi) + - Support for [GoundWaterML 2 GeologyLog observation](http://www.opengeospatial.org/standards/gwml2) + +### Future -## Code Compilation +From version 5.x of the 52N SOS, the database model and the DAO layer of 52N SOS and the [52N Sensor Web REST-API](https://github.com/52North/series-rest-api) would be merged to finally provide an easy-to-install and easy-to-configure service that provides the OGC SOS 2.0 interface and the 52N Sensor WEB REST-API to easily access the observed data via a restful interface. -This project is managed with Maven3. Simply run `mvn clean install` -to create a deployable .WAR file. +For that the similar database models of both services would be harmonized to use the same model. Furthermore, the new database model is to be defined in this way that a simple basic database model would provide the main features of the SOS and the Sensor WEB REST-API and can be easily extended to provide further features. -## Distributions +The Data Access Objects (DAO) layer would also be harmonized to provide a single point for accessing and manipulating the data in the database. This would reduce the maintenance and new database features would be easier supported by the SOS and the REST interface. -Here you can find some information that relates to the distributions of the 52°North SOS. +In the [Sensor Web Suite database project](https://github.com/52North/series-hibernate) the harmonized database model and the DAO layer would be provided as a separate project that would be use in the future 52N SOS and 52N Sensor WEB REST-API implementations. Additionally the [52N SOS Proxy](https://github.com/52North/series-sos-proxy) will also use this project to persist the metadata of the harvested SOS services. -### Download +![Image of Sensor Web Suite](https://github.com/52North/SOS/tree/develop/misc/pics/sensor_web_db_dao.PNG) -The latest release of 52°North SOS can be downloaded from this website: +This figure shows the future relation between the 52N Sensor Web Suite database project, the SOS and the Sensor WEB REST-API. - http://52north.org/downloads/category/3-sos +## Quick Start -### Contents - * `/src` : The source files of 52°North SOS modules - * `/bin` : Executable binary of 52°North SOS webapp module - * `LICENSE` : The license of 52°North SOS - * `NOTICE` : Third Party libraries and their licenses - * `README` : This file - * `RELEASE-NOTES` : The release notes of the 52°North SOS + Get started - the [installation guide](https://wiki.52north.org/SensorWeb/SensorObservationServiceIVDocumentation#Installation) helps you install and configure the 52°North SOS. -No printer friendly documentation exist for this release. Instead, refer to the [wiki documentation][5]. +## User Guide -### Installation + An OGC SOS [tutorial](http://www.ogcnetwork.net/SOS_2_0/tutorial) is available. -No printer friendly installation guide exist for this release. Instead, refer to the [wiki documentation][5]. +## Demo -## Contributing + http://sensorweb.demo.52north.org/sensorwebtestbed/ -You are interesting in contributing the 52°North SOS and you want to pull your changes to the 52N repository to make it available to all? +## License -In that case we need your official permission and for this purpose we have a so called contributors license agreement (CLA) in place. With this agreement you grant us the rights to use and publish your code under an open source license. + The 52°North SOS is published under the [GNU General Public License, Version 2 (GPLv2)](http://www.gnu.org/licenses/gpl-2.0.html) -A link to the contributors license agreement and further explanations are available here: +## Changelog - http://52north.org/about/licensing/cla-guidelines + The latest changes, additions, bugfixes, etc. can be found in the [RELEASE-NOTES](https://github.com/52North/SOS/blob/website-markdowns/RELEASE-NOTES) +## References -## Support and Contact + - [IRCEL-CELINE](www.irceline.be/) (Belgium): *Current and archived air quality data for all of Belgium* + - [Wupperverband](https://www.wupperverband.de/) (Germnay): *Regional water board providing a multitude of hydrological measurment data with the help of SOS standards* + - [Swedish EPA](http://www.swedishepa.se/)/[IVL](http://www.ivl.se/)/[SMHI](http://www.smhi.se/) (Schweden): *Current and archived air quality data for all of Sweden, as well as delivery this data to the European Protection Agency* + - [RIVM](http://www.rivm.nl/) (Netherlands): *Current and archived air quality data for all of the Netherlands* + - [Lithuanian EPA](http://gamta.lt/cms/index?lang=en) (Lithuania): *Current and archived air quality data for all of Lithuania* + - [European Environment Agency (EEA)](http://www.eea.europa.eu/): *Use of SOS interface to collect data from the member countries, as well as to publish the collective data* + - [PEGELONLINE](https://www.pegelonline.wsv.de/) (Germany): *Interoperable publication of te federal waterways' hydrological measurment data.* -You can get support in the community mailing list and forums: +## Credits - http://52north.org/resources/mailing-lists-and-forums/ +### Contributors + +The development the 52°North Sensor Observation Service implementations was contributed by + +| Name | Organisation | +| ------------- | :-------------: | +| [Carsten Hollmann](http://52north.org/about/52-north-team/25-carsten-hollmann) | [52°North](http://52north.org) | +| [Eike Hinderk Jürrens](http://52north.org/about/52-north-team/14-eike-hinderk-juerrens) | [52°North](http://52north.org) | +| [Christian Autermann](http://52north.org/about/52-north-team/30-autermann-christian) | [52°North](http://52north.org) | +| [Christoph Stasch](http://52north.org/about/52-north-team/31-stasch-christoph) | [52°North](http://52north.org) | +| Shane StClair | [Axiom Data Science](http://www.axiomdatascience.com) | +| Victor González | [geomati.co](http://geomati.co/en) | +| Oscar Fonts | [geomati.co](http://geomati.co/en) | +| Carlos Giraldo | [Instituto Tecnológico de Galicia (ITG)](http://www.itg.es/) | +| Alexander Kmoch | [Z_GIS](http://www.zgis.at), [Universität Salzburg (Austria and Germany)](http://www.uni-salzburg.at) | +| Carl Schroedl | Center for Integrated Data Analytics ([CIDA](http://cida.usgs.gov)), [USGS](http://www.usgs.gov) | +| Jordan Walker | Center for Integrated Data Analytics ([CIDA](http://cida.usgs.gov)), [USGS](http://www.usgs.gov) | + +### Contributing organizations + +The development the 52°North Sensor Observation Service implementations was contributed by several organizations + +
+ +| | | | | +| :-------------: | :-------------: | :-------------: | :-------------: | +| | | | | +| | Your logo?!true
, if parameter is set
*/
public boolean isSetParameter() {
- return CollectionHelper.isNotEmpty(getParameter());
+ return parameterHolder != null && CollectionHelper.isNotEmpty(getParameter());
}
/**
@@ -572,21 +577,16 @@ public boolean isSetParameter() {
* @return true
, if spatial filtering profile parameter is set
*/
public boolean isSetSpatialFilteringProfileParameter() {
- if (isSetParameter()) {
- for (NamedValue> namedValue : getParameter()) {
- if (isSamplingGeometryParameter(namedValue)) {
- return true;
- }
- }
- }
- return false;
+ return parameterHolder.isSetSpatialFilteringProfileParameter();
}
/**
* Remove spatial filtering profile parameter
*/
public void removeSpatialFilteringProfileParameter() {
- removeParameter(getSpatialFilteringProfileParameter());
+ if (isSetSpatialFilteringProfileParameter()) {
+ removeParameter(getSpatialFilteringProfileParameter());
+ }
}
/**
@@ -596,7 +596,7 @@ public void removeSpatialFilteringProfileParameter() {
* Parameter to remove
*/
public void removeParameter(NamedValue> parameter) {
- getParameter().remove(parameter);
+ getParameterHolder().removeParameter(parameter);
}
/**
@@ -607,10 +607,7 @@ public void removeParameter(NamedValue> parameter) {
* @return this
*/
public OmObservation addSpatialFilteringProfileParameter(Geometry samplingGeometry) {
- final NamedValuetrue
, if sampling geometry for spatial filtering
- * profile is set
- */
- private boolean isSamplingGeometryParameter(NamedValue> namedValue) {
- return namedValue.isSetName() && namedValue.getName().isSetHref()
- && namedValue.getName().getHref().equals(OmConstants.PARAM_NAME_SAMPLING_GEOMETRY)
- && namedValue.getValue() instanceof GeometryValue;
- }
-
/**
* Check whether height parameter is set
*
* @return true
, if height parameter is set
*/
public boolean isSetHeightParameter() {
- if (isSetParameter()) {
- for (NamedValue> namedValue : getParameter()) {
- if (isHeightParameter(namedValue)) {
- return true;
- }
- }
- }
- return false;
+ return parameterHolder.isSetHeightParameter();
}
/**
@@ -664,25 +634,10 @@ public boolean isSetHeightParameter() {
*
* @return Height parameter
*/
- @SuppressWarnings("unchecked")
public NamedValuetrue
, if depth parameter is set
*/
public boolean isSetDepthParameter() {
- if (isSetParameter()) {
- for (NamedValue> namedValue : getParameter()) {
- if (isDepthParameter(namedValue)) {
- return true;
- }
- }
- }
- return false;
+ return parameterHolder.isSetDepthParameter();
}
/**
@@ -705,47 +653,19 @@ public boolean isSetDepthParameter() {
*
* @return Depth parameter
*/
- @SuppressWarnings("unchecked")
public NamedValuetrue
, if height parameter is set
+ */
+ public boolean isSetHeightParameter() {
+ if (isSetParameter()) {
+ for (NamedValue> namedValue : getParameter()) {
+ if (isHeightParameter(namedValue)) {
+ return true;
+ }
+ }
+ }
+ return false;
+ }
+
+ /**
+ * Get height parameter
+ *
+ * @return Height parameter
+ */
+ @SuppressWarnings("unchecked")
+ public NamedValuetrue
, if depth parameter is set
+ */
+ public boolean isSetDepthParameter() {
+ if (isSetParameter()) {
+ for (NamedValue> namedValue : getParameter()) {
+ if (isDepthParameter(namedValue)) {
+ return true;
+ }
+ }
+ }
+ return false;
+ }
+
+ /**
+ * Get depth parameter
+ *
+ * @return Depth parameter
+ */
+ @SuppressWarnings("unchecked")
+ public NamedValuetrue
, if spatial filtering profile parameter is set
+ */
+ public boolean isSetSpatialFilteringProfileParameter() {
+ if (isSetParameter()) {
+ for (NamedValue> namedValue : getParameter()) {
+ if (isSamplingGeometryParameter(namedValue)) {
+ return true;
+ }
+ }
+ }
+ return false;
+ }
+
+ /**
+ * Add sampling geometry to observation
+ *
+ * @param samplingGeometry
+ * The sampling geometry to set
+ * @return this
+ */
+ public ParameterHolder addSpatialFilteringProfileParameter(Geometry samplingGeometry) {
+ final NamedValuetrue
, if sampling geometry for spatial filtering
+ * profile is set
+ */
+ private boolean isSamplingGeometryParameter(NamedValue> namedValue) {
+ return namedValue.isSetName() && namedValue.getName().isSetHref()
+ && namedValue.getName().getHref().equals(OmConstants.PARAM_NAME_SAMPLING_GEOMETRY)
+ && namedValue.getValue() instanceof GeometryValue;
+ }
+}
diff --git a/core/api/src/main/java/org/n52/sos/ogc/om/values/DiscreteCoverage.java b/core/api/src/main/java/org/n52/sos/ogc/om/values/DiscreteCoverage.java
index d4fcc055a6..9a8410aaef 100644
--- a/core/api/src/main/java/org/n52/sos/ogc/om/values/DiscreteCoverage.java
+++ b/core/api/src/main/java/org/n52/sos/ogc/om/values/DiscreteCoverage.java
@@ -43,5 +43,17 @@ public interface DiscreteCoverage