/** * Retrieve the main map layers from the geodesk. If it's a geodesk without layers, the layers from the blueprint * are retrieved. * * @param geodesk the geodesk * @return a list of layers */ public static List<LayerDto> getMainMapLayers(BaseGeodeskDto geodesk) { if (geodesk instanceof GeodeskDto && (geodesk.getMainMapLayers() == null || geodesk.getMainMapLayers().isEmpty())) { return getMainMapLayers(((GeodeskDto) geodesk).getBlueprint()); } return geodesk.getMainMapLayers(); } }