Compare commits

...

27 Commits

Author SHA1 Message Date
Fabio Sinibaldi bb5942db04 release 2021-06-14 15:42:15 +02:00
Fabio Sinibaldi 5a9c5e415c 1.4.4 2021-06-14 11:59:08 +02:00
Fabio Sinibaldi 9a465db43f releasing 2021-04-26 16:49:57 +02:00
Fabio Sinibaldi 77ed992aa2 reduced range towards sdi-interface 2021-04-26 16:47:57 +02:00
Fabio Sinibaldi 7a0ae3375e updated bom dependency 2021-04-26 16:10:55 +02:00
Fabio Sinibaldi 657dc81c8b removing obsolete files 2020-11-30 16:38:25 +01:00
Fabio Sinibaldi 48487aac1e profile compliant 2020-11-30 16:13:11 +01:00
Fabio Sinibaldi 29ae229759 changed nexus respository address 2020-11-16 16:21:53 +01:00
Fabio Sinibaldi 18d7f31ec6 release - gCube jackson 2020-10-29 11:21:37 +01:00
Fabio Sinibaldi 4fcd503699 default init 2020-10-14 18:10:38 +02:00
Fabio Sinibaldi 44c22ed0ad Singleton management 2020-10-14 18:01:23 +02:00
Fabio Sinibaldi 2aac7299a8 Enforcing fail management 2020-10-14 17:20:21 +02:00
Fabio Sinibaldi 0e26e2c75d Singleton Management 2020-10-13 18:10:00 +02:00
Fabio Sinibaldi 35bbfde328 Added binders 2020-10-13 17:08:32 +02:00
Fabio Sinibaldi 07cc61f096 added weld support 2020-10-13 16:28:00 +02:00
Fabio Sinibaldi 7a9edfa796 use of jersey-cdi 2020-10-13 16:16:44 +02:00
Fabio Sinibaldi 2465ed3741 Catches exception on get Configuration 2020-10-13 15:37:41 +02:00
Fabio Sinibaldi 096afda31c removed jackson indentation 2020-10-13 15:27:29 +02:00
Fabio Sinibaldi 27063e601e removed weld 2020-10-13 15:19:03 +02:00
Fabio Sinibaldi eeb6b242a9 removed swagger 2020-10-13 15:01:12 +02:00
Fabio Sinibaldi d3380737ec removed gcube-bom 2020-10-13 12:56:14 +02:00
Fabio Sinibaldi 65d13da3c6 Fixed scm 2020-09-03 17:30:58 +02:00
Fabio Sinibaldi a52b0861c6 Removed test file 2020-09-03 17:30:02 +02:00
Fabio Sinibaldi 92c3586ea0 Merge branch 'master' of gitea@code-repo.d4science.org:gCubeSystem/sdi-service.git 2020-09-03 17:28:56 +02:00
Fabio Sinibaldi 582bf4de05 gCube Project Template 2020-09-03 17:28:29 +02:00
Fabio Sinibaldi 3878e2e9e8 Fixed release in changelog 2020-07-01 15:23:59 +02:00
FabioISTI b198b1ffb2 Fixed CHANGELOG 2020-06-10 16:36:21 +02:00
38 changed files with 576 additions and 607 deletions

1
.gitignore vendored
View File

@ -1 +0,0 @@
target

View File

@ -1,10 +0,0 @@
<?xml version="1.0" encoding="UTF-8"?><project-modules id="moduleCoreId" project-version="1.5.0">
<wb-module deploy-name="sdi-service">
<wb-resource deploy-path="/" source-path="/target/m2e-wtp/web-resources"/>
<wb-resource deploy-path="/" source-path="/src/main/webapp" tag="defaultRootSource"/>
<wb-resource deploy-path="/WEB-INF/classes" source-path="/src/main/java"/>
<wb-resource deploy-path="/WEB-INF/classes" source-path="/src/main/resources"/>
<property name="context-root" value="sdi-service"/>
<property name="java-output-path" value="/sdi-service/target/classes"/>
</wb-module>
</project-modules>

18
CHANGELOG.md Normal file
View File

@ -0,0 +1,18 @@
This project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
# Changelog for org.gcube.spatial.data.sdi-service
## [v1.4.4] 2021-06-15
Fixes #20759 (https)
Fixes #21579 (human friendly opendap)
## [v1.4.3] 2020-05-15
changed maven repos
updated bom dependency
## [v1.4.2] 2020-05-15
### Fixes
- Integration with gcube distribution (https://support.d4science.org/issues/19612)

26
FUNDING.md Normal file
View File

@ -0,0 +1,26 @@
# Acknowledgments
The projects leading to this software have received funding from a series of European Union programmes including:
- the Sixth Framework Programme for Research and Technological Development
- [DILIGENT](https://cordis.europa.eu/project/id/004260) (grant no. 004260).
- the Seventh Framework Programme for research, technological development and demonstration
- [D4Science](https://cordis.europa.eu/project/id/212488) (grant no. 212488);
- [D4Science-II](https://cordis.europa.eu/project/id/239019) (grant no.239019);
- [ENVRI](https://cordis.europa.eu/project/id/283465) (grant no. 283465);
- [iMarine](https://cordis.europa.eu/project/id/283644) (grant no. 283644);
- [EUBrazilOpenBio](https://cordis.europa.eu/project/id/288754) (grant no. 288754).
- the H2020 research and innovation programme
- [SoBigData](https://cordis.europa.eu/project/id/654024) (grant no. 654024);
- [PARTHENOS](https://cordis.europa.eu/project/id/654119) (grant no. 654119);
- [EGI-Engage](https://cordis.europa.eu/project/id/654142) (grant no. 654142);
- [ENVRI PLUS](https://cordis.europa.eu/project/id/654182) (grant no. 654182);
- [BlueBRIDGE](https://cordis.europa.eu/project/id/675680) (grant no. 675680);
- [PerformFISH](https://cordis.europa.eu/project/id/727610) (grant no. 727610);
- [AGINFRA PLUS](https://cordis.europa.eu/project/id/731001) (grant no. 731001);
- [DESIRA](https://cordis.europa.eu/project/id/818194) (grant no. 818194);
- [ARIADNEplus](https://cordis.europa.eu/project/id/823914) (grant no. 823914);
- [RISIS 2](https://cordis.europa.eu/project/id/824091) (grant no. 824091);
- [EOSC-Pillar](https://cordis.europa.eu/project/id/857650) (grant no. 857650);
- [Blue Cloud](https://cordis.europa.eu/project/id/862409) (grant no. 862409);
- [SoBigData-PlusPlus](https://cordis.europa.eu/project/id/871042) (grant no. 871042);

View File

@ -1,34 +0,0 @@
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<Resource version="0.4.x">
<ID>2a3131f6-6ef6-4520-b8bf-70b29c7824f9</ID>
<Type>RuntimeResource</Type>
<Profile>
<Category>Gis</Category>
<Platform>
<Name>geonetwork</Name>
<Version>3</Version>
<MinorVersion>0</MinorVersion>
<RevisionVersion>5</RevisionVersion>
<BuildVersion>0</BuildVersion>
</Platform>
<RunTime>
<HostedOn>node3-d-d4s.d4science.org</HostedOn>
<Status>READY</Status>
</RunTime>
<AccessPoint>
<Interface>
<Endpoint EntryName="geonetwork">http://node3-d-d4s.d4science.org/geonetwork</Endpoint>
</Interface>
<AccessData>
<Username>admin</Username>
<Password>5jykeFZrlF1Xfa4vohyDYg==</Password>
</AccessData>
<Properties>
<Property>
<Name>priority</Name>
<Value encrypted="false">1</Value>
</Property>
</Properties>
</AccessPoint>
</Profile>
</Resource>

View File

@ -1,4 +1,4 @@
European Union Public Licence V. 1.1
# European Union Public Licence V. 1.1
EUPL © the European Community 2007
@ -19,7 +19,7 @@ or has expressed by any other mean his willingness to license under the EUPL.
1. Definitions
## 1. Definitions
In this Licence, the following terms have the following meaning:
@ -60,7 +60,7 @@ In this Licence, the following terms have the following meaning:
2. Scope of the rights granted by the Licence
## 2. Scope of the rights granted by the Licence
The Licensor hereby grants You a world-wide, royalty-free, non-exclusive,
sub-licensable licence to do the following, for the duration of copyright vested
@ -86,7 +86,7 @@ rights granted on the Work under this Licence.
3. Communication of the Source Code
## 3. Communication of the Source Code
The Licensor may provide the Work either in its Source Code form, or as
Executable Code. If the Work is provided as Executable Code, the Licensor
@ -98,7 +98,7 @@ continues to distribute and/or communicate the Work.
4. Limitations on copyright
## 4. Limitations on copyright
Nothing in this Licence is intended to deprive the Licensee of the benefits from
any exception or limitation to the exclusive rights of the rights owners in the
@ -107,7 +107,7 @@ applicable limitations thereto.
5. Obligations of the Licensee
## 5. Obligations of the Licensee
The grant of the rights mentioned above is subject to some restrictions and
obligations imposed on the Licensee. Those obligations are the following:
@ -148,7 +148,7 @@ reproducing the content of the copyright notice.
6. Chain of Authorship
## 6. Chain of Authorship
The original Licensor warrants that the copyright in the Original Work granted
hereunder is owned by him/her or licensed to him/her and that he/she has the
@ -164,7 +164,7 @@ terms of this Licence.
7. Disclaimer of Warranty
## 7. Disclaimer of Warranty
The Work is a work in progress, which is continuously improved by numerous
contributors. It is not a finished work and may therefore contain defects or
@ -181,7 +181,7 @@ for the grant of any rights to the Work.
8. Disclaimer of Liability
## 8. Disclaimer of Liability
Except in the cases of wilful misconduct or damages directly caused to natural
persons, the Licensor will in no event be liable for any direct or indirect,
@ -194,7 +194,7 @@ laws as far such laws apply to the Work.
9. Additional agreements
## 9. Additional agreements
While distributing the Original Work or Derivative Works, You may choose to
conclude an additional agreement to offer, and charge a fee for, acceptance of
@ -208,7 +208,7 @@ any such warranty or additional liability.
10. Acceptance of the Licence
## 10. Acceptance of the Licence
The provisions of this Licence can be accepted by clicking on an icon “I agree”
placed under the bottom of a window displaying the text of this Licence or by
@ -223,7 +223,7 @@ Distribution and/or Communication by You of the Work or copies thereof.
11. Information to the public
## 11. Information to the public
In case of any Distribution and/or Communication of the Work by means of
electronic communication by You (for example, by offering to download the Work
@ -234,7 +234,7 @@ accessible, concluded, stored and reproduced by the Licensee.
12. Termination of the Licence
## 12. Termination of the Licence
The Licence and the rights granted hereunder will terminate automatically upon
any breach by the Licensee of the terms of the Licence.
@ -245,7 +245,7 @@ remain in full compliance with the Licence.
13. Miscellaneous
## 13. Miscellaneous
Without prejudice of Article 9 above, the Licence represents the complete
agreement between the Parties as to the Work licensed hereunder.
@ -266,7 +266,7 @@ their choice.
14. Jurisdiction
## 14. Jurisdiction
Any litigation resulting from the interpretation of this License, arising
between the European Commission, as a Licensor, and any Licensee, will be
@ -280,7 +280,7 @@ conducts its primary business.
15. Applicable Law
## 15. Applicable Law
This Licence shall be governed by the law of the European Union country where
the Licensor resides or has his registered office.
@ -292,10 +292,8 @@ This licence shall be governed by the Belgian law if:
- or registered office inside a European Union country.
===
Appendix
## Appendix
@ -310,4 +308,5 @@ Appendix
- Eclipse Public License v. 1.0
- Cecill v. 2.0
- Cecill v. 2.0

51
README.md Normal file
View File

@ -0,0 +1,51 @@
Spatial Data Infrastucture - Service
--------------------------------------------------
SDI-Service is one of the subsystems forming the gCube Spatial Data Infrastructure Facilities. It aims to provide gCube Applications simplified feature in order to manage GeoSpatial Data and Metadata.
## Built with
* [OpenJDK](https://openjdk.java.net/) - The JDK used
* [JAX-RS](https://github.com/eclipse-ee4j/jaxrs-api) - Java™ API for RESTful Web Services
* [Jersey](https://jersey.github.io/) - JAX-RS runtime
* [Maven](https://maven.apache.org/) - Dependency Management
## Documentation
Documentation can be found [here](https://gcube.wiki.gcube-system.org/gcube/SDI-Service).
## Change log
See [CHANGELOG.md](CHANGELOG.md).
## License
This project is licensed under the EUPL V.1.1 License - see the [LICENSE.md](LICENSE.md) file for details.
## About the gCube Framework
This software is part of the [gCubeFramework](https://www.gcube-system.org/ "gCubeFramework"): an
open-source software toolkit used for building and operating Hybrid Data
Infrastructures enabling the dynamic deployment of Virtual Research Environments
by favouring the realisation of reuse oriented policies.
The projects leading to this software have received funding from a series of European Union programmes including:
- the Sixth Framework Programme for Research and Technological Development
- DILIGENT (grant no. 004260).
- the Seventh Framework Programme for research, technological development and demonstration
- D4Science (grant no. 212488);
- D4Science-II (grant no.239019);
- ENVRI (grant no. 283465);
- iMarine(grant no. 283644);
- EUBrazilOpenBio (grant no. 288754).
- the H2020 research and innovation programme
- SoBigData (grant no. 654024);
- PARTHENOS (grant no. 654119);
- EGIEngage (grant no. 654142);
- ENVRIplus (grant no. 654182);
- BlueBRIDGE (grant no. 675680);
- PerformFish (grant no. 727610);
- AGINFRAplus (grant no. 731001);
- DESIRA (grant no. 818194);
- ARIADNEplus (grant no. 823914);
- RISIS2 (grant no. 824091);

View File

@ -1,12 +0,0 @@
# Changelog
All notable changes to this project will be documented in this file.
This project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
## [1.4.1] - 2020-05-20
### Added
**Features**
Integration with uri-resolver-manager

View File

@ -1 +0,0 @@
${gcube.license}

View File

@ -1,65 +0,0 @@
The gCube System - ${name}
--------------------------------------------------
${description}
${gcube.description}
${gcube.funding}
Version
--------------------------------------------------
${version} (${buildDate})
Please see the file named "changelog.xml" in this directory for the release notes.
Authors
--------------------------------------------------
* Fabio Sinibaldi (fabio.sinibaldi-AT-isti.cnr.it) Istituto di Scienza e Tecnologie dell'Informazione "A. Faedo" - CNR, Pisa (Italy).
Maintainers
-----------
* Fabio Sinibaldi (fabio.sinibaldi-AT-isti.cnr.it) Istituto di Scienza e Tecnologie dell'Informazione "A. Faedo" - CNR, Pisa (Italy).
Download information
--------------------------------------------------
Source code is available from SVN:
${scm.url}
Binaries can be downloaded from the gCube website:
${gcube.website}
Installation
--------------------------------------------------
Installation documentation is available on-line in the gCube Wiki:
${gcube.wikiRoot}/Data_Transfer_2
Documentation
--------------------------------------------------
Documentation is available on-line in the gCube Wiki:
${gcube.wikiRoot}/Data_Transfer_2
${gcube.wikiRoot}/How_to_use_Data_Transfer_2
Support
--------------------------------------------------
Bugs and support requests can be reported in the gCube issue tracking tool:
${gcube.issueTracking}
Licensing
--------------------------------------------------
This software is licensed under the terms you may find in the file named "LICENSE" in this directory.

View File

@ -1,16 +0,0 @@
<ReleaseNotes>
<Changeset component="sdi-service-1.0.0" date="2017-03-22">
<Change>First Release</Change>
</Changeset>
<Changeset component="sdi-service-1.1.0" date="2017-05-16">
<Change>Added GeoServer interface</Change>
<Change>Added Metadata interface</Change>
</Changeset>
<Changeset component="sdi-service-1.2.0" date="2017-09-16">
<Change>Added Health interface</Change>
<Change>Added GeoNetwork interface</Change>
</Changeset>
<Changeset component="sdi-service-1.3.0" date="2017-12-01">
<Change>Added Thredds interface</Change>
</Changeset>
</ReleaseNotes>

View File

@ -1,30 +0,0 @@
<assembly
xmlns="http://maven.apache.org/plugins/maven-assembly-plugin/assembly/1.1.0"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/plugins/maven-assembly-plugin/assembly/1.1.0 http://maven.apache.org/xsd/assembly-1.1.0.xsd">
<id>servicearchive</id>
<formats>
<format>tar.gz</format>
</formats>
<baseDirectory>/</baseDirectory>
<fileSets>
<fileSet>
<directory>${distroDirectory}</directory>
<outputDirectory>/</outputDirectory>
<useDefaultExcludes>true</useDefaultExcludes>
<includes>
<include>README</include>
<include>LICENSE</include>
<include>changelog.xml</include>
</includes>
<fileMode>755</fileMode>
<filtered>true</filtered>
</fileSet>
</fileSets>
<files>
<file>
<source>target/${build.finalName}.${project.packaging}</source>
<outputDirectory>/${artifactId}</outputDirectory>
</file>
</files>
</assembly>

View File

@ -1,8 +0,0 @@
<application mode='online'>
<name>${artifactId}</name>
<group>SDI</group>
<version>${version}</version>
<description>${description}</description>
<local-persistence location='target' />
</application>

View File

@ -1,27 +0,0 @@
<?xml version="1.0" encoding="UTF-8"?>
<Resource xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
<ID />
<Type>Service</Type>
<Profile>
<Description>${description}</Description>
<Class>SDI</Class>
<Name>${artifactId}</Name>
<Version>1.0.0</Version>
<Packages>
<Software>
<Name>${artifactId}</Name>
<Version>${version}</Version>
<MavenCoordinates>
<groupId>${groupId}</groupId>
<artifactId>${artifactId}</artifactId>
<version>${version}</version>
</MavenCoordinates>
<Files>
<File>${build.finalName}.jar</File>
</Files>
</Software>
</Packages>
</Profile>
</Resource>

212
pom.xml
View File

@ -8,73 +8,63 @@
</parent>
<groupId>org.gcube.spatial.data</groupId>
<artifactId>sdi-service</artifactId>
<version>1.4.1</version>
<version>1.4.4</version>
<name>SDI Service</name>
<description>REST Interface towards SDI facilities</description>
<packaging>war</packaging>
<properties>
<webappDirectory>${project.basedir}/src/main/webapp/WEB-INF</webappDirectory>
<distroDirectory>${project.basedir}/distro</distroDirectory>
<jersey-version>2.14</jersey-version> <!-- 2.22 -->
<jersey-cdi-version>2.14</jersey-cdi-version>
<weld-version>2.2.4.Final</weld-version>
<properties>
<gitBaseUrl>https://code-repo.d4science.org/gCubeSystem</gitBaseUrl>
<jersey.version>2.25.1</jersey.version>
</properties>
<scm>
<connection>scm:git:https://code-repo.d4science.org/gCubeSystem/${project.artifactId}.git</connection>
<developerConnection>scm:git:https://code-repo.d4science.org/gCubeSystem/${project.artifactId}.git</developerConnection>
<url>https://code-repo.d4science.org/gCubeSystem/${project.artifactId}</url>
<scm>
<connection>scm:git:${gitBaseUrl}/${project.artifactId}.git</connection>
<developerConnection>scm:git:${gitBaseUrl}/${project.artifactId}.git</developerConnection>
<url>${gitBaseUrl}/${project.artifactId}.git</url>
</scm>
<dependencyManagement>
<dependencies>
<dependency>
<groupId>org.gcube.distribution</groupId>
<artifactId>maven-smartgears-bom</artifactId>
<version>LATEST</version>
<artifactId>gcube-smartgears-bom</artifactId>
<version>2.1.0</version>
<type>pom</type>
<scope>import</scope>
</dependency>
</dependencies>
<dependency>
<groupId> org.glassfish.jersey </groupId>
<artifactId>jersey-bom</artifactId>
<version>${jersey.version}</version>
<type>pom</type>
<scope>import</scope>
</dependency>
</dependencies>
</dependencyManagement>
<dependencies>
<!-- <dependency> -->
<!-- <groupId>org.gcube.spatial.data</groupId> -->
<!-- <artifactId>gis-interface</artifactId> -->
<!-- <version>[2.4.0-SNAPSHOT,3.0.0-SNAPSHOT)</version> -->
<!-- <exclusions> -->
<!-- <exclusion> -->
<!-- <artifactId>slf4j-log4j12</artifactId> -->
<!-- <groupId>org.slf4j</groupId> -->
<!-- </exclusion> -->
<!-- </exclusions> -->
<!-- </dependency> -->
<dependency>
<groupId>org.gcube.spatial.data</groupId>
<artifactId>sdi-interface</artifactId>
<version>[1.0.0-SNAPSHOT,2.0.0-SNAPSHOT)</version>
<version>[1.0.0,1.3.0-SNAPSHOT)</version>
</dependency>
<dependency>
<groupId>org.gcube.portlets.user</groupId>
<artifactId>uri-resolver-manager</artifactId>
<version>[1.0.0-SNAPSHOT, 2.0.0-SNAPSHOT)</version>
<version>[1.0.0, 2.0.0-SNAPSHOT)</version>
</dependency>
<dependency>
<groupId>org.gcube.data.transfer</groupId>
<artifactId>data-transfer-library</artifactId>
<version>[1.2.0-SNAPSHOT,2.0.0-SNAPSHOT)</version>
<version>[1.2.0,2.0.0-SNAPSHOT)</version>
</dependency>
<!-- <dependency> -->
<!-- <groupId>org.gcube.data.transfer</groupId> -->
<!-- <artifactId>data-transfer-library</artifactId> -->
<!-- <version>[1.2.0-SNAPSHOT,2.0.0-SNAPSHOT)</version> -->
<!-- </dependency> -->
<dependency>
<groupId>org.gcube.resources</groupId>
<artifactId>registry-publisher</artifactId>
@ -83,7 +73,7 @@
<dependency>
<groupId>org.gcube.resourcemanagement</groupId>
<artifactId>resourcemanager-client</artifactId>
<version>[1.0.0-SNAPSHOT,2.0.0-SNAPSHOT)</version>
<version>[1.0.0,2.0.0)</version>
</dependency>
<!-- SMARTGEARS -->
<dependency>
@ -92,30 +82,25 @@
</dependency>
<dependency>
<groupId>org.gcube.core</groupId>
<artifactId>common-smartgears</artifactId>
<exclusions>
<exclusion>
<artifactId>jackson-databind</artifactId>
<groupId>com.fasterxml.jackson.core</groupId>
</exclusion>
</exclusions>
<artifactId>common-smartgears</artifactId>
</dependency>
<!-- jersey -->
<dependency>
<groupId>javax.servlet</groupId>
<artifactId>javax.servlet-api</artifactId>
<version>3.0.1</version>
</dependency>
<dependency>
<groupId>javax.ws.rs</groupId>
<artifactId>javax.ws.rs-api</artifactId>
<version>2.0</version>
</dependency>
<dependency>
<groupId>org.glassfish.jersey.containers</groupId>
<artifactId>jersey-container-servlet</artifactId>
<version>${jersey-version}</version>
</dependency>
<dependency>
<groupId>org.glassfish.jersey.containers.glassfish</groupId>
<artifactId>jersey-gf-cdi</artifactId>
<version>${jersey-cdi-version}</version>
</dependency>
@ -124,112 +109,39 @@
<artifactId>javax.transaction-api</artifactId>
<version>1.2</version>
</dependency>
<dependency>
<groupId>javax.servlet</groupId>
<artifactId>javax.servlet-api</artifactId>
<version>3.0.1</version>
<scope>provided</scope>
</dependency>
<dependency>
<groupId>org.glassfish.jersey.media</groupId>
<artifactId>jersey-media-json-jackson</artifactId>
<version>${jersey-version}</version>
<exclusions>
<exclusion>
<artifactId>jackson-databind</artifactId>
<groupId>com.fasterxml.jackson.core</groupId>
</exclusion>
<exclusion>
<artifactId>jackson-core</artifactId>
<groupId>com.fasterxml.jackson.core</groupId>
</exclusion>
<exclusion>
<artifactId>jackson-module-jaxb-annotations</artifactId>
<groupId>com.fasterxml.jackson.core</groupId>
</exclusion>
<exclusion>
<artifactId>jackson-annotations</artifactId>
<groupId>com.fasterxml.jackson.core</groupId>
</exclusion>
<exclusion>
<groupId>com.fasterxml.jackson.jaxrs</groupId>
<artifactId>jackson-jaxrs-json-provider</artifactId>
</exclusion>
<exclusion>
<artifactId>jackson-jaxrs-base</artifactId>
<groupId>com.fasterxml.jackson.jaxrs</groupId>
</exclusion>
</exclusions>
</dependency>
<dependency>
<artifactId>jackson-databind</artifactId>
<groupId>com.fasterxml.jackson.core</groupId>
<version>2.4.2</version>
</dependency>
<dependency>
<groupId>org.glassfish.jersey.media</groupId>
<artifactId>jersey-media-multipart</artifactId>
<version>${jersey-version}</version>
</dependency>
<dependency>
<groupId>org.glassfish.jersey.bundles</groupId>
<artifactId>jaxrs-ri</artifactId>
<version>${jersey-version}</version>
</dependency>
<groupId>org.glassfish.jersey.ext.cdi</groupId>
<artifactId>jersey-cdi1x</artifactId>
</dependency>
<dependency>
<groupId>org.glassfish.jersey.core</groupId>
<artifactId>jersey-common</artifactId>
<version>${jersey-version}</version>
</dependency>
<!-- <dependency> -->
<!-- <groupId>org.glassfish.jersey.media</groupId> -->
<!-- <artifactId>jersey-media-moxy</artifactId> -->
<!-- <version>2.26-b08</version> -->
<!-- </dependency> -->
<!-- weld -->
<dependency>
<groupId>javax.enterprise</groupId>
<artifactId>cdi-api</artifactId>
<version>1.2</version>
</dependency>
<dependency>
<groupId>org.jboss.weld.servlet</groupId>
<artifactId>weld-servlet</artifactId>
<version>${weld-version}</version> <!-- 2.0.4 doesn't find implementations. 2.2.4 doesn't find CDI... -->
</dependency>
<dependency>
<groupId>org.jboss</groupId>
<artifactId>jandex</artifactId>
<version>1.2.2.Final</version>
</dependency>
<!-- WELD -->
<dependency>
<groupId>org.glassfish.jersey.ext.cdi</groupId>
<artifactId>jersey-weld2-se</artifactId>
</dependency>
<!-- swagger -->
<dependency>
<groupId>io.swagger</groupId>
<artifactId>swagger-jersey2-jaxrs</artifactId>
<version>1.5.0</version>
<exclusions>
<exclusion>
<artifactId>guava</artifactId>
<groupId>com.google.guava</groupId>
</exclusion>
<exclusion>
<artifactId>jackson-databind</artifactId>
<groupId>com.fasterxml.jackson.core</groupId>
</exclusion>
</exclusions>
</dependency>
<!-- <dependency> -->
<!-- <groupId>io.swagger</groupId> -->
<!-- <artifactId>swagger-jersey2-jaxrs</artifactId> -->
<!-- <version>1.5.0</version> -->
<!-- </dependency> -->
<!-- GN EXTERNAL -->
@ -291,14 +203,12 @@
<dependency>
<groupId>ch.qos.logback</groupId>
<artifactId>logback-classic</artifactId>
<version>1.0.13</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.glassfish.jersey.test-framework.providers</groupId>
<artifactId>jersey-test-framework-provider-simple</artifactId>
<version>${jersey-version}</version>
<scope>test</scope>
</dependency>
@ -311,10 +221,10 @@
</dependencies>
<repositories>
<repositories>
<repository>
<id>GeoSolutions-snap</id>
<url>http://maven.research-infrastructures.eu/nexus/content/repositories/geo-solutions-snapshots/</url>
<url>https://nexus.d4science.org/nexus/content/repositories/geo-solutions-snapshots/</url>
<snapshots>
<enabled>true</enabled>
</snapshots>
@ -324,7 +234,7 @@
</repository>
<repository>
<id>GeoSolutions-rels</id>
<url>http://maven.research-infrastructures.eu:8081/nexus/content/repositories/geo-solutions/</url>
<url>https://nexus.d4science.org/nexus/content/repositories/geo-solutions/</url>
<snapshots>
<enabled>false</enabled>
</snapshots>
@ -335,20 +245,8 @@
<repository>
<id>GeoToolkit</id>
<url>http://maven.research-infrastructures.eu:8081/nexus/content/repositories/geotoolkit/</url>
<url>https://nexus.d4science.org/nexus/content/repositories/geotoolkit/</url>
</repository>
</repositories>
<build>
<finalName>${project.artifactId}</finalName>
<testResources>
<testResource>
<directory>src/test/resources</directory>
</testResource>
<testResource>
<directory>src/main/webapps</directory>
</testResource>
</testResources>
</build>
</repositories>
</project>

View File

@ -4,15 +4,33 @@ import java.net.URL;
import javax.ws.rs.ApplicationPath;
import org.aopalliance.reflect.Metadata;
import org.gcube.smartgears.ContextProvider;
import org.gcube.smartgears.configuration.container.ContainerConfiguration;
import org.gcube.smartgears.context.application.ApplicationContext;
import org.gcube.spatial.data.sdi.engine.GISManager;
import org.gcube.spatial.data.sdi.engine.GeoNetworkManager;
import org.gcube.spatial.data.sdi.engine.RoleManager;
import org.gcube.spatial.data.sdi.engine.SDIManager;
import org.gcube.spatial.data.sdi.engine.TemplateManager;
import org.gcube.spatial.data.sdi.engine.TemporaryPersistence;
import org.gcube.spatial.data.sdi.engine.ThreddsManager;
import org.gcube.spatial.data.sdi.engine.impl.factories.GeoNetworkManagerFactory;
import org.gcube.spatial.data.sdi.engine.impl.factories.GeoServerManagerFactory;
import org.gcube.spatial.data.sdi.engine.impl.factories.MetadataTemplateManagerFactory;
import org.gcube.spatial.data.sdi.engine.impl.factories.RoleManagerFactory;
import org.gcube.spatial.data.sdi.engine.impl.factories.SDIManagerFactory;
import org.gcube.spatial.data.sdi.engine.impl.factories.TemporaryPersistenceFactory;
import org.gcube.spatial.data.sdi.engine.impl.factories.ThreddsManagerFactory;
import org.gcube.spatial.data.sdi.model.ServiceConstants;
import org.gcube.spatial.data.sdi.rest.GeoNetwork;
import org.gcube.spatial.data.sdi.rest.GeoServer;
import org.gcube.spatial.data.sdi.rest.SDI;
import org.gcube.spatial.data.sdi.rest.Thredds;
import org.glassfish.hk2.utilities.binding.AbstractBinder;
import org.glassfish.jersey.media.multipart.MultiPartFeature;
import org.glassfish.jersey.server.ResourceConfig;
import io.swagger.jaxrs.config.BeanConfig;
import lombok.extern.slf4j.Slf4j;
@Slf4j
@ApplicationPath(ServiceConstants.APPLICATION)
@ -25,19 +43,9 @@ public class SDIService extends ResourceConfig{
//
public SDIService() {
super();
packages("org.gcube.spatial.data");
// packages("org.gcube.spatial.data.sdi.model");
register(io.swagger.jaxrs.listing.ApiListingResource.class);
register(io.swagger.jaxrs.listing.SwaggerSerializers.class);
register(MultiPartFeature.class);
// register(MoxyXmlFeature.class);
ApplicationContext context=ContextProvider.get();
log.warn("Initializing App : Properties.. ");
ApplicationContext context=ContextProvider.get();
ContainerConfiguration configuration=context.container().configuration();
String hostName=configuration.hostname();
Integer port=configuration.port();
try{
URL resourceUrl = context.application().getResource("/WEB-INF/config.properties");
LocalConfiguration.init(resourceUrl).
@ -53,19 +61,60 @@ public class SDIService extends ResourceConfig{
packages("org.gcube.spatial.data");
log.warn("Initializing App : Binders");
AbstractBinder binder = new AbstractBinder() {
@Override
protected void configure() {
bindFactory(SDIManagerFactory.class).to(SDIManager.class);
bindFactory(GeoNetworkManagerFactory.class).to(GeoNetworkManager.class);
bindFactory(ThreddsManagerFactory.class).to(ThreddsManager.class);
bindFactory(GeoServerManagerFactory.class).to(GISManager.class);
bindFactory(MetadataTemplateManagerFactory.class).to(TemplateManager.class);
bindFactory(RoleManagerFactory.class).to(RoleManager.class);
bindFactory(TemporaryPersistenceFactory.class).to(TemporaryPersistence.class);
}
};
register(binder);
register(MultiPartFeature.class);
registerClasses(SDI.class);
registerClasses(GeoNetwork.class);
registerClasses(GeoServer.class);
registerClasses(Thredds.class);
registerClasses(Metadata.class);
log.warn("Initialization complete");
// register(MoxyXmlFeature.class);
// String hostName=configuration.hostname();
// Integer port=configuration.port();
//SWAGGER
BeanConfig beanConfig = new BeanConfig();
beanConfig.setVersion("1.0.0");
beanConfig.setSchemes(new String[]{"http","https"});
beanConfig.setHost(hostName+":"+port);
beanConfig.setBasePath("/gcube/service/");
beanConfig.setResourcePackage(GeoNetwork.class.getPackage().getName());
beanConfig.setTitle("SDI Service");
beanConfig.setDescription("REST Interface towards SDI facilities");
beanConfig.setPrettyPrint(true);
beanConfig.setScan(true);
// BeanConfig beanConfig = new BeanConfig();
// beanConfig.setVersion("1.0.0");
// beanConfig.setSchemes(new String[]{"http","https"});
// beanConfig.setHost(hostName+":"+port);
// beanConfig.setBasePath("/gcube/service/");
// beanConfig.setResourcePackage(GeoNetwork.class.getPackage().getName());
// beanConfig.setTitle("SDI Service");
// beanConfig.setDescription("REST Interface towards SDI facilities");
// beanConfig.setPrettyPrint(true);
// beanConfig.setScan(true);
//
// System.out.println("********************** SDI INIT *****************************");

View File

@ -4,7 +4,6 @@ import java.util.ArrayList;
import java.util.List;
import javax.inject.Singleton;
import javax.validation.metadata.ConstraintDescriptor;
import org.gcube.spatial.data.sdi.engine.RoleManager;
import org.gcube.spatial.data.sdi.model.credentials.AccessType;

View File

@ -0,0 +1,27 @@
package org.gcube.spatial.data.sdi.engine.impl.factories;
import javax.inject.Inject;
import org.gcube.spatial.data.sdi.engine.GeoNetworkManager;
import org.gcube.spatial.data.sdi.engine.RoleManager;
import org.gcube.spatial.data.sdi.engine.impl.GeoNetworkManagerImpl;
import org.glassfish.hk2.api.Factory;
public class GeoNetworkManagerFactory implements Factory<GeoNetworkManager>{
@Inject
private RoleManager manager;
@Override
public void dispose(GeoNetworkManager instance) {
// TODO Auto-generated method stub
}
@Override
public GeoNetworkManager provide() {
return new GeoNetworkManagerImpl(manager);
}
}

View File

@ -0,0 +1,31 @@
package org.gcube.spatial.data.sdi.engine.impl.factories;
import org.gcube.spatial.data.sdi.engine.GISManager;
import org.gcube.spatial.data.sdi.engine.impl.GISManagerImpl;
import org.glassfish.hk2.api.Factory;
import lombok.Synchronized;
public class GeoServerManagerFactory implements Factory<GISManager>{
@Override
public void dispose(GISManager instance) {
// TODO Auto-generated method stub
}
@Override
public GISManager provide() {
return getInstance();
}
private static GISManager instance=null;
@Synchronized
private static GISManager getInstance() {
if(instance==null)
instance=new GISManagerImpl();
return instance;
}
}

View File

@ -0,0 +1,36 @@
package org.gcube.spatial.data.sdi.engine.impl.factories;
import org.gcube.spatial.data.sdi.engine.TemplateManager;
import org.gcube.spatial.data.sdi.engine.impl.metadata.MetadataTemplateManagerImpl;
import org.glassfish.hk2.api.Factory;
import lombok.Synchronized;
public class MetadataTemplateManagerFactory implements Factory<TemplateManager>{
@Override
public TemplateManager provide() {
return getInstance();
}
@Override
public void dispose(TemplateManager instance) {
// TODO Auto-generated method stub
}
private static TemplateManager instance = null;
@Synchronized
private static final TemplateManager getInstance() {
if(instance==null) {
instance=new MetadataTemplateManagerImpl();
try {
((MetadataTemplateManagerImpl)instance).defaultInit();
}catch(Exception e) {
throw new RuntimeException("Unable to init temp ",e);
}
}
return instance;
}
}

View File

@ -0,0 +1,29 @@
package org.gcube.spatial.data.sdi.engine.impl.factories;
import org.gcube.spatial.data.sdi.engine.RoleManager;
import org.gcube.spatial.data.sdi.engine.impl.RoleManagerImpl;
import org.glassfish.hk2.api.Factory;
import lombok.Synchronized;
public class RoleManagerFactory implements Factory<RoleManager>{
@Override
public void dispose(RoleManager instance) {
}
private static RoleManager instance;
@Override
public RoleManager provide() {
return getInstance();
}
@Synchronized
private static RoleManager getInstance() {
if(instance==null)
instance=new RoleManagerImpl();
return instance;
}
}

View File

@ -0,0 +1,44 @@
package org.gcube.spatial.data.sdi.engine.impl.factories;
import javax.inject.Inject;
import org.gcube.spatial.data.sdi.engine.GISManager;
import org.gcube.spatial.data.sdi.engine.GeoNetworkManager;
import org.gcube.spatial.data.sdi.engine.SDIManager;
import org.gcube.spatial.data.sdi.engine.ThreddsManager;
import org.gcube.spatial.data.sdi.engine.impl.SDIManagerImpl;
import org.glassfish.hk2.api.Factory;
import lombok.Synchronized;
public class SDIManagerFactory implements Factory<SDIManager>{
@Override
public void dispose(SDIManager instance) {
// TODO Auto-generated method stub
}
@Override
public SDIManager provide() {
return getInstance(gnManager,gisManager,thManager);
}
private static SDIManager sdiManager=null;
@Inject
private GeoNetworkManager gnManager;
@Inject
private GISManager gisManager;
@Inject
private ThreddsManager thManager;
@Synchronized
private static SDIManager getInstance(GeoNetworkManager gnManager, GISManager gisManager,ThreddsManager thManager) {
if(sdiManager==null)
sdiManager=new SDIManagerImpl(gnManager,thManager,gisManager);
return sdiManager;
}
}

View File

@ -0,0 +1,37 @@
package org.gcube.spatial.data.sdi.engine.impl.factories;
import org.gcube.spatial.data.sdi.engine.TemporaryPersistence;
import org.gcube.spatial.data.sdi.engine.impl.TemporaryPersistenceImpl;
import org.glassfish.hk2.api.Factory;
import lombok.Synchronized;
public class TemporaryPersistenceFactory implements Factory<TemporaryPersistence>{
@Override
public void dispose(TemporaryPersistence arg0) {
arg0.shutdown();
}
@Override
public TemporaryPersistence provide() {
return getInstance();
}
private static TemporaryPersistence temp=null;
@Synchronized
private static TemporaryPersistence getInstance(){
if(temp==null) {
temp=new TemporaryPersistenceImpl();
try {
temp.init();
}catch(Exception e) {
throw new RuntimeException("Unable to init temp ",e);
}
}
return temp;
}
}

View File

@ -0,0 +1,37 @@
package org.gcube.spatial.data.sdi.engine.impl.factories;
import javax.inject.Inject;
import org.gcube.spatial.data.sdi.engine.TemplateManager;
import org.gcube.spatial.data.sdi.engine.ThreddsManager;
import org.gcube.spatial.data.sdi.engine.impl.ThreddsManagerImpl;
import org.glassfish.hk2.api.Factory;
import lombok.Synchronized;
public class ThreddsManagerFactory implements Factory<ThreddsManager>{
@Inject
private TemplateManager manager;
@Override
public ThreddsManager provide() {
return getInstance(manager);
}
@Override
public void dispose(ThreddsManager instance) {
// TODO Auto-generated method stub
}
private static ThreddsManager instance=null;
@Synchronized
private static ThreddsManager getInstance(TemplateManager manager) {
if(instance==null)
instance=new ThreddsManagerImpl(manager);
return instance;
}
}

View File

@ -189,7 +189,7 @@ public class GeoNetworkRetriever extends AbstractISModule{
GeoNetworkServiceDefinition gnDefinition=(GeoNetworkServiceDefinition) definition;
AccessPoint point=new AccessPoint();
point.address("http://"+definition.getHostname()+"/geonetwork");
point.address("https://"+definition.getHostname()+"/geonetwork");
point.credentials(ISUtils.encryptString(definition.getAdminPassword()), "admin");
point.description("Main Access point");
point.name(getServiceEndpointAccessPointName());

View File

@ -49,6 +49,7 @@ public class MetadataTemplateManagerImpl implements TemplateManager {
@PostConstruct
public void defaultInit() {
log.info("Default Initialization");
init(LocalConfiguration.getTemplateConfigurationObject());
}
@ -88,7 +89,7 @@ public class MetadataTemplateManagerImpl implements TemplateManager {
cfg.setLogTemplateExceptions(false);
// availableTemplates.add(new TemplateDescriptor("THREDDS-ONLINE", "Thredds online resources", "Template for online resources exposed by thredds.", "http://sdi-d4s.d4science.org"));
// availableTemplates.add(new TemplateDescriptor("THREDDS-ONLINE", "Thredds online resources", "Template for online resources exposed by thredds.", "https://sdi-d4s.d4science.org"));
ThreddsOnlineTemplate tpl=new ThreddsOnlineTemplate();

View File

@ -32,7 +32,7 @@ public class ThreddsOnlineTemplate extends AbstractMetadataTemplate<ThreddsOnlin
EXPECTED_PARAMETERS.add(new ParameterType(TemplateInvocationBuilder.THREDDS_ONLINE.FILENAME, "The dataset's file name"));
EXPECTED_PARAMETERS.add(new ParameterType(TemplateInvocationBuilder.THREDDS_ONLINE.HOSTNAME, "Thredds hostname"));
DESCRIPTOR=new TemplateDescriptor(TEMPLATE_ID, TEMPLATE_NAME, "Template for online resources exposed by thredds.", "http://sdi-d4s.d4science.org",EXPECTED_PARAMETERS);
DESCRIPTOR=new TemplateDescriptor(TEMPLATE_ID, TEMPLATE_NAME, "Template for online resources exposed by thredds.", "https://sdi-d4s.d4science.org",EXPECTED_PARAMETERS);
}

View File

@ -25,11 +25,9 @@ import org.gcube.spatial.data.sdi.model.services.ServiceDefinition.Type;
import com.fasterxml.jackson.databind.SerializationFeature;
import com.fasterxml.jackson.jaxrs.annotation.JacksonFeatures;
import io.swagger.annotations.Api;
import lombok.extern.slf4j.Slf4j;
@Path(ServiceConstants.GeoNetwork.INTERFACE)
@Api(value=ServiceConstants.GeoNetwork.INTERFACE)
@Slf4j
@ManagedBy(SDIServiceManager.class)
public class GeoNetwork {

View File

@ -24,11 +24,9 @@ import org.gcube.spatial.data.sdi.model.services.ServiceDefinition.Type;
import com.fasterxml.jackson.databind.SerializationFeature;
import com.fasterxml.jackson.jaxrs.annotation.JacksonFeatures;
import io.swagger.annotations.Api;
import lombok.extern.slf4j.Slf4j;
@Path(ServiceConstants.GeoServer.INTERFACE)
@Api(value=ServiceConstants.GeoServer.INTERFACE)
@Slf4j
@ManagedBy(SDIServiceManager.class)
public class GeoServer {

View File

@ -50,11 +50,11 @@ import lombok.extern.slf4j.Slf4j;
public class Metadata {
@Inject
TemplateManager templateManager;
private TemplateManager templateManager;
@Inject
GeoNetworkManager geonetworkManager;
private GeoNetworkManager geonetworkManager;
@Inject
TemporaryPersistence persistence;
private TemporaryPersistence persistence;
@POST
@Consumes(MediaType.MULTIPART_FORM_DATA)
@ -85,7 +85,7 @@ public class Metadata {
}
MetadataReport toReturn=new MetadataReport();
Set<TemplateInvocation> metadataEnrichments=new HashSet<>(templateInvocations);
if(metadataEnrichments!=null && !metadataEnrichments.isEmpty()){
try{
log.debug("Applying invocations...");
@ -114,10 +114,10 @@ public class Metadata {
MetadataReport toReturn=new MetadataReport();
File toPublish=persistence.getById(uploadedId);
log.debug("Publishing metadata.. ");
GeoNetworkDescriptor desc=geonetworkManager.getSuggestedInstances().get(0);
GeoNetworkClient client=geonetworkManager.getClient(desc);
String uuid=new MetadataHandler(toPublish).getUUID();
long id=0;
try {
@ -131,8 +131,8 @@ public class Metadata {
throw new RuntimeException("Insert Operation failed with unexpected reason (Metadata with uuid "+uuid+" has not been found).",e);
}
}
toReturn.setPublishedID(id);
toReturn.setPublishedUUID(uuid);
return toReturn;
@ -151,10 +151,15 @@ public class Metadata {
@Path("/list")
@Produces(MediaType.APPLICATION_JSON)
public Collection<TemplateDescriptor> getList(){
log.debug("Received LIST method");
TemplateCollection coll= templateManager.getAvailableMetadataTemplates();
log.debug("Gonna respond with {} ",coll);
return coll.getAvailableTemplates();
try{
log.debug("Received LIST method");
TemplateCollection coll= templateManager.getAvailableMetadataTemplates();
log.debug("Gonna respond with {} ",coll);
return coll.getAvailableTemplates();
}catch(Throwable e ){
log.warn("Unexpected error while getting templates",e);
throw new WebApplicationException("Unabel to publish metadata. Cause "+e.getMessage(),Status.INTERNAL_SERVER_ERROR);
}
}

View File

@ -3,25 +3,23 @@ package org.gcube.spatial.data.sdi.rest;
import javax.inject.Inject;
import javax.ws.rs.GET;
import javax.ws.rs.Path;
import javax.ws.rs.PathParam;
import javax.ws.rs.Produces;
import javax.ws.rs.WebApplicationException;
import javax.ws.rs.core.MediaType;
import org.gcube.smartgears.annotations.ManagedBy;
import org.gcube.spatia.data.model.profiles.ApplicationProfile;
import org.gcube.spatial.data.sdi.SDIServiceManager;
import org.gcube.spatial.data.sdi.engine.SDIManager;
import org.gcube.spatial.data.sdi.model.ScopeConfiguration;
import org.gcube.spatial.data.sdi.model.ServiceConstants;
import org.gcube.spatial.data.sdi.model.health.HealthReport;
import com.fasterxml.jackson.databind.SerializationFeature;
import com.fasterxml.jackson.jaxrs.annotation.JacksonFeatures;
import io.swagger.annotations.Api;
import lombok.extern.slf4j.Slf4j;
@Path(ServiceConstants.INTERFACE)
@Api(value=ServiceConstants.INTERFACE)
//@Api(value=ServiceConstants.INTERFACE)
@ManagedBy(SDIServiceManager.class)
@Slf4j
public class SDI {
@ -32,16 +30,21 @@ public class SDI {
@GET
@Produces(MediaType.APPLICATION_JSON)
@JacksonFeatures(serializationEnable = { SerializationFeature.INDENT_OUTPUT })
public ScopeConfiguration getConfiguration(){
try {
ScopeConfiguration config=sdiManager.getContextConfiguration();
log.debug("Served Configuration");
return config;
}catch(Throwable t) {
log.error("Unable to serve get configuration");
throw new WebApplicationException("Unable to get configuration. Contact administrator.",t);
}
return sdiManager.getContextConfiguration();
}
@GET
@Produces({MediaType.APPLICATION_XML, MediaType.APPLICATION_JSON})
@JacksonFeatures(serializationEnable = { SerializationFeature.INDENT_OUTPUT })
@Path("status")
public HealthReport getReport() {
try{
@ -52,6 +55,24 @@ public class SDI {
}
}
public static final String SERVICE_CLASS_PARAM="service_class";
public static final String SERVICE_NAME_PARAM="service_name";
@GET
@Produces({MediaType.APPLICATION_XML, MediaType.APPLICATION_JSON})
@Path("profile/{"+SERVICE_CLASS_PARAM+"}/{"+SERVICE_NAME_PARAM+"}")
public ApplicationProfile getProfile(@PathParam(SERVICE_CLASS_PARAM) String serviceClass,
@PathParam(SERVICE_NAME_PARAM) String serviceName) {
try {
log.debug("Looking for Application Profile [SC :{} SN : {}]",serviceClass,serviceName);
throw new RuntimeException("Feature not yet available");
}catch(WebApplicationException e){
log.warn("Unable to serve request",e);
throw e;
}catch(Throwable e){
log.warn("Unable to serve request",e);
throw new WebApplicationException("Unable to serve request", e);
}
}
}

View File

@ -15,11 +15,10 @@ import org.gcube.spatial.data.sdi.SDIServiceManager;
import org.gcube.spatial.data.sdi.engine.ThreddsManager;
import org.gcube.spatial.data.sdi.utils.ScopeUtils;
import io.swagger.annotations.Api;
import lombok.extern.slf4j.Slf4j;
@Path("Thredds")
@Api(value="Thredds")
//@Api(value="Thredds")
@Slf4j
@ManagedBy(SDIServiceManager.class)
public class Thredds {
@ -34,7 +33,7 @@ public class Thredds {
@Inject
ThreddsManager threddsManager;
private ThreddsManager threddsManager;
@PUT

View File

@ -1,78 +0,0 @@
The gCube System - SDI Service
--------------------------------------------------
REST Interface towards SDI facilities
This software is part of the gCube Framework (https://www.gcube-system.org/): an
open-source software toolkit used for building and operating Hybrid Data
Infrastructures enabling the dynamic deployment of Virtual Research Environments
by favouring the realisation of reuse oriented policies.
The projects leading to this software have received funding from a series of
European Union programmes including:
* the Sixth Framework Programme for Research and Technological Development -
DILIGENT (grant no. 004260);
* the Seventh Framework Programme for research, technological development and
demonstration - D4Science (grant no. 212488), D4Science-II (grant no.
239019),ENVRI (grant no. 283465), EUBrazilOpenBio (grant no. 288754), iMarine
(grant no. 283644);
* the H2020 research and innovation programme - BlueBRIDGE (grant no. 675680),
EGIEngage (grant no. 654142), ENVRIplus (grant no. 654182), Parthenos (grant
no. 654119), SoBigData (grant no. 654024);
Version
--------------------------------------------------
1.1.0-SNAPSHOT (2017-06-19)
Please see the file named "changelog.xml" in this directory for the release notes.
Authors
--------------------------------------------------
* Fabio Sinibaldi (fabio.sinibaldi-AT-isti.cnr.it) Istituto di Scienza e Tecnologie dell'Informazione "A. Faedo" - CNR, Pisa (Italy).
Maintainers
-----------
* Fabio Sinibaldi (fabio.sinibaldi-AT-isti.cnr.it) Istituto di Scienza e Tecnologie dell'Informazione "A. Faedo" - CNR, Pisa (Italy).
Download information
--------------------------------------------------
Source code is available from SVN:
${scm.url}
Binaries can be downloaded from the gCube website:
https://www.gcube-system.org/
Installation
--------------------------------------------------
Installation documentation is available on-line in the gCube Wiki:
https://wiki.gcube-system.org/gcube/index.php/Data_Transfer_2
Documentation
--------------------------------------------------
Documentation is available on-line in the gCube Wiki:
https://wiki.gcube-system.org/gcube/index.php/Data_Transfer_2
https://wiki.gcube-system.org/gcube/index.php/How_to_use_Data_Transfer_2
Support
--------------------------------------------------
Bugs and support requests can be reported in the gCube issue tracking tool:
https://support.d4science.org/projects/gcube/
Licensing
--------------------------------------------------
This software is licensed under the terms you may find in the file named "LICENSE" in this directory.

View File

@ -1,9 +0,0 @@
<ReleaseNotes>
<Changeset component="sdi-service-1.0.0" date="2017-03-22">
<Change>First Release</Change>
</Changeset>
<Changeset component="sdi-service-1.1.0" date="2017-05-16">
<Change>Added GeoServer interface</Change>
<Change>Added Metadata interface</Change>
</Changeset>
</ReleaseNotes>

View File

@ -1,30 +0,0 @@
<assembly
xmlns="http://maven.apache.org/plugins/maven-assembly-plugin/assembly/1.1.0"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/plugins/maven-assembly-plugin/assembly/1.1.0 http://maven.apache.org/xsd/assembly-1.1.0.xsd">
<id>servicearchive</id>
<formats>
<format>tar.gz</format>
</formats>
<baseDirectory>/</baseDirectory>
<fileSets>
<fileSet>
<directory>/home/fabio/workspaces/trunk_workspace/sdi-service/distro</directory>
<outputDirectory>/</outputDirectory>
<useDefaultExcludes>true</useDefaultExcludes>
<includes>
<include>README</include>
<include>LICENSE</include>
<include>changelog.xml</include>
</includes>
<fileMode>755</fileMode>
<filtered>true</filtered>
</fileSet>
</fileSets>
<files>
<file>
<source>target/sdi-service.war</source>
<outputDirectory>/sdi-service</outputDirectory>
</file>
</files>
</assembly>

View File

@ -1,27 +0,0 @@
<?xml version="1.0" encoding="UTF-8"?>
<Resource xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
<ID />
<Type>Service</Type>
<Profile>
<Description>REST Interface towards SDI facilities</Description>
<Class>SDI</Class>
<Name>sdi-service</Name>
<Version>1.0.0</Version>
<Packages>
<Software>
<Name>sdi-service</Name>
<Version>1.1.0-SNAPSHOT</Version>
<MavenCoordinates>
<groupId>org.gcube.spatial.data</groupId>
<artifactId>sdi-service</artifactId>
<version>1.1.0-SNAPSHOT</version>
</MavenCoordinates>
<Files>
<File>sdi-service.jar</File>
</Files>
</Software>
</Packages>
</Profile>
</Resource>

View File

@ -84,7 +84,7 @@
<gmd:onLine>
<gmd:CI_OnlineResource>
<gmd:linkage>
<gmd:URL>http://${hostname}/thredds/dodsC/${cataloguedPath}</gmd:URL>
<gmd:URL>https://${hostname}/thredds/dodsC/${cataloguedPath}</gmd:URL>
</gmd:linkage>
<gmd:protocol>
<gco:CharacterString>WWW:LINK-1.0-http--link</gco:CharacterString>
@ -97,11 +97,28 @@
</gmd:description>
</gmd:CI_OnlineResource>
</gmd:onLine>
<gmd:onLine>
<gmd:CI_OnlineResource>
<gmd:linkage>
<gmd:URL>https://${hostname}/thredds/dodsC/${cataloguedPath}.html</gmd:URL>
</gmd:linkage>
<gmd:protocol>
<gco:CharacterString>WWW:LINK-1.0-http--link</gco:CharacterString>
</gmd:protocol>
<gmd:name>
<gco:CharacterString>${layername} : OPeNDAP THREDDS GUI</gco:CharacterString>
</gmd:name>
<gmd:description>
<gco:CharacterString>GIS data (OPenNDAP)</gco:CharacterString>
</gmd:description>
</gmd:CI_OnlineResource>
</gmd:onLine>
<gmd:onLine>
<gmd:CI_OnlineResource>
<gmd:linkage>
<gmd:URL>http://${hostname}/thredds/ncss/${cataloguedPath}</gmd:URL>
<gmd:URL>https://${hostname}/thredds/ncss/${cataloguedPath}</gmd:URL>
</gmd:linkage>
<gmd:protocol>
<gco:CharacterString>WWW:LINK-1.0-http--link</gco:CharacterString>
@ -118,7 +135,7 @@
<gmd:onLine>
<gmd:CI_OnlineResource>
<gmd:linkage>
<gmd:URL>http://${hostname}/thredds/wcs/${cataloguedPath}?service=wcs&amp;version=1.0.0&amp;request=GetCoverage&amp;coverage=${layername}&amp;CRS=EPSG:4326&amp;format=geotiff</gmd:URL>
<gmd:URL>https://${hostname}/thredds/wcs/${cataloguedPath}?service=wcs&amp;version=1.0.0&amp;request=GetCoverage&amp;coverage=${layername}&amp;CRS=EPSG:4326&amp;format=geotiff</gmd:URL>
</gmd:linkage>
<gmd:protocol>
<gco:CharacterString>OGC:WCS-1.0.0-http-get-coverage</gco:CharacterString>
@ -135,7 +152,7 @@
<gmd:onLine>
<gmd:CI_OnlineResource>
<gmd:linkage>
<gmd:URL>http://${hostname}/thredds/wms/${cataloguedPath}</gmd:URL>
<gmd:URL>https://${hostname}/thredds/wms/${cataloguedPath}</gmd:URL>
</gmd:linkage>
<gmd:protocol>
<gco:CharacterString>OGC:WMS-1.3.0-http-get-map</gco:CharacterString>
@ -152,7 +169,7 @@
<gmd:onLine>
<gmd:CI_OnlineResource>
<gmd:linkage>
<gmd:URL>http://${hostname}/thredds/fileServer/${cataloguedPath}</gmd:URL>
<gmd:URL>https://${hostname}/thredds/fileServer/${cataloguedPath}</gmd:URL>
</gmd:linkage>
<gmd:protocol>
<gco:CharacterString>WWW:LINK-1.0-http--link</gco:CharacterString>
@ -169,7 +186,7 @@
<gmd:onLine>
<gmd:CI_OnlineResource>
<gmd:linkage>
<gmd:URL>http://${hostname}/thredds/ncml/${cataloguedPath}</gmd:URL>
<gmd:URL>https://${hostname}/thredds/ncml/${cataloguedPath}</gmd:URL>
</gmd:linkage>
<gmd:protocol>
<gco:CharacterString>WWW:LINK-1.0-http--link</gco:CharacterString>
@ -187,7 +204,7 @@
<gmd:onLine>
<gmd:CI_OnlineResource>
<gmd:linkage>
<gmd:URL>http://${hostname}/thredds/uddc/${cataloguedPath}</gmd:URL>
<gmd:URL>https://${hostname}/thredds/uddc/${cataloguedPath}</gmd:URL>
</gmd:linkage>
<gmd:protocol>
<gco:CharacterString>WWW:LINK-1.0-http--link</gco:CharacterString>

View File

@ -12,14 +12,13 @@ import org.gcube.spatial.data.sdi.LocalConfiguration;
import org.gcube.spatial.data.sdi.SDIService;
import org.gcube.spatial.data.sdi.engine.GISManager;
import org.gcube.spatial.data.sdi.engine.GeoNetworkManager;
import org.gcube.spatial.data.sdi.engine.TemplateManager;
import org.gcube.spatial.data.sdi.engine.RoleManager;
import org.gcube.spatial.data.sdi.engine.SDIManager;
import org.gcube.spatial.data.sdi.engine.TemplateManager;
import org.gcube.spatial.data.sdi.engine.TemporaryPersistence;
import org.gcube.spatial.data.sdi.engine.ThreddsManager;
import org.gcube.spatial.data.sdi.model.ServiceConstants;
import org.gcube.spatial.data.sdi.model.metadata.TemplateDescriptor;
import org.gcube.spatial.data.sdi.rest.GeoNetwork;
import org.gcube.spatial.data.sdi.test.factories.GISManagerFactory;
import org.gcube.spatial.data.sdi.test.factories.GeoNetworkManagerFactory;
import org.gcube.spatial.data.sdi.test.factories.MetadataTemplateManagerFactory;
@ -34,8 +33,6 @@ import org.glassfish.jersey.test.JerseyTest;
import org.junit.BeforeClass;
import org.junit.Test;
import io.swagger.jaxrs.config.BeanConfig;
public class MainTest extends JerseyTest{
@BeforeClass
@ -69,22 +66,22 @@ public class MainTest extends JerseyTest{
ResourceConfig config= new ResourceConfig(SDIService.class);
config.register(new MyBinder());
config.register(io.swagger.jaxrs.listing.ApiListingResource.class);
config.register(io.swagger.jaxrs.listing.SwaggerSerializers.class);
// config.register(io.swagger.jaxrs.listing.ApiListingResource.class);
// config.register(io.swagger.jaxrs.listing.SwaggerSerializers.class);
//
// //SWAGGER
BeanConfig beanConfig = new BeanConfig();
beanConfig.setVersion("1.0.0");
beanConfig.setSchemes(new String[]{"http","https"});
beanConfig.setHost("localhost:9998");
beanConfig.setBasePath("gcube/service");
String packageName=GeoNetwork.class.getPackage().getName();
System.out.println("PACKAGE : "+packageName);
beanConfig.setResourcePackage(packageName);
beanConfig.setScan(true);
System.out.println(beanConfig.getSwagger());
// BeanConfig beanConfig = new BeanConfig();
// beanConfig.setVersion("1.0.0");
// beanConfig.setSchemes(new String[]{"http","https"});
// beanConfig.setHost("localhost:9998");
// beanConfig.setBasePath("gcube/service");
// String packageName=GeoNetwork.class.getPackage().getName();
// System.out.println("PACKAGE : "+packageName);
// beanConfig.setResourcePackage(packageName);
// beanConfig.setScan(true);
// System.out.println(beanConfig.getSwagger());
//
//
//Multipart
// config.packages("org.glassfish.jersey.media.multipart");
@ -113,7 +110,7 @@ public class MainTest extends JerseyTest{
//
@Test
public void getGeoServer(){
System.out.println(target(ServiceConstants.GeoServer.INTERFACE).path("configuration/geoserver1-spatial-dev.d4science.org").request(MediaType.APPLICATION_JSON_TYPE).get(String.class));
System.out.println(target(ServiceConstants.GeoServer.INTERFACE).path("configuration/geoserver1.dev.d4science.org").request(MediaType.APPLICATION_JSON_TYPE).get(String.class));
}
@Test