OGC LINKS as Map
This commit is contained in:
parent
ac80cbbd7c
commit
a5702a44fa
|
@ -7,6 +7,7 @@ import org.bson.Document;
|
|||
import org.gcube.application.geoportal.common.model.document.filesets.Materialization;
|
||||
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
|
||||
public class GCubeSDILayer extends Materialization {
|
||||
|
||||
|
@ -130,7 +131,7 @@ public class GCubeSDILayer extends Materialization {
|
|||
}
|
||||
|
||||
@JsonIgnore
|
||||
public List getOGCLinks(){return this.get(OGC_LINKS, List.class);}
|
||||
public Map getOGCLinks(){return this.get(OGC_LINKS, Map.class);}
|
||||
@JsonIgnore
|
||||
public Object getBBox(){return this.get(B_BOX);}
|
||||
@JsonIgnore
|
||||
|
|
|
@ -46,7 +46,11 @@ public class GCubeSDILayerBuilder {
|
|||
theObject.put(GCubeSDILayer.B_BOX,bbox);
|
||||
|
||||
prepareOGCLinks();
|
||||
theObject.put(GCubeSDILayer.OGC_LINKS,ogcLinks.values());
|
||||
final Document finalLinkDocument = new Document();
|
||||
ogcLinks.forEach( (type,document) -> {
|
||||
finalLinkDocument.putAll(document);
|
||||
});
|
||||
theObject.put(GCubeSDILayer.OGC_LINKS,finalLinkDocument);
|
||||
return theObject;
|
||||
}
|
||||
|
||||
|
|
|
@ -93,6 +93,10 @@ public class IndexerTest extends BasicPluginTest {
|
|||
assertEquals(GeoServerPlatform.GS_PLATFORM,platformDoc.get(Materialization.TYPE));
|
||||
}
|
||||
|
||||
System.out.println("OGC_LINKS : ");
|
||||
layer.getOGCLinks().forEach((k,v) ->{
|
||||
System.out.println(k + "\t:\t"+v);
|
||||
});
|
||||
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue