Merge pull request '1.0.1' (#1) from 1.0.1 into master

This commit is contained in:
Fabio Sinibaldi 2020-12-10 12:55:42 +01:00
commit 05906f2404
3 changed files with 43 additions and 1 deletions

View File

@ -2,6 +2,10 @@ This project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.htm
# Changelog for org.gcube.application.geoportal-client
## [v1.0.1] - 2020-11-11
Excluded common-calls 1.2.0
## [v1.0.0] - 2020-11-11
First release

View File

@ -4,7 +4,7 @@
<modelVersion>4.0.0</modelVersion>
<groupId>org.gcube.application</groupId>
<artifactId>geoportal-client</artifactId>
<version>1.0.0</version>
<version>1.0.1</version>
<name>Geoportal Client</name>
@ -45,6 +45,13 @@
<dependencies>
<!-- REMOVE FROM GCUBE 5 -->
<dependency>
<groupId>org.gcube.core</groupId>
<artifactId>common-gcube-calls</artifactId>
<version>[1.0.0,1.2.0)</version>
</dependency>
<dependency>
<groupId>org.projectlombok</groupId>
<artifactId>lombok</artifactId>

View File

@ -5,6 +5,9 @@ import java.util.concurrent.atomic.AtomicLong;
import org.gcube.application.geoportal.client.legacy.ConcessioniManager;
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.Before;
import org.junit.Test;
@ -30,6 +33,11 @@ public class ConcessioniTests {
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()+"");
@ -38,6 +46,22 @@ public class ConcessioniTests {
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) {
@ -48,8 +72,15 @@ public class ConcessioniTests {
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);
}
// @Test
// public void readOne() throws Exception {
// ConcessioniManager manager=new ConcessioniManager();