Bugfix hide and display ids
This commit is contained in:
parent
6e49b095e4
commit
3c9be903cc
|
@ -232,20 +232,20 @@ public class SDIIndexerPlugin extends SDIAbstractPlugin implements IndexerPlugin
|
|||
centroidDoc.put(m.getName(),toSetValue);
|
||||
}
|
||||
|
||||
log.info("Inserting Centroid {} into {} ",centroidDoc.toJson(),indexer);
|
||||
log.info("Inserting Centroid {} into {} ",Serialization.write(centroidDoc.toJson()),indexer);
|
||||
indexer.insert(centroidDoc);
|
||||
|
||||
|
||||
|
||||
//TODO SUPPORT HIDE AND DISPLAY
|
||||
// Support to HIDE AND DISPLAY as requested by invoker
|
||||
if(requestArguments.containsKey("_toHideIds")){
|
||||
List<String> ids = requestArguments.getList("_toHideIds",String.class);
|
||||
|
||||
List<String> ids = Serialization.convert(requestArguments.get("_toHideIds"),List.class);
|
||||
log.info("Requested to hide centroids {} ",ids);
|
||||
indexer.updateIsVisible(false,ids);
|
||||
}
|
||||
|
||||
if(requestArguments.containsKey("_toDisplayIds")){
|
||||
List<String> ids = requestArguments.getList("_toDisplayIds",String.class);
|
||||
List<String> ids = Serialization.convert(requestArguments.get("_toDisplayIds"),List.class);
|
||||
|
||||
log.info("Requested to hide centroids {} ",ids);
|
||||
indexer.updateIsVisible(true,ids);
|
||||
}
|
||||
|
|
|
@ -25,6 +25,8 @@ import org.gcube.application.geoportal.common.utils.Files;
|
|||
import org.gcube.application.geoportal.common.utils.tests.GCubeTest;
|
||||
import org.junit.Test;
|
||||
|
||||
import java.util.Arrays;
|
||||
|
||||
import static junit.framework.TestCase.*;
|
||||
import static org.junit.Assume.assumeTrue;
|
||||
|
||||
|
@ -35,8 +37,11 @@ public class IndexerTest extends BasicPluginTest {
|
|||
assumeTrue(GCubeTest.isTestInfrastructureEnabled());
|
||||
Project doc= TestDocuments.documentMap.get("dummy.json");
|
||||
doc.setProfileID("sdi-tests");
|
||||
|
||||
doc.getTheDocument().put("coordX",10d);
|
||||
doc.getTheDocument().put("coordY",11d);
|
||||
|
||||
doc.getTheDocument().put("nome", Arrays.asList("My Little Test","Detto test"));
|
||||
testIndexing(doc);
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue