diff --git a/cms-test-commons/pom.xml b/cms-test-commons/pom.xml new file mode 100644 index 0000000..58c8903 --- /dev/null +++ b/cms-test-commons/pom.xml @@ -0,0 +1,75 @@ + + + + 4.0.0 + org.gcube.application.cms + cms-test-commons + 1.0.0-SNAPSHOT + CMS Test Commons + + + + org.gcube.application.cms + gcube-cms-suite + 1.0.0-SNAPSHOT + + + + + https://code-repo.d4science.org/gCubeSystem + 1.0 + + + + scm:git:${gitBaseUrl}/${project.artifactId}.git + scm:git:${gitBaseUrl}/${project.artifactId}.git + ${gitBaseUrl}/${project.artifactId}.git + + + + + + + org.gcube.distribution + gcube-bom + 2.0.1 + pom + import + + + org.gcube.distribution + gcube-smartgears-bom + 2.1.0 + pom + import + + + + + + + org.gcube.application + geoportal-common + + + + ch.qos.logback + logback-classic + + + + junit + junit + 4.12 + + + + org.gcube.common + storagehub-client-library + [1.0.0,2.0.0-SNAPSHOT) + + + + \ No newline at end of file diff --git a/geoportal-service/src/test/java/org/gcube/application/geoportal/service/TestModel.java b/cms-test-commons/src/main/java/org/gcube/application/cms/tests/model/TestModel.java similarity index 87% rename from geoportal-service/src/test/java/org/gcube/application/geoportal/service/TestModel.java rename to cms-test-commons/src/main/java/org/gcube/application/cms/tests/model/TestModel.java index 6639d5a..6440eb8 100644 --- a/geoportal-service/src/test/java/org/gcube/application/geoportal/service/TestModel.java +++ b/cms-test-commons/src/main/java/org/gcube/application/cms/tests/model/TestModel.java @@ -1,24 +1,20 @@ -package org.gcube.application.geoportal.service; - -import org.bson.types.ObjectId; -import org.gcube.application.geoportal.common.model.legacy.*; +package org.gcube.application.cms.tests.model; import java.time.LocalDateTime; import java.util.ArrayList; import java.util.Arrays; - +import org.bson.types.ObjectId; +import org.gcube.application.geoportal.common.model.legacy.*; public class TestModel { - public static Concessione prepareEmptyConcessione() { Concessione concessione=new Concessione(); // Generic fields - - // Concessione fields + // Concessione fields concessione.setNome("MONGO Italia, forse, ma su "); concessione.setIntroduzione("This is my MONGO project"); concessione.setDescrizioneContenuto("It contains this and that"); @@ -40,7 +36,7 @@ public class TestModel { 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"})); @@ -48,12 +44,12 @@ public class TestModel { concessione.setParoleChiaveICCD(Arrays.asList(new String[] {"vattelapesca","somthing something"})); - concessione.setCentroidLat(43.0); //N-S - concessione.setCentroidLong(9.0); //E-W - +// 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()); @@ -62,29 +58,35 @@ public class TestModel { c.getImmaginiRappresentative().forEach((UploadedImage i)->{i.setMongo_id(rnd());}); return c; } - - public static final String rnd() { + + 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 + + // Attachments // Relazione scavo RelazioneScavo relScavo=new RelazioneScavo(); - - relScavo.setAbstractIta("simple abstract section"); relScavo.setResponsabili(concessione.getAuthors()); - concessione.setRelazioneScavo(relScavo); + + //Abstract + AbstractRelazione abstractRelazione=new AbstractRelazione(); + abstractRelazione.setAbstractIta("Il mio abstract"); + abstractRelazione.setAbstractEng("My abstract"); + concessione.setAbstractRelazione(abstractRelazione); + + //Immagini rappresentative ArrayList imgs=new ArrayList<>(); for(int i=0;i0); @@ -44,14 +45,14 @@ public class SerializationTest { @Test public void readConcessione() throws JsonProcessingException, IOException { Concessione concessione=mapper.readerFor(Concessione.class).readValue( - Files.getFileFromResources("Concessione.json")); + Files.getFileFromResources("concessioni/Concessione.json")); System.out.println("Concessione is "+concessione.toString()); } @Test public void generic() throws JsonProcessingException, IOException { - Concessione conc=TestModel.prepareConcessione(); + Concessione conc= TestModel.prepareConcessione(); conc.validate(); full(conc); } diff --git a/geoportal-client/pom.xml b/geoportal-client/pom.xml index bfbc227..a530f34 100644 --- a/geoportal-client/pom.xml +++ b/geoportal-client/pom.xml @@ -18,54 +18,25 @@ https://code-repo.d4science.org/gCubeSystem 1.0 - - - scm:git:${gitBaseUrl}/${project.artifactId}.git scm:git:${gitBaseUrl}/${project.artifactId}.git ${gitBaseUrl}/${project.artifactId}.git - - - - - - org.gcube.distribution - gcube-bom - 2.0.1 - pom - import - - - org.gcube.distribution - gcube-smartgears-bom - 2.1.0 - pom - test - - - - - - org.projectlombok lombok - 1.14.8 org.gcube.application geoportal-common - [1.0.0,2.0.0) - org.gcube.core common-fw-clients @@ -77,8 +48,6 @@ - - org.gcube.common common-jaxrs-client @@ -87,18 +56,11 @@ - junit - junit + org.gcube.application.cms + cms-test-commons test - 4.11 - - - org.gcube.common - storagehub-client-library - [1.0.0,2.0.0-SNAPSHOT) - @@ -134,6 +96,7 @@ + \ No newline at end of file diff --git a/geoportal-client/src/test/java/org/gcube/application/geoportal/StorageTests.java b/geoportal-client/src/test/java/org/gcube/application/geoportal/StorageTests.java index 5942bcb..c73306a 100644 --- a/geoportal-client/src/test/java/org/gcube/application/geoportal/StorageTests.java +++ b/geoportal-client/src/test/java/org/gcube/application/geoportal/StorageTests.java @@ -1,6 +1,6 @@ package org.gcube.application.geoportal; -import org.gcube.application.geoportal.clients.TokenSetter; +import org.gcube.application.cms.tests.model.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; diff --git a/geoportal-client/src/test/java/org/gcube/application/geoportal/clients/BasicVreTests.java b/geoportal-client/src/test/java/org/gcube/application/geoportal/clients/BasicVreTests.java index d6cb21b..f57479d 100644 --- a/geoportal-client/src/test/java/org/gcube/application/geoportal/clients/BasicVreTests.java +++ b/geoportal-client/src/test/java/org/gcube/application/geoportal/clients/BasicVreTests.java @@ -1,5 +1,6 @@ package org.gcube.application.geoportal.clients; +import org.gcube.application.cms.tests.model.TokenSetter; import org.junit.BeforeClass; public class BasicVreTests { diff --git a/geoportal-client/src/test/java/org/gcube/application/geoportal/clients/StatefulClientTests.java b/geoportal-client/src/test/java/org/gcube/application/geoportal/clients/StatefulClientTests.java index e46aa7e..c85016b 100644 --- a/geoportal-client/src/test/java/org/gcube/application/geoportal/clients/StatefulClientTests.java +++ b/geoportal-client/src/test/java/org/gcube/application/geoportal/clients/StatefulClientTests.java @@ -6,9 +6,9 @@ import static org.junit.Assert.*; import java.io.FileInputStream; import java.io.FileNotFoundException; +import org.gcube.application.cms.tests.model.TestModel; 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; @@ -34,7 +34,7 @@ public class StatefulClientTests extends BasicVreTests{ toRegister.setNome("Mock module"); manager.createNew(toRegister); - UploadedImage toRegisterImg=TestModel.prepareConcessione().getImmaginiRappresentative().get(0); + 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"); diff --git a/geoportal-client/src/test/java/org/gcube/application/geoportal/clients/StatelessClientTests.java b/geoportal-client/src/test/java/org/gcube/application/geoportal/clients/StatelessClientTests.java index b01957a..c44dd1e 100644 --- a/geoportal-client/src/test/java/org/gcube/application/geoportal/clients/StatelessClientTests.java +++ b/geoportal-client/src/test/java/org/gcube/application/geoportal/clients/StatelessClientTests.java @@ -1,7 +1,6 @@ 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; @@ -11,10 +10,8 @@ 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.cms.tests.model.TestModel; 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; diff --git a/geoportal-client/src/test/java/org/gcube/application/geoportal/clients/TokenSetter.java b/geoportal-client/src/test/java/org/gcube/application/geoportal/clients/TokenSetter.java deleted file mode 100644 index ae53e71..0000000 --- a/geoportal-client/src/test/java/org/gcube/application/geoportal/clients/TokenSetter.java +++ /dev/null @@ -1,35 +0,0 @@ -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); - } - - -} diff --git a/geoportal-client/src/test/java/org/gcube/application/geoportal/common/model/Serializations.java b/geoportal-client/src/test/java/org/gcube/application/geoportal/common/model/Serializations.java deleted file mode 100644 index 993c926..0000000 --- a/geoportal-client/src/test/java/org/gcube/application/geoportal/common/model/Serializations.java +++ /dev/null @@ -1,33 +0,0 @@ -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); - } - -} diff --git a/geoportal-client/src/test/java/org/gcube/application/geoportal/common/model/TestModel.java b/geoportal-client/src/test/java/org/gcube/application/geoportal/common/model/TestModel.java deleted file mode 100644 index aac4795..0000000 --- a/geoportal-client/src/test/java/org/gcube/application/geoportal/common/model/TestModel.java +++ /dev/null @@ -1,130 +0,0 @@ -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 imgs=new ArrayList<>(); - for(int i=0;i piante=new ArrayList(); - for(int i=0;i> piante, List pos, MongoConcessioni client, StorageUtils storage) throws Exception { - Concessione c=TestModel.prepareConcessione(piante.size(), 2); + Concessione c= TestModel.prepareConcessione(piante.size(), 2); c.setNome("Mock for "+baseName); c= client.createNew(c); String mongoId=c.getMongo_id(); diff --git a/geoportal-client/src/test/resources/concessioni/Concessione.json b/geoportal-client/src/test/resources/concessioni/Concessione.json deleted file mode 100644 index 612b021..0000000 --- a/geoportal-client/src/test/resources/concessioni/Concessione.json +++ /dev/null @@ -1,747 +0,0 @@ -{ - "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 dell’area 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" -} \ No newline at end of file diff --git a/geoportal-common/pom.xml b/geoportal-common/pom.xml index 7236f7e..f940491 100644 --- a/geoportal-common/pom.xml +++ b/geoportal-common/pom.xml @@ -45,7 +45,6 @@ org.projectlombok lombok - 1.14.8 diff --git a/geoportal-common/src/main/java/org/gcube/application/geoportal/common/model/legacy/AbstractRelazione.java b/geoportal-common/src/main/java/org/gcube/application/geoportal/common/model/legacy/AbstractRelazione.java index d5cab38..79f768d 100644 --- a/geoportal-common/src/main/java/org/gcube/application/geoportal/common/model/legacy/AbstractRelazione.java +++ b/geoportal-common/src/main/java/org/gcube/application/geoportal/common/model/legacy/AbstractRelazione.java @@ -13,4 +13,5 @@ public class AbstractRelazione extends AssociatedContent{ private String abstractEng; + } diff --git a/geoportal-common/src/main/java/org/gcube/application/geoportal/common/model/legacy/AssociatedContent.java b/geoportal-common/src/main/java/org/gcube/application/geoportal/common/model/legacy/AssociatedContent.java index 627d244..43fd773 100644 --- a/geoportal-common/src/main/java/org/gcube/application/geoportal/common/model/legacy/AssociatedContent.java +++ b/geoportal-common/src/main/java/org/gcube/application/geoportal/common/model/legacy/AssociatedContent.java @@ -74,11 +74,7 @@ public abstract class AssociatedContent { 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) { diff --git a/geoportal-common/src/main/java/org/gcube/application/geoportal/common/model/legacy/Concessione.java b/geoportal-common/src/main/java/org/gcube/application/geoportal/common/model/legacy/Concessione.java index f664862..60e52b3 100644 --- a/geoportal-common/src/main/java/org/gcube/application/geoportal/common/model/legacy/Concessione.java +++ b/geoportal-common/src/main/java/org/gcube/application/geoportal/common/model/legacy/Concessione.java @@ -71,7 +71,7 @@ public class Concessione extends Record{ private Double centroidLong; private RelazioneScavo relazioneScavo; - private AssociatedContent abstractRelazione; + private AbstractRelazione abstractRelazione; private List immaginiRappresentative=new ArrayList(); diff --git a/geoportal-common/src/test/java/org/gcube/application/geoportal/common/model/TestModel.java b/geoportal-common/src/test/java/org/gcube/application/geoportal/common/model/TestModel.java deleted file mode 100644 index 8bce974..0000000 --- a/geoportal-common/src/test/java/org/gcube/application/geoportal/common/model/TestModel.java +++ /dev/null @@ -1,130 +0,0 @@ -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.gcube.application.geoportal.common.model.legacy.*; - -public class TestModel { - - private static final String rnd() { - return UUID.randomUUID().toString().replace("-", "_"); - } - - - 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 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 Concessione prepareConcessione() { - - Concessione concessione=prepareEmptyConcessione(); - - - - // Attachments - - // Relazione scavo - RelazioneScavo relScavo=new RelazioneScavo(); - - relScavo.setResponsabili(concessione.getAuthors()); - - // Abstract - AbstractRelazione abstractRel=new AbstractRelazione(); - abstractRel.setAbstractEng("This is the abstract"); - abstractRel.setAbstractIta("Abstract ita"); - concessione.setAbstractRelazione(abstractRel); - - - - concessione.setRelazioneScavo(relScavo); - //Immagini rappresentative - ArrayList imgs=new ArrayList<>(); - for(int i=0;i<5;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 piante=new ArrayList(); - for(int i=0;i<4;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; - } - -} diff --git a/geoportal-common/src/test/resources/Concessione.json b/geoportal-common/src/test/resources/Concessione.json deleted file mode 100644 index f17b3c3..0000000 --- a/geoportal-common/src/test/resources/Concessione.json +++ /dev/null @@ -1,747 +0,0 @@ -{ - "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 dell’area 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" -} \ No newline at end of file diff --git a/geoportal-service/pom.xml b/geoportal-service/pom.xml index afde409..b026879 100644 --- a/geoportal-service/pom.xml +++ b/geoportal-service/pom.xml @@ -212,6 +212,11 @@ logback-classic test + + org.gcube.application.cms + cms-test-commons + test + diff --git a/geoportal-service/src/test/java/org/gcube/application/geoportal/service/ConcessioniOverMongoTest.java b/geoportal-service/src/test/java/org/gcube/application/geoportal/service/ConcessioniOverMongoTest.java index a0f3a78..fa650e9 100644 --- a/geoportal-service/src/test/java/org/gcube/application/geoportal/service/ConcessioniOverMongoTest.java +++ b/geoportal-service/src/test/java/org/gcube/application/geoportal/service/ConcessioniOverMongoTest.java @@ -1,5 +1,6 @@ package org.gcube.application.geoportal.service; +import org.gcube.application.cms.tests.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.LayerConcessione; @@ -77,7 +78,7 @@ public class ConcessioniOverMongoTest extends BasicServiceTestUnit{ } private static Concessione get(WebTarget target) throws Exception { - return register(target,TestModel.prepareConcessione()); + return register(target, TestModel.prepareConcessione()); } private static Concessione getById(WebTarget target ,String id) throws Exception { diff --git a/geoportal-service/src/test/resources/Concessione.json b/geoportal-service/src/test/resources/Concessione.json deleted file mode 100644 index 4eb7c3f..0000000 --- a/geoportal-service/src/test/resources/Concessione.json +++ /dev/null @@ -1,3 +0,0 @@ -{ - -} \ No newline at end of file diff --git a/geoportal-service/src/test/resources/concessioni/immagine.png b/geoportal-service/src/test/resources/concessioni/immagine.png deleted file mode 100644 index e777369..0000000 Binary files a/geoportal-service/src/test/resources/concessioni/immagine.png and /dev/null differ diff --git a/geoportal-service/src/test/resources/concessioni/immagine2.png b/geoportal-service/src/test/resources/concessioni/immagine2.png deleted file mode 100644 index e777369..0000000 Binary files a/geoportal-service/src/test/resources/concessioni/immagine2.png and /dev/null differ diff --git a/geoportal-service/src/test/resources/concessioni/jsonFilters/all.json b/geoportal-service/src/test/resources/concessioni/jsonFilters/all.json deleted file mode 100644 index 9e26dfe..0000000 --- a/geoportal-service/src/test/resources/concessioni/jsonFilters/all.json +++ /dev/null @@ -1 +0,0 @@ -{} \ No newline at end of file diff --git a/geoportal-service/src/test/resources/concessioni/jsonFilters/legacyid.json b/geoportal-service/src/test/resources/concessioni/jsonFilters/legacyid.json deleted file mode 100644 index 610e687..0000000 --- a/geoportal-service/src/test/resources/concessioni/jsonFilters/legacyid.json +++ /dev/null @@ -1,3 +0,0 @@ -{ - "id" : {$gt : 0} -} \ No newline at end of file diff --git a/geoportal-service/src/test/resources/concessioni/jsonFilters/missingCentroid.json b/geoportal-service/src/test/resources/concessioni/jsonFilters/missingCentroid.json deleted file mode 100644 index ab28660..0000000 --- a/geoportal-service/src/test/resources/concessioni/jsonFilters/missingCentroid.json +++ /dev/null @@ -1,4 +0,0 @@ -{ - "centroidLat" : 0 - -} \ No newline at end of file diff --git a/geoportal-service/src/test/resources/concessioni/jsonFilters/nonFabio.json b/geoportal-service/src/test/resources/concessioni/jsonFilters/nonFabio.json deleted file mode 100644 index b40d2fe..0000000 --- a/geoportal-service/src/test/resources/concessioni/jsonFilters/nonFabio.json +++ /dev/null @@ -1,3 +0,0 @@ -{ - "creationUser" : {$ne : "fabio.sinibaldi"} -} \ No newline at end of file diff --git a/geoportal-service/src/test/resources/concessioni/jsonFilters/validated.json b/geoportal-service/src/test/resources/concessioni/jsonFilters/validated.json deleted file mode 100644 index f05a79f..0000000 --- a/geoportal-service/src/test/resources/concessioni/jsonFilters/validated.json +++ /dev/null @@ -1,3 +0,0 @@ -{ - "report.status": {$eq : "PASSED"} -} \ No newline at end of file diff --git a/geoportal-service/src/test/resources/concessioni/jsonQueries/firstRegistered.json b/geoportal-service/src/test/resources/concessioni/jsonQueries/firstRegistered.json deleted file mode 100644 index f70d918..0000000 --- a/geoportal-service/src/test/resources/concessioni/jsonQueries/firstRegistered.json +++ /dev/null @@ -1,10 +0,0 @@ -{ - "paging" : { - "offset" : 0, - "limit" : 1 - }, - "ordering" : { - "direction" : "ASCENDING", - "fields" : ["creationTime","nome"] - } -} \ No newline at end of file diff --git a/geoportal-service/src/test/resources/concessioni/jsonQueries/lastNamesRegisteredByFabio.json b/geoportal-service/src/test/resources/concessioni/jsonQueries/lastNamesRegisteredByFabio.json deleted file mode 100644 index 668175a..0000000 --- a/geoportal-service/src/test/resources/concessioni/jsonQueries/lastNamesRegisteredByFabio.json +++ /dev/null @@ -1,18 +0,0 @@ -{ - "paging" : { - "offset" : 0, - "limit" : 1 - }, - "ordering" : { - "direction" : "DESCENDING", - "fields" : ["creationTime","nome"] - }, - "filter" : { - "creationUser" : {$eq : "fabio.sinibaldi"} - }, - "projection" : { - "nome" : 1 - } - - -} \ No newline at end of file diff --git a/geoportal-service/src/test/resources/concessioni/jsonQueries/lastRegistered.json b/geoportal-service/src/test/resources/concessioni/jsonQueries/lastRegistered.json deleted file mode 100644 index 3324a3a..0000000 --- a/geoportal-service/src/test/resources/concessioni/jsonQueries/lastRegistered.json +++ /dev/null @@ -1,11 +0,0 @@ -{ - "paging" : { - "offset" : 0, - "limit" : 1 - }, - "ordering" : { - "direction" : "DESCENDING", - "fields" : ["creationTime","nome"] - } - -} \ No newline at end of file diff --git a/geoportal-service/src/test/resources/concessioni/jsonQueries/publicationWarningMessages.json b/geoportal-service/src/test/resources/concessioni/jsonQueries/publicationWarningMessages.json deleted file mode 100644 index 514bb64..0000000 --- a/geoportal-service/src/test/resources/concessioni/jsonQueries/publicationWarningMessages.json +++ /dev/null @@ -1,10 +0,0 @@ -{ - "ordering" : { - "direction" : "DESCENDING", - "fields" : ["nome"] - }, - - "filter" : {"report.status" : {"$eq" : "WARNING"}}, - "projection" : {"report.warningMessages" : 1} - -} \ No newline at end of file diff --git a/geoportal-service/src/test/resources/concessioni/pianta.shp b/geoportal-service/src/test/resources/concessioni/pianta.shp deleted file mode 100644 index 24ed2bd..0000000 Binary files a/geoportal-service/src/test/resources/concessioni/pianta.shp and /dev/null differ diff --git a/geoportal-service/src/test/resources/concessioni/pianta.shx b/geoportal-service/src/test/resources/concessioni/pianta.shx deleted file mode 100644 index b6a49a0..0000000 Binary files a/geoportal-service/src/test/resources/concessioni/pianta.shx and /dev/null differ diff --git a/geoportal-service/src/test/resources/concessioni/pos.dbf b/geoportal-service/src/test/resources/concessioni/pos.dbf deleted file mode 100644 index eff02b7..0000000 Binary files a/geoportal-service/src/test/resources/concessioni/pos.dbf and /dev/null differ diff --git a/geoportal-service/src/test/resources/concessioni/pos.prj b/geoportal-service/src/test/resources/concessioni/pos.prj deleted file mode 100644 index a30c00a..0000000 --- a/geoportal-service/src/test/resources/concessioni/pos.prj +++ /dev/null @@ -1 +0,0 @@ -GEOGCS["GCS_WGS_1984",DATUM["D_WGS_1984",SPHEROID["WGS_1984",6378137,298.257223563]],PRIMEM["Greenwich",0],UNIT["Degree",0.017453292519943295]] \ No newline at end of file diff --git a/geoportal-service/src/test/resources/concessioni/pos.qpj b/geoportal-service/src/test/resources/concessioni/pos.qpj deleted file mode 100644 index 5fbc831..0000000 --- a/geoportal-service/src/test/resources/concessioni/pos.qpj +++ /dev/null @@ -1 +0,0 @@ -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"]] diff --git a/geoportal-service/src/test/resources/concessioni/pos.shp b/geoportal-service/src/test/resources/concessioni/pos.shp deleted file mode 100644 index ba95a92..0000000 Binary files a/geoportal-service/src/test/resources/concessioni/pos.shp and /dev/null differ diff --git a/geoportal-service/src/test/resources/concessioni/pos.shx b/geoportal-service/src/test/resources/concessioni/pos.shx deleted file mode 100644 index 21821b5..0000000 Binary files a/geoportal-service/src/test/resources/concessioni/pos.shx and /dev/null differ diff --git a/geoportal-service/src/test/resources/concessioni/relazione.pdf b/geoportal-service/src/test/resources/concessioni/relazione.pdf deleted file mode 100644 index 65c914c..0000000 Binary files a/geoportal-service/src/test/resources/concessioni/relazione.pdf and /dev/null differ diff --git a/pom.xml b/pom.xml index 6c0422a..efbcc44 100644 --- a/pom.xml +++ b/pom.xml @@ -32,6 +32,7 @@ geoportal-service geoportal-client geoportal-common + cms-test-commons @@ -49,42 +50,40 @@ + + org.gcube.application + geoportal-service + [1.0.6-SNAPSHOT,2.0.0) + + + org.gcube.application + geoportal-client + [1.0.5-SNAPSHOT,2.0.0) + + + org.gcube.application + geoportal-common + [1.0.7-SNAPSHOT,2.0.0) + + + org.gcube.application.cms + cms-test-commons + [1.0.0-SNAPSHOT,2.0.0) + + + + + org.projectlombok + lombok + 1.14.8 + - - - - org.projectlombok - lombok - 1.14.8 - - - org.slf4j - slf4j-api - - - - - - ch.qos.logback - logback-classic - test - - - - junit - junit - 4.12 - test - - - - gCube CMS Suite is a set of components designed to manage complex space-temporal Documents defined by metadata Profiles.