Merged repositories

sg-core-3
Fabio Sinibaldi 3 years ago
parent 2a1c5adb16
commit a7de8e61c3

@ -0,0 +1,6 @@
This project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
# Changelog for org.gcube.spatial.data.gcube-sdi-suite
## [v1.0.0-SNAPSHOT] - 2021-2-11
First release

@ -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);

@ -0,0 +1,312 @@
# European Union Public Licence V. 1.1
EUPL © the European Community 2007
This European Union Public Licence (the “EUPL”) applies to the Work or Software
(as defined below) which is provided under the terms of this Licence. Any use of
the Work, other than as authorised under this Licence is prohibited (to the
extent such use is covered by a right of the copyright holder of the Work).
The Original Work is provided under the terms of this Licence when the Licensor
(as defined below) has placed the following notice immediately following the
copyright notice for the Original Work:
Licensed under the EUPL V.1.1
or has expressed by any other mean his willingness to license under the EUPL.
## 1. Definitions
In this Licence, the following terms have the following meaning:
- The Licence: this Licence.
- The Original Work or the Software: the software distributed and/or
communicated by the Licensor under this Licence, available as Source Code and
also as Executable Code as the case may be.
- Derivative Works: the works or software that could be created by the Licensee,
based upon the Original Work or modifications thereof. This Licence does not
define the extent of modification or dependence on the Original Work required
in order to classify a work as a Derivative Work; this extent is determined by
copyright law applicable in the country mentioned in Article 15.
- The Work: the Original Work and/or its Derivative Works.
- The Source Code: the human-readable form of the Work which is the most
convenient for people to study and modify.
- The Executable Code: any code which has generally been compiled and which is
meant to be interpreted by a computer as a program.
- The Licensor: the natural or legal person that distributes and/or communicates
the Work under the Licence.
- Contributor(s): any natural or legal person who modifies the Work under the
Licence, or otherwise contributes to the creation of a Derivative Work.
- The Licensee or “You”: any natural or legal person who makes any usage of the
Software under the terms of the Licence.
- Distribution and/or Communication: any act of selling, giving, lending,
renting, distributing, communicating, transmitting, or otherwise making
available, on-line or off-line, copies of the Work or providing access to its
essential functionalities at the disposal of any other natural or legal
person.
## 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
in the Original Work:
- use the Work in any circumstance and for all usage, reproduce the Work, modify
- the Original Work, and make Derivative Works based upon the Work, communicate
- to the public, including the right to make available or display the Work or
- copies thereof to the public and perform publicly, as the case may be, the
- Work, distribute the Work or copies thereof, lend and rent the Work or copies
- thereof, sub-license rights in the Work or copies thereof.
Those rights can be exercised on any media, supports and formats, whether now
known or later invented, as far as the applicable law permits so.
In the countries where moral rights apply, the Licensor waives his right to
exercise his moral right to the extent allowed by law in order to make effective
the licence of the economic rights here above listed.
The Licensor grants to the Licensee royalty-free, non exclusive usage rights to
any patents held by the Licensor, to the extent necessary to make use of the
rights granted on the Work under this Licence.
## 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
provides in addition a machine-readable copy of the Source Code of the Work
along with each copy of the Work that the Licensor distributes or indicates, in
a notice following the copyright notice attached to the Work, a repository where
the Source Code is easily and freely accessible for as long as the Licensor
continues to distribute and/or communicate the Work.
## 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
Original Work or Software, of the exhaustion of those rights or of other
applicable limitations thereto.
## 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:
Attribution right: the Licensee shall keep intact all copyright, patent or
trademarks notices and all notices that refer to the Licence and to the
disclaimer of warranties. The Licensee must include a copy of such notices and a
copy of the Licence with every copy of the Work he/she distributes and/or
communicates. The Licensee must cause any Derivative Work to carry prominent
notices stating that the Work has been modified and the date of modification.
Copyleft clause: If the Licensee distributes and/or communicates copies of the
Original Works or Derivative Works based upon the Original Work, this
Distribution and/or Communication will be done under the terms of this Licence
or of a later version of this Licence unless the Original Work is expressly
distributed only under this version of the Licence. The Licensee (becoming
Licensor) cannot offer or impose any additional terms or conditions on the Work
or Derivative Work that alter or restrict the terms of the Licence.
Compatibility clause: If the Licensee Distributes and/or Communicates Derivative
Works or copies thereof based upon both the Original Work and another work
licensed under a Compatible Licence, this Distribution and/or Communication can
be done under the terms of this Compatible Licence. For the sake of this clause,
“Compatible Licence” refers to the licences listed in the appendix attached to
this Licence. Should the Licensees obligations under the Compatible Licence
conflict with his/her obligations under this Licence, the obligations of the
Compatible Licence shall prevail.
Provision of Source Code: When distributing and/or communicating copies of the
Work, the Licensee will provide a machine-readable copy of the Source Code or
indicate a repository where this Source will be easily and freely available for
as long as the Licensee continues to distribute and/or communicate the Work.
Legal Protection: This Licence does not grant permission to use the trade names,
trademarks, service marks, or names of the Licensor, except as required for
reasonable and customary use in describing the origin of the Work and
reproducing the content of the copyright notice.
## 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
power and authority to grant the Licence.
Each Contributor warrants that the copyright in the modifications he/she brings
to the Work are owned by him/her or licensed to him/her and that he/she has the
power and authority to grant the Licence.
Each time You accept the Licence, the original Licensor and subsequent
Contributors grant You a licence to their contributions to the Work, under the
terms of this Licence.
## 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
“bugs” inherent to this type of software development.
For the above reason, the Work is provided under the Licence on an “as is” basis
and without warranties of any kind concerning the Work, including without
limitation merchantability, fitness for a particular purpose, absence of defects
or errors, accuracy, non-infringement of intellectual property rights other than
copyright as stated in Article 6 of this Licence.
This disclaimer of warranty is an essential part of the Licence and a condition
for the grant of any rights to the Work.
## 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,
material or moral, damages of any kind, arising out of the Licence or of the use
of the Work, including without limitation, damages for loss of goodwill, work
stoppage, computer failure or malfunction, loss of data or any commercial
damage, even if the Licensor has been advised of the possibility of such
damage. However, the Licensor will be liable under statutory product liability
laws as far such laws apply to the Work.
## 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
support, warranty, indemnity, or other liability obligations and/or services
consistent with this Licence. However, in accepting such obligations, You may
act only on your own behalf and on your sole responsibility, not on behalf of
the original Licensor or any other Contributor, and only if You agree to
indemnify, defend, and hold each Contributor harmless for any liability incurred
by, or claims asserted against such Contributor by the fact You have accepted
any such warranty or additional liability.
## 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
affirming consent in any other similar way, in accordance with the rules of
applicable law. Clicking on that icon indicates your clear and irrevocable
acceptance of this Licence and all of its terms and conditions.
Similarly, you irrevocably accept this Licence and all of its terms and
conditions by exercising any rights granted to You by Article 2 of this Licence,
such as the use of the Work, the creation by You of a Derivative Work or the
Distribution and/or Communication by You of the Work or copies thereof.
## 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
from a remote location) the distribution channel or media (for example, a
website) must at least provide to the public the information requested by the
applicable law regarding the Licensor, the Licence and the way it may be
accessible, concluded, stored and reproduced by the Licensee.
## 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.
Such a termination will not terminate the licences of any person who has
received the Work from the Licensee under the Licence, provided such persons
remain in full compliance with the Licence.
## 13. Miscellaneous
Without prejudice of Article 9 above, the Licence represents the complete
agreement between the Parties as to the Work licensed hereunder.
If any provision of the Licence is invalid or unenforceable under applicable
law, this will not affect the validity or enforceability of the Licence as a
whole. Such provision will be construed and/or reformed so as necessary to make
it valid and enforceable.
The European Commission may publish other linguistic versions and/or new
versions of this Licence, so far this is required and reasonable, without
reducing the scope of the rights granted by the Licence. New versions of the
Licence will be published with a unique version number.
All linguistic versions of this Licence, approved by the European Commission,
have identical value. Parties can take advantage of the linguistic version of
their choice.
## 14. Jurisdiction
Any litigation resulting from the interpretation of this License, arising
between the European Commission, as a Licensor, and any Licensee, will be
subject to the jurisdiction of the Court of Justice of the European Communities,
as laid down in article 238 of the Treaty establishing the European Community.
Any litigation arising between Parties, other than the European Commission, and
resulting from the interpretation of this License, will be subject to the
exclusive jurisdiction of the competent court where the Licensor resides or
conducts its primary business.
## 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.
This licence shall be governed by the Belgian law if:
- a litigation arises between the European Commission, as a Licensor, and any
- Licensee; the Licensor, other than the European Commission, has no residence
- or registered office inside a European Union country.
## Appendix
“Compatible Licences” according to article 5 EUPL are:
- GNU General Public License (GNU GPL) v. 2
- Open Software License (OSL) v. 2.1, v. 3.0
- Common Public License v. 1.0
- Eclipse Public License v. 1.0
- Cecill v. 2.0

@ -1,2 +1,52 @@
# gcube-cms-suite
gCube CMS Suite
--------------------------------------------------
gCube CMS Suite is a set of components designed to manage complex space-temporal Documents defined by metadata Profiles.
## Built with
* [gCube SmartGears] (https://gcube.wiki.gcube-system.org/gcube/SmartGears) - The gCube SmartGears framework
* [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/GeoPortal_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);

@ -0,0 +1,27 @@
This project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
# Changelog for org.gcube.application.geoportal-client
## [v1.0.5-SNAPSHOT] - 2021-09-20
Refactored repositories
## [v1.0.4-SNAPSHOT] - 2020-11-11
Serialization utils
Queries & Filters support
Test Reports
UseCases
Fixes #21897
## [v1.0.3] - 2020-11-11
Stateful Concessioni Manager client over mongo
## [v1.0.2] - 2020-11-11
Fixed dulicate dependency declaration
## [v1.0.1] - 2020-11-11
Excluded common-calls 1.2.0
## [v1.0.0] - 2020-11-11
First release

@ -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);

@ -0,0 +1,312 @@
# European Union Public Licence V. 1.1
EUPL © the European Community 2007
This European Union Public Licence (the “EUPL”) applies to the Work or Software
(as defined below) which is provided under the terms of this Licence. Any use of
the Work, other than as authorised under this Licence is prohibited (to the
extent such use is covered by a right of the copyright holder of the Work).
The Original Work is provided under the terms of this Licence when the Licensor
(as defined below) has placed the following notice immediately following the
copyright notice for the Original Work:
Licensed under the EUPL V.1.1
or has expressed by any other mean his willingness to license under the EUPL.
## 1. Definitions
In this Licence, the following terms have the following meaning:
- The Licence: this Licence.
- The Original Work or the Software: the software distributed and/or
communicated by the Licensor under this Licence, available as Source Code and
also as Executable Code as the case may be.
- Derivative Works: the works or software that could be created by the Licensee,
based upon the Original Work or modifications thereof. This Licence does not
define the extent of modification or dependence on the Original Work required
in order to classify a work as a Derivative Work; this extent is determined by
copyright law applicable in the country mentioned in Article 15.
- The Work: the Original Work and/or its Derivative Works.
- The Source Code: the human-readable form of the Work which is the most
convenient for people to study and modify.
- The Executable Code: any code which has generally been compiled and which is
meant to be interpreted by a computer as a program.
- The Licensor: the natural or legal person that distributes and/or communicates
the Work under the Licence.
- Contributor(s): any natural or legal person who modifies the Work under the
Licence, or otherwise contributes to the creation of a Derivative Work.
- The Licensee or “You”: any natural or legal person who makes any usage of the
Software under the terms of the Licence.
- Distribution and/or Communication: any act of selling, giving, lending,
renting, distributing, communicating, transmitting, or otherwise making
available, on-line or off-line, copies of the Work or providing access to its
essential functionalities at the disposal of any other natural or legal
person.
## 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
in the Original Work:
- use the Work in any circumstance and for all usage, reproduce the Work, modify
- the Original Work, and make Derivative Works based upon the Work, communicate
- to the public, including the right to make available or display the Work or
- copies thereof to the public and perform publicly, as the case may be, the
- Work, distribute the Work or copies thereof, lend and rent the Work or copies
- thereof, sub-license rights in the Work or copies thereof.
Those rights can be exercised on any media, supports and formats, whether now
known or later invented, as far as the applicable law permits so.
In the countries where moral rights apply, the Licensor waives his right to
exercise his moral right to the extent allowed by law in order to make effective
the licence of the economic rights here above listed.
The Licensor grants to the Licensee royalty-free, non exclusive usage rights to
any patents held by the Licensor, to the extent necessary to make use of the
rights granted on the Work under this Licence.
## 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
provides in addition a machine-readable copy of the Source Code of the Work
along with each copy of the Work that the Licensor distributes or indicates, in
a notice following the copyright notice attached to the Work, a repository where
the Source Code is easily and freely accessible for as long as the Licensor
continues to distribute and/or communicate the Work.
## 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
Original Work or Software, of the exhaustion of those rights or of other
applicable limitations thereto.
## 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:
Attribution right: the Licensee shall keep intact all copyright, patent or
trademarks notices and all notices that refer to the Licence and to the
disclaimer of warranties. The Licensee must include a copy of such notices and a
copy of the Licence with every copy of the Work he/she distributes and/or
communicates. The Licensee must cause any Derivative Work to carry prominent
notices stating that the Work has been modified and the date of modification.
Copyleft clause: If the Licensee distributes and/or communicates copies of the
Original Works or Derivative Works based upon the Original Work, this
Distribution and/or Communication will be done under the terms of this Licence
or of a later version of this Licence unless the Original Work is expressly
distributed only under this version of the Licence. The Licensee (becoming
Licensor) cannot offer or impose any additional terms or conditions on the Work
or Derivative Work that alter or restrict the terms of the Licence.
Compatibility clause: If the Licensee Distributes and/or Communicates Derivative
Works or copies thereof based upon both the Original Work and another work
licensed under a Compatible Licence, this Distribution and/or Communication can
be done under the terms of this Compatible Licence. For the sake of this clause,
“Compatible Licence” refers to the licences listed in the appendix attached to
this Licence. Should the Licensees obligations under the Compatible Licence
conflict with his/her obligations under this Licence, the obligations of the
Compatible Licence shall prevail.
Provision of Source Code: When distributing and/or communicating copies of the
Work, the Licensee will provide a machine-readable copy of the Source Code or
indicate a repository where this Source will be easily and freely available for
as long as the Licensee continues to distribute and/or communicate the Work.
Legal Protection: This Licence does not grant permission to use the trade names,
trademarks, service marks, or names of the Licensor, except as required for
reasonable and customary use in describing the origin of the Work and
reproducing the content of the copyright notice.
## 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
power and authority to grant the Licence.
Each Contributor warrants that the copyright in the modifications he/she brings
to the Work are owned by him/her or licensed to him/her and that he/she has the
power and authority to grant the Licence.
Each time You accept the Licence, the original Licensor and subsequent
Contributors grant You a licence to their contributions to the Work, under the
terms of this Licence.
## 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
“bugs” inherent to this type of software development.
For the above reason, the Work is provided under the Licence on an “as is” basis
and without warranties of any kind concerning the Work, including without
limitation merchantability, fitness for a particular purpose, absence of defects
or errors, accuracy, non-infringement of intellectual property rights other than
copyright as stated in Article 6 of this Licence.
This disclaimer of warranty is an essential part of the Licence and a condition
for the grant of any rights to the Work.
## 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,
material or moral, damages of any kind, arising out of the Licence or of the use
of the Work, including without limitation, damages for loss of goodwill, work
stoppage, computer failure or malfunction, loss of data or any commercial
damage, even if the Licensor has been advised of the possibility of such
damage. However, the Licensor will be liable under statutory product liability
laws as far such laws apply to the Work.
## 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
support, warranty, indemnity, or other liability obligations and/or services
consistent with this Licence. However, in accepting such obligations, You may
act only on your own behalf and on your sole responsibility, not on behalf of
the original Licensor or any other Contributor, and only if You agree to
indemnify, defend, and hold each Contributor harmless for any liability incurred
by, or claims asserted against such Contributor by the fact You have accepted
any such warranty or additional liability.
## 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
affirming consent in any other similar way, in accordance with the rules of
applicable law. Clicking on that icon indicates your clear and irrevocable
acceptance of this Licence and all of its terms and conditions.
Similarly, you irrevocably accept this Licence and all of its terms and
conditions by exercising any rights granted to You by Article 2 of this Licence,
such as the use of the Work, the creation by You of a Derivative Work or the
Distribution and/or Communication by You of the Work or copies thereof.
## 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
from a remote location) the distribution channel or media (for example, a
website) must at least provide to the public the information requested by the
applicable law regarding the Licensor, the Licence and the way it may be
accessible, concluded, stored and reproduced by the Licensee.
## 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.
Such a termination will not terminate the licences of any person who has
received the Work from the Licensee under the Licence, provided such persons
remain in full compliance with the Licence.
## 13. Miscellaneous
Without prejudice of Article 9 above, the Licence represents the complete
agreement between the Parties as to the Work licensed hereunder.
If any provision of the Licence is invalid or unenforceable under applicable
law, this will not affect the validity or enforceability of the Licence as a
whole. Such provision will be construed and/or reformed so as necessary to make
it valid and enforceable.
The European Commission may publish other linguistic versions and/or new
versions of this Licence, so far this is required and reasonable, without
reducing the scope of the rights granted by the Licence. New versions of the
Licence will be published with a unique version number.
All linguistic versions of this Licence, approved by the European Commission,
have identical value. Parties can take advantage of the linguistic version of
their choice.
## 14. Jurisdiction
Any litigation resulting from the interpretation of this License, arising
between the European Commission, as a Licensor, and any Licensee, will be
subject to the jurisdiction of the Court of Justice of the European Communities,
as laid down in article 238 of the Treaty establishing the European Community.
Any litigation arising between Parties, other than the European Commission, and
resulting from the interpretation of this License, will be subject to the
exclusive jurisdiction of the competent court where the Licensor resides or
conducts its primary business.
## 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.
This licence shall be governed by the Belgian law if:
- a litigation arises between the European Commission, as a Licensor, and any
- Licensee; the Licensor, other than the European Commission, has no residence
- or registered office inside a European Union country.
## Appendix
“Compatible Licences” according to article 5 EUPL are:
- GNU General Public License (GNU GPL) v. 2
- Open Software License (OSL) v. 2.1, v. 3.0
- Common Public License v. 1.0
- Eclipse Public License v. 1.0
- Cecill v. 2.0

@ -0,0 +1,50 @@
GeoPortal - Client
--------------------------------------------------
GeoPortal - Client is the java library wrapping Geoportal REST Service
## Built with
* [Maven](https://maven.apache.org/) - Dependency Management
## Documentation
Documentation can be found [here](https://gcube.wiki.gcube-system.org/gcube/GeoPortal).
## 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);

@ -0,0 +1,139 @@
<project xmlns="http://maven.apache.org/POM/4.0.0"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion>
<groupId>org.gcube.application</groupId>
<artifactId>geoportal-client</artifactId>
<version>1.0.5-SNAPSHOT</version>
<name>Geoportal Client</name>
<parent>
<groupId>org.gcube.application.cms</groupId>
<artifactId>gcube-cms-suite</artifactId>
<version>1.0.0-SNAPSHOT</version>
</parent>
<properties>
<gitBaseUrl>https://code-repo.d4science.org/gCubeSystem</gitBaseUrl>
<sis.version>1.0</sis.version>
</properties>
<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>gcube-bom</artifactId>
<version>2.0.1</version>
<type>pom</type>
<scope>import</scope>
</dependency>
<dependency>
<groupId>org.gcube.distribution</groupId>
<artifactId>gcube-smartgears-bom</artifactId>
<version>2.1.0</version>
<type>pom</type>
<scope>test</scope>
</dependency>
</dependencies>
</dependencyManagement>
<dependencies>
<dependency>
<groupId>org.projectlombok</groupId>
<artifactId>lombok</artifactId>
<version>1.14.8</version>
</dependency>
<dependency>
<groupId>org.gcube.application</groupId>
<artifactId>geoportal-common</artifactId>
<version>[1.0.0,2.0.0)</version>
</dependency>
<dependency>
<groupId>org.gcube.core</groupId>
<artifactId>common-fw-clients</artifactId>
</dependency>
<dependency>
<groupId>org.gcube.core</groupId>
<artifactId>common-generic-clients</artifactId>
</dependency>
<dependency>
<groupId>org.gcube.common</groupId>
<artifactId>common-jaxrs-client</artifactId>
<version>[1.0.0,2.0.0)</version>
</dependency>
<!-- TEST -->
<dependency>
<groupId>junit</groupId>
<artifactId>junit</artifactId>
<scope>test</scope>
<version>4.11</version>
</dependency>
<!-- Storage HUB -->
<dependency>
<groupId>org.gcube.common</groupId>
<artifactId>storagehub-client-library</artifactId>
<version>[1.0.0,2.0.0-SNAPSHOT)</version>
</dependency>
<!-- Client for legacy -->
<!-- jackson java time -->
<dependency>
<groupId>com.fasterxml.jackson.datatype</groupId>
<artifactId>jackson-datatype-jsr310</artifactId>
<version>2.8.8</version>
</dependency>
<dependency>
<groupId>org.glassfish.jersey.media</groupId>
<artifactId>jersey-media-json-jackson</artifactId>
</dependency>
<dependency>
<groupId>ch.qos.logback</groupId>
<artifactId>logback-classic</artifactId>
<scope>test</scope>
</dependency>
<dependency>
<groupId>com.opencsv</groupId>
<artifactId>opencsv</artifactId>
<version>3.9</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>com.github.cliftonlabs</groupId>
<artifactId>json-simple</artifactId>
<version>3.1.0</version>
<scope>test</scope>
</dependency>
</dependencies>
</project>

@ -0,0 +1,218 @@
package org.gcube.application.geoportal.client;
import com.fasterxml.jackson.databind.ObjectMapper;
import lombok.NonNull;
import lombok.RequiredArgsConstructor;
import lombok.extern.slf4j.Slf4j;
import org.gcube.application.geoportal.client.utils.Serialization;
import org.gcube.application.geoportal.common.model.legacy.Concessione;
import org.gcube.application.geoportal.common.model.rest.AddSectionToConcessioneRequest;
import org.gcube.application.geoportal.common.model.rest.Configuration;
import org.gcube.application.geoportal.common.model.rest.QueryRequest;
import org.gcube.application.geoportal.common.rest.InterfaceConstants;
import org.gcube.application.geoportal.common.rest.MongoConcessioni;
import org.gcube.common.clients.Call;
import org.gcube.common.clients.delegates.ProxyDelegate;
import javax.ws.rs.client.Entity;
import javax.ws.rs.client.WebTarget;
import javax.ws.rs.core.MediaType;
import javax.ws.rs.core.Response;
import java.io.IOException;
import java.io.InputStream;
import java.rmi.RemoteException;
import java.util.Iterator;
@RequiredArgsConstructor
@Slf4j
public class DefaultMongoConcessioni implements MongoConcessioni{
@NonNull
private final ProxyDelegate<WebTarget> delegate;
private final ObjectMapper mapper=Serialization.mapper;
@Override
public Concessione createNew(Concessione c) throws Exception {
log.debug("Serializing {} ",c);
final String serialized=mapper.writeValueAsString(c);
Call<WebTarget,Concessione> call= endpoint -> {
Response resp= endpoint.request(MediaType.APPLICATION_JSON).post(Entity.entity(serialized, MediaType.APPLICATION_JSON));
return check(resp,Concessione.class);
};
Concessione toReturn = delegate.make(call);
log.info("Registered {}",toReturn);
return toReturn;
}
@Override
public void deleteById(String id) throws Exception {
deleteById(id,false);
}
@Override
public void deleteById(String id,Boolean force) throws Exception {
log.debug("Deleting by id {}",id);
delegate.make((Call<WebTarget, String>) endpoint -> {
check(endpoint.path(id).queryParam(InterfaceConstants.Parameters.FORCE,force).request(MediaType.APPLICATION_JSON).delete(),null);
log.info("Deleted by id {}",id);
return null;
});
}
@Override
public Concessione getById(String id) throws Exception {
log.debug("Loading by id {}",id);
Call<WebTarget,Concessione> call= endpoint -> {
Response resp= endpoint.path(id).request(MediaType.APPLICATION_JSON).get();
return check(resp,Concessione.class);
};
Concessione toReturn = delegate.make(call);
log.debug("Loaded {}",toReturn);
return toReturn;
}
@Override
public Iterator<Concessione> getList() throws Exception {
log.debug("Getting list");
Call<WebTarget,Iterator<Concessione>> call= endpoint -> mapper.readerFor(Concessione.class).readValues(
endpoint.request(MediaType.APPLICATION_JSON).get(InputStream.class));
return delegate.make(call);
}
@Override
public Concessione publish(String id) throws Exception {
log.info("Publishing {} ",id);
Call<WebTarget,Concessione> call= endpoint -> {
Response resp= endpoint.path(InterfaceConstants.Methods.PUBLISH_PATH).
path(id).request(MediaType.APPLICATION_JSON).put(Entity.entity(id, MediaType.APPLICATION_JSON));
return check(resp,Concessione.class);
};
Concessione toReturn = delegate.make(call);
log.debug("Published {} ",toReturn);
return toReturn;
}
@Override
public void unPublish(String id) throws Exception {
log.info("Publishing {} ",id);
Call<WebTarget,Concessione> call= endpoint -> {
Response resp= endpoint.path(InterfaceConstants.Methods.PUBLISH_PATH).
path(id).request(MediaType.APPLICATION_JSON).delete();
check(resp,null);
return null;
};
delegate.make(call);
log.debug("UnPublished {} ",id);
}
@Override
public Configuration getCurrentConfiguration() throws Exception {
return delegate.make(webTarget -> check(webTarget.path(InterfaceConstants.Methods.CONFIGURATION_PATH).
request(MediaType.APPLICATION_JSON).get(),Configuration.class));
}
@Override
public Iterator<Concessione> search(String s) throws Exception {
log.debug("Searching for {}",s);
Call<WebTarget,Iterator<Concessione>> call= endpoint -> {
Response resp =endpoint.path(InterfaceConstants.Methods.SEARCH_PATH).request(MediaType.APPLICATION_JSON).
post(Entity.entity(s,MediaType.APPLICATION_JSON));
return checkCollection(resp,Concessione.class);
};
return delegate.make(call);
}
@Override
public Iterator<Concessione> query(QueryRequest queryRequest) throws Exception {
log.debug("Querying for {}",queryRequest);
return queryForType(queryRequest,Concessione.class);
}
@Override
public String queryForJSON(QueryRequest queryRequest) throws Exception {
return null;
}
@Override
public <T> Iterator<T> queryForType(QueryRequest queryRequest, Class<T> aClass) throws Exception {
log.debug("Querying for {}",queryRequest);
Call<WebTarget, Iterator<T>> call= endpoint -> {
Response resp =endpoint.path(InterfaceConstants.Methods.QUERY_PATH).request(MediaType.APPLICATION_JSON).
post(Entity.entity(queryRequest,MediaType.APPLICATION_JSON));
return checkCollection(resp,aClass);
};
return delegate.make(call);
}
@Override
public Concessione registerFileSet(String id, AddSectionToConcessioneRequest request) throws Exception {
log.info("Registering {} in {}",request,id);
Call<WebTarget,Concessione> call= endpoint -> {
Response resp= endpoint.path(InterfaceConstants.Methods.REGISTER_FILES_PATH).
path(id).request(MediaType.APPLICATION_JSON).post(Entity.entity(mapper.writeValueAsString(request),
MediaType.APPLICATION_JSON));
return check(resp,Concessione.class);
};
Concessione toReturn = delegate.make(call);
log.debug("Registered Fileset {} result is {} ",request,toReturn);
return toReturn;
}
@Override
public Concessione cleanFileSet(String id, String path)throws Exception{
log.info("Cleaning Fileset at {} in {}",path,id);
Call<WebTarget,Concessione> call= endpoint -> {
Response resp= endpoint.path(InterfaceConstants.Methods.DELETE_FILES_PATH).
path(id).request(MediaType.APPLICATION_JSON).post(Entity.entity(path,
MediaType.APPLICATION_JSON));
return check(resp,Concessione.class);
};
Concessione toReturn = delegate.make(call);
log.debug("Cleaned path {} result {} ",path,toReturn);
return toReturn;
}
@Override
public Concessione update(String id, String jsonUpdate) throws Exception {
throw new Exception("To implement");
}
@Override
public Concessione replace(Concessione replacement) throws Exception {
log.info("Replacing {}",replacement);
Call<WebTarget,Concessione> call= endpoint -> {
Response resp= endpoint.
request(MediaType.APPLICATION_JSON).
put(Entity.entity(mapper.writeValueAsString(replacement),
MediaType.APPLICATION_JSON));
return check(resp,Concessione.class);
};
Concessione toReturn = delegate.make(call);
log.debug("Reloaded {} ",toReturn);
return toReturn;
}
protected static<T> T check(Response resp, Class<T> clazz) throws IOException {
String resString=resp.readEntity(String.class);
if(resp.getStatus()<200||resp.getStatus()>=300)
throw new RemoteException("RESP STATUS IS "+resp.getStatus()+". Message : "+resString);
System.out.println("Resp String is "+resString);
if(clazz!=null)
return Serialization.read(resString, clazz);
else return null;
}
protected static<T> Iterator<T> checkCollection(Response resp, Class<T> clazz) throws IOException {
if(resp.getStatus()<200||resp.getStatus()>=300)
throw new RemoteException("RESP STATUS IS "+resp.getStatus()+". Message : "+resp.readEntity(String.class));
if(clazz!=null)
return Serialization.readCollection((InputStream) resp.getEntity(), clazz);
else return null;
}
}

@ -0,0 +1,93 @@
package org.gcube.application.geoportal.client;
import java.rmi.RemoteException;
import java.util.Iterator;
import javax.ws.rs.client.WebTarget;
import javax.ws.rs.core.MediaType;
import org.gcube.application.geoportal.common.model.project.Project;
import org.gcube.application.geoportal.common.rest.ProjectsI;
import org.gcube.common.clients.Call;
import org.gcube.common.clients.delegates.ProxyDelegate;
import lombok.NonNull;
import lombok.RequiredArgsConstructor;
@RequiredArgsConstructor
public class DefaultProjects implements ProjectsI{
@NonNull
private final ProxyDelegate<WebTarget> delegate;
@Override
public void deleteById(String profileId, String projectId) throws RemoteException {
deleteById(profileId,projectId,false);
}
@Override
public void deleteById(String profileId, String projectId,Boolean force) throws RemoteException {
// Call<WebTarget,String> call= new Call<WebTarget, String>() {
//
// @Override
// public String call(WebTarget endpoint) throws Exception {
// endpoint.path(profileId).path(projectId).request(MediaType.APPLICATION_JSON).delete();
// }
// };
// try{
// delegate.make(call);
// }catch(Exception e) {
//// throw new RemoteException(e);
// }
}
@Override
public Iterator<Project> getAll() throws RemoteException {
Call<WebTarget,Iterator<Project>> call=new Call<WebTarget,Iterator<Project>>(){
@Override
public Iterator<Project> call(WebTarget endpoint) throws Exception {
throw new Exception("Client method not ready");
}
};
try{
return delegate.make(call);
}catch(Exception e) {
throw new RemoteException(e.getMessage());
}
}
@Override
public Iterator<Project> getByFilter(String filter) throws RemoteException {
// TODO Auto-generated method stub
return null;
}
@Override
public Iterator<Project> getByFilter(String filter, String profileId) throws RemoteException {
// TODO Auto-generated method stub
return null;
}
@Override
public Project getById(String profileId, String id) throws RemoteException {
// TODO Auto-generated method stub
return null;
}
@Override
public Iterator<Project> getByProfile(String profileId) throws RemoteException {
// TODO Auto-generated method stub
return null;
}
@Override
public Project registrNew(String profileId, String jsonDocument) throws RemoteException {
// TODO Auto-generated method stub
return null;
}
@Override
public Project update(String profileId, String projectId, String jsonDocument) throws RemoteException {
// TODO Auto-generated method stub
return null;
}
}

@ -0,0 +1,8 @@
package org.gcube.application.geoportal.client;
public class GeoPortalClient {
}

@ -0,0 +1,72 @@
package org.gcube.application.geoportal.client;
import javax.ws.rs.client.WebTarget;
import org.gcube.application.geoportal.client.legacy.ConcessioniManagerI;
import org.gcube.application.geoportal.client.legacy.ConcessioniPlugin;
import org.gcube.application.geoportal.client.legacy.MongoConcessioniPlugin;
import org.gcube.application.geoportal.client.legacy.StatefulMongoConcessioni;
import org.gcube.application.geoportal.client.legacy.StatefulMongoConcessioniPlugin;
import org.gcube.application.geoportal.common.rest.ConcessioniI;
import org.gcube.application.geoportal.common.rest.InterfaceConstants;
import org.gcube.application.geoportal.common.rest.MongoConcessioni;
import org.gcube.common.clients.Plugin;
import org.gcube.common.clients.ProxyBuilder;
import org.gcube.common.clients.ProxyBuilderImpl;
import org.gcube.common.clients.config.ProxyConfig;
import lombok.AllArgsConstructor;
@AllArgsConstructor
public abstract class GeoportalAbstractPlugin <S, P> implements Plugin<S, P>{
private static ConcessioniPlugin concessioni_plugin=new ConcessioniPlugin();
private static MongoConcessioniPlugin mongo_concessioni_plugin=new MongoConcessioniPlugin();
private static StatefulMongoConcessioniPlugin stateful_mongo_concessioni_plugin=new StatefulMongoConcessioniPlugin();
public static ProxyBuilder<ConcessioniI> concessioni() {
return new ProxyBuilderImpl<WebTarget,ConcessioniI>(concessioni_plugin);
}
public static ProxyBuilder<MongoConcessioni> mongoConcessioni(){
return new ProxyBuilderImpl<WebTarget, MongoConcessioni>(mongo_concessioni_plugin);
}
public static ProxyBuilder<ConcessioniManagerI> statefulMongoConcessioni(){
return new ProxyBuilderImpl<WebTarget, ConcessioniManagerI>(stateful_mongo_concessioni_plugin);
}
@Override
public Exception convert(Exception fault, ProxyConfig<?, ?> config) {
return fault;
}
@Override
public String name() {
return InterfaceConstants.APPLICATION_BASE_PATH+InterfaceConstants.APPLICATION_PATH;
}
@Override
public String namespace() {
return InterfaceConstants.NAMESPACE;
}
@Override
public String serviceClass() {
return InterfaceConstants.SERVICE_CLASS;
}
@Override
public String serviceName() {
return InterfaceConstants.SERVICE_NAME;
}
}

@ -0,0 +1,41 @@
package org.gcube.application.geoportal.client;
import javax.ws.rs.client.WebTarget;
import javax.xml.namespace.QName;
import javax.xml.transform.dom.DOMResult;
import javax.xml.ws.EndpointReference;
import org.gcube.application.geoportal.common.rest.InterfaceConstants;
import org.gcube.application.geoportal.common.rest.ProjectsI;
import org.gcube.common.calls.jaxrs.GcubeService;
import org.gcube.common.calls.jaxrs.TargetFactory;
import org.gcube.common.clients.config.ProxyConfig;
import org.gcube.common.clients.delegates.ProxyDelegate;
import org.w3c.dom.Node;
public class ProjectsPlugin extends GeoportalAbstractPlugin<WebTarget, ProjectsI>{
@Override
public Exception convert(Exception fault, ProxyConfig<?, ?> config) {
return fault;
}
@Override
public ProjectsI newProxy(ProxyDelegate<WebTarget> delegate) {
return new DefaultProjects(delegate);
}
@Override
public WebTarget resolve(EndpointReference address, ProxyConfig<?, ?> config) throws Exception {
DOMResult result = new DOMResult();
address.writeTo(result);
Node node =result.getNode();
Node child=node.getFirstChild();
String addressString = child.getTextContent();
GcubeService service = GcubeService.service().
withName(new QName(InterfaceConstants.NAMESPACE,InterfaceConstants.Methods.PROJECTS)).
andPath(InterfaceConstants.Methods.PROJECTS);
return TargetFactory.stubFor(service).at(addressString);
}
}

@ -0,0 +1,136 @@
package org.gcube.application.geoportal.client.legacy;
import static org.gcube.application.geoportal.client.GeoportalAbstractPlugin.concessioni;
import java.io.IOException;
import java.util.ArrayList;
import java.util.Collection;
import org.gcube.application.geoportal.common.model.legacy.Concessione;
import org.gcube.application.geoportal.common.model.legacy.InputStreamDescriptor;
import org.gcube.application.geoportal.common.model.legacy.LayerConcessione;
import org.gcube.application.geoportal.common.model.legacy.RelazioneScavo;
import org.gcube.application.geoportal.common.model.legacy.UploadedImage;
import org.gcube.application.geoportal.common.model.legacy.report.PublicationReport;
import org.gcube.application.geoportal.common.rest.ConcessioniI;
import com.fasterxml.jackson.annotation.JsonInclude.Include;
import com.fasterxml.jackson.core.JsonProcessingException;
import com.fasterxml.jackson.databind.DeserializationFeature;
import com.fasterxml.jackson.databind.MappingIterator;
import com.fasterxml.jackson.databind.ObjectMapper;
import com.fasterxml.jackson.databind.ObjectReader;
import com.fasterxml.jackson.databind.SerializationFeature;
import com.fasterxml.jackson.datatype.jsr310.JavaTimeModule;
import lombok.extern.slf4j.Slf4j;
@Slf4j
public class ConcessioniManager{
private static ObjectMapper mapper = new ObjectMapper();
private static ObjectReader concessioniReader=null;
private static ObjectReader collectionReader=null;
static {
mapper.configure(DeserializationFeature.FAIL_ON_UNKNOWN_PROPERTIES,false);
mapper.configure(SerializationFeature.WRITE_EMPTY_JSON_ARRAYS, false);
mapper.setSerializationInclusion(Include.NON_NULL);
// mapper.configure(SerializationFeature.WRITE_DATES_AS_TIMESTAMPS, false);
mapper.registerModule(new JavaTimeModule());
mapper.configure(SerializationFeature.INDENT_OUTPUT, true);
concessioniReader=mapper.readerFor(Concessione.class);
collectionReader=mapper.readerFor(Collection.class);
}
private ConcessioniI service;
private static enum ImplementationType{
}
public ConcessioniManager() {
service=concessioni().build();
}
public Concessione getById(String id) throws Exception {
log.info("Reading by ID "+id);
try {
String result=service.readById(id);
log.debug("Reading json object : "+result);
return concessioniReader.readValue(result);
} catch (IOException e) {
e.printStackTrace();
throw e;
} catch (Exception e) {
e.printStackTrace();
throw e;
}
}
public static String toJson(Object obj) throws JsonProcessingException {
return mapper.writeValueAsString(obj);
}
public ArrayList<Concessione> getList() throws Exception{
log.info("Getting list");
try {
String result=service.getAll();
log.debug("Reading json object : "+result);
Collection<String> coll=collectionReader.readValue(result);
// JsonArray array=Json.createReader(new ByteArrayInputStream(result.getBytes(StandardCharsets.UTF_8))).readArray();
ArrayList<Concessione> toReturn=new ArrayList<Concessione>();
// MappingIterator<Concessione> it=concessioniReader.readValues(result);
// while(it.hasNext())
// toReturn.add(it.next());
for(String s: coll) {
toReturn.add(concessioniReader.readValue(s));
}
// for(int i=0;i<array.size();i++)
// for()
// toReturn.add(concessioniReader.readValue(array.get(i).toString()));
return toReturn;
} catch (IOException e) {
e.printStackTrace();
throw e;
} catch (Exception e) {
e.printStackTrace();
throw e;
}
}
// Register session
private Concessione lastRegistered;
public Concessione registerNew(Concessione c) throws Exception {
try {
String response=service.create(mapper.writeValueAsString(c));
lastRegistered=concessioniReader.readValue(response);
return lastRegistered;
} catch (IOException e) {
e.printStackTrace();
throw e;
} catch (Exception e) {
e.printStackTrace();
throw e;
}
}
}

@ -0,0 +1,29 @@
package org.gcube.application.geoportal.client.legacy;
import org.gcube.application.geoportal.common.model.legacy.Concessione;
import org.gcube.application.geoportal.common.model.legacy.InputStreamDescriptor;
import org.gcube.application.geoportal.common.model.legacy.LayerConcessione;
import org.gcube.application.geoportal.common.model.legacy.RelazioneScavo;
import org.gcube.application.geoportal.common.model.legacy.UploadedImage;
import org.gcube.application.geoportal.common.rest.MongoConcessioni;
import org.gcube.application.geoportal.common.rest.TempFile;
public interface ConcessioniManagerI extends MongoConcessioni{
public Concessione addImmagineRappresentativa(UploadedImage toAdd,TempFile f) throws Exception;
public Concessione addPiantaFineScavo(LayerConcessione toAdd,TempFile...files)throws Exception;
public Concessione setPosizionamento(LayerConcessione toSet,TempFile...files)throws Exception;
public Concessione setRelazioneScavo(RelazioneScavo toSet,TempFile...files)throws Exception;
public Concessione addImmagineRappresentativa(UploadedImage toAdd,InputStreamDescriptor f) throws Exception;
public Concessione addPiantaFineScavo(LayerConcessione toAdd,InputStreamDescriptor...files)throws Exception;
public Concessione setPosizionamento(LayerConcessione toSet,InputStreamDescriptor...files)throws Exception;
public Concessione setRelazioneScavo(RelazioneScavo toSet,InputStreamDescriptor f)throws Exception;
public Concessione publish() throws Exception;
public void delete() throws Exception;
}

@ -0,0 +1,44 @@
package org.gcube.application.geoportal.client.legacy;
import javax.ws.rs.client.WebTarget;
import javax.xml.namespace.QName;
import javax.xml.transform.dom.DOMResult;
import javax.xml.ws.EndpointReference;
import org.gcube.application.geoportal.client.GeoportalAbstractPlugin;
import org.gcube.application.geoportal.common.rest.ConcessioniI;
import org.gcube.application.geoportal.common.rest.InterfaceConstants;
import org.gcube.common.calls.jaxrs.GcubeService;
import org.gcube.common.calls.jaxrs.TargetFactory;
import org.gcube.common.clients.config.ProxyConfig;
import org.gcube.common.clients.delegates.ProxyDelegate;
import org.w3c.dom.Node;
public class ConcessioniPlugin extends GeoportalAbstractPlugin<WebTarget, ConcessioniI>{
@Override
public Exception convert(Exception fault, ProxyConfig<?, ?> config) {
return fault;
}
@Override
public ConcessioniI newProxy(ProxyDelegate<WebTarget> delegate) {
return new DefaultConcessioni(delegate);
}
@Override
public WebTarget resolve(EndpointReference address, ProxyConfig<?, ?> config) throws Exception {
DOMResult result = new DOMResult();
address.writeTo(result);
Node node =result.getNode();
Node child=node.getFirstChild();
String addressString = child.getTextContent();
GcubeService service = GcubeService.service().
withName(new QName(InterfaceConstants.NAMESPACE,InterfaceConstants.Methods.CONCESSIONI)).
andPath(InterfaceConstants.Methods.CONCESSIONI);
return TargetFactory.stubFor(service).at(addressString);
}
}

@ -0,0 +1,71 @@
package org.gcube.application.geoportal.client.legacy;
import javax.ws.rs.client.Entity;
import javax.ws.rs.client.WebTarget;
import javax.ws.rs.core.MediaType;
import org.gcube.application.geoportal.common.rest.ConcessioniI;
import org.gcube.common.clients.Call;
import org.gcube.common.clients.delegates.ProxyDelegate;
import lombok.NonNull;
import lombok.RequiredArgsConstructor;
@RequiredArgsConstructor
public class DefaultConcessioni implements ConcessioniI{
@NonNull
private final ProxyDelegate<WebTarget> delegate;
@Override
public String create(final String toCreate) throws Exception {
Call<WebTarget,String> call= new Call<WebTarget,String>(){
@Override
public String call(WebTarget endpoint) throws Exception {
return endpoint.request(MediaType.APPLICATION_JSON).put(Entity.entity(toCreate, MediaType.APPLICATION_JSON)).readEntity(String.class);
}
};
return delegate.make(call);
}
@Override
public String readById(final String readById) throws Exception {
Call<WebTarget,String> call= new Call<WebTarget,String>(){
@Override
public String call(WebTarget endpoint) throws Exception {
return endpoint.path(readById).request(MediaType.APPLICATION_JSON).get().readEntity(String.class);
}
};
return delegate.make(call);
}
@Override
public String getAll() throws Exception {
Call<WebTarget,String> call= new Call<WebTarget,String>(){
@Override
public String call(WebTarget endpoint) throws Exception {
return endpoint.request(MediaType.APPLICATION_JSON).get().readEntity(String.class);
}
};
return delegate.make(call);
}
// @Override
// public String update(final String id, final String updated) throws Exception {
// Call<WebTarget,String> call= new Call<WebTarget,String>(){
// @Override
// public String call(WebTarget endpoint) throws Exception {
// return endpoint.path(id).request(MediaType.APPLICATION_JSON).put(Entity.entity(updated, MediaType.APPLICATION_JSON)).readEntity(String.class);
// }
// };
// return delegate.make(call);
// }
@Override
public String addSection(String arg0, String arg1) throws Exception {
// TODO Auto-generated method stub
return null;
}
}

@ -0,0 +1,41 @@
package org.gcube.application.geoportal.client.legacy;
import javax.ws.rs.client.WebTarget;
import javax.xml.namespace.QName;
import javax.xml.transform.dom.DOMResult;
import javax.xml.ws.EndpointReference;
import org.gcube.application.geoportal.client.DefaultMongoConcessioni;
import org.gcube.application.geoportal.client.GeoportalAbstractPlugin;
import org.gcube.application.geoportal.common.rest.InterfaceConstants;
import org.gcube.application.geoportal.common.rest.MongoConcessioni;
import org.gcube.common.calls.jaxrs.GcubeService;
import org.gcube.common.calls.jaxrs.TargetFactory;
import org.gcube.common.clients.config.ProxyConfig;
import org.gcube.common.clients.delegates.ProxyDelegate;
import org.w3c.dom.Node;
public class MongoConcessioniPlugin extends GeoportalAbstractPlugin<WebTarget, MongoConcessioni>{
@Override
public WebTarget resolve(EndpointReference address, ProxyConfig<?, ?> config) throws Exception {
DOMResult result = new DOMResult();
address.writeTo(result);
Node node =result.getNode();
Node child=node.getFirstChild();
String addressString = child.getTextContent();
GcubeService service = GcubeService.service().
withName(new QName(InterfaceConstants.NAMESPACE,InterfaceConstants.Methods.MONGO_CONCESSIONI)).
andPath(InterfaceConstants.Methods.MONGO_CONCESSIONI);
return TargetFactory.stubFor(service).at(addressString);
}
@Override
public MongoConcessioni newProxy(ProxyDelegate<WebTarget> delegate) {
return new DefaultMongoConcessioni(delegate);
}
}

@ -0,0 +1,135 @@
package org.gcube.application.geoportal.client.legacy;
import java.io.FileNotFoundException;
import java.util.ArrayList;
import javax.ws.rs.client.WebTarget;
import org.gcube.application.geoportal.client.DefaultMongoConcessioni;
import org.gcube.application.geoportal.client.utils.FileSets;
import org.gcube.application.geoportal.common.model.legacy.Concessione;
import org.gcube.application.geoportal.common.model.legacy.Concessione.Paths;
import org.gcube.application.geoportal.common.model.legacy.InputStreamDescriptor;
import org.gcube.application.geoportal.common.model.legacy.LayerConcessione;
import org.gcube.application.geoportal.common.model.legacy.RelazioneScavo;
import org.gcube.application.geoportal.common.model.legacy.UploadedImage;
import org.gcube.application.geoportal.common.model.rest.AddSectionToConcessioneRequest;
import org.gcube.application.geoportal.common.rest.TempFile;
import org.gcube.application.geoportal.common.utils.StorageUtils;
import org.gcube.common.clients.delegates.ProxyDelegate;
import org.gcube.contentmanagement.blobstorage.transport.backend.RemoteBackendException;
public class StatefulMongoConcessioni extends DefaultMongoConcessioni implements ConcessioniManagerI{
public StatefulMongoConcessioni(ProxyDelegate<WebTarget> delegate) {
super(delegate);
}
private Concessione currentC=null;
private StorageUtils storage=new StorageUtils();
// Override methods to handle state
@Override
public Concessione createNew(Concessione c) throws Exception {
currentC=super.createNew(c);
return currentC;
}
@Override
public Concessione getById(String id) throws Exception {
currentC= super.getById(id);
return currentC;
}
@Override
public Concessione publish() throws Exception {
if(currentC==null) throw new Exception("Invalid operation : current Concessione is null.");
currentC=super.publish(currentC.getMongo_id());
return currentC;
}
@Override
public void delete() throws Exception {
if(currentC==null) throw new Exception("Invalid operation : current Concessione is null.");
super.deleteById(currentC.getMongo_id());
currentC=null;
}
@Override
public Concessione addImmagineRappresentativa(UploadedImage toAdd, TempFile f) throws Exception {
if(currentC==null) throw new Exception("Invalid operation : current Concessione is null.");
if(currentC.getImmaginiRappresentative()==null) currentC.setImmaginiRappresentative(new ArrayList<UploadedImage>());
currentC.getImmaginiRappresentative().add(toAdd);
currentC=replace(currentC);
currentC=super.registerFileSet(currentC.getMongo_id(),
FileSets.build(Paths.imgByIndex(currentC.getImmaginiRappresentative().size()-1),f).getTheRequest());
return currentC;
}
@Override
public Concessione addPiantaFineScavo(LayerConcessione toAdd, TempFile... files) throws Exception {
if(currentC==null) throw new Exception("Invalid operation : current Concessione is null.");
if(currentC.getPianteFineScavo()==null) currentC.setPianteFineScavo(new ArrayList<>());
currentC.getPianteFineScavo().add(toAdd);
currentC=replace(currentC);
currentC=super.registerFileSet(currentC.getMongo_id(),
FileSets.build(Paths.piantaByIndex(currentC.getPianteFineScavo().size()-1),files).getTheRequest());
return currentC;
}
@Override
public Concessione setPosizionamento(LayerConcessione toSet, TempFile... files) throws Exception {
if(currentC==null) throw new Exception("Invalid operation : current Concessione is null.");
currentC.setPosizionamentoScavo(toSet);
currentC=replace(currentC);
currentC=super.registerFileSet(currentC.getMongo_id(),
FileSets.build(Paths.POSIZIONAMENTO,files).getTheRequest());
return currentC;
}
@Override
public Concessione setRelazioneScavo(RelazioneScavo toSet, TempFile... files) throws Exception {
if(currentC==null) throw new Exception("Invalid operation : current Concessione is null.");
currentC.setRelazioneScavo(toSet);
currentC=replace(currentC);
currentC=super.registerFileSet(currentC.getMongo_id(),
FileSets.build(Paths.RELAZIONE,files).getTheRequest());
return currentC;
}
@Override
public Concessione addImmagineRappresentativa(UploadedImage toAdd, InputStreamDescriptor f) throws Exception {
return addImmagineRappresentativa(toAdd,FileSets.asTemp(storage,f));
}
@Override
public Concessione addPiantaFineScavo(LayerConcessione toAdd, InputStreamDescriptor... files) throws Exception {
return addPiantaFineScavo(toAdd, FileSets.asTemp(storage,files));
}
@Override
public Concessione setPosizionamento(LayerConcessione toSet, InputStreamDescriptor... files) throws Exception {
return setPosizionamento(toSet,FileSets.asTemp(storage,files));
}
@Override
public Concessione setRelazioneScavo(RelazioneScavo toSet, InputStreamDescriptor f) throws Exception {
return setRelazioneScavo(toSet,FileSets.asTemp(storage,f));
}
}

@ -0,0 +1,38 @@
package org.gcube.application.geoportal.client.legacy;
import javax.ws.rs.client.WebTarget;
import javax.xml.namespace.QName;
import javax.xml.transform.dom.DOMResult;
import javax.xml.ws.EndpointReference;
import org.gcube.application.geoportal.client.GeoportalAbstractPlugin;
import org.gcube.application.geoportal.common.rest.InterfaceConstants;
import org.gcube.common.calls.jaxrs.GcubeService;
import org.gcube.common.calls.jaxrs.TargetFactory;
import org.gcube.common.clients.config.ProxyConfig;
import org.gcube.common.clients.delegates.ProxyDelegate;
import org.w3c.dom.Node;
public class StatefulMongoConcessioniPlugin extends GeoportalAbstractPlugin<WebTarget, ConcessioniManagerI>{
@Override
public WebTarget resolve(EndpointReference address, ProxyConfig<?, ?> config) throws Exception {
DOMResult result = new DOMResult();
address.writeTo(result);
Node node =result.getNode();
Node child=node.getFirstChild();
String addressString = child.getTextContent();
GcubeService service = GcubeService.service().
withName(new QName(InterfaceConstants.NAMESPACE,InterfaceConstants.Methods.MONGO_CONCESSIONI)).
andPath(InterfaceConstants.Methods.MONGO_CONCESSIONI);
return TargetFactory.stubFor(service).at(addressString);
}
@Override
public ConcessioniManagerI newProxy(ProxyDelegate<WebTarget> delegate) {
return new StatefulMongoConcessioni(delegate);
}
}

@ -0,0 +1,36 @@
package org.gcube.application.geoportal.client.model;
import lombok.Data;
@Data
public class CommunicationException extends Exception {
private String remoteMessage;
private Integer responseHTTPCode;
public CommunicationException() {
// TODO Auto-generated constructor stub
}
public CommunicationException(String message) {
super(message);
// TODO Auto-generated constructor stub
}
public CommunicationException(Throwable cause) {
super(cause);
// TODO Auto-generated constructor stub
}
public CommunicationException(String message, Throwable cause) {
super(message, cause);
// TODO Auto-generated constructor stub
}
public CommunicationException(String message, Throwable cause, boolean enableSuppression,
boolean writableStackTrace) {
super(message, cause, enableSuppression, writableStackTrace);
// TODO Auto-generated constructor stub
}
}

@ -0,0 +1,86 @@
package org.gcube.application.geoportal.client.utils;
import org.gcube.application.geoportal.common.model.legacy.InputStreamDescriptor;
import org.gcube.application.geoportal.common.model.rest.AddSectionToConcessioneRequest;
import org.gcube.application.geoportal.common.rest.TempFile;
import org.gcube.application.geoportal.common.utils.StorageUtils;
import org.gcube.contentmanagement.blobstorage.transport.backend.RemoteBackendException;
import java.io.File;
import java.io.FileInputStream;
import java.io.FileNotFoundException;
import java.util.ArrayList;
import java.util.Collection;
import java.util.Collections;
public class FileSets {
public static class RequestBuilder {
AddSectionToConcessioneRequest theRequest=new AddSectionToConcessioneRequest();
public RequestBuilder add(TempFile... f){
if(theRequest.getStreams()==null)
theRequest.setStreams(new ArrayList<TempFile>());
for(TempFile temp: f )
theRequest.getStreams().add(temp);
return this;
}
public RequestBuilder add(TempFile f){
if(theRequest.getStreams()==null)
theRequest.setStreams(new ArrayList<TempFile>());
theRequest.getStreams().add(f);
return this;
}
public RequestBuilder setPath(String path){
theRequest.setDestinationPath(path);
return this;
}
public AddSectionToConcessioneRequest getTheRequest(){return theRequest;}
}
public static RequestBuilder build(String path) {
return new RequestBuilder().setPath(path);
}
public static RequestBuilder build(String path, TempFile...files) {
return new RequestBuilder().setPath(path).add(files);
}
public static TempFile asTemp(StorageUtils storage,InputStreamDescriptor descriptor) throws RemoteBackendException, FileNotFoundException {
return storage.putOntoStorage(descriptor.getStream(), descriptor.getFilename());
}
public static TempFile[] asTemp(StorageUtils storage,InputStreamDescriptor... descriptors) throws RemoteBackendException, FileNotFoundException {
ArrayList<TempFile> toReturn=new ArrayList<TempFile>();
for(InputStreamDescriptor desc:descriptors)
toReturn.add(storage.putOntoStorage(desc.getStream(), desc.getFilename()));
return toReturn.toArray(new TempFile[toReturn.size()]);
}
public static AddSectionToConcessioneRequest prepareRequestFromFolder(StorageUtils storage, String path, File directory) throws FileNotFoundException {
File[] children =directory.listFiles();
System.out.println("Found "+children+ " files to push");
InputStreamDescriptor[] iss=new InputStreamDescriptor[children.length];
return prepareRequest(storage,path,children);
}
public static AddSectionToConcessioneRequest prepareRequest(StorageUtils storage, String path, File... toUpload) throws FileNotFoundException {
FileSets.RequestBuilder builder = FileSets.build(path);
for (File f : toUpload) {
if(!f.isDirectory())
builder.add(FileSets.asTemp(storage, new InputStreamDescriptor(new FileInputStream(f), f.getName())));
}
return builder.getTheRequest();
}
}

@ -0,0 +1,42 @@
package org.gcube.application.geoportal.client.utils;
import org.apache.commons.io.IOUtils;
import org.bson.Document;
import org.gcube.application.geoportal.common.model.rest.QueryRequest;
import org.gcube.application.geoportal.common.utils.Files;
import java.io.File;
import java.io.IOException;
import java.io.InputStream;
import java.nio.charset.Charset;
public class Queries {
public static QueryRequest parse(String json) throws IOException {
Document queryDocument=Document.parse(json);
QueryRequest req=new QueryRequest();
if(queryDocument.containsKey("ordering"))
req.setOrdering(Serialization.read(((Document)queryDocument.get("ordering")).toJson(),QueryRequest.OrderedRequest.class));
if(queryDocument.containsKey("paging"))
req.setPaging(Serialization.read(((Document)queryDocument.get("paging")).toJson(),QueryRequest.PagedRequest.class));
req.setProjection(queryDocument.get("projection",Document.class));
req.setFilter(queryDocument.get("filter",Document.class));
return req;
};
public static QueryRequest readPath(String jsonFilePath) throws IOException{
return parse(Files.readFileAsString(jsonFilePath, Charset.defaultCharset()));
}
public static QueryRequest readFile(File jsonFile)throws IOException{
return parse(Files.readFileAsString(jsonFile.getAbsolutePath(), Charset.defaultCharset()));
}
public static QueryRequest read(InputStream is)throws IOException{
return parse(IOUtils.toString(is));
}
}

@ -0,0 +1,41 @@
package org.gcube.application.geoportal.client.utils;
import java.io.IOException;
import java.io.InputStream;
import java.time.format.DateTimeFormatter;
import java.util.Iterator;
import com.fasterxml.jackson.core.JsonProcessingException;
import com.fasterxml.jackson.databind.DeserializationFeature;
import com.fasterxml.jackson.databind.ObjectMapper;
import com.fasterxml.jackson.datatype.jsr310.JavaTimeModule;
public class Serialization {
public static final DateTimeFormatter FULL_FORMATTER=DateTimeFormatter.ofPattern("uuuuMMdd_HH-mm-ss");
public static ObjectMapper mapper;
static {
mapper=new ObjectMapper();
mapper.configure(DeserializationFeature.FAIL_ON_UNKNOWN_PROPERTIES,false);
mapper.registerModule(new JavaTimeModule());
}
public static <T> T read(String jsonString,Class<T> clazz) throws JsonProcessingException, IOException {
return mapper.readerFor(clazz).readValue(jsonString);
}
public static String write(Object obj) throws JsonProcessingException, IOException {
return mapper.writeValueAsString(obj);
}
public static <T> Iterator<T> readCollection(String jsonString, Class<T> clazz) throws IOException {
return mapper.readerFor(clazz).readValues(jsonString);
}
public static <T> Iterator<T> readCollection(InputStream is, Class<T> clazz) throws IOException {
return mapper.readerFor(clazz).readValues(is);
}
}

@ -0,0 +1,34 @@
package org.gcube.application.geoportal;
import org.gcube.application.geoportal.clients.TokenSetter;
import org.gcube.application.geoportal.common.rest.TempFile;
import org.gcube.application.geoportal.common.utils.Files;
import org.gcube.application.geoportal.common.utils.StorageUtils;
import org.gcube.common.storagehub.client.dsl.StorageHubClient;
import java.io.FileInputStream;
import java.io.FileNotFoundException;
public class StorageTests {
public static void main(String[] args) throws FileNotFoundException {
FileInputStream fis =new FileInputStream(Files.getFileFromResources("concessioni/relazione.pdf"));
String filename= "relazione.pdf";
String sourceContext="/d4science.research-infrastructures.eu";
String targetContext="/pred4s/preprod/preVRE";
TokenSetter.set(sourceContext);
StorageHubClient sgClient=new StorageHubClient();
TokenSetter.set(targetContext);
TempFile file= new StorageUtils().putOntoStorage(fis,filename);
System.out.println(new StorageUtils().getUrlById(file.getId()));
}
}

@ -0,0 +1,14 @@
package org.gcube.application.geoportal.clients;
import org.junit.BeforeClass;
public class BasicVreTests {
@BeforeClass
public static void setScope(){
// TokenSetter.set("/gcube/devNext/NextNext");
TokenSetter.set("/gcube/devsec/devVRE");
}
}

@ -0,0 +1,113 @@
package org.gcube.application.geoportal.clients;
import static org.gcube.application.geoportal.client.GeoportalAbstractPlugin.statefulMongoConcessioni;
import static org.junit.Assert.*;
import java.io.FileInputStream;
import java.io.FileNotFoundException;
import org.gcube.application.geoportal.client.legacy.ConcessioniManagerI;
import org.gcube.application.geoportal.client.utils.Serialization;
import org.gcube.application.geoportal.common.model.TestModel;
import org.gcube.application.geoportal.common.model.legacy.Concessione;
import org.gcube.application.geoportal.common.model.legacy.InputStreamDescriptor;
import org.gcube.application.geoportal.common.model.legacy.LayerConcessione;
import org.gcube.application.geoportal.common.model.legacy.UploadedImage;
import org.gcube.application.geoportal.common.model.legacy.report.ValidationReport.ValidationStatus;
import org.gcube.application.geoportal.common.rest.TempFile;
import org.gcube.application.geoportal.common.utils.Files;
import org.gcube.application.geoportal.common.utils.StorageUtils;
import org.gcube.contentmanagement.blobstorage.transport.backend.RemoteBackendException;
import org.junit.Test;
public class StatefulClientTests extends BasicVreTests{
private Concessione publishNew() throws Exception {
ConcessioniManagerI manager=statefulMongoConcessioni().build();
StorageUtils storage=new StorageUtils();
Concessione toRegister= TestModel.prepareEmptyConcessione();
toRegister.setNome("Mock module");
manager.createNew(toRegister);
UploadedImage toRegisterImg=TestModel.prepareConcessione().getImmaginiRappresentative().get(0);
// TEMP Files are hosted in INFRASTRUCTURE's VOLATILE AREA
TempFile toUpload=storage.putOntoStorage(new FileInputStream(Files.getFileFromResources("concessioni/immagine.png")), "immagine.png");
manager.addImmagineRappresentativa(toRegisterImg, toUpload);
//Alternative Method
InputStreamDescriptor isDesc=new InputStreamDescriptor(new FileInputStream(Files.getFileFromResources("concessioni/immagine.png")), "immagine.png");
manager.addImmagineRappresentativa(toRegisterImg, isDesc);
//Relazione
manager.setRelazioneScavo(TestModel.prepareConcessione().getRelazioneScavo(),
storage.putOntoStorage(new FileInputStream(Files.getFileFromResources("concessioni/relazione.pdf")), "relazione_it.pdf"),
storage.putOntoStorage(new FileInputStream(Files.getFileFromResources("concessioni/relazione.pdf")), "relazione_en.pdf"));
// Posizionamento scavo
manager.setPosizionamento(TestModel.prepareConcessione().getPosizionamentoScavo(),
storage.putOntoStorage(new FileInputStream(Files.getFileFromResources("concessioni/pos.shp")), "pos.shp"));
// Piante
manager.addPiantaFineScavo(TestModel.prepareConcessione().getPianteFineScavo().get(0),
storage.putOntoStorage(new FileInputStream(Files.getFileFromResources("concessioni/pianta.shp")), "pianta.shp"),
storage.putOntoStorage(new FileInputStream(Files.getFileFromResources("concessioni/pianta.shx")), "pianta.shx"));
return manager.publish();
}
@Test
public void testRegisterNew() throws RemoteBackendException, FileNotFoundException, Exception {
Concessione published=publishNew();
// VARIOUS CHECKS
assertNotNull(published.getReport());
assertEquals(published.getReport().getStatus(),ValidationStatus.PASSED);
assertEquals(published.getImmaginiRappresentative().size(),2);
assertEquals(published.getPianteFineScavo().size(),1);
assertNotNull(published.getPosizionamentoScavo().getWmsLink());
for(LayerConcessione l : published.getPianteFineScavo())
assertNotNull(l.getWmsLink());
assertNotNull(published.getCentroidLat());
assertNotNull(published.getCentroidLong());
System.out.println(Serialization.write(published));
System.out.println(Serialization.write(published.getReport()));
}
@Test
public void delete() throws Exception {
ConcessioniManagerI manager=statefulMongoConcessioni().build();
StorageUtils storage=new StorageUtils();
manager.createNew(TestModel.prepareEmptyConcessione());
manager.delete();
}
@Test
public void replace() {
}
@Test
public void getById() {
}
@Test
public void list() {
}
}

@ -0,0 +1,216 @@
package org.gcube.application.geoportal.clients;
import static org.gcube.application.geoportal.client.GeoportalAbstractPlugin.mongoConcessioni;
import static org.gcube.application.geoportal.client.GeoportalAbstractPlugin.statefulMongoConcessioni;
import static org.junit.Assert.*;
import java.io.File;
import java.io.FileInputStream;
import java.nio.charset.Charset;
import java.util.Collections;
import java.util.Iterator;
import java.util.concurrent.atomic.AtomicLong;
import org.gcube.application.geoportal.client.legacy.ConcessioniManagerI;
import org.gcube.application.geoportal.client.utils.Queries;
import org.gcube.application.geoportal.client.utils.Serialization;
import org.gcube.application.geoportal.common.model.TestModel;
import org.gcube.application.geoportal.common.model.legacy.Concessione;
import org.gcube.application.geoportal.common.model.legacy.Concessione.Paths;
import org.gcube.application.geoportal.common.model.legacy.report.ValidationReport.ValidationStatus;
import org.gcube.application.geoportal.common.model.rest.AddSectionToConcessioneRequest;
import org.gcube.application.geoportal.common.rest.MongoConcessioni;
import org.gcube.application.geoportal.common.utils.Files;
import org.gcube.application.geoportal.common.utils.StorageUtils;
import org.junit.Test;
public class StatelessClientTests extends BasicVreTests{
private MongoConcessioni client=mongoConcessioni().build();
@Test
public void testCreateNew() throws Exception {
Concessione c= client.createNew(TestModel.prepareEmptyConcessione());
assertNotNull(c);
assertNotNull(c.getMongo_id());
}
@Test
public void testDeleteById() throws Exception {
Concessione c= client.createNew(TestModel.prepareEmptyConcessione());
client.deleteById(c.getMongo_id());
}
@Test
public void testList() throws Exception {
final AtomicLong counter=new AtomicLong();
long before=System.currentTimeMillis();
client.getList().forEachRemaining((Concessione c)-> {counter.addAndGet(1);});
System.out.println("Loaded "+counter+" in "+(System.currentTimeMillis()-before)+" ms");
}
@Test
public void testReplace() throws Exception {
Concessione c= client.createNew(TestModel.prepareEmptyConcessione());
String title="My new shiny Title";
c.setNome(title);
Concessione c1=client.replace(c);
assertEquals(title, c1.getNome());
}
@Test
public void testUploadFileSet() throws Exception {
Concessione c= client.createNew(TestModel.prepareConcessione());
assertNotNull(c.getRelazioneScavo());
AddSectionToConcessioneRequest request=
new AddSectionToConcessioneRequest(Paths.RELAZIONE,
Collections.singletonList(new StorageUtils().putOntoStorage(
new FileInputStream(Files.getFileFromResources("concessioni/relazione.pdf")), "relazione.pdf")));
c= client.registerFileSet(c.getMongo_id(), request);
assertNotNull(c.getRelazioneScavo().getActualContent());
assertNotNull(c.getRelazioneScavo().getActualContent().get(0));
}
@Test
public void testPublsh() throws Exception {
publish(true);
}
public Concessione publish(Boolean verify) throws Exception {
return publish(verify,client);
}
public static Concessione publish(Boolean verify,MongoConcessioni client) throws Exception {
Concessione c= client.createNew(TestModel.prepareConcessione());
String mongoId=c.getMongo_id();
AddSectionToConcessioneRequest request=
new AddSectionToConcessioneRequest(Paths.RELAZIONE,
Collections.singletonList(new StorageUtils().putOntoStorage(
new FileInputStream(Files.getFileFromResources("concessioni/relazione.pdf")), "relazione.pdf")));
client.registerFileSet(mongoId, request);
request=
new AddSectionToConcessioneRequest(Paths.imgByIndex(0),
Collections.singletonList(new StorageUtils().putOntoStorage(
new FileInputStream(Files.getFileFromResources("concessioni/immagine.png")), "immagine.png")));
client.registerFileSet(mongoId, request);
request=
new AddSectionToConcessioneRequest(Paths.POSIZIONAMENTO,
Collections.singletonList(new StorageUtils().putOntoStorage(
new FileInputStream(Files.getFileFromResources("concessioni/pos.shp")), "pos.shp")));
client.registerFileSet(mongoId, request);
request=
new AddSectionToConcessioneRequest(Paths.piantaByIndex(0),
Collections.singletonList(new StorageUtils().putOntoStorage(
new FileInputStream(Files.getFileFromResources("concessioni/pianta.shp")), "pianta.shp")));
client.registerFileSet(mongoId, request);
c=client.publish(mongoId);
if(verify)
assertTrue(c.getReport().getStatus().equals(ValidationStatus.PASSED));
return c;
}
@Test
public void getConfiguration() throws Exception {
System.out.println(client.getCurrentConfiguration());
}
@Test
public void searches() throws Exception {
for(File filterFile:new File("src/test/resources/concessioni/filters").listFiles()) {
String query=Files.readFileAsString(filterFile.getAbsolutePath(), Charset.defaultCharset());
System.out.println("Count for "+filterFile.getName()+"\t"+ count(client.search(query)));
}
}
@Test
public void query() throws Exception {
// No Transformation
System.out.print("First Registered \t");
Iterator<Concessione> queriedDocuments=client.query(
Queries.readPath("src/test/resources/concessioni/queries/firstRegistered.json"));
// Expected one result
assertTrue(count(queriedDocuments)==1);
System.out.print("Last Registered \t");
// Expected one result
queriedDocuments=client.query(
Queries.readPath("src/test/resources/concessioni/queries/lastRegistered.json"));
assertTrue(count(queriedDocuments)==1);
queriedDocuments.forEachRemaining((Concessione c)->{System.out.println(c.getNome());});
// Transformations
System.out.println(
client.queryForJSON(
Queries.readPath("src/test/resources/concessioni/queries/lastNameRegisteredByFabio.json")));
System.out.println(
client.queryForJSON(
Queries.readPath("src/test/resources/concessioni/queries/publicationWarningMessages.json")));
// String query=Files.readFileAsString(filterFile.getAbsolutePath(), Charset.defaultCharset());
// System.out.println("Count for "+filterFile.getName()+"\t"+ count(client.search(query)));
// }
}
@Test
public void testCleanFileSet() throws Exception {
Concessione c=publish(false);
client.unPublish(c.getMongo_id());
//Precheck to be sure
assertFalse(c.getPosizionamentoScavo().getActualContent().isEmpty());
assertFalse(c.getPianteFineScavo().get(0).getActualContent().isEmpty());
//Clear pos
c=client.cleanFileSet(c.getMongo_id(),Paths.POSIZIONAMENTO);
assertTrue(c.getPosizionamentoScavo().getActualContent().isEmpty());
//Clear pianta [0]
c=client.cleanFileSet(c.getMongo_id(),Paths.piantaByIndex(0));
assertTrue(c.getPianteFineScavo().get(0).getActualContent().isEmpty());
}
// UTILS
public static long count(Iterator<?> iterator){
AtomicLong l=new AtomicLong(0);
iterator.forEachRemaining(el->{l.incrementAndGet();});
return l.get();
}
}

@ -0,0 +1,35 @@
package org.gcube.application.geoportal.clients;
import java.util.Properties;
import org.gcube.common.authorization.library.provider.SecurityTokenProvider;
import org.gcube.common.scope.api.ScopeProvider;
public class TokenSetter {
private static Properties props=new Properties();
static{
try {
props.load(TokenSetter.class.getResourceAsStream("/tokens.properties"));
} catch (Exception e) {
throw new RuntimeException("YOU NEED TO SET TOKEN FILE IN CONFIGURATION");
}
}
public static void set(String scope){
try{
if(!props.containsKey(scope)) throw new RuntimeException("No token found for scope : "+scope);
SecurityTokenProvider.instance.set(props.getProperty(scope));
}catch(Exception e){
e.printStackTrace(System.err);
throw e;
}
ScopeProvider.instance.set(scope);
}
}

@ -0,0 +1,81 @@
package org.gcube.application.geoportal.clients.legacy;
import java.util.ArrayList;
import java.util.concurrent.atomic.AtomicLong;
import org.gcube.application.geoportal.client.legacy.ConcessioniManager;
import org.gcube.application.geoportal.clients.BasicVreTests;
import org.gcube.application.geoportal.common.model.legacy.Concessione;
import org.gcube.application.geoportal.common.model.legacy.GeoServerContent;
import org.gcube.application.geoportal.common.model.legacy.LayerConcessione;
import org.gcube.application.geoportal.common.model.legacy.PersistedContent;
import org.gcube.application.geoportal.common.model.legacy.report.ValidationReport.ValidationStatus;
import org.junit.Test;
public class ConcessioniTests extends BasicVreTests {
static boolean STOP_ON_FAIL=true;
@Test
public void readAll() throws Exception {
ConcessioniManager manager=new ConcessioniManager();
ArrayList<Concessione> found=manager.getList();
System.out.println("Found "+found.size()+" elements.");
final AtomicLong byId=new AtomicLong(0);
final ArrayList<Long> validIDs=new ArrayList<>();
final ArrayList<Long> imgs=new ArrayList<Long>();
final AtomicLong error=new AtomicLong(0);
final ArrayList<Long> piante=new ArrayList<Long>();
final ArrayList<Long> pos=new ArrayList<Long>();
final ArrayList<Long> wmsLink=new ArrayList<Long>();
found.forEach((Concessione c )->{
try {
manager.getById(c.getId()+"");
byId.incrementAndGet();
if(c.validate().getStatus().equals(ValidationStatus.PASSED))
validIDs.add(c.getId());
if(c.getImmaginiRappresentative()!=null&&c.getImmaginiRappresentative().size()>0)
imgs.add(c.getId());
if(c.getPianteFineScavo()!=null)
c.getPianteFineScavo().forEach((LayerConcessione l)->{
if(l.getActualContent()!=null)
l.getActualContent().forEach((PersistedContent p)->{
if(p instanceof GeoServerContent) piante.add(c.getId());
});
if(l.getWmsLink()!=null) wmsLink.add(c.getId());
});
if(c.getPosizionamentoScavo()!=null) {
LayerConcessione l=c.getPosizionamentoScavo();
l.getActualContent().forEach((PersistedContent p)->{
if(p instanceof GeoServerContent) pos.add(c.getId());
});
if(l.getWmsLink()!=null) wmsLink.add(c.getId());
}
}catch(Throwable t) {
error.incrementAndGet();
if(STOP_ON_FAIL) {
throw new RuntimeException(t);
}else t.printStackTrace(System.err);
}
});
System.out.println("Valid count "+validIDs.size()+ "Load BY ID : "+byId.get()+" Error : "+error.get()+" OUT OF "+found.size());
System.out.println("Valid IDS "+validIDs);
System.out.println("With imgs : "+imgs);
System.out.println("With piante : "+piante);
System.out.println("With pos : "+pos);
System.out.println("With wmsLink : "+wmsLink);
}
}

@ -0,0 +1,33 @@
package org.gcube.application.geoportal.common.model;
import org.gcube.application.geoportal.client.utils.Serialization;
import org.gcube.application.geoportal.common.model.legacy.Concessione;
import org.junit.Assert;
import org.junit.Test;
import java.io.File;
import java.io.FileInputStream;
import java.io.FileNotFoundException;
import java.io.IOException;
import java.util.Iterator;
import java.util.concurrent.atomic.AtomicLong;
public class Serializations {
@Test
public void readOne(){}
@Test
public void readMulti() throws IOException {
Iterator it=Serialization.readCollection(
new FileInputStream(new File("src/test/resources/concessioni/ConcessioniList.json")),
Concessione.class);
AtomicLong l=new AtomicLong(0);
it.forEachRemaining(element->{l.incrementAndGet();});
Assert.assertTrue(l.get()==4);
}
}

@ -0,0 +1,130 @@
package org.gcube.application.geoportal.common.model;
import java.time.LocalDateTime;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.UUID;
import org.bson.types.ObjectId;
import org.gcube.application.geoportal.common.model.legacy.AccessPolicy;
import org.gcube.application.geoportal.common.model.legacy.Concessione;
import org.gcube.application.geoportal.common.model.legacy.LayerConcessione;
import org.gcube.application.geoportal.common.model.legacy.RelazioneScavo;
import org.gcube.application.geoportal.common.model.legacy.UploadedImage;
public class TestModel {
public static Concessione prepareEmptyConcessione() {
Concessione concessione=new Concessione();
// Generic fields
// Concessione fields
concessione.setNome("MONGO Italia, forse, ma su ");
concessione.setIntroduzione("This is my MONGO project");
concessione.setDescrizioneContenuto("It contains this and that");
concessione.setAuthors(Arrays.asList(new String[] {"Some one","Some, oneelse"}));
concessione.setContributore("Contrib 1");
concessione.setTitolari(Arrays.asList(new String[] {"Some one","Some, oneelse"}));
concessione.setResponsabile("Someone");
concessione.setEditore("Editore");
concessione.setFontiFinanziamento(Arrays.asList(new String[] {"Big pharma","Pentagon"}));
concessione.setSoggetto(Arrays.asList(new String[] {"Research Excavation","Archeology"}));
concessione.setDataInizioProgetto(LocalDateTime.now());
concessione.setDataFineProgetto(LocalDateTime.now());
concessione.setLicenzaID("CC-BY");
concessione.setTitolareLicenza(Arrays.asList(new String[] {"Qualcun altro"}));
concessione.setTitolareCopyright(Arrays.asList(new String[] {"Chiedilo in giro"}));
concessione.setParoleChiaveLibere(Arrays.asList(new String[] {"Robba","Stuff"}));
concessione.setParoleChiaveICCD(Arrays.asList(new String[] {"vattelapesca","somthing something"}));
// concessione.setCentroidLat(43.0); //N-S
// concessione.setCentroidLong(9.0); //E-W
//
return concessione;
}
public static final Concessione setIds(Concessione c) {
// c.setMongo_id(rnd());
c.getRelazioneScavo().setMongo_id(rnd());
c.getPosizionamentoScavo().setMongo_id(rnd());
c.getPianteFineScavo().forEach((LayerConcessione l)->{l.setMongo_id(rnd());});
c.getImmaginiRappresentative().forEach((UploadedImage i)->{i.setMongo_id(rnd());});
return c;
}
public static final String rnd() {
return new ObjectId().toHexString();
}
public static Concessione prepareConcessione() {
return prepareConcessione(4,2);
}
public static Concessione prepareConcessione(int pianteCount ,int imgsCount) {
Concessione concessione=prepareEmptyConcessione();
// Attachments
// Relazione scavo
RelazioneScavo relScavo=new RelazioneScavo();
relScavo.setAbstractEng("simple abstract section");
relScavo.setAbstractIta("semplice sezione abstract");
relScavo.setResponsabili(concessione.getAuthors());
concessione.setRelazioneScavo(relScavo);
//Immagini rappresentative
ArrayList<UploadedImage> imgs=new ArrayList<>();
for(int i=0;i<imgsCount;i++) {
UploadedImage img=new UploadedImage();
img.setTitolo("My image number "+i);
img.setDidascalia("You can see my image number "+i);
img.setFormat("TIFF");
img.setCreationTime(LocalDateTime.now());
img.setResponsabili(concessione.getAuthors());
imgs.add(img);
}
concessione.setImmaginiRappresentative(imgs);
//Posizionamento
LayerConcessione posizionamento=new LayerConcessione();
posizionamento.setValutazioneQualita("Secondo me si");
posizionamento.setMetodoRaccoltaDati("Fattobbene");
posizionamento.setScalaAcquisizione("1:10000");
posizionamento.setAuthors(concessione.getAuthors());
concessione.setPosizionamentoScavo(posizionamento);
// Piante fine scavo
ArrayList<LayerConcessione> piante=new ArrayList<LayerConcessione>();
for(int i=0;i<pianteCount;i++) {
LayerConcessione pianta=new LayerConcessione();
pianta.setValutazioneQualita("Secondo me si");
pianta.setMetodoRaccoltaDati("Fattobbene");
pianta.setScalaAcquisizione("1:10000");
pianta.setAuthors(concessione.getAuthors());
pianta.setPolicy(AccessPolicy.RESTRICTED);
piante.add(pianta);
}
concessione.setPianteFineScavo(piante);
return concessione;
}
}

@ -0,0 +1,59 @@
package org.gcube.application.geoportal.usecases;
import org.gcube.application.geoportal.client.legacy.ConcessioniManagerI;
import org.gcube.application.geoportal.clients.TokenSetter;
import org.gcube.application.geoportal.common.model.legacy.Concessione;
import java.util.ArrayList;
import java.util.Iterator;
import java.util.concurrent.atomic.AtomicLong;
import static org.gcube.application.geoportal.client.GeoportalAbstractPlugin.statefulMongoConcessioni;
public class ClearConcessioni {
public static void main(String[] args) throws Exception {
TokenSetter.set("/gcube/devsec/devVRE");
ConcessioniManagerI manager=statefulMongoConcessioni().build();
ArrayList<String> toSkipIds=new ArrayList<>();
// toSkipIds.add("6102c8dd02ad3d05b5f81df4");
// toSkipIds.add("610415af02ad3d05b5f81ee3");
AtomicLong count=new AtomicLong(0);
AtomicLong nullCount=new AtomicLong(0);
AtomicLong errCount=new AtomicLong(0);
Iterator<Concessione> it=null;
// it=manager.getList();
it=manager.search("{\"centroidLat\" : 0}");
it.forEachRemaining((Concessione c)->{
try{
String currentId=c.getMongo_id();
if(currentId==null) {
System.out.println("ID IS NULL " + c);
nullCount.incrementAndGet();
}
else
if(toSkipIds.contains(currentId))
System.out.println("Skipping "+currentId);
else {
System.out.println("Deleting " + c.getMongo_id());
manager.deleteById(c.getMongo_id(),true);
}
}catch(Throwable throwable){
System.err.println(throwable);
errCount.incrementAndGet();
}finally {
count.incrementAndGet();
}
});
System.out.println("Done "+count.get()+" [null : "+nullCount.get()+", err : "+errCount.get()+"]");
}
}

@ -0,0 +1,67 @@
package org.gcube.application.geoportal.usecases;
import org.gcube.application.geoportal.client.utils.FileSets;
import org.gcube.application.geoportal.clients.TokenSetter;
import org.gcube.application.geoportal.common.model.legacy.AssociatedContent;
import org.gcube.application.geoportal.common.model.legacy.Concessione;
import org.gcube.application.geoportal.common.model.legacy.InputStreamDescriptor;
import org.gcube.application.geoportal.common.model.rest.AddSectionToConcessioneRequest;
import org.gcube.application.geoportal.common.rest.MongoConcessioni;
import org.gcube.application.geoportal.common.utils.StorageUtils;
import java.io.File;
import java.io.FileInputStream;
import java.io.FileNotFoundException;
import static org.gcube.application.geoportal.client.GeoportalAbstractPlugin.mongoConcessioni;
public class EditFileSet {
public static void main(String[] args) throws Exception {
// params
String context="/gcube/devsec/devVRE";
String publishOption="true";
String toUpdateId="6131f42502ad3d2580412da7";
String toEditPath= Concessione.Paths.piantaByIndex(0);
String folderPath="/Users/fabioisti/Documents/GNA_Ferrandina_2020_inserimento/New Folder With Items/topografia/Piante";
//Check params
Boolean publish = Boolean.parseBoolean(publishOption);
File sourceFolder=new File(folderPath);
if(!sourceFolder.canRead()) throw new Exception("Cannot read from "+folderPath);
System.out.println("!!!!!!! SETTING CONTEXT "+context);
TokenSetter.set(context);
//Prepare Fileset
System.out.println("Preparing request..");
StorageUtils storage=new StorageUtils();
AddSectionToConcessioneRequest request= FileSets.prepareRequestFromFolder(storage,toEditPath,sourceFolder);
MongoConcessioni client=mongoConcessioni().build();
// Unpublish
System.out.println("Unpublishing "+toUpdateId);
client.unPublish(toUpdateId);
// update Fileset
System.out.println("Removing old fileset.. ");
client.cleanFileSet(toUpdateId,toEditPath);
System.out.println("Sending new Fileset ..");
Concessione result= client.registerFileSet(toUpdateId,request);
if(publish)
result = client.publish(toUpdateId);
System.out.println("Done ");
System.out.println("Result : "+result);
}
}

@ -0,0 +1,159 @@
package org.gcube.application.geoportal.usecases;
import lombok.extern.slf4j.Slf4j;
import org.gcube.application.geoportal.client.legacy.ConcessioniManagerI;
import org.gcube.application.geoportal.client.utils.Serialization;
import org.gcube.application.geoportal.clients.TokenSetter;
import org.gcube.application.geoportal.common.model.legacy.*;
import org.gcube.application.geoportal.common.model.legacy.report.ValidationReport;
import org.gcube.application.geoportal.common.rest.TempFile;
import org.gcube.application.geoportal.common.utils.Files;
import org.gcube.application.geoportal.common.utils.StorageUtils;
import java.io.File;
import java.io.FileInputStream;
import java.io.FileNotFoundException;
import java.io.IOException;
import java.nio.charset.Charset;
import java.nio.file.Path;
import java.nio.file.Paths;
import java.util.ArrayList;
import java.util.List;
import java.util.concurrent.atomic.AtomicLong;
import static org.gcube.application.geoportal.client.GeoportalAbstractPlugin.statefulMongoConcessioni;
@Slf4j
/*
Pushes concessioni JSON from folder to geoportal-service
*/
public class Export {
public static void main(String[] args) {
File dir= new File("/Users/fabioisti/git/geoportal-client/import1628178107083");
// String targetContext="/pred4s/preprod/preVRE";
String targetContext="/gcube/devsec/devVRE";
ArrayList<Concessione> found=new ArrayList<>();
for(File elementFolder:dir.listFiles())
for(File jsonFile:elementFolder.listFiles((dir1, name) -> {return name.endsWith(".json");}))
try {
log.info("Reading "+jsonFile.getAbsolutePath());
String json= Files.readFileAsString(jsonFile.getAbsolutePath(), Charset.defaultCharset());
found.add(Serialization.read(json,Concessione.class));
} catch (IOException e) {
e.printStackTrace();
}
System.out.println("Loaded "+found.size()+" elements from "+dir.getAbsolutePath());
TokenSetter.set(targetContext);
ConcessioniManagerI targetManager = statefulMongoConcessioni().build();
StorageUtils storage = new StorageUtils();
AtomicLong count = new AtomicLong(0);
AtomicLong warnCount = new AtomicLong(0);
AtomicLong errCount = new AtomicLong(0);
for (Concessione c : found) {
try {
log.info("Using {} {}",c.getNome(),c.getMongo_id());
Concessione result = push(c, targetManager, new File(dir.getAbsolutePath(),
c.getId() + ""), storage);
if (!result.getReport().getStatus().equals(ValidationReport.ValidationStatus.PASSED))
warnCount.incrementAndGet();
} catch (Throwable throwable) {
System.err.println(throwable);
errCount.incrementAndGet();
} finally {
count.incrementAndGet();
}
}
System.out.println("Done "+count.get()+" [warn : "+warnCount.get()+", err : "+errCount.get()+"]");
}
public static Concessione push(Concessione c, ConcessioniManagerI manager, File dir, StorageUtils storage) throws Exception {
// remove GIS references
LayerConcessione posizionamento= c.getPosizionamentoScavo();
c.setPosizionamentoScavo(null);
List<LayerConcessione> piante=c.getPianteFineScavo();
c.setPianteFineScavo(new ArrayList<LayerConcessione>());
List<UploadedImage> imgs=c.getImmaginiRappresentative();
c.setImmaginiRappresentative(new ArrayList<UploadedImage>());
List<OtherContent> other=c.getGenericContent();
c.setGenericContent(new ArrayList<OtherContent>());
RelazioneScavo rel=c.getRelazioneScavo();
c.setRelazioneScavo(null);
// remove source folder id
c.setFolderId(null);
c.setMongo_id(null);
// PUSH PROJECT
manager.createNew(c);
// UPLOAD WOrKSPaCE content
// Relazione
removeContent(rel);
manager.setRelazioneScavo(rel, fromPath(dir.toPath().toAbsolutePath()+File.separator+"rel",storage)[0]);
// Posizionamento
removeContent(posizionamento);
manager.setPosizionamento(posizionamento,
fromPath(dir.toPath().toAbsolutePath()+File.separator+"pos", storage));
//Piante
for(int i=0; i<piante.size();i++) {
LayerConcessione l=piante.get(i);
removeContent(l);
manager.addPiantaFineScavo(l,
fromPath(dir.toPath().toAbsolutePath()+File.separator+"pianta_"+i, storage));
}
//Immagini Rappresentative
for(int i=0; i<imgs.size();i++) {
UploadedImage img=imgs.get(i);
removeContent(img);
manager.addImmagineRappresentativa(img,
fromPath(dir.toPath().toAbsolutePath()+File.separator+"imgs_"+i, storage)[0]);
}
//Other content
// for(int i=0; i<other.size();i++) {
// OtherContent otherContent=other.get(i);
// removeContent(otherContent);
// manager.a(otherContent,
// fromPath(dir.toPath().toAbsolutePath()+File.separator+"imgs_"+i));
// }
// publish
return manager.publish();
}
private static TempFile[] fromPath(String path, StorageUtils storage) throws FileNotFoundException {
Path baseDir= Paths.get(path);
ArrayList<TempFile> toReturn=new ArrayList<>();
for(File f : baseDir.toFile().listFiles()){
toReturn.add(storage.putOntoStorage(new FileInputStream(f),f.getName()));
}
log.info("Loaded {} files from {} ",toReturn.size(),path);
return toReturn.toArray(new TempFile[toReturn.size()]);
}
private static void removeContent(AssociatedContent c){ c.setActualContent(new ArrayList<>());}
}

@ -0,0 +1,110 @@
package org.gcube.application.geoportal.usecases;
import lombok.extern.slf4j.Slf4j;
import org.apache.commons.io.IOUtils;
import org.gcube.application.geoportal.client.legacy.ConcessioniManager;
import org.gcube.application.geoportal.client.utils.Serialization;
import org.gcube.application.geoportal.clients.TokenSetter;
import org.gcube.application.geoportal.common.model.legacy.*;
import org.gcube.common.storagehub.client.dsl.FileContainer;
import org.gcube.common.storagehub.client.dsl.StorageHubClient;
import org.gcube.common.storagehub.model.exceptions.StorageHubException;
import java.io.*;
import java.util.ArrayList;
@Slf4j
/*
Imports Json concessioni into import<TIME-MILLIS>
*/
public class Import {
public static void main(String[] args) throws Exception {
// Path dir=Files.createTempDirectory(System.currentTimeMillis()+"");
File dir=new File("import"+System.currentTimeMillis());
dir.mkdirs();
String sourceContext="/d4science.research-infrastructures.eu/D4OS/GeoNA-Prototype";
// String sourceContext="/pred4s/preprod/preVRE";
// GET FOM SOURCE
TokenSetter.set(sourceContext);
StorageHubClient sgClient=new StorageHubClient();
// ConcessioniManagerI manager= statefulMongoConcessioni().build();
ConcessioniManager sourceManager = new ConcessioniManager();
ArrayList<Concessione> found=new ArrayList<>();
sourceManager.getList().forEach((Concessione c)->{
try {
File currentFolder=new File (dir.toString(),c.getId()+"");
currentFolder.mkdirs();
//Load locally
// POSIZIONAMENTO
loadFiles(c.getPosizionamentoScavo(),new File(currentFolder,"pos"),sgClient);
// RELAZIONE
loadFiles(c.getRelazioneScavo(),new File(currentFolder,"rel"),sgClient);
// IMGs
for(int i=0;i<c.getImmaginiRappresentative().size();i++)
loadFiles(c.getImmaginiRappresentative().get(i), new File(currentFolder,"imgs_"+i),sgClient);
// Piante
for(int i=0;i<c.getPianteFineScavo().size();i++)
loadFiles(c.getPianteFineScavo().get(i), new File(currentFolder,"pianta_"+i),sgClient);
found.add(c);
PrintWriter w=new PrintWriter(new File(currentFolder,c.getId()+".json"));
w.append(Serialization.write(c));
w.flush();
w.close();
} catch (IOException e) {
log.error("Unable to load {}",c.getId(),e);
} catch (StorageHubException e) {
log.error("Unable to load {}",c.getId(),e);
}
});
System.out.println("Imported "+found.size()+" elements into "+dir.getAbsolutePath());
}
// NB baseDIR/conc_id/pos | pianta_i | imgs_i | other_i /
private static int loadFiles(AssociatedContent c, File directory, StorageHubClient sgHub) throws IOException, StorageHubException {
int count=0;
if (c == null) {
log.warn("Content is null for path {}",directory.getAbsolutePath());
} else if (c.getActualContent() == null) {
log.warn("Content {} is empty for path {}",c.getId(),directory.getAbsolutePath());
}else {
for (PersistedContent content : c.getActualContent()) {
if (content instanceof WorkspaceContent) {
FileContainer item = sgHub.open(((WorkspaceContent) content).getStorageID()).asFile();
WorkspaceContent wc = (WorkspaceContent) content;
File dest = new File(directory, item.get().getName());
dest.getParentFile().mkdirs();
dest.createNewFile();
IOUtils.copy(item.getPublicLink().openStream(), new FileOutputStream(dest));
count++;
}
}
log.info("Put {} files into {} ", count, directory.getAbsolutePath());
}
return count;
};
}

@ -0,0 +1,54 @@
package org.gcube.application.geoportal.usecases;
import org.gcube.application.geoportal.client.legacy.ConcessioniManagerI;
import org.gcube.application.geoportal.clients.TokenSetter;
import org.gcube.application.geoportal.common.model.legacy.Concessione;
import java.util.ArrayList;
import java.util.concurrent.atomic.AtomicLong;
import static org.gcube.application.geoportal.client.GeoportalAbstractPlugin.statefulMongoConcessioni;
public class RepublishAll {
public static void main(String[] args) throws Exception {
TokenSetter.set("/gcube/devsec/devVRE");
ConcessioniManagerI manager=statefulMongoConcessioni().build();
ArrayList<String> toSkipIds=new ArrayList<>();
AtomicLong count=new AtomicLong(0);
AtomicLong nullCount=new AtomicLong(0);
AtomicLong errCount=new AtomicLong(0);
manager.getList().forEachRemaining((Concessione c)->{
try{
String currentId=c.getMongo_id();
if(currentId==null) {
System.out.println("ID IS NULL " + c);
nullCount.incrementAndGet();
}
else
if(toSkipIds.contains(currentId))
System.out.println("Skipping "+currentId);
else {
System.out.println("Upublishing " + c.getMongo_id());
manager.unPublish(c.getMongo_id());
System.out.println("Republishing" + c.getMongo_id());
manager.publish(c.getMongo_id());
}
}catch(Throwable throwable){
System.err.println(throwable);
errCount.incrementAndGet();
}finally {
count.incrementAndGet();
}
});
System.out.println("Done "+count.get()+" [null : "+nullCount.get()+", err : "+errCount.get()+"]");
}
}

@ -0,0 +1,17 @@
package org.gcube.application.geoportal.usecases;
import org.gcube.application.geoportal.client.legacy.ConcessioniManagerI;
import org.gcube.application.geoportal.clients.TokenSetter;
import static org.gcube.application.geoportal.client.GeoportalAbstractPlugin.statefulMongoConcessioni;
public class UnpublishSingle {
public static void main(String[] args) throws Exception {
TokenSetter.set("/gcube/devsec/devVRE");
ConcessioniManagerI manager=statefulMongoConcessioni().build();
manager.publish("610415af02ad3d05b5f81ee3");
}
}

@ -0,0 +1,171 @@
package org.gcube.application.geoportal.usecases.mocks;
import com.opencsv.CSVReader;
import lombok.extern.slf4j.Slf4j;
import org.gcube.application.geoportal.client.legacy.ConcessioniManagerI;
import org.gcube.application.geoportal.client.utils.FileSets;
import org.gcube.application.geoportal.clients.StatelessClientTests;
import org.gcube.application.geoportal.clients.TokenSetter;
import org.gcube.application.geoportal.common.model.TestModel;
import org.gcube.application.geoportal.common.model.legacy.Concessione;
import org.gcube.application.geoportal.common.model.legacy.InputStreamDescriptor;
import org.gcube.application.geoportal.common.model.legacy.UploadedImage;
import org.gcube.application.geoportal.common.model.legacy.report.ValidationReport;
import org.gcube.application.geoportal.common.model.rest.AddSectionToConcessioneRequest;
import org.gcube.application.geoportal.common.rest.MongoConcessioni;
import org.gcube.application.geoportal.common.rest.TempFile;
import org.gcube.application.geoportal.common.utils.Files;
import org.gcube.application.geoportal.common.utils.StorageUtils;
import org.gcube.contentmanagement.blobstorage.service.IClient;
import java.io.*;
import java.lang.reflect.Array;
import java.util.*;
import static org.gcube.application.geoportal.client.GeoportalAbstractPlugin.mongoConcessioni;
import static org.gcube.application.geoportal.client.GeoportalAbstractPlugin.statefulMongoConcessioni;
import static org.junit.Assert.assertTrue;
@Slf4j
public class MockFromFolder {
public static void main(String[] args) throws Exception {
//PARAMS
String context="/gcube/devsec/devVRE";
//Concessioni 04-03
//String packageBaseDir="/Users/fabioisti/Documents/Concessioni 04-03/";
//String csvDescriptor="src/test/resources/concessioni/concessioni04-03.csv";
//DATASET_GNA_01
// String packageBaseDir="/Users/fabioisti/Documents/DATASET_GNA_01";
// String csvDescriptor="src/test/resources/concessioni/DATASET_GNA_01.csv";
//DATASET_GNA_02
//String packageBaseDir="/Users/fabioisti/Documents/DATASET_GNA_02";
//String csvDescriptor="src/test/resources/concessioni/DATASET_GNA_02.csv";
// invio_08_02
// String packageBaseDir="/Users/fabioisti/Documents/invio_08_05";
// String csvDescriptor="src/test/resources/concessioni/invio_08_05.csv";
// concessioni 23_04
String packageBaseDir="/Users/fabioisti/Documents/Concessioni_23_04";
String csvDescriptor="src/test/resources/concessioni/concessioni_23_04.csv";
TokenSetter.set(context);
MongoConcessioni client=mongoConcessioni().build();
StorageUtils storage=new StorageUtils();
long publishedCount=0l;
long successcount=0l;
long entrycount=0l;
//Parse CSV descriptor
File baseDir=new File(packageBaseDir);
ArrayList<Concessione> pushed=new ArrayList<>();
CSVReader reader = new CSVReader(new FileReader(csvDescriptor));
String [] nextLine;
//reads one line at a time
while ((nextLine = reader.readNext()) != null)
{
entrycount++;
//Create new
String projectName = nextLine[0];
String positionPath = nextLine[1];
String piantePath = nextLine[2];
try {
//NB raggruppa per file
Map.Entry<String,List<File>> posSets = clusterizeFiles(positionPath, baseDir).entrySet().stream().findFirst().get();
Map<String, List<File>> pianteSets = clusterizeFiles(piantePath, baseDir);
// Sometimes they are the same
if(positionPath.equals(piantePath))
pianteSets.remove(posSets.getKey());
log.debug("Entry {} pos Size {} piante {} ",projectName,posSets.getValue().size(),pianteSets.size());
Concessione c = createMock(projectName, pianteSets, posSets.getValue(), client, storage);
publishedCount++;
if (c.getReport().getStatus().equals(ValidationReport.ValidationStatus.PASSED))
successcount++;
pushed.add(c);
}catch(Throwable t){
System.err.println("Problematic entry "+projectName);
t.printStackTrace(System.err);
}
}
System.out.println("Done "+publishedCount+" [SUCCESS : "+successcount+"] \t OUT OF :"+entrycount+" entries");
pushed.forEach(c -> {
try{
System.out.println(c.getNome()+"\t"+c.getMongo_id()+"\t"+c.getReport().getStatus());
}catch(Throwable t){
System.out.println(c.getNome()+"\t"+c.getMongo_id()+"\t PROBLEMATIC, NO REPORT");
}
});
}
private static Map<String,List<File>> clusterizeFiles(String basePath,File packageFolder) throws IOException {
log.debug("Clusterizing "+basePath);
HashMap<String,List<File>> toReturn = new HashMap<>();
File baseDir=new File(packageFolder,basePath);
for(File shp:baseDir.listFiles((dir,name)->{return name.endsWith(".shp");})) {
String basename=shp.getName().substring(0,shp.getName().lastIndexOf("."));
List<File> fileset=new ArrayList<>();
for (File shpSet : baseDir.listFiles((dir, name) -> {return name.startsWith(basename);}))
fileset.add(shpSet);
log.debug("SHP {} Set size {} ",basename,fileset.size());
toReturn.put(basename,fileset);
}
return toReturn;
}
private static Concessione createMock(String baseName,Map<String,List<File>> piante, List<File> pos,
MongoConcessioni client, StorageUtils storage) throws Exception {
Concessione c=TestModel.prepareConcessione(piante.size(), 2);
c.setNome("Mock for "+baseName);
c= client.createNew(c);
String mongoId=c.getMongo_id();
// TEST DATA, DO NOT CARE
client.registerFileSet(mongoId, FileSets.prepareRequest(storage,
Concessione.Paths.RELAZIONE,new File ("src/test/resources/concessioni/relazione.pdf")));
client.registerFileSet(mongoId, FileSets.prepareRequest(storage,
Concessione.Paths.imgByIndex(0),new File("src/test/resources/concessioni/immagine.png")));
// POSIZIONAMENTO
client.registerFileSet(mongoId, FileSets.prepareRequest(storage,
Concessione.Paths.POSIZIONAMENTO,pos.toArray(new File[pos.size()])));
Map.Entry<String,List<File>>[] entries= piante.entrySet().toArray(new Map.Entry[0]);
for( int i= 0; i< piante.size();i++)
client.registerFileSet(mongoId, FileSets.prepareRequest(storage,
Concessione.Paths.piantaByIndex(i),entries[i].getValue().toArray(new File[0])));
c=client.publish(mongoId);
System.out.println("@@@ Concessione "+c.getNome()+"\t STATUS : "+ c.getReport().getStatus());
return c;
}
}

@ -0,0 +1,747 @@
{
"authors": [
"Some one",
"Some, oneelse"
],
"centroidLat": 43.0,
"centroidLong": 9.0,
"contributore": "Contrib 1",
"creationTime": [
2020,
11,
26,
13,
14,
37,
342000000
],
"creationUser": "NO NAME",
"dataFineProgetto": [
2020,
11,
26,
13,
14,
17,
6000000
],
"dataInizioProgetto": [
2020,
11,
26,
13,
14,
16,
994000000
],
"descrizioneContenuto": "It contains this and that",
"editore": "Editore",
"folderId": "5f14252f-55df-4c9a-94d9-9ad190efbe6a",
"fontiFinanziamento": [
"Big pharma",
"Pentagon"
],
"genericContent": [],
"id": 8,
"immaginiRappresentative": [
{
"actualContent": [
{
"associated": null,
"id": 187,
"link": "https://data.dev.d4science.org/shub/E_VGFQSExUR1BmdzVHNjI5ZjFJeXE1TUFpWEkxUGllelIyWVZndndKZ3pBaGNPWlNGczdFaUNtMHVZaEd0dXc2Rw==",
"mimetype": "image/png",
"storageID": "6765deab-b157-494f-83e2-299032e1904c",
"type": "WorkspaceContent"
}
],
"creationTime": [
2020,
11,
26,
13,
14,
35,
177000000
],
"didascalia": "You can see my image number 0",
"format": "TIFF",
"id": 67,
"licenseID": "CC-BY",
"policy": "OPEN",
"record": null,
"responsabili": [
"Some one",
"Some, oneelse"
],
"soggetto": [
"Research Excavation",
"Archeology"
],
"titolo": "My image number 0",
"type": "UploadedImage"
},
{
"actualContent": [
{
"associated": null,
"id": 188,
"link": "https://data.dev.d4science.org/shub/E_NDVyQnBiMFJ1VDliYS83eEJvYS9vb1JrZ2tQN2orY3ZXNUJia25McFFtNlMrSS91NHNBN3pPVUNzTGN2aE9JOQ==",
"mimetype": "image/png",
"storageID": "4b4fb9f9-b96d-485d-80c9-713fad8a5c9b",
"type": "WorkspaceContent"
}
],
"creationTime": [
2020,
11,
26,
13,
14,
35,
177000000
],
"didascalia": "You can see my image number 1",
"format": "TIFF",
"id": 68,
"licenseID": "CC-BY",
"policy": "OPEN",
"record": null,
"responsabili": [
"Some one",
"Some, oneelse"
],
"soggetto": [
"Research Excavation",
"Archeology"
],
"titolo": "My image number 1",
"type": "UploadedImage"
},
{
"actualContent": [
{
"associated": null,
"id": 189,
"link": "https://data.dev.d4science.org/shub/E_YWw0TXVKa29KZFJOeDMwVlRDc29xMW0zSExYdGRJdmxZWEtJSGRVZ3ZBRVEwTnc1cEdMNG1iVVRBN2JDVG9WYQ==",
"mimetype": "image/png",
"storageID": "2690d6bc-2833-4797-81bb-1c1865f34f34",
"type": "WorkspaceContent"
}
],
"creationTime": [
2020,
11,
26,
13,
14,
35,
177000000
],
"didascalia": "You can see my image number 2",
"format": "TIFF",
"id": 69,
"licenseID": "CC-BY",
"policy": "OPEN",
"record": null,
"responsabili": [
"Some one",
"Some, oneelse"
],
"soggetto": [
"Research Excavation",
"Archeology"
],
"titolo": "My image number 2",
"type": "UploadedImage"
},
{
"actualContent": [
{
"associated": null,
"id": 190,
"link": "https://data.dev.d4science.org/shub/E_TU9ha0lGMTRhTDl6S2IzWDNmUWROVXZjZzJiSmNrS1BjZ3gycUJvVEI2b0ZDaGxuK1dUWmlsNW1DZE1ESUJPbA==",
"mimetype": "image/png",
"storageID": "244b0fe0-8f53-469a-9c5e-ac63e37d4622",
"type": "WorkspaceContent"
}
],
"creationTime": [
2020,
11,
26,
13,
14,
35,
177000000
],
"didascalia": "You can see my image number 3",
"format": "TIFF",
"id": 70,
"licenseID": "CC-BY",
"policy": "OPEN",
"record": null,
"responsabili": [
"Some one",
"Some, oneelse"
],
"soggetto": [
"Research Excavation",
"Archeology"
],
"titolo": "My image number 3",
"type": "UploadedImage"
},
{
"actualContent": [
{
"associated": null,
"id": 191,
"link": "https://data.dev.d4science.org/shub/E_NXZYZnV3RlFTYzRWOTBOMWt0cmFtVUtTU20xWTBQb3daRVV6RU8zTDc5RU9USnZVL3Y1VmpRNHNaajMyelVTMQ==",
"mimetype": "image/png",
"storageID": "6fab2082-08af-4899-9730-462b011b517d",
"type": "WorkspaceContent"
}
],
"creationTime": [
2020,
11,
26,
13,
14,
35,
177000000
],
"didascalia": "You can see my image number 4",
"format": "TIFF",
"id": 71,
"licenseID": "CC-BY",
"policy": "OPEN",
"record": null,
"responsabili": [
"Some one",
"Some, oneelse"
],
"soggetto": [
"Research Excavation",
"Archeology"
],
"titolo": "My image number 4",
"type": "UploadedImage"
}
],
"introduzione": "This is my project",
"lastUpdateTime": [
2020,
11,
26,
13,
14,
37,
342000000
],
"lastUpdateUser": "NO NAME",
"licenzaID": "CC-BY",
"nome": "Italia, forse",
"paroleChiaveICCD": [
"vattelapesca",
"somthing something"
],
"paroleChiaveLibere": [
"Robba",
"Stuff"
],
"pianteFineScavo": [
{
"abstractSection": "Planimetria georeferenziata dell'area indagata al termine delle attività",
"actualContent": [
{
"associated": null,
"id": 196,
"link": "https://data.dev.d4science.org/shub/E_aTZqVlNzRlRVSUFVZXhBNVp2bDdYMDlRTnNwVlRGRXNqMlI3MkxTdXlrWVFJeDF0L3pLemtaTDBwWFA3TVJKUw==",
"mimetype": "application/x-shapefile",
"storageID": "debd7027-56fe-4cff-ae87-b0df94421035",
"type": "WorkspaceContent"
},
{
"associated": null,
"id": 193,
"link": "https://data.dev.d4science.org/shub/E_UWpOTUYvRTRvV2hCYS8wQ3BaSG5GdG00MXdyeVg2M3dnZk5ZSEd3a0RxdWs0YUJTalFMK1JJQ2x5dFlySTZ4Lw==",
"mimetype": "text/plain",
"storageID": "d44b073f-6828-4dfd-a1fc-1d5eed93abc5",
"type": "WorkspaceContent"
},
{
"associated": null,
"id": 195,
"link": "https://data.dev.d4science.org/shub/E_SXUrWi9OZW9MMXpTSzdraGhveXNpaVo3b0Fid1loc1BEdnlqVmdGaWd1U2czb1YxdDhPeHNBWmovV21xRmxXVw==",
"mimetype": "application/x-shapefile",
"storageID": "4e184a77-915b-4ebd-bcb8-08ac8138069b",
"type": "WorkspaceContent"
},
{
"associated": null,
"id": 194,
"link": "https://data.dev.d4science.org/shub/E_RFZ0V2NUaDB5bCt4bGo5MnByZXZoRW5rWnRSWXFoRzdnQmxqTHlYSlhCeTU5RHZ3S2Ywa0ZDUCtUOCtZK3VkdQ==",
"mimetype": "text/plain",
"storageID": "f0f1fff4-6ee4-47c5-92be-2fd2c1ab5687",
"type": "WorkspaceContent"
},
{
"associated": null,
"id": 192,
"link": "https://data.dev.d4science.org/shub/E_cFZ6MFgvR1gzWmx0d2hvRmVnVTBQTEszdG1seEN3d2tBcHNsYkFXVlhKRUtucHZKb24xakEwa1IwQWJCTjc3cA==",
"mimetype": "application/x-dbf",
"storageID": "2c542d5a-ca89-42bb-87c9-1bceb8f0f03b",
"type": "WorkspaceContent"
}
],
"authors": [
"Some one",
"Some, oneelse"
],
"bbox": {
"maxLat": 90.0,
"maxLong": 180.0,
"minLat": -90.0,
"minLong": -180.0
},
"creationTime": [
2020,
11,
26,
13,
14,
37,
342000000
],
"id": 72,
"layerID": null,
"layerName": null,
"layerUUID": null,
"licenseID": "CC-BY",
"metodoRaccoltaDati": "Fattobbene",
"paroleChiaveICCD": [
"vattelapesca",
"somthing something"
],
"paroleChiaveLibere": [
"Robba",
"Stuff"
],
"policy": "RESTRICTED",
"record": null,
"responsabile": "Someone",
"scalaAcquisizione": "1:10000",
"subTopic": "Archeology",
"titolo": "Italia, forse pianta fine scavo",
"topicCategory": "Society",
"type": "LayerConcessione",
"valutazioneQualita": "Secondo me si",
"wmsLink": null
},
{
"abstractSection": "Planimetria georeferenziata dell'area indagata al termine delle attività",
"actualContent": [
{
"associated": null,
"id": 198,
"link": "https://data.dev.d4science.org/shub/E_UWpOTUYvRTRvV2hCYS8wQ3BaSG5GdG00MXdyeVg2M3dnZk5ZSEd3a0RxdWs0YUJTalFMK1JJQ2x5dFlySTZ4Lw==",
"mimetype": "text/plain",
"storageID": "d44b073f-6828-4dfd-a1fc-1d5eed93abc5",
"type": "WorkspaceContent"
},
{
"associated": null,
"id": 197,
"link": "https://data.dev.d4science.org/shub/E_cFZ6MFgvR1gzWmx0d2hvRmVnVTBQTEszdG1seEN3d2tBcHNsYkFXVlhKRUtucHZKb24xakEwa1IwQWJCTjc3cA==",
"mimetype": "application/x-dbf",
"storageID": "2c542d5a-ca89-42bb-87c9-1bceb8f0f03b",
"type": "WorkspaceContent"
},
{
"associated": null,
"id": 200,
"link": "https://data.dev.d4science.org/shub/E_SXUrWi9OZW9MMXpTSzdraGhveXNpaVo3b0Fid1loc1BEdnlqVmdGaWd1U2czb1YxdDhPeHNBWmovV21xRmxXVw==",
"mimetype": "application/x-shapefile",
"storageID": "4e184a77-915b-4ebd-bcb8-08ac8138069b",
"type": "WorkspaceContent"
},
{
"associated": null,
"id": 199,
"link": "https://data.dev.d4science.org/shub/E_RFZ0V2NUaDB5bCt4bGo5MnByZXZoRW5rWnRSWXFoRzdnQmxqTHlYSlhCeTU5RHZ3S2Ywa0ZDUCtUOCtZK3VkdQ==",
"mimetype": "text/plain",
"storageID": "f0f1fff4-6ee4-47c5-92be-2fd2c1ab5687",
"type": "WorkspaceContent"
},
{
"associated": null,
"id": 201,
"link": "https://data.dev.d4science.org/shub/E_aTZqVlNzRlRVSUFVZXhBNVp2bDdYMDlRTnNwVlRGRXNqMlI3MkxTdXlrWVFJeDF0L3pLemtaTDBwWFA3TVJKUw==",
"mimetype": "application/x-shapefile",
"storageID": "debd7027-56fe-4cff-ae87-b0df94421035",
"type": "WorkspaceContent"
}
],
"authors": [
"Some one",
"Some, oneelse"
],
"bbox": {
"maxLat": 90.0,
"maxLong": 180.0,
"minLat": -90.0,
"minLong": -180.0
},
"creationTime": [
2020,
11,
26,
13,
14,
37,
342000000
],
"id": 73,
"layerID": null,
"layerName": null,
"layerUUID": null,
"licenseID": "CC-BY",
"metodoRaccoltaDati": "Fattobbene",
"paroleChiaveICCD": [
"vattelapesca",
"somthing something"
],
"paroleChiaveLibere": [
"Robba",
"Stuff"
],
"policy": "RESTRICTED",
"record": null,
"responsabile": "Someone",
"scalaAcquisizione": "1:10000",
"subTopic": "Archeology",
"titolo": "Italia, forse pianta fine scavo",
"topicCategory": "Society",
"type": "LayerConcessione",
"valutazioneQualita": "Secondo me si",
"wmsLink": null
},
{
"abstractSection": "Planimetria georeferenziata dell'area indagata al termine delle attività",
"actualContent": [
{
"associated": null,
"id": 202,
"link": "https://data.dev.d4science.org/shub/E_cFZ6MFgvR1gzWmx0d2hvRmVnVTBQTEszdG1seEN3d2tBcHNsYkFXVlhKRUtucHZKb24xakEwa1IwQWJCTjc3cA==",
"mimetype": "application/x-dbf",
"storageID": "2c542d5a-ca89-42bb-87c9-1bceb8f0f03b",
"type": "WorkspaceContent"
},
{
"associated": null,
"id": 204,
"link": "https://data.dev.d4science.org/shub/E_RFZ0V2NUaDB5bCt4bGo5MnByZXZoRW5rWnRSWXFoRzdnQmxqTHlYSlhCeTU5RHZ3S2Ywa0ZDUCtUOCtZK3VkdQ==",
"mimetype": "text/plain",
"storageID": "f0f1fff4-6ee4-47c5-92be-2fd2c1ab5687",
"type": "WorkspaceContent"
},
{
"associated": null,
"id": 205,
"link": "https://data.dev.d4science.org/shub/E_SXUrWi9OZW9MMXpTSzdraGhveXNpaVo3b0Fid1loc1BEdnlqVmdGaWd1U2czb1YxdDhPeHNBWmovV21xRmxXVw==",
"mimetype": "application/x-shapefile",
"storageID": "4e184a77-915b-4ebd-bcb8-08ac8138069b",
"type": "WorkspaceContent"
},
{
"associated": null,
"id": 203,
"link": "https://data.dev.d4science.org/shub/E_UWpOTUYvRTRvV2hCYS8wQ3BaSG5GdG00MXdyeVg2M3dnZk5ZSEd3a0RxdWs0YUJTalFMK1JJQ2x5dFlySTZ4Lw==",
"mimetype": "text/plain",
"storageID": "d44b073f-6828-4dfd-a1fc-1d5eed93abc5",
"type": "WorkspaceContent"
},
{
"associated": null,
"id": 206,
"link": "https://data.dev.d4science.org/shub/E_aTZqVlNzRlRVSUFVZXhBNVp2bDdYMDlRTnNwVlRGRXNqMlI3MkxTdXlrWVFJeDF0L3pLemtaTDBwWFA3TVJKUw==",
"mimetype": "application/x-shapefile",
"storageID": "debd7027-56fe-4cff-ae87-b0df94421035",
"type": "WorkspaceContent"
}
],
"authors": [
"Some one",
"Some, oneelse"
],
"bbox": {
"maxLat": 90.0,
"maxLong": 180.0,
"minLat": -90.0,
"minLong": -180.0
},
"creationTime": [
2020,
11,
26,
13,
14,
37,
342000000
],
"id": 74,
"layerID": null,
"layerName": null,
"layerUUID": null,
"licenseID": "CC-BY",
"metodoRaccoltaDati": "Fattobbene",
"paroleChiaveICCD": [
"vattelapesca",
"somthing something"
],
"paroleChiaveLibere": [
"Robba",
"Stuff"
],
"policy": "RESTRICTED",
"record": null,
"responsabile": "Someone",
"scalaAcquisizione": "1:10000",
"subTopic": "Archeology",
"titolo": "Italia, forse pianta fine scavo",
"topicCategory": "Society",
"type": "LayerConcessione",
"valutazioneQualita": "Secondo me si",
"wmsLink": null
},
{
"abstractSection": "Planimetria georeferenziata dell'area indagata al termine delle attività",
"actualContent": [
{
"associated": null,
"id": 209,
"link": "https://data.dev.d4science.org/shub/E_RFZ0V2NUaDB5bCt4bGo5MnByZXZoRW5rWnRSWXFoRzdnQmxqTHlYSlhCeTU5RHZ3S2Ywa0ZDUCtUOCtZK3VkdQ==",
"mimetype": "text/plain",
"storageID": "f0f1fff4-6ee4-47c5-92be-2fd2c1ab5687",
"type": "WorkspaceContent"
},
{
"associated": null,
"id": 211,
"link": "https://data.dev.d4science.org/shub/E_aTZqVlNzRlRVSUFVZXhBNVp2bDdYMDlRTnNwVlRGRXNqMlI3MkxTdXlrWVFJeDF0L3pLemtaTDBwWFA3TVJKUw==",
"mimetype": "application/x-shapefile",
"storageID": "debd7027-56fe-4cff-ae87-b0df94421035",
"type": "WorkspaceContent"
},
{
"associated": null,
"id": 207,
"link": "https://data.dev.d4science.org/shub/E_cFZ6MFgvR1gzWmx0d2hvRmVnVTBQTEszdG1seEN3d2tBcHNsYkFXVlhKRUtucHZKb24xakEwa1IwQWJCTjc3cA==",
"mimetype": "application/x-dbf",
"storageID": "2c542d5a-ca89-42bb-87c9-1bceb8f0f03b",
"type": "WorkspaceContent"
},
{
"associated": null,
"id": 208,
"link": "https://data.dev.d4science.org/shub/E_UWpOTUYvRTRvV2hCYS8wQ3BaSG5GdG00MXdyeVg2M3dnZk5ZSEd3a0RxdWs0YUJTalFMK1JJQ2x5dFlySTZ4Lw==",
"mimetype": "text/plain",
"storageID": "d44b073f-6828-4dfd-a1fc-1d5eed93abc5",
"type": "WorkspaceContent"
},
{
"associated": null,
"id": 210,
"link": "https://data.dev.d4science.org/shub/E_SXUrWi9OZW9MMXpTSzdraGhveXNpaVo3b0Fid1loc1BEdnlqVmdGaWd1U2czb1YxdDhPeHNBWmovV21xRmxXVw==",
"mimetype": "application/x-shapefile",
"storageID": "4e184a77-915b-4ebd-bcb8-08ac8138069b",
"type": "WorkspaceContent"
}
],
"authors": [
"Some one",
"Some, oneelse"
],
"bbox": {
"maxLat": 90.0,
"maxLong": 180.0,
"minLat": -90.0,
"minLong": -180.0
},
"creationTime": [
2020,
11,
26,
13,
14,
37,
342000000
],
"id": 75,
"layerID": null,
"layerName": null,
"layerUUID": null,
"licenseID": "CC-BY",
"metodoRaccoltaDati": "Fattobbene",
"paroleChiaveICCD": [
"vattelapesca",
"somthing something"
],
"paroleChiaveLibere": [
"Robba",
"Stuff"
],
"policy": "RESTRICTED",
"record": null,
"responsabile": "Someone",
"scalaAcquisizione": "1:10000",
"subTopic": "Archeology",
"titolo": "Italia, forse pianta fine scavo",
"topicCategory": "Society",
"type": "LayerConcessione",
"valutazioneQualita": "Secondo me si",
"wmsLink": null
}
],
"policy": "OPEN",
"posizionamentoScavo": {
"abstractSection": "Posizionamento topografico georeferenziato dellarea interessata dalle indagini",
"actualContent": [
{
"associated": null,
"id": 214,
"link": "https://data.dev.d4science.org/shub/E_UjJoQkw2a0VlR3djQnVYMlNaME40VkdLL3pxV21DNmRrWXVZUlFhMk53aXJORVJmM29pcHpPdVc4aHZLUTRwcg==",
"mimetype": "text/plain",
"storageID": "fac45dad-4840-4fda-b613-0bfd831d8720",
"type": "WorkspaceContent"
},
{
"associated": null,
"id": 213,
"link": "https://data.dev.d4science.org/shub/E_T0lsR09LbVdqMExWT1ZwZWpZSW4zUXBqZlV2bCt6d3hMbnc5UDBvRW45eENONzB4cXNtZ216cXZFNWVzdjU0eg==",
"mimetype": "text/plain",
"storageID": "d599e90f-26e0-4b27-b85e-bedd286ff2d7",
"type": "WorkspaceContent"
},
{
"associated": null,
"id": 215,
"link": "https://data.dev.d4science.org/shub/E_U2NhMXUvMzRycE9YYkRmbHphdC82QlJJN2FEeVd0Y1FEQmxwSjNmcWRTUDZoZHhVQ1VPdjRMVVdOVDcxNTh5Yw==",
"mimetype": "application/x-shapefile",
"storageID": "f1080875-7f01-4658-9758-9388262ad12c",
"type": "WorkspaceContent"
},
{
"associated": null,
"id": 216,
"link": "https://data.dev.d4science.org/shub/E_RlBWRW5lUG9nbncxSC9ZQlRURmFSeTQ3Q0ZqdDhOK2luV01uWjUxMTZ4OHREa29US2t3K21RblpjaXFMTWtSSA==",
"mimetype": "application/x-shapefile",
"storageID": "6b7eeb40-0cd1-4fe5-97b5-b7091e6b7531",
"type": "WorkspaceContent"
},
{
"associated": null,
"id": 212,
"link": "https://data.dev.d4science.org/shub/E_aHQxcDhoRGN0QXdXZTkwUmtKRlJsUFVqWjM4STY3U0JkVGU1L3l1a2t5WkhFWlc4blpoa0QxaDVRaHZCOXR2Nw==",
"mimetype": "application/x-dbf",
"storageID": "9af11436-2241-4a03-a95b-96849272bc25",
"type": "WorkspaceContent"
}
],
"authors": [
"Some one",
"Some, oneelse"
],
"bbox": {
"maxLat": 90.0,
"maxLong": 180.0,
"minLat": -90.0,
"minLong": -180.0
},
"creationTime": [
2020,
11,
26,
13,
14,
37,
342000000
],
"id": 76,
"layerID": null,
"layerName": null,
"layerUUID": null,
"licenseID": "CC-BY",
"metodoRaccoltaDati": "Fattobbene",
"paroleChiaveICCD": [
"vattelapesca",
"somthing something"
],
"paroleChiaveLibere": [
"Robba",
"Stuff"
],
"policy": "OPEN",
"record": null,
"responsabile": "Someone",
"scalaAcquisizione": "1:10000",
"subTopic": "Archeology",
"titolo": "Italia, forse posizionamento scavo",
"topicCategory": "Society",
"type": "LayerConcessione",
"valutazioneQualita": "Secondo me si",
"wmsLink": null
},
"recordType": "CONCESSIONE",
"relazioneScavo": {
"abstractSection": "simple abstract section",
"actualContent": [
{
"associated": null,
"id": 217,
"link": "https://data.dev.d4science.org/shub/E_a0JGWWNsY0tFc29CVC8xUW1ROUJhMnVaaWwxNk5TTk5TRlgvQW1tbkpLdDBuNFU3Rkg2VmlFVW53TEUzaEM4aA==",
"mimetype": "application/pdf",
"storageID": "e0cd721a-89e4-437d-9fba-2bfc197cb4c1",
"type": "WorkspaceContent"
}
],
"creationTime": [
2020,
11,
26,
13,
14,
37,
342000000
],
"id": 77,
"licenseID": "CC-BY",
"policy": "OPEN",
"record": null,
"responsabili": [
"Some one",
"Some, oneelse"
],
"soggetto": [
"Research Excavation",
"Archeology"
],
"titolo": "Italia, forse relazione di scavo",
"type": "RelazioneScavo"
},
"responsabile": "Someone",
"risorseCorrelate": [],
"soggetto": [
"Research Excavation",
"Archeology"
],
"titolareCopyright": "Chiedilo in giro",
"titolareLicenza": "Qualcun altro",
"titolari": [
"Some one",
"Some, oneelse"
],
"version": "1.0.0"
}

File diff suppressed because one or more lines are too long

@ -0,0 +1,6 @@
"GNA_Aquileia Casa Bestie Ferite_2019_rev_CdL","GNA_Aquileia Casa Bestie Ferite_2019_rev_CdL/GNA_topografia_Aquileia Casa Bestie Ferite","GNA_Aquileia Casa Bestie Ferite_2019_rev_CdL/GNA_topografia_Aquileia Casa Bestie Ferite"
"GNA_Castelseprio castrum-borgo_2019_rev_CdL","GNA_Castelseprio castrum-borgo_2019_rev_CdL/GNA_topografia_Castelseprio castrum-borgo","GNA_Castelseprio castrum-borgo_2019_rev_CdL/GNA_topografia_Castelseprio castrum-borgo"
"GNA_Monte Postale_2019_rev_CdL_FPDC","GNA_Monte Postale_2019_rev_CdL_FPDC/GNA_topografia_Monte Postale","GNA_Monte Postale_2019_rev_CdL_FPDC/GNA_topografia_Monte Postale"
"GNA_Castelseprio castrum-borgo_2019_rev_CdL","GNA_Castelseprio castrum-borgo_2019_rev_CdL/GNA_topografia_Castelseprio castrum-borgo","GNA_Castelseprio castrum-borgo_2019_rev_CdL/GNA_topografia_Castelseprio castrum-borgo"
"GNA_Aquileia Casa Bestie Ferite_2019_rev_CdL","GNA_Aquileia Casa Bestie Ferite_2019_rev_CdL/GNA_topografia_Aquileia Casa Bestie Ferite","GNA_Aquileia Casa Bestie Ferite_2019_rev_CdL/GNA_topografia_Aquileia Casa Bestie Ferite"
"GNA_Appia Antica V miglio_2019_rev_CdL","GNA_Appia Antica V miglio_2019_rev_CdL/GNA_topografia_Appia Antica V miglio","GNA_Appia Antica V miglio_2019_rev_CdL/GNA_topografia_Appia Antica V miglio"
1 GNA_Aquileia Casa Bestie Ferite_2019_rev_CdL GNA_Aquileia Casa Bestie Ferite_2019_rev_CdL/GNA_topografia_Aquileia Casa Bestie Ferite GNA_Aquileia Casa Bestie Ferite_2019_rev_CdL/GNA_topografia_Aquileia Casa Bestie Ferite
2 GNA_Castelseprio castrum-borgo_2019_rev_CdL GNA_Castelseprio castrum-borgo_2019_rev_CdL/GNA_topografia_Castelseprio castrum-borgo GNA_Castelseprio castrum-borgo_2019_rev_CdL/GNA_topografia_Castelseprio castrum-borgo
3 GNA_Monte Postale_2019_rev_CdL_FPDC GNA_Monte Postale_2019_rev_CdL_FPDC/GNA_topografia_Monte Postale GNA_Monte Postale_2019_rev_CdL_FPDC/GNA_topografia_Monte Postale
4 GNA_Castelseprio castrum-borgo_2019_rev_CdL GNA_Castelseprio castrum-borgo_2019_rev_CdL/GNA_topografia_Castelseprio castrum-borgo GNA_Castelseprio castrum-borgo_2019_rev_CdL/GNA_topografia_Castelseprio castrum-borgo
5 GNA_Aquileia Casa Bestie Ferite_2019_rev_CdL GNA_Aquileia Casa Bestie Ferite_2019_rev_CdL/GNA_topografia_Aquileia Casa Bestie Ferite GNA_Aquileia Casa Bestie Ferite_2019_rev_CdL/GNA_topografia_Aquileia Casa Bestie Ferite
6 GNA_Appia Antica V miglio_2019_rev_CdL GNA_Appia Antica V miglio_2019_rev_CdL/GNA_topografia_Appia Antica V miglio GNA_Appia Antica V miglio_2019_rev_CdL/GNA_topografia_Appia Antica V miglio

@ -0,0 +1,5 @@
"GNA_Bostel di Rotzo_Rev_FPDC","GNA_Bostel di Rotzo_Rev_FPDC/GNA_topografia_Bostel di Rotzo","GNA_Bostel di Rotzo_Rev_FPDC/GNA_topografia_Bostel di Rotzo"
"GNA_Braida Murada_Rev_FPDC","GNA_Braida Murada_Rev_FPDC/GNA_topografia_Braida Murada","GNA_Braida Murada_Rev_FPDC/GNA_topografia_Braida Murada"
"GNA_Egnazia_Rev_FPDC","GNA_Bostel di Rotzo_Rev_FPDC/GNA_topografia_Bostel di Rotzo","GNA_Bostel di Rotzo_Rev_FPDC/GNA_topografia_Bostel di Rotzo"
"GNA_Ferrandina_Rev_FPDC","GNA_Ferrandina_Rev_FPDC/GNA_topografia_Ferrandina","GNA_Ferrandina_Rev_FPDC/GNA_topografia_Ferrandina"
"GNA_Timpone della Motta_Rev_FPDC","GNA_Timpone della Motta_Rev_FPDC/GNA_topografia_Timpone della Motta","GNA_Timpone della Motta_Rev_FPDC/GNA_topografia_Timpone della Motta"
1 GNA_Bostel di Rotzo_Rev_FPDC GNA_Bostel di Rotzo_Rev_FPDC/GNA_topografia_Bostel di Rotzo GNA_Bostel di Rotzo_Rev_FPDC/GNA_topografia_Bostel di Rotzo
2 GNA_Braida Murada_Rev_FPDC GNA_Braida Murada_Rev_FPDC/GNA_topografia_Braida Murada GNA_Braida Murada_Rev_FPDC/GNA_topografia_Braida Murada
3 GNA_Egnazia_Rev_FPDC GNA_Bostel di Rotzo_Rev_FPDC/GNA_topografia_Bostel di Rotzo GNA_Bostel di Rotzo_Rev_FPDC/GNA_topografia_Bostel di Rotzo
4 GNA_Ferrandina_Rev_FPDC GNA_Ferrandina_Rev_FPDC/GNA_topografia_Ferrandina GNA_Ferrandina_Rev_FPDC/GNA_topografia_Ferrandina
5 GNA_Timpone della Motta_Rev_FPDC GNA_Timpone della Motta_Rev_FPDC/GNA_topografia_Timpone della Motta GNA_Timpone della Motta_Rev_FPDC/GNA_topografia_Timpone della Motta

@ -0,0 +1,18 @@
"Acquacadda_Nuxis_2019_def","Acquacadda_Nuxis_2019_def/D_posizionamento saggi_NUXIS 2019","Acquacadda_Nuxis_2019_def/E_piante fine scavo vettoriali_NUXIS 2019"
"Ariano nel Polisine (Ro) - Loc. San Basilio ( Unvi. di Padova)","Ariano nel Polisine (Ro) - Loc. San Basilio ( Unvi. di Padova)/GNA_SAN BASILIO_2019/GNA_topografia_San Basilio/POSIZIONAMENTO SAGGI E AREE DELLE INDAGINI","Ariano nel Polisine (Ro) - Loc. San Basilio ( Unvi. di Padova)/GNA_SAN BASILIO_2019/GNA_topografia_San Basilio/PLANIMETRIE SAGGI AREE DELLE INDAGINI"
"Ariano Polesine (Ro) - Loc. San Basilio (Uni. di Venezia)","Ariano Polesine (Ro) - Loc. San Basilio (Uni. di Venezia)/S.Basilio-UniVe_GNA/D.GNA_Posizionamento_San Basilio","Ariano Polesine (Ro) - Loc. San Basilio (Uni. di Venezia)/S.Basilio-UniVe_GNA/E-F.GNA_Pianta fine scavo_San Basilio/GNA_Pianta di fine scavo_San Basilio"
"C_F_GNA_Oscurusciuto_2020","C_F_GNA_Oscurusciuto_2020/D-E-F_GNA_topografia_Oscurusciuto/Posizionamento_limiti_saggi_indagati_Oscurusciuto_vettoriale","C_F_GNA_Oscurusciuto_2020/D-E-F_GNA_topografia_Oscurusciuto/Pianta_fine_scavo_Oscurusciuto_2019_vettoriale"
"Cerchiara-Damale_rev","Cerchiara-Damale_rev/D. Posizionamento saggio","Cerchiara-Damale_rev/D. Posizionamento saggio/E. Pianta fine scavo_vettoriale"
"Cerveteri (RM)_loc. Monte Abatone_documentazione fine scavo 2019 (paragr. IVa)","Cerveteri (RM)_loc. Monte Abatone_documentazione fine scavo 2019 (paragr. IVa)/IVa_E_Tav.1_Shape Posizionamento area scavo","Cerveteri (RM)_loc. Monte Abatone_documentazione fine scavo 2019 (paragr. IVa)/IVa_E_Tav.1_Shape Posizionamento area scavo"
"Cervia Vecchia_rev","Cervia Vecchia_rev/D_GNA_topografia_Cervia","Cervia Vecchia_rev/D_GNA_topografia_Cervia"
"Civitavecchia (RM)_loc. Ficoncella_Aquae Tauri_docum. IVa_2019","Civitavecchia (RM)_loc. Ficoncella_Aquae Tauri_docum. IVa_2019/Civitavecchia (RM)_Ficoncella_documentazione fine scavo 2019_IVa/IVa_D_E_F_topografia_Aquae_Tauri/Posizionamento saggi 2019","Civitavecchia (RM)_loc. Ficoncella_Aquae Tauri_docum. IVa_2019/Civitavecchia (RM)_Ficoncella_documentazione fine scavo 2019_IVa/IVa_D_E_F_topografia_Aquae_Tauri/Pianta di fine scavo 2019"
"Frascineto Timpone delle Fave_rev","Frascineto Timpone delle Fave_rev/D. Posizionamento dell'area","Frascineto Timpone delle Fave_rev/D. Posizionamento dell'area"
"GNA_AQUILEIAcomellimoro_2019_rev","GNA_AQUILEIAcomellimoro_2019_rev/GNA_topografia_AQUILEIAcomellimoro_2019/D.Posizionamento_AQU19COM","GNA_AQUILEIAcomellimoro_2019_rev/GNA_topografia_AQUILEIAcomellimoro_2019/E.Planimetria generale_AQU19COM"
"GNA_Poggio Pimperiale_Poggibonsi","GNA_Poggio Pimperiale_Poggibonsi/5591449/GNA_topografia_PoggioImperiale/POSIZIONAMENTO","GNA_Poggio Pimperiale_Poggibonsi/5591449/GNA_topografia_PoggioImperiale/PLANIMETRIE SAGGI/SHAPE A22"
"Jesolo (Ve) - Loc. San Mauro e Torre del Caligo","Jesolo (Ve) - Loc. San Mauro e Torre del Caligo/GNA_topografia_Jesolo/GIS_shp","Jesolo (Ve) - Loc. San Mauro e Torre del Caligo/GNA_topografia_Jesolo/GIS_shp"
"Monterotondo (RM)_loc. Tor Mancina_documentazione fine scavo 2019 (paragr. IVa)","Monterotondo (RM)_loc. Tor Mancina_documentazione fine scavo 2019 (paragr. IVa)/IVa_D_E_F_GNA_topografia_Via Nomentum-Eretum","Monterotondo (RM)_loc. Tor Mancina_documentazione fine scavo 2019 (paragr. IVa)/IVa_D_E_F_GNA_topografia_Via Nomentum-Eretum"
"Quarto d'Altino -Loc. Fornace","Quarto d'Altino -Loc. Fornace/Cupitò/GNA_Altino_posizionamento_shp","Quarto d'Altino -Loc. Fornace/Cupitò/GNA_Altino_posizionamento_shp"
"Tolfa (RM)_Bufalareccia_documentazione IVa 2019","Tolfa (RM)_Bufalareccia_documentazione IVa 2019/IVa_D_GNA_posizionamento dei limiti in formato vectoriale_Bufalareccia 2019","Tolfa (RM)_Bufalareccia_documentazione IVa 2019/IVa_E_GNA_pianta di fine scavo multipolygon_Bufalareccia 2019"
"UNIME_ LAINO_REV","UNIME_ LAINO_REV/D. Limiti saggi/laino 2019 limiti saggi","UNIME_ LAINO_REV/D. Limiti saggi/laino 2019 limiti saggi"
"UNIME_TORTORA_rev","UNIME_TORTORA_rev/tortora 2019 limiti saggi","UNIME_TORTORA_rev/tortora 2019 pianta fine scavo"
"UsiniTomestighes","UsiniTomestighes/GNA_TOMESTIGHES_2019/GNA_Topografia_Tomestighes/D_GNA_Posizionamento_limiti_aree_indagate","UsiniTomestighes/GNA_TOMESTIGHES_2019/GNA_Topografia_Tomestighes/E_GNA_Piante_fine_scavo_Tomestighes/Area A_est"
1 Acquacadda_Nuxis_2019_def Acquacadda_Nuxis_2019_def/D_posizionamento saggi_NUXIS 2019 Acquacadda_Nuxis_2019_def/E_piante fine scavo vettoriali_NUXIS 2019
2 Ariano nel Polisine (Ro) - Loc. San Basilio ( Unvi. di Padova) Ariano nel Polisine (Ro) - Loc. San Basilio ( Unvi. di Padova)/GNA_SAN BASILIO_2019/GNA_topografia_San Basilio/POSIZIONAMENTO SAGGI E AREE DELLE INDAGINI Ariano nel Polisine (Ro) - Loc. San Basilio ( Unvi. di Padova)/GNA_SAN BASILIO_2019/GNA_topografia_San Basilio/PLANIMETRIE SAGGI AREE DELLE INDAGINI
3 Ariano Polesine (Ro) - Loc. San Basilio (Uni. di Venezia) Ariano Polesine (Ro) - Loc. San Basilio (Uni. di Venezia)/S.Basilio-UniVe_GNA/D.GNA_Posizionamento_San Basilio Ariano Polesine (Ro) - Loc. San Basilio (Uni. di Venezia)/S.Basilio-UniVe_GNA/E-F.GNA_Pianta fine scavo_San Basilio/GNA_Pianta di fine scavo_San Basilio
4 C_F_GNA_Oscurusciuto_2020 C_F_GNA_Oscurusciuto_2020/D-E-F_GNA_topografia_Oscurusciuto/Posizionamento_limiti_saggi_indagati_Oscurusciuto_vettoriale C_F_GNA_Oscurusciuto_2020/D-E-F_GNA_topografia_Oscurusciuto/Pianta_fine_scavo_Oscurusciuto_2019_vettoriale
5 Cerchiara-Damale_rev Cerchiara-Damale_rev/D. Posizionamento saggio Cerchiara-Damale_rev/D. Posizionamento saggio/E. Pianta fine scavo_vettoriale
6 Cerveteri (RM)_loc. Monte Abatone_documentazione fine scavo 2019 (paragr. IVa) Cerveteri (RM)_loc. Monte Abatone_documentazione fine scavo 2019 (paragr. IVa)/IVa_E_Tav.1_Shape Posizionamento area scavo Cerveteri (RM)_loc. Monte Abatone_documentazione fine scavo 2019 (paragr. IVa)/IVa_E_Tav.1_Shape Posizionamento area scavo
7 Cervia Vecchia_rev Cervia Vecchia_rev/D_GNA_topografia_Cervia Cervia Vecchia_rev/D_GNA_topografia_Cervia
8 Civitavecchia (RM)_loc. Ficoncella_Aquae Tauri_docum. IVa_2019 Civitavecchia (RM)_loc. Ficoncella_Aquae Tauri_docum. IVa_2019/Civitavecchia (RM)_Ficoncella_documentazione fine scavo 2019_IVa/IVa_D_E_F_topografia_Aquae_Tauri/Posizionamento saggi 2019 Civitavecchia (RM)_loc. Ficoncella_Aquae Tauri_docum. IVa_2019/Civitavecchia (RM)_Ficoncella_documentazione fine scavo 2019_IVa/IVa_D_E_F_topografia_Aquae_Tauri/Pianta di fine scavo 2019
9 Frascineto Timpone delle Fave_rev Frascineto Timpone delle Fave_rev/D. Posizionamento dell'area Frascineto Timpone delle Fave_rev/D. Posizionamento dell'area
10 GNA_AQUILEIAcomellimoro_2019_rev GNA_AQUILEIAcomellimoro_2019_rev/GNA_topografia_AQUILEIAcomellimoro_2019/D.Posizionamento_AQU19COM GNA_AQUILEIAcomellimoro_2019_rev/GNA_topografia_AQUILEIAcomellimoro_2019/E.Planimetria generale_AQU19COM
11 GNA_Poggio Pimperiale_Poggibonsi GNA_Poggio Pimperiale_Poggibonsi/5591449/GNA_topografia_PoggioImperiale/POSIZIONAMENTO GNA_Poggio Pimperiale_Poggibonsi/5591449/GNA_topografia_PoggioImperiale/PLANIMETRIE SAGGI/SHAPE A22
12 Jesolo (Ve) - Loc. San Mauro e Torre del Caligo Jesolo (Ve) - Loc. San Mauro e Torre del Caligo/GNA_topografia_Jesolo/GIS_shp Jesolo (Ve) - Loc. San Mauro e Torre del Caligo/GNA_topografia_Jesolo/GIS_shp
13 Monterotondo (RM)_loc. Tor Mancina_documentazione fine scavo 2019 (paragr. IVa) Monterotondo (RM)_loc. Tor Mancina_documentazione fine scavo 2019 (paragr. IVa)/IVa_D_E_F_GNA_topografia_Via Nomentum-Eretum Monterotondo (RM)_loc. Tor Mancina_documentazione fine scavo 2019 (paragr. IVa)/IVa_D_E_F_GNA_topografia_Via Nomentum-Eretum
14 Quarto d'Altino -Loc. Fornace Quarto d'Altino -Loc. Fornace/Cupitò/GNA_Altino_posizionamento_shp Quarto d'Altino -Loc. Fornace/Cupitò/GNA_Altino_posizionamento_shp
15 Tolfa (RM)_Bufalareccia_documentazione IVa 2019 Tolfa (RM)_Bufalareccia_documentazione IVa 2019/IVa_D_GNA_posizionamento dei limiti in formato vectoriale_Bufalareccia 2019 Tolfa (RM)_Bufalareccia_documentazione IVa 2019/IVa_E_GNA_pianta di fine scavo multipolygon_Bufalareccia 2019
16 UNIME_ LAINO_REV UNIME_ LAINO_REV/D. Limiti saggi/laino 2019 limiti saggi UNIME_ LAINO_REV/D. Limiti saggi/laino 2019 limiti saggi
17 UNIME_TORTORA_rev UNIME_TORTORA_rev/tortora 2019 limiti saggi UNIME_TORTORA_rev/tortora 2019 pianta fine scavo
18 UsiniTomestighes UsiniTomestighes/GNA_TOMESTIGHES_2019/GNA_Topografia_Tomestighes/D_GNA_Posizionamento_limiti_aree_indagate UsiniTomestighes/GNA_TOMESTIGHES_2019/GNA_Topografia_Tomestighes/E_GNA_Piante_fine_scavo_Tomestighes/Area A_est

@ -0,0 +1,18 @@
"Acquacadda_Nuxis_2019_def","Acquacadda_Nuxis_2019_def/D_posizionamento saggi_NUXIS 2019","Acquacadda_Nuxis_2019_def/E_piante fine scavo vettoriali_NUXIS 2019"
"Ariano nel Polisine (Ro) - Loc. San Basilio ( Unvi. di Padova)","Ariano nel Polisine (Ro) - Loc. San Basilio ( Unvi. di Padova)/GNA_SAN BASILIO_2019/GNA_topografia_San Basilio/POSIZIONAMENTO SAGGI E AREE DELLE INDAGINI","Ariano nel Polisine (Ro) - Loc. San Basilio ( Unvi. di Padova)/GNA_SAN BASILIO_2019/GNA_topografia_San Basilio/PLANIMETRIE SAGGI AREE DELLE INDAGINI"
"Ariano Polesine (Ro) - Loc. San Basilio (Uni. di Venezia)","Ariano Polesine (Ro) - Loc. San Basilio (Uni. di Venezia)/S.Basilio-UniVe_GNA/D.GNA_Posizionamento_San Basilio","Ariano Polesine (Ro) - Loc. San Basilio (Uni. di Venezia)/S.Basilio-UniVe_GNA/E-F.GNA_Pianta fine scavo_San Basilio/GNA_Pianta di fine scavo_San Basilio"
"C_F_GNA_Oscurusciuto_2020","C_F_GNA_Oscurusciuto_2020/D-E-F_GNA_topografia_Oscurusciuto/Posizionamento_limiti_saggi_indagati_Oscurusciuto_vettoriale","C_F_GNA_Oscurusciuto_2020/D-E-F_GNA_topografia_Oscurusciuto/Pianta_fine_scavo_Oscurusciuto_2019_vettoriale"
"Cerchiara-Damale_rev","Cerchiara-Damale_rev/D. Posizionamento saggio","Cerchiara-Damale_rev/D. Posizionamento saggio/E. Pianta fine scavo_vettoriale"
"Cerveteri (RM)_loc. Monte Abatone_documentazione fine scavo 2019 (paragr. IVa)","Cerveteri (RM)_loc. Monte Abatone_documentazione fine scavo 2019 (paragr. IVa)/IVa_E_Tav.1_Shape Posizionamento area scavo","Cerveteri (RM)_loc. Monte Abatone_documentazione fine scavo 2019 (paragr. IVa)/IVa_E_Tav.1_Shape Posizionamento area scavo"
"Cervia Vecchia_rev","Cervia Vecchia_rev/D_GNA_topografia_Cervia","Cervia Vecchia_rev/D_GNA_topografia_Cervia"
"Civitavecchia (RM)_loc. Ficoncella_Aquae Tauri_docum. IVa_2019","Civitavecchia (RM)_loc. Ficoncella_Aquae Tauri_docum. IVa_2019/Civitavecchia (RM)_Ficoncella_documentazione fine scavo 2019_IVa/IVa_D_E_F_topografia_Aquae_Tauri/Posizionamento saggi 2019","Civitavecchia (RM)_loc. Ficoncella_Aquae Tauri_docum. IVa_2019/Civitavecchia (RM)_Ficoncella_documentazione fine scavo 2019_IVa/IVa_D_E_F_topografia_Aquae_Tauri/Pianta di fine scavo 2019"
"Frascineto Timpone delle Fave_rev","Frascineto Timpone delle Fave_rev/D. Posizionamento dell'area","Frascineto Timpone delle Fave_rev/D. Posizionamento dell'area"
"GNA_AQUILEIAcomellimoro_2019_rev","GNA_AQUILEIAcomellimoro_2019_rev/GNA_topografia_AQUILEIAcomellimoro_2019/D.Posizionamento_AQU19COM","GNA_AQUILEIAcomellimoro_2019_rev/GNA_topografia_AQUILEIAcomellimoro_2019/E.Planimetria generale_AQU19COM"
"GNA_Poggio Pimperiale_Poggibonsi","GNA_Poggio Pimperiale_Poggibonsi/5591449/GNA_topografia_PoggioImperiale/POSIZIONAMENTO","GNA_Poggio Pimperiale_Poggibonsi/5591449/GNA_topografia_PoggioImperiale/PLANIMETRIE SAGGI/SHAPE A22"
"Jesolo (Ve) - Loc. San Mauro e Torre del Caligo","Jesolo (Ve) - Loc. San Mauro e Torre del Caligo/GNA_topografia_Jesolo/GIS_shp","Jesolo (Ve) - Loc. San Mauro e Torre del Caligo/GNA_topografia_Jesolo/GIS_shp"
"Monterotondo (RM)_loc. Tor Mancina_documentazione fine scavo 2019 (paragr. IVa)","Monterotondo (RM)_loc. Tor Mancina_documentazione fine scavo 2019 (paragr. IVa)/IVa_D_E_F_GNA_topografia_Via Nomentum-Eretum","Monterotondo (RM)_loc. Tor Mancina_documentazione fine scavo 2019 (paragr. IVa)/IVa_D_E_F_GNA_topografia_Via Nomentum-Eretum"
"Quarto d'Altino -Loc. Fornace","Quarto d'Altino -Loc. Fornace/Cupitò/GNA_Altino_posizionamento_shp","Quarto d'Altino -Loc. Fornace/Cupitò/GNA_Altino_posizionamento_shp"
"Tolfa (RM)_Bufalareccia_documentazione IVa 2019","Tolfa (RM)_Bufalareccia_documentazione IVa 2019/IVa_D_GNA_posizionamento dei limiti in formato vectoriale_Bufalareccia 2019","Tolfa (RM)_Bufalareccia_documentazione IVa 2019/IVa_E_GNA_pianta di fine scavo multipolygon_Bufalareccia 2019"
"UNIME_ LAINO_REV","UNIME_ LAINO_REV/D. Limiti saggi/laino 2019 limiti saggi","UNIME_ LAINO_REV/D. Limiti saggi/laino 2019 limiti saggi"
"UNIME_TORTORA_rev","UNIME_TORTORA_rev/tortora 2019 limiti saggi","UNIME_TORTORA_rev/tortora 2019 pianta fine scavo"
"UsiniTomestighes","UsiniTomestighes/GNA_TOMESTIGHES_2019/GNA_Topografia_Tomestighes/D_GNA_Posizionamento_limiti_aree_indagate","UsiniTomestighes/GNA_TOMESTIGHES_2019/GNA_Topografia_Tomestighes/E_GNA_Piante_fine_scavo_Tomestighes/Area A_est"
1 Acquacadda_Nuxis_2019_def Acquacadda_Nuxis_2019_def/D_posizionamento saggi_NUXIS 2019 Acquacadda_Nuxis_2019_def/E_piante fine scavo vettoriali_NUXIS 2019
2 Ariano nel Polisine (Ro) - Loc. San Basilio ( Unvi. di Padova) Ariano nel Polisine (Ro) - Loc. San Basilio ( Unvi. di Padova)/GNA_SAN BASILIO_2019/GNA_topografia_San Basilio/POSIZIONAMENTO SAGGI E AREE DELLE INDAGINI Ariano nel Polisine (Ro) - Loc. San Basilio ( Unvi. di Padova)/GNA_SAN BASILIO_2019/GNA_topografia_San Basilio/PLANIMETRIE SAGGI AREE DELLE INDAGINI
3 Ariano Polesine (Ro) - Loc. San Basilio (Uni. di Venezia) Ariano Polesine (Ro) - Loc. San Basilio (Uni. di Venezia)/S.Basilio-UniVe_GNA/D.GNA_Posizionamento_San Basilio Ariano Polesine (Ro) - Loc. San Basilio (Uni. di Venezia)/S.Basilio-UniVe_GNA/E-F.GNA_Pianta fine scavo_San Basilio/GNA_Pianta di fine scavo_San Basilio
4 C_F_GNA_Oscurusciuto_2020 C_F_GNA_Oscurusciuto_2020/D-E-F_GNA_topografia_Oscurusciuto/Posizionamento_limiti_saggi_indagati_Oscurusciuto_vettoriale C_F_GNA_Oscurusciuto_2020/D-E-F_GNA_topografia_Oscurusciuto/Pianta_fine_scavo_Oscurusciuto_2019_vettoriale
5 Cerchiara-Damale_rev Cerchiara-Damale_rev/D. Posizionamento saggio Cerchiara-Damale_rev/D. Posizionamento saggio/E. Pianta fine scavo_vettoriale
6 Cerveteri (RM)_loc. Monte Abatone_documentazione fine scavo 2019 (paragr. IVa) Cerveteri (RM)_loc. Monte Abatone_documentazione fine scavo 2019 (paragr. IVa)/IVa_E_Tav.1_Shape Posizionamento area scavo Cerveteri (RM)_loc. Monte Abatone_documentazione fine scavo 2019 (paragr. IVa)/IVa_E_Tav.1_Shape Posizionamento area scavo
7 Cervia Vecchia_rev Cervia Vecchia_rev/D_GNA_topografia_Cervia Cervia Vecchia_rev/D_GNA_topografia_Cervia
8 Civitavecchia (RM)_loc. Ficoncella_Aquae Tauri_docum. IVa_2019 Civitavecchia (RM)_loc. Ficoncella_Aquae Tauri_docum. IVa_2019/Civitavecchia (RM)_Ficoncella_documentazione fine scavo 2019_IVa/IVa_D_E_F_topografia_Aquae_Tauri/Posizionamento saggi 2019 Civitavecchia (RM)_loc. Ficoncella_Aquae Tauri_docum. IVa_2019/Civitavecchia (RM)_Ficoncella_documentazione fine scavo 2019_IVa/IVa_D_E_F_topografia_Aquae_Tauri/Pianta di fine scavo 2019
9 Frascineto Timpone delle Fave_rev Frascineto Timpone delle Fave_rev/D. Posizionamento dell'area Frascineto Timpone delle Fave_rev/D. Posizionamento dell'area
10 GNA_AQUILEIAcomellimoro_2019_rev GNA_AQUILEIAcomellimoro_2019_rev/GNA_topografia_AQUILEIAcomellimoro_2019/D.Posizionamento_AQU19COM GNA_AQUILEIAcomellimoro_2019_rev/GNA_topografia_AQUILEIAcomellimoro_2019/E.Planimetria generale_AQU19COM
11 GNA_Poggio Pimperiale_Poggibonsi GNA_Poggio Pimperiale_Poggibonsi/5591449/GNA_topografia_PoggioImperiale/POSIZIONAMENTO GNA_Poggio Pimperiale_Poggibonsi/5591449/GNA_topografia_PoggioImperiale/PLANIMETRIE SAGGI/SHAPE A22
12 Jesolo (Ve) - Loc. San Mauro e Torre del Caligo Jesolo (Ve) - Loc. San Mauro e Torre del Caligo/GNA_topografia_Jesolo/GIS_shp Jesolo (Ve) - Loc. San Mauro e Torre del Caligo/GNA_topografia_Jesolo/GIS_shp
13 Monterotondo (RM)_loc. Tor Mancina_documentazione fine scavo 2019 (paragr. IVa) Monterotondo (RM)_loc. Tor Mancina_documentazione fine scavo 2019 (paragr. IVa)/IVa_D_E_F_GNA_topografia_Via Nomentum-Eretum Monterotondo (RM)_loc. Tor Mancina_documentazione fine scavo 2019 (paragr. IVa)/IVa_D_E_F_GNA_topografia_Via Nomentum-Eretum
14 Quarto d'Altino -Loc. Fornace Quarto d'Altino -Loc. Fornace/Cupitò/GNA_Altino_posizionamento_shp Quarto d'Altino -Loc. Fornace/Cupitò/GNA_Altino_posizionamento_shp
15 Tolfa (RM)_Bufalareccia_documentazione IVa 2019 Tolfa (RM)_Bufalareccia_documentazione IVa 2019/IVa_D_GNA_posizionamento dei limiti in formato vectoriale_Bufalareccia 2019 Tolfa (RM)_Bufalareccia_documentazione IVa 2019/IVa_E_GNA_pianta di fine scavo multipolygon_Bufalareccia 2019
16 UNIME_ LAINO_REV UNIME_ LAINO_REV/D. Limiti saggi/laino 2019 limiti saggi UNIME_ LAINO_REV/D. Limiti saggi/laino 2019 limiti saggi
17 UNIME_TORTORA_rev UNIME_TORTORA_rev/tortora 2019 limiti saggi UNIME_TORTORA_rev/tortora 2019 pianta fine scavo
18 UsiniTomestighes UsiniTomestighes/GNA_TOMESTIGHES_2019/GNA_Topografia_Tomestighes/D_GNA_Posizionamento_limiti_aree_indagate UsiniTomestighes/GNA_TOMESTIGHES_2019/GNA_Topografia_Tomestighes/E_GNA_Piante_fine_scavo_Tomestighes/Area A_est

@ -0,0 +1,4 @@
"GNA_Incoronata_2019_Rennes","/GNA_Incoronata_2019_Rennes/GNA_topografia_Incoronata/D","/GNA_Incoronata_2019_Rennes/GNA_topografia_Incoronata/E/SHP"
"MONTE MANNU_2019","/MONTE MANNU_2019/GNA_topografia_Monte_Mannu/D_Limiti dei saggi","/MONTE MANNU_2019/GNA_topografia_Monte_Mannu/E_Pianta di fine scavo"
"Santa Rosa Poviglio_2019","/Santa Rosa Poviglio_2019/GNA_Topografia_Poviglio/Posizionamento","/Santa Rosa Poviglio_2019/GNA_Topografia_Poviglio/Planimetrie"
"Usini Tomestighes_integrata","/Usini Tomestighes_integrata/GNA_TOMESTIGHES_2019/GNA_Topografia_Tomestighes/GNA_Tomestighes_2019/D_GNA_Posizionamento_limiti_aree_indagate","/Usini Tomestighes_integrata/GNA_TOMESTIGHES_2019/GNA_Topografia_Tomestighes/GNA_Tomestighes_2019/E_GNA_Piante_fine_scavo_Tomestighes/Area A est"
1 GNA_Incoronata_2019_Rennes /GNA_Incoronata_2019_Rennes/GNA_topografia_Incoronata/D /GNA_Incoronata_2019_Rennes/GNA_topografia_Incoronata/E/SHP
2 MONTE MANNU_2019 /MONTE MANNU_2019/GNA_topografia_Monte_Mannu/D_Limiti dei saggi /MONTE MANNU_2019/GNA_topografia_Monte_Mannu/E_Pianta di fine scavo
3 Santa Rosa Poviglio_2019 /Santa Rosa Poviglio_2019/GNA_Topografia_Poviglio/Posizionamento /Santa Rosa Poviglio_2019/GNA_Topografia_Poviglio/Planimetrie
4 Usini Tomestighes_integrata /Usini Tomestighes_integrata/GNA_TOMESTIGHES_2019/GNA_Topografia_Tomestighes/GNA_Tomestighes_2019/D_GNA_Posizionamento_limiti_aree_indagate /Usini Tomestighes_integrata/GNA_TOMESTIGHES_2019/GNA_Topografia_Tomestighes/GNA_Tomestighes_2019/E_GNA_Piante_fine_scavo_Tomestighes/Area A est

@ -0,0 +1,3 @@
{
"creationUser" : {$ne : "fabio.sinibaldi"}
}

Binary file not shown.

After

Width:  |  Height:  |  Size: 5.7 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 5.7 KiB

@ -0,0 +1,7 @@
"Farnese (VT)_Sorgenti della Nova_documentazione fine scavo 2019","Farnese (VT)_Sorgenti della Nova_documentazione fine scavo 2019/Gis Sorgenti della Nova","Farnese (VT)_Sorgenti della Nova_documentazione fine scavo 2019/Gis Sorgenti della Nova/Piante di fase"
"GNA_Aquileia_ExPasqualis_ok","GNA_Aquileia_ExPasqualis_ok/GNA_topografia_Aquileia ex Pasqualis_2019","GNA_Aquileia_ExPasqualis_ok/GNA_topografia_Aquileia ex Pasqualis_2019"
"Jesolo (Ve) - Loc. San Mauro e Torre del Caligo","Jesolo (Ve) - Loc. San Mauro e Torre del Caligo/topografia_modificata","Jesolo (Ve) - Loc. San Mauro e Torre del Caligo/topografia_modificata"
"Montalto di Castro (VT)_Vulci_Indagini non invasive_Doc. paragr._Va","Montalto di Castro (VT)_Vulci_Indagini non invasive_Doc. paragr._Va/CONSEGNA_WGS84","Montalto di Castro (VT)_Vulci_Indagini non invasive_Doc. paragr._Va/CONSEGNA_WGS84"
"Montecompatri_Tenuta_Castiglione_doc_IVa_2019","Montecompatri_Tenuta_Castiglione_doc_IVa_2019/GNA_topografia_Gabii_Louvre/POSIZIONAMENTO","Montecompatri_Tenuta_Castiglione_doc_IVa_2019/GNA_topografia_Gabii_Louvre/PIANTA FINE SCAVO"
"SAN_CASCIANO_BAGNI","SAN_CASCIANO_BAGNI/POSIZIONAMENTO_EPSG_4326","SAN_CASCIANO_BAGNI"
"Tarquinia_Civita_GNA_2019","Tarquinia_Civita_GNA_2019/Va_D__Topografia_Tarquinia/Posizionamento","Tarquinia_Civita_GNA_2019/Va_D__Topografia_Tarquinia/Posizionamento"
1 Farnese (VT)_Sorgenti della Nova_documentazione fine scavo 2019 Farnese (VT)_Sorgenti della Nova_documentazione fine scavo 2019/Gis Sorgenti della Nova Farnese (VT)_Sorgenti della Nova_documentazione fine scavo 2019/Gis Sorgenti della Nova/Piante di fase
2 GNA_Aquileia_ExPasqualis_ok GNA_Aquileia_ExPasqualis_ok/GNA_topografia_Aquileia ex Pasqualis_2019 GNA_Aquileia_ExPasqualis_ok/GNA_topografia_Aquileia ex Pasqualis_2019
3 Jesolo (Ve) - Loc. San Mauro e Torre del Caligo Jesolo (Ve) - Loc. San Mauro e Torre del Caligo/topografia_modificata Jesolo (Ve) - Loc. San Mauro e Torre del Caligo/topografia_modificata
4 Montalto di Castro (VT)_Vulci_Indagini non invasive_Doc. paragr._Va Montalto di Castro (VT)_Vulci_Indagini non invasive_Doc. paragr._Va/CONSEGNA_WGS84 Montalto di Castro (VT)_Vulci_Indagini non invasive_Doc. paragr._Va/CONSEGNA_WGS84
5 Montecompatri_Tenuta_Castiglione_doc_IVa_2019 Montecompatri_Tenuta_Castiglione_doc_IVa_2019/GNA_topografia_Gabii_Louvre/POSIZIONAMENTO Montecompatri_Tenuta_Castiglione_doc_IVa_2019/GNA_topografia_Gabii_Louvre/PIANTA FINE SCAVO
6 SAN_CASCIANO_BAGNI SAN_CASCIANO_BAGNI/POSIZIONAMENTO_EPSG_4326 SAN_CASCIANO_BAGNI
7 Tarquinia_Civita_GNA_2019 Tarquinia_Civita_GNA_2019/Va_D__Topografia_Tarquinia/Posizionamento Tarquinia_Civita_GNA_2019/Va_D__Topografia_Tarquinia/Posizionamento

@ -0,0 +1 @@
GEOGCS["GCS_WGS_1984",DATUM["D_WGS_1984",SPHEROID["WGS_1984",6378137,298.257223563]],PRIMEM["Greenwich",0],UNIT["Degree",0.017453292519943295]]

@ -0,0 +1 @@
GEOGCS["WGS 84",DATUM["WGS_1984",SPHEROID["WGS 84",6378137,298.257223563,AUTHORITY["EPSG","7030"]],AUTHORITY["EPSG","6326"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4326"]]

@ -0,0 +1,10 @@
{
"paging" : {
"offset" : 0,
"limit" : 1
},
"ordering" : {
"direction" : "ASCENDING",
"fields" : ["creationTime","nome"]
}
}

@ -0,0 +1,18 @@
{
"paging" : {
"offset" : 0,
"limit" : 1
},
"ordering" : {
"direction" : "DESCENDING",
"fields" : ["creationTime","nome"]
},
"filter" : {
"creationUser" : {$eq : "fabio.sinibaldi"}
},
"projection" : {
"nome" : 1
}
}

@ -0,0 +1,11 @@
{
"paging" : {
"offset" : 0,
"limit" : 1
},
"ordering" : {
"direction" : "DESCENDING",
"fields" : ["creationTime","nome"]
}
}

@ -0,0 +1,10 @@
{
"ordering" : {
"direction" : "DESCENDING",
"fields" : ["nome"]
},
"filter" : {"report.status" : {"$eq" : "WARNING"}},
"projection" : {"report.warningMessages" : 1}
}

@ -0,0 +1,41 @@
This project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
# Changelog for org.gcube.application.geoportal-common
# [v1.0.7-SNAPSHOT] - 2021-09-20
Refactored repositories
# [v1.0.6-SNAPSHOT] - 2021-08-3
Forced Deletion
Search & query
Clean Fileset
Interfaces return iterator instead of iterable
Name in WorkspaceContent (https://support.d4science.org/issues/22032)
Section AbstractRelazione (https://support.d4science.org/issues/22031)
# [v1.0.5] - 2020-12-9
Mongo Id in record
Mongo Concessioni interface
Added Files.fixFileNAme
ValidationReport as field
Updated Model (#20357)
# [v1.0.4-SNAPSHOT] - 2020-12-9
Projects Rest Interface
TempFile support
# [v1.0.3] - 2020-12-4
Project model update
# [v1.0.2-SNAPSHOT] - 2020-12-4
Model update
## [v1.0.1] - 2020-11-11
Model update
## [v1.0.0] - 2020-11-11
First release

@ -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);

@ -0,0 +1,312 @@
# European Union Public Licence V. 1.1
EUPL © the European Community 2007
This European Union Public Licence (the “EUPL”) applies to the Work or Software
(as defined below) which is provided under the terms of this Licence. Any use of
the Work, other than as authorised under this Licence is prohibited (to the
extent such use is covered by a right of the copyright holder of the Work).
The Original Work is provided under the terms of this Licence when the Licensor
(as defined below) has placed the following notice immediately following the
copyright notice for the Original Work:
Licensed under the EUPL V.1.1
or has expressed by any other mean his willingness to license under the EUPL.
## 1. Definitions
In this Licence, the following terms have the following meaning:
- The Licence: this Licence.
- The Original Work or the Software: the software distributed and/or
communicated by the Licensor under this Licence, available as Source Code and
also as Executable Code as the case may be.
- Derivative Works: the works or software that could be created by the Licensee,
based upon the Original Work or modifications thereof. This Licence does not
define the extent of modification or dependence on the Original Work required
in order to classify a work as a Derivative Work; this extent is determined by
copyright law applicable in the country mentioned in Article 15.
- The Work: the Original Work and/or its Derivative Works.
- The Source Code: the human-readable form of the Work which is the most
convenient for people to study and modify.
- The Executable Code: any code which has generally been compiled and which is
meant to be interpreted by a computer as a program.
- The Licensor: the natural or legal person that distributes and/or communicates
the Work under the Licence.
- Contributor(s): any natural or legal person who modifies the Work under the
Licence, or otherwise contributes to the creation of a Derivative Work.
- The Licensee or “You”: any natural or legal person who makes any usage of the
Software under the terms of the Licence.
- Distribution and/or Communication: any act of selling, giving, lending,
renting, distributing, communicating, transmitting, or otherwise making
available, on-line or off-line, copies of the Work or providing access to its
essential functionalities at the disposal of any other natural or legal
person.
## 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
in the Original Work:
- use the Work in any circumstance and for all usage, reproduce the Work, modify
- the Original Work, and make Derivative Works based upon the Work, communicate
- to the public, including the right to make available or display the Work or
- copies thereof to the public and perform publicly, as the case may be, the
- Work, distribute the Work or copies thereof, lend and rent the Work or copies
- thereof, sub-license rights in the Work or copies thereof.
Those rights can be exercised on any media, supports and formats, whether now
known or later invented, as far as the applicable law permits so.
In the countries where moral rights apply, the Licensor waives his right to
exercise his moral right to the extent allowed by law in order to make effective
the licence of the economic rights here above listed.
The Licensor grants to the Licensee royalty-free, non exclusive usage rights to
any patents held by the Licensor, to the extent necessary to make use of the
rights granted on the Work under this Licence.
## 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
provides in addition a machine-readable copy of the Source Code of the Work
along with each copy of the Work that the Licensor distributes or indicates, in
a notice following the copyright notice attached to the Work, a repository where
the Source Code is easily and freely accessible for as long as the Licensor
continues to distribute and/or communicate the Work.
## 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
Original Work or Software, of the exhaustion of those rights or of other
applicable limitations thereto.
## 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:
Attribution right: the Licensee shall keep intact all copyright, patent or
trademarks notices and all notices that refer to the Licence and to the
disclaimer of warranties. The Licensee must include a copy of such notices and a
copy of the Licence with every copy of the Work he/she distributes and/or
communicates. The Licensee must cause any Derivative Work to carry prominent
notices stating that the Work has been modified and the date of modification.
Copyleft clause: If the Licensee distributes and/or communicates copies of the
Original Works or Derivative Works based upon the Original Work, this
Distribution and/or Communication will be done under the terms of this Licence
or of a later version of this Licence unless the Original Work is expressly
distributed only under this version of the Licence. The Licensee (becoming
Licensor) cannot offer or impose any additional terms or conditions on the Work
or Derivative Work that alter or restrict the terms of the Licence.
Compatibility clause: If the Licensee Distributes and/or Communicates Derivative
Works or copies thereof based upon both the Original Work and another work
licensed under a Compatible Licence, this Distribution and/or Communication can
be done under the terms of this Compatible Licence. For the sake of this clause,
“Compatible Licence” refers to the licences listed in the appendix attached to
this Licence. Should the Licensees obligations under the Compatible Licence
conflict with his/her obligations under this Licence, the obligations of the
Compatible Licence shall prevail.
Provision of Source Code: When distributing and/or communicating copies of the
Work, the Licensee will provide a machine-readable copy of the Source Code or
indicate a repository where this Source will be easily and freely available for
as long as the Licensee continues to distribute and/or communicate the Work.
Legal Protection: This Licence does not grant permission to use the trade names,
trademarks, service marks, or names of the Licensor, except as required for
reasonable and customary use in describing the origin of the Work and
reproducing the content of the copyright notice.
## 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
power and authority to grant the Licence.
Each Contributor warrants that the copyright in the modifications he/she brings
to the Work are owned by him/her or licensed to him/her and that he/she has the
power and authority to grant the Licence.
Each time You accept the Licence, the original Licensor and subsequent
Contributors grant You a licence to their contributions to the Work, under the
terms of this Licence.
## 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
“bugs” inherent to this type of software development.
For the above reason, the Work is provided under the Licence on an “as is” basis
and without warranties of any kind concerning the Work, including without
limitation merchantability, fitness for a particular purpose, absence of defects
or errors, accuracy, non-infringement of intellectual property rights other than
copyright as stated in Article 6 of this Licence.
This disclaimer of warranty is an essential part of the Licence and a condition
for the grant of any rights to the Work.
## 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,
material or moral, damages of any kind, arising out of the Licence or of the use
of the Work, including without limitation, damages for loss of goodwill, work
stoppage, computer failure or malfunction, loss of data or any commercial
damage, even if the Licensor has been advised of the possibility of such
damage. However, the Licensor will be liable under statutory product liability
laws as far such laws apply to the Work.
## 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
support, warranty, indemnity, or other liability obligations and/or services
consistent with this Licence. However, in accepting such obligations, You may
act only on your own behalf and on your sole responsibility, not on behalf of
the original Licensor or any other Contributor, and only if You agree to
indemnify, defend, and hold each Contributor harmless for any liability incurred
by, or claims asserted against such Contributor by the fact You have accepted
any such warranty or additional liability.
## 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
affirming consent in any other similar way, in accordance with the rules of
applicable law. Clicking on that icon indicates your clear and irrevocable
acceptance of this Licence and all of its terms and conditions.
Similarly, you irrevocably accept this Licence and all of its terms and
conditions by exercising any rights granted to You by Article 2 of this Licence,
such as the use of the Work, the creation by You of a Derivative Work or the
Distribution and/or Communication by You of the Work or copies thereof.
## 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
from a remote location) the distribution channel or media (for example, a
website) must at least provide to the public the information requested by the
applicable law regarding the Licensor, the Licence and the way it may be
accessible, concluded, stored and reproduced by the Licensee.
## 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.
Such a termination will not terminate the licences of any person who has
received the Work from the Licensee under the Licence, provided such persons
remain in full compliance with the Licence.
## 13. Miscellaneous
Without prejudice of Article 9 above, the Licence represents the complete
agreement between the Parties as to the Work licensed hereunder.
If any provision of the Licence is invalid or unenforceable under applicable
law, this will not affect the validity or enforceability of the Licence as a
whole. Such provision will be construed and/or reformed so as necessary to make
it valid and enforceable.
The European Commission may publish other linguistic versions and/or new
versions of this Licence, so far this is required and reasonable, without
reducing the scope of the rights granted by the Licence. New versions of the
Licence will be published with a unique version number.
All linguistic versions of this Licence, approved by the European Commission,
have identical value. Parties can take advantage of the linguistic version of
their choice.
## 14. Jurisdiction
Any litigation resulting from the interpretation of this License, arising
between the European Commission, as a Licensor, and any Licensee, will be
subject to the jurisdiction of the Court of Justice of the European Communities,
as laid down in article 238 of the Treaty establishing the European Community.
Any litigation arising between Parties, other than the European Commission, and
resulting from the interpretation of this License, will be subject to the
exclusive jurisdiction of the competent court where the Licensor resides or
conducts its primary business.
## 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.
This licence shall be governed by the Belgian law if:
- a litigation arises between the European Commission, as a Licensor, and any
- Licensee; the Licensor, other than the European Commission, has no residence
- or registered office inside a European Union country.
## Appendix
“Compatible Licences” according to article 5 EUPL are:
- GNU General Public License (GNU GPL) v. 2
- Open Software License (OSL) v. 2.1, v. 3.0
- Common Public License v. 1.0
- Eclipse Public License v. 1.0
- Cecill v. 2.0

@ -0,0 +1,50 @@
GeoPortal - Common
--------------------------------------------------
GeoPortal - Common is the java library containing basic classes (e.g. models) of gCube GeoPortal.
## Built with
* [Maven](https://maven.apache.org/) - Dependency Management
## Documentation
Documentation can be found [here](https://gcube.wiki.gcube-system.org/gcube/GeoPortal).
## 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);

@ -0,0 +1,103 @@
<project xmlns="http://maven.apache.org/POM/4.0.0"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion>
<groupId>org.gcube.application</groupId>
<artifactId>geoportal-common</artifactId>
<version>1.0.7-SNAPSHOT</version>
<name>Geoportal Common</name>
<parent>
<groupId>org.gcube.application.cms</groupId>
<artifactId>gcube-cms-suite</artifactId>
<version>1.0.0-SNAPSHOT</version>
</parent>
<properties>
<gitBaseUrl>https://code-repo.d4science.org/gCubeSystem</gitBaseUrl>
<sis.version>1.0</sis.version>
</properties>
<dependencyManagement>
<dependencies>
<dependency>
<groupId>org.gcube.distribution</groupId>
<artifactId>gcube-bom</artifactId>
<version>2.0.1</version>
<type>pom</type>
<scope>import</scope>
</dependency>
</dependencies>
</dependencyManagement>
<scm>
<connection>scm:git:${gitBaseUrl}/${project.artifactId}.git</connection>
<developerConnection>scm:git:${gitBaseUrl}/${project.artifactId}.git</developerConnection>
<url>${gitBaseUrl}/${project.artifactId}.git</url>
</scm>
<dependencies>
<dependency>
<groupId>org.projectlombok</groupId>
<artifactId>lombok</artifactId>
<version>1.14.8</version>
</dependency>
<dependency>
<groupId>org.gcube.common</groupId>
<artifactId>authorization-client</artifactId>
</dependency>
<!-- TEST -->
<dependency>
<groupId>junit</groupId>
<artifactId>junit</artifactId>
<version>4.12</version>
<scope>test</scope>
</dependency>
<!-- read JSON -->
<dependency>
<groupId>org.glassfish.jersey.media</groupId>
<artifactId>jersey-media-json-jackson</artifactId>
</dependency>
<!-- jackson java time -->
<dependency>
<groupId>com.fasterxml.jackson.datatype</groupId>
<artifactId>jackson-datatype-jsr310</artifactId>
<version>2.8.8</version>
</dependency>
<!-- STORAGE -->
<dependency>
<groupId>org.gcube.contentmanagement</groupId>
<artifactId>storage-manager-core</artifactId>
<version>[2.0.0, 3.0.0-SNAPSHOT)</version>
</dependency>
<dependency>
<groupId>org.gcube.contentmanagement</groupId>
<artifactId>storage-manager-wrapper</artifactId>
<version>[2.0.0, 3.0.0-SNAPSHOT)</version>
</dependency>
<dependency>
<groupId>ch.qos.logback</groupId>
<artifactId>logback-classic</artifactId>
<scope>test</scope>
</dependency>
</dependencies>
</project>

@ -0,0 +1,37 @@
package org.gcube.application.geoportal.common.faults;
public class JsonParseException extends Exception{
/**
*
*/
private static final long serialVersionUID = 1L;
public JsonParseException() {
super();
// TODO Auto-generated constructor stub
}
public JsonParseException(String message, Throwable cause, boolean enableSuppression, boolean writableStackTrace) {
super(message, cause, enableSuppression, writableStackTrace);
// TODO Auto-generated constructor stub
}
public JsonParseException(String message, Throwable cause) {
super(message, cause);
// TODO Auto-generated constructor stub
}
public JsonParseException(String message) {
super(message);
// TODO Auto-generated constructor stub
}
public JsonParseException(Throwable cause) {
super(cause);
// TODO Auto-generated constructor stub
}
}

@ -0,0 +1,7 @@
package org.gcube.application.geoportal.common.model;
public class BasicJSONObject {
}

@ -0,0 +1,16 @@
package org.gcube.application.geoportal.common.model.legacy;
import lombok.Getter;
import lombok.Setter;
import lombok.ToString;
@Getter
@Setter
@ToString(callSuper=true)
public class AbstractRelazione extends AssociatedContent{
private String abstractIta;
private String abstractEng;
}

@ -0,0 +1,7 @@
package org.gcube.application.geoportal.common.model.legacy;
public enum AccessPolicy {
OPEN,RESTRICTED,EMBARGOED;
}

@ -0,0 +1,132 @@
package org.gcube.application.geoportal.common.model.legacy;
import java.time.LocalDateTime;
import java.util.ArrayList;
import java.util.List;
import javax.xml.bind.annotation.XmlElement;
import javax.xml.bind.annotation.XmlElements;
import org.gcube.application.geoportal.common.model.legacy.report.ValidationReport;
import org.gcube.application.geoportal.common.utils.CollectionsUtils;
import lombok.Getter;
import lombok.Setter;
@Getter
@Setter
public abstract class AssociatedContent {
private String mongo_id;
private long id;
private AccessPolicy policy;
private String licenseID;
private String titolo;
private LocalDateTime creationTime;
public ValidationReport validateForInsertion() {
ValidationReport toReturn=new ValidationReport("Associated Content");
toReturn.checkMandatory(policy, "Politica di accesso");
toReturn.checkMandatory(licenseID, "Licenza");
toReturn.checkMandatory(titolo,"Titolo");
toReturn.checkMandatory(creationTime, "Creation time");
return toReturn;
}
@XmlElements({
@XmlElement(type=GeoServerContent.class),
@XmlElement(type=WorkspaceContent.class),
})
private List<PersistedContent> actualContent=new ArrayList<>();
@Override
public int hashCode() {
final int prime = 31;
int result = 1;
// result = prime * result + ((actualContent == null) ? 0 : actualContent.hashCode());
result = prime * result + CollectionsUtils.hashCode(actualContent);
result = prime * result + ((creationTime == null) ? 0 : creationTime.hashCode());
result = prime * result + (int) (id ^ (id >>> 32));
result = prime * result + ((licenseID == null) ? 0 : licenseID.hashCode());
result = prime * result + ((policy == null) ? 0 : policy.hashCode());
result = prime * result + ((titolo == null) ? 0 : titolo.hashCode());
return result;
}
@Override
public boolean equals(Object obj) {
if (this == obj)
return true;
if (obj == null)
return false;
if (getClass() != obj.getClass())
return false;
AssociatedContent other = (AssociatedContent) obj;
// if (actualContent == null) {
// if (other.actualContent != null)
// return false;
// } else if (!actualContent.equals(other.actualContent))
// return false;
if(!CollectionsUtils.equalsCollections(actualContent, other.actualContent)) return false;
if (creationTime == null) {
if (other.creationTime != null)
return false;
} else if (!creationTime.equals(other.creationTime))
return false;
if (id != other.id)
return false;
if (licenseID == null) {
if (other.licenseID != null)
return false;
} else if (!licenseID.equals(other.licenseID))
return false;
if (policy != other.policy)
return false;
if (titolo == null) {
if (other.titolo != null)
return false;
} else if (!titolo.equals(other.titolo))
return false;
return true;
}
@Override
public String toString() {
StringBuilder builder = new StringBuilder();
builder.append("AssociatedContent [id=");
builder.append(id);
builder.append(", policy=");
builder.append(policy);
builder.append(", licenseID=");
builder.append(licenseID);
builder.append(", titolo=");
builder.append(titolo);
builder.append(", creationTime=");
builder.append(creationTime);
builder.append(", actualContent=");
builder.append(actualContent);
builder.append("]");
return builder.toString();
}
}

@ -0,0 +1,36 @@
package org.gcube.application.geoportal.common.model.legacy;
import java.io.Serializable;
import lombok.EqualsAndHashCode;
import lombok.Getter;
import lombok.NoArgsConstructor;
import lombok.NonNull;
import lombok.RequiredArgsConstructor;
import lombok.ToString;
@RequiredArgsConstructor
@Getter
@NoArgsConstructor
@EqualsAndHashCode
@ToString
public class BBOX implements Serializable{
/**
*
*/
private static final long serialVersionUID = -159414992596542946L;
public static BBOX WORLD_EXTENT=new BBOX(90d,180d,-90d,-180d);
@NonNull
private Double maxLat;
@NonNull
private Double maxLong;
@NonNull
private Double minLat;
@NonNull
private Double minLong;
}

@ -0,0 +1,512 @@
package org.gcube.application.geoportal.common.model.legacy;
import java.time.LocalDateTime;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.List;
import javax.xml.bind.annotation.XmlRootElement;
import org.gcube.application.geoportal.common.model.legacy.report.Check;
import org.gcube.application.geoportal.common.model.legacy.report.ConstraintCheck;
import org.gcube.application.geoportal.common.model.legacy.report.ValidationReport;
import org.gcube.application.geoportal.common.model.legacy.report.ValidationReport.ValidationStatus;
import org.gcube.application.geoportal.common.utils.CollectionsUtils;
import lombok.Getter;
import lombok.Setter;
import lombok.ToString;
@Getter
@Setter
@ToString(callSuper=true)
@XmlRootElement
public class Concessione extends Record{
//Introduzione (descrizione del progetto)
private String introduzione;
//Descrizione del contenuto
private String descrizioneContenuto;
//Autori
private List<String> authors;
//Soggetto che materialmente invia i dati.
private String contributore;
//Indicare il nome del titolare/i dei dati contenuti nel dataset e/o per sue specifiche parti.
private List<String> titolari;
private String responsabile;
private String editore;
private List<String> fontiFinanziamento;
//Research Excavation; Archaeology (valori di default)
private List<String> soggetto;
//Referenze bibliografiche, DOI (se esistenti) di risorse correlate allindagine in oggetto
private List<String> risorseCorrelate;
private LocalDateTime dataInizioProgetto;
private LocalDateTime dataFineProgetto;
private List<String> titolareLicenza;
private List<String> titolareCopyright;
private List<String> paroleChiaveLibere;
private List<String> paroleChiaveICCD;
private Double centroidLat;
private Double centroidLong;
private RelazioneScavo relazioneScavo;
private AssociatedContent abstractRelazione;
private List<UploadedImage> immaginiRappresentative=new ArrayList<UploadedImage>();
private LayerConcessione posizionamentoScavo;
private List<LayerConcessione> pianteFineScavo=new ArrayList<>();
private List<OtherContent> genericContent=new ArrayList<>();
public Concessione() {
super();
setRecordType(RecordType.CONCESSIONE);
}
public static class Paths{
public final static String RELAZIONE="relazione";
public final static String POSIZIONAMENTO="posizionamentoScavo";
public final static String PIANTE="piante";
public final static String IMMAGINI="immagini";
public final static String ABSTRACT_RELAZIONE="abstract_relazione";
public static final String MONGO_ID="mongo_id";
public final static String piantaByIndex(int index) {return makeByIndex(PIANTE,index);};
public final static String imgByIndex(int index) {return makeByIndex(IMMAGINI,index);};
public final static String piantaById(String id) {return makeByStringField(PIANTE, MONGO_ID, id);};
public final static String imgById(String id) {return makeByStringField(IMMAGINI, MONGO_ID, id);};
private static String makeByIndex(String base,int value) {return String.format("%1$s[%2$d]",base,value);}
private static String makeByStringField(String base,String field,String value)
{return String.format("%1$s.%2$s:\"%3$s\"",base,field,value);}
}
@Override
public AssociatedContent getContentByPath(String path) {
switch(path) {
case Paths.RELAZIONE : return getRelazioneScavo();
case Paths.POSIZIONAMENTO : return getPosizionamentoScavo();
case Paths.ABSTRACT_RELAZIONE: return getAbstractRelazione();
}
if(path.matches("\\w+\\[\\d+\\]")) {
// Array section
String field=path.substring(0,path.lastIndexOf("["));
Integer index=Integer.parseInt(path.substring(path.lastIndexOf("[")+1,path.lastIndexOf("]")));
List<? extends AssociatedContent> list=null;
switch (field) {
case Paths.IMMAGINI : list = immaginiRappresentative; break;
case Paths.PIANTE : list = pianteFineScavo; break;
}
return getByIndex(list,index);
}
if(path.matches("\\w+\\.\\w+\\s*\\:\\s*\\\"\\w+\\\"")) {
// Map section
String field=path.substring(0,path.lastIndexOf("."));
String subField=path.substring(path.indexOf(".")+1,path.lastIndexOf(":")).trim();
String value=path.substring(path.indexOf("\"")+1,path.lastIndexOf("\""));
List<? extends AssociatedContent> list=null;
switch (field) {
case Paths.IMMAGINI : list = immaginiRappresentative; break;
case Paths.PIANTE : list = pianteFineScavo; break;
}
return getByFieldValue(list, subField, value);
}
return null;
}
private static AssociatedContent getByIndex(List<? extends AssociatedContent> list, int index) {
if(list == null )return null;
return list.get(index);
}
// NB only mongo_id is supported in this impl.
private static AssociatedContent getByFieldValue(List<? extends AssociatedContent> list, String field, Object value) {
for(AssociatedContent c: list) {
switch(field) {
case Paths.MONGO_ID : {
if(c.getMongo_id()!=null&&c.getMongo_id().equals(value))
return c;
}
}
}
return null;
}
@Override
public void setAtPath(AssociatedContent toSet, String path) {
switch(path) {
case Paths.RELAZIONE : {
setRelazioneScavo((RelazioneScavo) toSet);
break;
}
case Paths.POSIZIONAMENTO : {
setPosizionamentoScavo((LayerConcessione) toSet);
break;
}
case Paths.ABSTRACT_RELAZIONE:{
setAbstractRelazione((AbstractRelazione)toSet);
break;
}
case Paths.PIANTE : {
if(pianteFineScavo==null)pianteFineScavo=new ArrayList<LayerConcessione>();
pianteFineScavo.add((LayerConcessione) toSet);
break;
}
case Paths.IMMAGINI: {
if(immaginiRappresentative==null)immaginiRappresentative=new ArrayList<UploadedImage>();
pianteFineScavo.add((LayerConcessione) toSet);
break;
}
//TODO MATCH if()case Paths.PIANTa : return
//TODO MATCH if()case Paths.Img : return
}
}
@Override
public ValidationReport validate() {
ValidationReport validator= super.validate();
validator.setObjectName("Concessione");
setPolicy(AccessPolicy.OPEN);
validator.checkMandatory(authors, "Lista Autori");
if(validator.checkMandatory(centroidLat, "Latitudine"))
if(centroidLat>90||centroidLat<-90) validator.addMessage(ValidationStatus.ERROR, "Latitudine non valida : "+centroidLat);
if(validator.checkMandatory(centroidLong, "Longitudine"))
if(centroidLong>180||centroidLong<-180) validator.addMessage(ValidationStatus.ERROR, "Longitudine non valida : "+centroidLong);
validator.checkMandatory(contributore, "Contributore");
if(validator.checkMandatory(dataFineProgetto, "Data Fine Progetto") &&
validator.checkMandatory(dataInizioProgetto, "Data Inizio Progetto"))
if(dataFineProgetto.isBefore(dataInizioProgetto)) validator.addMessage(ValidationStatus.ERROR, "Data Fine Progetto non può esser prima di Data Inizio Progetto.");
validator.checkMandatory(descrizioneContenuto, "Descrizione contenuto");
validator.checkMandatory(editore, "Editore");
validator.checkMandatory(fontiFinanziamento, "Fonti Finanaziamento");
validator.checkMandatory(introduzione, "Introduzione");
validator.checkMandatory(paroleChiaveICCD, "Parole chiave ICCD");
validator.checkMandatory(paroleChiaveLibere, "Parole chiave libere");
validator.checkMandatory(responsabile,"Responsabile");
validator.checkMandatory(titolareCopyright, "Titolare Copyright");
validator.checkMandatory(titolareLicenza,"Titolare licenza");
validator.checkMandatory(titolari, "Titolari");
if(validator.checkMandatory(relazioneScavo, "Relazione scavo")) {
validator.addChild(relazioneScavo.validateForInsertion());
}
if(validator.checkMandatory(abstractRelazione,"Abstract Relazione")){
validator.addChild(abstractRelazione.validateForInsertion());
}
// if(immaginiRappresentative!=null)
//
// for(UploadedImage img : immaginiRappresentative) {
// validator.setDefault(img.getSoggetto(),getSoggetto());
// validator.setDefault(img.getCreationTime(),getCreationTime());
// validator.setDefault(img.getPolicy(), getPolicy());
// validator.setDefault(img.getLicenzaID(), getLicenzaID());
//
// validator.addChild(img.validateForInsertion());
// }
//
if(validator.checkMandatory(posizionamentoScavo, "Posizionamento scavo")) {
ValidationReport posReport=posizionamentoScavo.validateForInsertion();
posReport.setObjectName("Posizionamento scavo");
validator.addChild(posReport);
}
if(genericContent!=null)
for(OtherContent content:genericContent)
validator.addChild(content.validateForInsertion());
if(validator.checkMandatory(pianteFineScavo,"Piante fine scavo"))
for(LayerConcessione l:pianteFineScavo) {
validator.addChild(l.validateForInsertion());
}
return validator;
}
@Override
public void setDefaults() {
super.setDefaults();
setSoggetto(ConstraintCheck.defaultFor(soggetto, Arrays.asList(new String[] {"Research Excavation","Archaeology"}))
.addChecks(Check.collectionSizeMin(2)).evaluate());
setDescrizioneContenuto(ConstraintCheck.defaultFor(getDescrizioneContenuto(),
"Relazione di fine scavo e relativo abstract; selezione di immagini rappresentative;"
+ " posizionamento topografico dell'area indagata, pianta di fine scavo.").evaluate());
setSoggetto(ConstraintCheck.defaultFor(soggetto, Arrays.asList(new String[] {"Research Excavation","Archaeology"}))
.addChecks(Check.collectionSizeMin(2)).evaluate());
setLicenzaID(ConstraintCheck.defaultFor(getLicenzaID(), "CC0-1.0").evaluate());
if(relazioneScavo!=null) {
relazioneScavo.setTitolo(ConstraintCheck.defaultFor(relazioneScavo.getTitolo(),getNome()+" relazione di scavo").evaluate());
relazioneScavo.setSoggetto(ConstraintCheck.defaultFor(relazioneScavo.getSoggetto(),getSoggetto()).evaluate());
relazioneScavo.setCreationTime(ConstraintCheck.defaultFor(relazioneScavo.getCreationTime(),getCreationTime()).evaluate());
relazioneScavo.setLicenseID(ConstraintCheck.defaultFor(getLicenzaID(), "CC-BY-4.0").evaluate());
relazioneScavo.setPolicy(getPolicy());
}
if(abstractRelazione!=null) {
abstractRelazione.setTitolo(ConstraintCheck.defaultFor(abstractRelazione.getTitolo(),getNome()+" abstract relazione di scavo").evaluate());
abstractRelazione.setCreationTime(ConstraintCheck.defaultFor(abstractRelazione.getCreationTime(),getCreationTime()).evaluate());
abstractRelazione.setLicenseID(ConstraintCheck.defaultFor(getLicenzaID(), "CC-BY-4.0").evaluate());
abstractRelazione.setPolicy(getPolicy());
}
if(immaginiRappresentative!=null)
for(UploadedImage img : immaginiRappresentative) {
img.setSoggetto(ConstraintCheck.defaultFor(img.getSoggetto(),getSoggetto()).evaluate());
img.setCreationTime(ConstraintCheck.defaultFor(img.getCreationTime(),getCreationTime()).evaluate());
img.setPolicy(ConstraintCheck.defaultFor(img.getPolicy(),getPolicy()).evaluate());
img.setLicenseID(ConstraintCheck.defaultFor(img.getLicenseID(),"CC-BY-4.0").evaluate());
}
if(posizionamentoScavo!=null) {
posizionamentoScavo.setTitolo(ConstraintCheck.defaultFor(posizionamentoScavo.getTitolo(), getNome()+" posizionamento scavo").evaluate());
posizionamentoScavo.setAbstractSection(
ConstraintCheck.defaultFor(posizionamentoScavo.getAbstractSection(),"Posizionamento topografico georeferenziato dellarea interessata dalle indagini").evaluate());
posizionamentoScavo.setTopicCategory(ConstraintCheck.defaultFor(posizionamentoScavo.getTopicCategory(), "Society").evaluate());
posizionamentoScavo.setSubTopic(ConstraintCheck.defaultFor(posizionamentoScavo.getSubTopic(), "Archeology").evaluate());
posizionamentoScavo.setParoleChiaveLibere(ConstraintCheck.defaultFor(posizionamentoScavo.getParoleChiaveLibere(),getParoleChiaveLibere()).evaluate());
posizionamentoScavo.setParoleChiaveICCD(ConstraintCheck.defaultFor(posizionamentoScavo.getParoleChiaveICCD(),getParoleChiaveICCD()).evaluate());
//TODO Evaluate
posizionamentoScavo.setBbox(ConstraintCheck.defaultFor(posizionamentoScavo.getBbox(), BBOX.WORLD_EXTENT).evaluate());
posizionamentoScavo.setPolicy(ConstraintCheck.defaultFor(posizionamentoScavo.getPolicy(),getPolicy()).evaluate());;
posizionamentoScavo.setLicenseID(ConstraintCheck.defaultFor(posizionamentoScavo.getLicenseID(), "CC-BY-4.0").evaluate());
posizionamentoScavo.setResponsabile(getResponsabile());
posizionamentoScavo.setCreationTime(ConstraintCheck.defaultFor(posizionamentoScavo.getCreationTime(), getCreationTime()).evaluate());
}
if(pianteFineScavo!=null)
for(LayerConcessione l:pianteFineScavo) {
l.setTitolo(ConstraintCheck.defaultFor(l.getTitolo(), getNome()+" pianta fine scavo").evaluate());
l.setAbstractSection(
ConstraintCheck.defaultFor(l.getAbstractSection(),"Planimetria georeferenziata dell'area indagata al termine delle attività").evaluate());
l.setTopicCategory(ConstraintCheck.defaultFor(l.getTopicCategory(), "Society").evaluate());
l.setSubTopic(ConstraintCheck.defaultFor(l.getSubTopic(), "Archeology").evaluate());
l.setParoleChiaveLibere(ConstraintCheck.defaultFor(l.getParoleChiaveLibere(),getParoleChiaveLibere()).evaluate());
l.setParoleChiaveICCD(ConstraintCheck.defaultFor(l.getParoleChiaveICCD(),getParoleChiaveICCD()).evaluate());
l.setBbox(ConstraintCheck.defaultFor(l.getBbox(), BBOX.WORLD_EXTENT).evaluate());
l.setPolicy(ConstraintCheck.defaultFor(l.getPolicy(),getPolicy()).evaluate());;
l.setLicenseID(ConstraintCheck.defaultFor(l.getLicenseID(), "CC-BY-4.0").evaluate());
l.setResponsabile(getResponsabile());
l.setCreationTime(ConstraintCheck.defaultFor(l.getCreationTime(), getCreationTime()).evaluate());
}
}
@Override
public int hashCode() {
final int prime = 31;
int result = 1;
// result = prime * result + ((authors == null) ? 0 : authors.hashCode());
result = prime * result + CollectionsUtils.hashCode(authors);
// result = prime * result + ((fontiFinanaziamento == null) ? 0 : fontiFinanaziamento.hashCode());
result = prime * result + CollectionsUtils.hashCode(fontiFinanziamento);
// result = prime * result + ((immaginiRappresentative == null) ? 0 : immaginiRappresentative.hashCode());
result = prime * result + CollectionsUtils.hashCode(immaginiRappresentative);
// result = prime * result + ((paroleChiaveICCD == null) ? 0 : paroleChiaveICCD.hashCode());
result = prime * result + CollectionsUtils.hashCode(paroleChiaveICCD);
// result = prime * result + ((paroleChiaveLibere == null) ? 0 : paroleChiaveLibere.hashCode());
result = prime * result + CollectionsUtils.hashCode(paroleChiaveLibere);
// result = prime * result + ((pianteFineScavo == null) ? 0 : pianteFineScavo.hashCode());
result = prime * result + CollectionsUtils.hashCode(pianteFineScavo);
// result = prime * result + ((risorseCorrelate == null) ? 0 : risorseCorrelate.hashCode());
result = prime * result + CollectionsUtils.hashCode(risorseCorrelate);
// result = prime * result + ((soggetto == null) ? 0 : soggetto.hashCode());
result = prime * result + CollectionsUtils.hashCode(soggetto);
// result = prime * result + ((titolari == null) ? 0 : titolari.hashCode());
result = prime * result + CollectionsUtils.hashCode(titolari);
result = prime * result + ((centroidLat == null) ? 0 : centroidLat.hashCode());
result = prime * result + ((centroidLong == null) ? 0 : centroidLong.hashCode());
result = prime * result + ((contributore == null) ? 0 : contributore.hashCode());
result = prime * result + ((dataFineProgetto == null) ? 0 : dataFineProgetto.hashCode());
result = prime * result + ((dataInizioProgetto == null) ? 0 : dataInizioProgetto.hashCode());
result = prime * result + ((descrizioneContenuto == null) ? 0 : descrizioneContenuto.hashCode());
result = prime * result + ((editore == null) ? 0 : editore.hashCode());
result = prime * result + ((genericContent == null) ? 0 : genericContent.hashCode());
result = prime * result + ((introduzione == null) ? 0 : introduzione.hashCode());
result = prime * result + ((posizionamentoScavo == null) ? 0 : posizionamentoScavo.hashCode());
result = prime * result + ((relazioneScavo == null) ? 0 : relazioneScavo.hashCode());
result = prime * result + ((responsabile == null) ? 0 : responsabile.hashCode());
result = prime * result + ((titolareCopyright == null) ? 0 : titolareCopyright.hashCode());
result = prime * result + ((titolareLicenza == null) ? 0 : titolareLicenza.hashCode());
return result;
}
@Override
public boolean equals(Object obj) {
if (this == obj)
return true;
if (obj == null)
return false;
if (getClass() != obj.getClass())
return false;
Concessione other = (Concessione) obj;
if(!CollectionsUtils.equalsCollections(authors, other.authors)) return false;
if (!CollectionsUtils.equalsCollections(fontiFinanziamento, other.fontiFinanziamento)) return false;
if (!CollectionsUtils.equalsCollections(immaginiRappresentative, other.immaginiRappresentative)) return false;
if (!CollectionsUtils.equalsCollections(paroleChiaveICCD, other.paroleChiaveICCD)) return false;
if (!CollectionsUtils.equalsCollections(paroleChiaveLibere, other.paroleChiaveLibere)) return false;
if (!CollectionsUtils.equalsCollections(pianteFineScavo, other.pianteFineScavo)) return false;
if (!CollectionsUtils.equalsCollections(risorseCorrelate, other.risorseCorrelate)) return false;
if (!CollectionsUtils.equalsCollections(soggetto, other.soggetto)) return false;
if (!CollectionsUtils.equalsCollections(titolari, other.titolari)) return false;
if (centroidLat == null) {
if (other.centroidLat != null)
return false;
} else if (!centroidLat.equals(other.centroidLat))
return false;
if (centroidLong == null) {
if (other.centroidLong != null)
return false;
} else if (!centroidLong.equals(other.centroidLong))
return false;
if (contributore == null) {
if (other.contributore != null)
return false;
} else if (!contributore.equals(other.contributore))
return false;
if (dataFineProgetto == null) {
if (other.dataFineProgetto != null)
return false;
} else if (!dataFineProgetto.equals(other.dataFineProgetto))
return false;
if (dataInizioProgetto == null) {
if (other.dataInizioProgetto != null)
return false;
} else if (!dataInizioProgetto.equals(other.dataInizioProgetto))
return false;
if (descrizioneContenuto == null) {
if (other.descrizioneContenuto != null)
return false;
} else if (!descrizioneContenuto.equals(other.descrizioneContenuto))
return false;
if (editore == null) {
if (other.editore != null)
return false;
} else if (!editore.equals(other.editore))
return false;
if (genericContent == null) {
if (other.genericContent != null)
return false;
} else if (!genericContent.equals(other.genericContent))
return false;
if (introduzione == null) {
if (other.introduzione != null)
return false;
} else if (!introduzione.equals(other.introduzione))
return false;
if (posizionamentoScavo == null) {
if (other.posizionamentoScavo != null)
return false;
} else if (!posizionamentoScavo.equals(other.posizionamentoScavo))
return false;
if (relazioneScavo == null) {
if (other.relazioneScavo != null)
return false;
} else if (!relazioneScavo.equals(other.relazioneScavo))
return false;
if (responsabile == null) {
if (other.responsabile != null)
return false;
} else if (!responsabile.equals(other.responsabile))
return false;
if (titolareCopyright == null) {
if (other.titolareCopyright != null)
return false;
} else if (!titolareCopyright.equals(other.titolareCopyright))
return false;
if (titolareLicenza == null) {
if (other.titolareLicenza != null)
return false;
} else if (!titolareLicenza.equals(other.titolareLicenza))
return false;
return true;
}
}

@ -0,0 +1,28 @@
package org.gcube.application.geoportal.common.model.legacy;
import java.util.ArrayList;
import java.util.List;
import lombok.EqualsAndHashCode;
import lombok.Getter;
import lombok.Setter;
import lombok.ToString;
@Getter
@Setter
@ToString(callSuper=true)
@EqualsAndHashCode(callSuper=true)
public class GeoServerContent extends PersistedContent{
//GeoServer Details
private String geoserverHostName;
private String geoserverPath;
private List<String> fileNames=new ArrayList<String>();
private String workspace;
private String store;
private String featureType;
}

@ -0,0 +1,21 @@
package org.gcube.application.geoportal.common.model.legacy;
import java.io.InputStream;
import lombok.Data;
import lombok.Getter;
import lombok.NonNull;
import lombok.Setter;
@Data
@Getter
@Setter
public class InputStreamDescriptor{
@NonNull
private InputStream stream;
@NonNull
private String filename;
}

@ -0,0 +1,152 @@
package org.gcube.application.geoportal.common.model.legacy;
import java.util.List;
import org.gcube.application.geoportal.common.model.legacy.report.ValidationReport;
import org.gcube.application.geoportal.common.utils.CollectionsUtils;
import lombok.Getter;
import lombok.Setter;
@Getter
@Setter
public class LayerConcessione extends SDILayerDescriptor{
//meta
private String layerUUID;
private Long layerID;
//layer
private String layerName;
private String wmsLink;
private String workspace;
//1.Identificazione
private String abstractSection;
//2.Classificazione
private String topicCategory;
//3.Keyword
private String subTopic;
//4. Delimitazione geographica
private BBOX bbox;
//5. Temporal
private List<String> paroleChiaveLibere;
private List<String> paroleChiaveICCD;
//6. Quality
private String valutazioneQualita;
private String metodoRaccoltaDati;
private String scalaAcquisizione;
//8. Responsabili
private List<String> authors;
private String responsabile;
@Override
public ValidationReport validateForInsertion() {
ValidationReport toReturn=super.validateForInsertion();
toReturn.setObjectName("Layer Concessione");
toReturn.checkMandatory(abstractSection, "Abstract");
toReturn.checkMandatory(subTopic, "Categoria (Topic)");
//TODO
// toReturn.checkMandatory(bbox, "Bounding Box");
toReturn.checkMandatory(valutazioneQualita, "Valutazione della qualita");
toReturn.checkMandatory(metodoRaccoltaDati, "Metodo raccolta dati");
toReturn.checkMandatory(scalaAcquisizione, "Scala acquisizione");
toReturn.checkMandatory(authors, "Autori");
return toReturn;
}
@Override
public int hashCode() {
final int prime = 31;
int result = super.hashCode();
result = prime * result + ((abstractSection == null) ? 0 : abstractSection.hashCode());
// result = prime * result + ((authors == null) ? 0 : authors.hashCode());
result = prime * result + CollectionsUtils.hashCode(authors);
result = prime * result + ((bbox == null) ? 0 : bbox.hashCode());
result = prime * result + ((metodoRaccoltaDati == null) ? 0 : metodoRaccoltaDati.hashCode());
result = prime * result + ((scalaAcquisizione == null) ? 0 : scalaAcquisizione.hashCode());
result = prime * result + ((subTopic == null) ? 0 : subTopic.hashCode());
result = prime * result + ((topicCategory == null) ? 0 : topicCategory.hashCode());
result = prime * result + ((valutazioneQualita == null) ? 0 : valutazioneQualita.hashCode());
return result;
}
@Override
public boolean equals(Object obj) {
if (this == obj)
return true;
if (!super.equals(obj))
return false;
if (getClass() != obj.getClass())
return false;
LayerConcessione other = (LayerConcessione) obj;
if (abstractSection == null) {
if (other.abstractSection != null)
return false;
} else if (!abstractSection.equals(other.abstractSection))
return false;
// if (authors == null) {
// if (other.authors != null)
// return false;
// } else if (!authors.equals(other.authors))
// return false;
if(!CollectionsUtils.equalsCollections(authors, other.authors)) return false;
if (bbox == null) {
if (other.bbox != null)
return false;
} else if (!bbox.equals(other.bbox))
return false;
if (metodoRaccoltaDati == null) {
if (other.metodoRaccoltaDati != null)
return false;
} else if (!metodoRaccoltaDati.equals(other.metodoRaccoltaDati))
return false;
if (scalaAcquisizione == null) {
if (other.scalaAcquisizione != null)
return false;
} else if (!scalaAcquisizione.equals(other.scalaAcquisizione))
return false;
if (subTopic == null) {
if (other.subTopic != null)
return false;
} else if (!subTopic.equals(other.subTopic))
return false;
if (topicCategory == null) {
if (other.topicCategory != null)
return false;
} else if (!topicCategory.equals(other.topicCategory))
return false;
if (valutazioneQualita == null) {
if (other.valutazioneQualita != null)
return false;
} else if (!valutazioneQualita.equals(other.valutazioneQualita))
return false;
return true;
}
}

@ -0,0 +1,15 @@
package org.gcube.application.geoportal.common.model.legacy;
import lombok.Getter;
import lombok.Setter;
import lombok.ToString;
@Getter
@Setter
@ToString(callSuper=true)
public class OtherContent extends AssociatedContent {
}

@ -0,0 +1,36 @@
package org.gcube.application.geoportal.common.model.legacy;
import com.fasterxml.jackson.annotation.JsonSubTypes;
import com.fasterxml.jackson.annotation.JsonSubTypes.Type;
import com.fasterxml.jackson.annotation.JsonTypeInfo;
import lombok.EqualsAndHashCode;
import lombok.Getter;
import lombok.Setter;
@Getter
@Setter
@EqualsAndHashCode
@JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "type")
@JsonSubTypes({
@Type(value = GeoServerContent.class),
@Type(value = WorkspaceContent.class),
})
public abstract class PersistedContent {
//Generic Info
private long id;
@Override
public String toString() {
StringBuilder builder = new StringBuilder();
builder.append("PersistedContent [id=");
builder.append(id);
builder.append("]");
return builder.toString();
}
}

@ -0,0 +1,74 @@
package org.gcube.application.geoportal.common.model.legacy;
import java.time.LocalDateTime;
import org.gcube.application.geoportal.common.model.legacy.report.ConstraintCheck;
import org.gcube.application.geoportal.common.model.legacy.report.ValidationReport;
import lombok.EqualsAndHashCode;
import lombok.Getter;
import lombok.Setter;
import lombok.ToString;
@Getter
@Setter
@ToString
@EqualsAndHashCode
public abstract class Record {
private String mongo_id;
//Generic Info
private long id;
private RecordType recordType;
private String version;
private String licenzaID;
private AccessPolicy policy;
//Nome del progetto
private String nome;
//Storage Info
private String folderId;
//Accounting
private LocalDateTime lastUpdateTime;
private String lastUpdateUser;
private LocalDateTime creationTime;
private String creationUser;
private ValidationReport report;
public ValidationReport validate() {
setDefaults();
ValidationReport validator=new ValidationReport("Core metadata");
validator.checkMandatory(getRecordType(), "Record Type");
validator.checkMandatory(getNome(), "Nome");
setReport(validator);
return getReport();
}
public void setDefaults() {
LocalDateTime now=LocalDateTime.now();
setVersion(ConstraintCheck.defaultFor(getVersion(),"1.0.0").evaluate());
setPolicy(ConstraintCheck.defaultFor(getPolicy(), AccessPolicy.OPEN).evaluate());
setLastUpdateTime(ConstraintCheck.defaultFor(getLastUpdateTime(),now).evaluate());
setCreationTime(ConstraintCheck.defaultFor(getCreationTime(),now).evaluate());
setLicenzaID(ConstraintCheck.defaultFor(getLicenzaID(),"CC-BY").evaluate());
}
public abstract AssociatedContent getContentByPath(String path);
public abstract void setAtPath(AssociatedContent toSet,String path);
}

@ -0,0 +1,6 @@
package org.gcube.application.geoportal.common.model.legacy;
public enum RecordType {
CONCESSIONE,MOSI,MOPR
}

@ -0,0 +1,60 @@
package org.gcube.application.geoportal.common.model.legacy;
import java.util.List;
import org.gcube.application.geoportal.common.model.legacy.report.ValidationReport;
import org.gcube.application.geoportal.common.utils.CollectionsUtils;
import lombok.Getter;
import lombok.Setter;
import lombok.ToString;
@Getter
@Setter
@ToString(callSuper=true)
public class RelazioneScavo extends AssociatedContent {
private List<String> responsabili;
private List<String> soggetto;
@Override
public ValidationReport validateForInsertion() {
ValidationReport toReturn=super.validateForInsertion();
toReturn.setObjectName("Relazione Scavo");
toReturn.checkMandatory(responsabili, "Responsabili");
toReturn.checkMandatory(soggetto, "Soggetto");
return toReturn;
}
@Override
public int hashCode() {
final int prime = 31;
int result = super.hashCode();
result = prime * result + CollectionsUtils.hashCode(responsabili);
result = prime * result + CollectionsUtils.hashCode(soggetto);
return result;
}
@Override
public boolean equals(Object obj) {
if (this == obj)
return true;
if (!super.equals(obj))
return false;
if (getClass() != obj.getClass())
return false;
RelazioneScavo other = (RelazioneScavo) obj;
if(!CollectionsUtils.equalsCollections(responsabili, other.responsabili)) return false;
if(!CollectionsUtils.equalsCollections(soggetto, other.soggetto)) return false;
return true;
}
}

@ -0,0 +1,25 @@
package org.gcube.application.geoportal.common.model.legacy;
import lombok.Getter;
import lombok.Setter;
@Getter
@Setter
public abstract class SDILayerDescriptor extends AssociatedContent{
public abstract Long getLayerID();
public abstract void setLayerID(Long layerID);
public abstract String getLayerUUID();
public abstract void setLayerUUID(String layerUUID);
public abstract String getLayerName();
public abstract void setLayerName(String layerName);
public abstract String getWmsLink();
public abstract void setWmsLink(String wmsLink);
public abstract void setWorkspace(String workspace);
public abstract String getWorkspace();
public abstract BBOX getBbox();
public abstract void setBbox(BBOX toSet);
}

@ -0,0 +1,73 @@
package org.gcube.application.geoportal.common.model.legacy;
import java.util.List;
import org.gcube.application.geoportal.common.utils.CollectionsUtils;
import lombok.Getter;
import lombok.Setter;
import lombok.ToString;
@Getter
@Setter
@ToString(callSuper=true)
public class UploadedImage extends AssociatedContent {
private String didascalia;
private String format;
private List<String> responsabili;
private List<String> soggetto;
@Override
public int hashCode() {
final int prime = 31;
int result = super.hashCode();
result = prime * result + ((didascalia == null) ? 0 : didascalia.hashCode());
result = prime * result + ((format == null) ? 0 : format.hashCode());
// result = prime * result + ((responsabili == null) ? 0 : responsabili.hashCode());
result = prime * result + CollectionsUtils.hashCode(responsabili);
// result = prime * result + ((soggetto == null) ? 0 : soggetto.hashCode());
result = prime * result + CollectionsUtils.hashCode(soggetto);
return result;
}
@Override
public boolean equals(Object obj) {
if (this == obj)
return true;
if (!super.equals(obj))
return false;
if (getClass() != obj.getClass())
return false;
UploadedImage other = (UploadedImage) obj;
if (didascalia == null) {
if (other.didascalia != null)
return false;
} else if (!didascalia.equals(other.didascalia))
return false;
if (format == null) {
if (other.format != null)
return false;
} else if (!format.equals(other.format))
return false;
// if (responsabili == null) {
// if (other.responsabili != null)
// return false;
// } else if (!responsabili.equals(other.responsabili))
// return false;
if(!CollectionsUtils.equalsCollections(responsabili, other.responsabili)) return false;
// if (soggetto == null) {
// if (other.soggetto != null)
// return false;
// } else if (!soggetto.equals(other.soggetto))
// return false;
if(!CollectionsUtils.equalsCollections(soggetto, other.soggetto)) return false;
return true;
}
}

@ -0,0 +1,19 @@
package org.gcube.application.geoportal.common.model.legacy;
import lombok.EqualsAndHashCode;
import lombok.Getter;
import lombok.Setter;
import lombok.ToString;
@Getter
@Setter
@ToString(callSuper=true)
@EqualsAndHashCode(callSuper=true)
public class WorkspaceContent extends PersistedContent{
private String mimetype;
private String storageID;
private String link;
private String name;
}

@ -0,0 +1,56 @@
package org.gcube.application.geoportal.common.model.legacy.report;
import java.util.Collection;
public interface Check{
public static Check collectionSizeMax(final int upperBound) {
return new Check() {
int size=0;
@Override
public boolean isOk(Object toCheck) {
int size=((Collection)toCheck).size();
return size<=upperBound;
}
@Override
public String getMessage() {
return "Numero elementi : "+size+" [max : "+upperBound+"]";
}
};
}
public static Check collectionSizeMin(final int lowerBound) {
return new Check() {
int size=0;
@Override
public boolean isOk(Object toCheck) {
int size=((Collection)toCheck).size();
return size>=lowerBound;
}
@Override
public String getMessage() {
return "Numero elementi : "+size+" [min : "+lowerBound+"]";
}
};
}
public static Check collectionSize(final int lowerBound, final int upperBound) {
return new Check() {
int size=0;
@Override
public boolean isOk(Object toCheck) {
size=((Collection)toCheck).size();
return size<=upperBound&&size>=lowerBound;
}
@Override
public String getMessage() {
return "Numero elementi : "+size+" [min : "+lowerBound+" max : "+upperBound+"]";
}
};
}
public boolean isOk(Object toCheck);
public String getMessage();
}

@ -0,0 +1,7 @@
package org.gcube.application.geoportal.common.model.legacy.report;
public class Checks {
// public static final Check
}

@ -0,0 +1,103 @@
package org.gcube.application.geoportal.common.model.legacy.report;
import java.util.ArrayList;
import java.util.Collection;
import java.util.Collections;
import java.util.List;
import lombok.Getter;
import lombok.Setter;
@Getter
@Setter
public class ConstraintCheck<T> {
public static <T> ConstraintCheck<T> defaultFor(T toCheck,T defaultValue){
return new ConstraintCheck<T>(toCheck).withDefault(defaultValue);
}
private T theObject;
private String fieldLabel;
private String message;
private boolean error=false;
private boolean mandatory;
private T theDefault;
private List<Check> additionalChecks=new ArrayList<Check>();
public ConstraintCheck(T theObject,Check...checks){
this.theObject=theObject;
for(Check c:checks)
additionalChecks.add(c);
check();
}
public ConstraintCheck<T> withDefault(T theDefault){
this.theDefault=theDefault;
return this;
}
public ConstraintCheck<T> addChecks(Check...checks){
for(Check c:checks)
additionalChecks.add(c);
return this;
}
public ConstraintCheck(T theObject,String fieldLabel,Check...checks){
this.theObject=theObject;
this.fieldLabel=fieldLabel;
for(Check c:checks)
additionalChecks.add(c);
check();
}
public T evaluate() {
check();
T result=theObject;
if(isError()) {
result=theDefault;
if(theDefault!=null && theDefault instanceof Collection) {
Collection defaultCollection=(Collection) theDefault;
ArrayList target=new ArrayList(defaultCollection);
result=(T) target;
}
}
return result;
}
private void check() {
if(theObject==null) {
this.setMessage(fieldLabel+" è un campo obbligatorio.");
this.setError(true);
}else
if((theObject instanceof String) && ((String) theObject).isEmpty()) {
this.setMessage(fieldLabel+" non può essere vuoto.");
this.setError(true);
}else
if((theObject instanceof Collection)) {
Collection toCheckCollection=(Collection) theObject;
if(toCheckCollection.isEmpty()) {
this.setMessage("La lista "+fieldLabel+" non può essere vuota.");
this.setError(true);
}
Boolean containsError=false;
Object[] array=toCheckCollection.toArray(new Object[toCheckCollection.size()]);
for(int i=0;i<array.length;i++) {
containsError=new ConstraintCheck(array[i],fieldLabel+" [elemento N° "+i+"]").isError();
}
this.setError(containsError);
}else {
for(Check check:additionalChecks) {
if(!check.isOk(theObject)) {
this.setError(true);
this.setMessage(check.getMessage());
}
}
}
}
}

@ -0,0 +1,5 @@
package org.gcube.application.geoportal.common.model.legacy.report;
public class DeletionReport {
}

@ -0,0 +1,29 @@
package org.gcube.application.geoportal.common.model.legacy.report;
import java.io.Serializable;
import javax.xml.bind.annotation.XmlAccessType;
import javax.xml.bind.annotation.XmlAccessorType;
import org.gcube.application.geoportal.common.model.legacy.Record;
import lombok.Getter;
import lombok.Setter;
@XmlAccessorType(XmlAccessType.NONE)
public class PublicationReport extends ValidationReport implements Serializable{
/**
*
*/
private static final long serialVersionUID = -1422004928222440165L;
@Getter
@Setter
private Record theRecord;
public PublicationReport(String objectName) {
super(objectName);
}
}

@ -0,0 +1,80 @@
package org.gcube.application.geoportal.common.model.legacy.report;
import java.io.Serializable;
import java.util.ArrayList;
import java.util.List;
import lombok.Data;
import lombok.NoArgsConstructor;
@Data
@NoArgsConstructor
public class ValidationReport implements Serializable{
/**
*
*/
private static final long serialVersionUID = -3629142756787381094L;
public static enum ValidationStatus{
PASSED, ERROR, WARNING
}
private String objectName;
private List<String> errorMessages=new ArrayList<String>();
private List<String> warningMessages=new ArrayList<String>();
private List<ValidationReport> children=new ArrayList<ValidationReport>();
public ValidationStatus getStatus() {
if(!errorMessages.isEmpty()) return ValidationStatus.ERROR;
boolean isWarning=(!warningMessages.isEmpty());
for(ValidationReport obj : children) {
ValidationStatus status=obj.getStatus();
if(status.equals(ValidationStatus.ERROR)) return ValidationStatus.ERROR;
if(status.equals(ValidationStatus.WARNING)) isWarning=true;
}
if(isWarning) return ValidationStatus.WARNING;
return ValidationStatus.PASSED;
}
public void addChild(ValidationReport obj) {
children.add(obj);
}
public void addMessage(ValidationStatus status,String message) {
switch (status) {
case ERROR:
errorMessages.add(message);
break;
case WARNING :
warningMessages.add(message);
default:
break;
}
}
public <T> boolean checkMandatory(T toCheck,String name,Check...checks) {
ConstraintCheck<T> check=new ConstraintCheck<T>(toCheck,name,checks);
if(check.isError())
this.addMessage(ValidationStatus.ERROR, check.getMessage());
return !check.isError();
}
public ValidationReport(String objectName) {
super();
this.objectName = objectName;
}
}

@ -0,0 +1,7 @@
package org.gcube.application.geoportal.common.model.profile;
public class DefaultCompiler {
}

@ -0,0 +1,11 @@
package org.gcube.application.geoportal.common.model.profile;
import lombok.Getter;
@Getter
public class Field {
}

@ -0,0 +1,7 @@
package org.gcube.application.geoportal.common.model.profile;
public class FieldMapping {
}

@ -0,0 +1,7 @@
package org.gcube.application.geoportal.common.model.profile;
public class IndexDefinition {
}

Some files were not shown because too many files have changed in this diff Show More

Loading…
Cancel
Save