Fixes Coordinates parsing
This commit is contained in:
parent
21cc19c713
commit
c44a8c851f
|
@ -36,7 +36,7 @@ public class BBOXByCoordinatePaths extends BBOXEvaluator{
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public GCubeSDILayer.BBOX evaluate(Document profileConfiguration, UseCaseDescriptor useCaseDescriptor, JSONPathWrapper documentNavigator) {
|
public GCubeSDILayer.BBOX evaluate(Document profileConfiguration, UseCaseDescriptor useCaseDescriptor, JSONPathWrapper documentNavigator) {
|
||||||
List coordsConfig=profileConfiguration.get("coordinatesPaths",List.class);
|
List coordsConfig=profileConfiguration.get("coordinatesPath",List.class);
|
||||||
GCubeSDILayer.BBOX toSet = null;
|
GCubeSDILayer.BBOX toSet = null;
|
||||||
for(Object coordsObj:coordsConfig){
|
for(Object coordsObj:coordsConfig){
|
||||||
log.debug("UseCaseDescriptor {} : Evaluating coords {} ", useCaseDescriptor.getId(),coordsObj);
|
log.debug("UseCaseDescriptor {} : Evaluating coords {} ", useCaseDescriptor.getId(),coordsObj);
|
||||||
|
|
|
@ -33,7 +33,12 @@ public class IndexerTest extends BasicPluginTest {
|
||||||
@Test
|
@Test
|
||||||
public void testIndexRequest() throws PluginExecutionException, JsonProcessingException {
|
public void testIndexRequest() throws PluginExecutionException, JsonProcessingException {
|
||||||
assumeTrue(GCubeTest.isTestInfrastructureEnabled());
|
assumeTrue(GCubeTest.isTestInfrastructureEnabled());
|
||||||
Project doc= TestDocuments.documentMap.get("profiledConcessioniExample.json");
|
UseCaseDescriptor ucd=TestProfiles.profiles.get("sdi-tests");
|
||||||
|
Project doc= TestDocuments.documentMap.get("dummy.json");
|
||||||
|
|
||||||
|
doc.setProfileID(ucd.getId());
|
||||||
|
doc.getTheDocument().put("coordX",10d);
|
||||||
|
doc.getTheDocument().put("coordY",11d);
|
||||||
|
|
||||||
IndexDocumentRequest request=new IndexDocumentRequest(TestProfiles.profiles.get(doc.getProfileID()),
|
IndexDocumentRequest request=new IndexDocumentRequest(TestProfiles.profiles.get(doc.getProfileID()),
|
||||||
getCurrentUser(),getTestContext(),doc);
|
getCurrentUser(),getTestContext(),doc);
|
||||||
|
@ -55,6 +60,10 @@ public class IndexerTest extends BasicPluginTest {
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
@Test
|
@Test
|
||||||
public void getIndex() throws ConfigurationException, JsonProcessingException {
|
public void getIndex() throws ConfigurationException, JsonProcessingException {
|
||||||
assumeTrue(GCubeTest.isTestInfrastructureEnabled());
|
assumeTrue(GCubeTest.isTestInfrastructureEnabled());
|
||||||
|
|
|
@ -0,0 +1,53 @@
|
||||||
|
{
|
||||||
|
"_id" : "sdi-tests",
|
||||||
|
"_version" : "1.0.0",
|
||||||
|
"_name" : "SDI Tests",
|
||||||
|
|
||||||
|
"_description" : "Used for tests on sdi plugins",
|
||||||
|
"_creationInfo": {
|
||||||
|
"_user" : {
|
||||||
|
"_username": "fabio.sinibaldi"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
|
||||||
|
"_schema" :{ "title" : {"_min" : 1},
|
||||||
|
"section" : { "_max" : 1, "_min" : 1,
|
||||||
|
"_children" : [
|
||||||
|
{"fileset" :{"_type" : "RegisteredFileSet", "_min": 1}},
|
||||||
|
{"title" : {"_min" : 1}}
|
||||||
|
]
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"_dataAccessPolicies" : [
|
||||||
|
{"_policy" : {"_read" : "any", "_write" : "any"}, "_roles":[]}
|
||||||
|
],
|
||||||
|
|
||||||
|
|
||||||
|
"_handlers" : [
|
||||||
|
{
|
||||||
|
"_id" : "DEFAULT-SINGLE-STEP",
|
||||||
|
"_type" : "LifecycleManagement",
|
||||||
|
"_configuration" : {
|
||||||
|
"step_access" : [
|
||||||
|
{"STEP" : "PUBLISH", "roles" :[]}
|
||||||
|
]
|
||||||
|
}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"_id": "SDI-Indexer-Plugin",
|
||||||
|
"_type": "Indexer",
|
||||||
|
"_configuration": {
|
||||||
|
"coordinatesPath" :[{"x" : "$._theDocument.coordX", "y" : "$._theDocument.coordY"}],
|
||||||
|
"explicitFieldMapping": [],
|
||||||
|
"additionalLayers": [
|
||||||
|
{
|
||||||
|
"source": {
|
||||||
|
"url": "..."
|
||||||
|
},
|
||||||
|
"toSetTitle": ""
|
||||||
|
}
|
||||||
|
]
|
||||||
|
}
|
||||||
|
}
|
||||||
|
]
|
||||||
|
}
|
Loading…
Reference in New Issue