Package org.geoserver.catalog

Examples of org.geoserver.catalog.LayerGroupInfo.layers()


                    infoObject=layerInfo;
                } else {
                    LayerGroupInfo layerGroupInfo = wms.getLayerGroupByName(layer);
                    if(layerGroupInfo != null) {
                        // add all single layers of the group
                        for(LayerInfo singleLayer : layerGroupInfo.layers()) {
                            addLayer(layers,singleLayer,request);
                        }
                        infoObject=layerGroupInfo;
                    } else {
                        throw new ServiceException(layer + " layer does not exist.");
View Full Code Here


            for(String styleName : styleNames) {
                // if we have a layer group and no style is specified
                // use the default one for the layer in the current position
                if (styleName.equals("") && infoObj instanceof LayerGroupInfo) {
                    LayerGroupInfo layerGroupInfo = (LayerGroupInfo) infoObj;
                    List<LayerInfo> groupLayers = layerGroupInfo.layers();
                    if (pos < groupLayers.size()) {
                        sldStyles.add(getStyleFromLayer(groupLayers.get(pos)));
                    }
                } else {
                    sldStyles.add(wms.getStyleByName(styleName));
View Full Code Here

        } else {
            if(infoObj instanceof LayerInfo) {
                sldStyles.add(getStyleFromLayer((LayerInfo)infoObj));
            } else if(infoObj instanceof LayerGroupInfo) {
                LayerGroupInfo layerGroupInfo=(LayerGroupInfo)infoObj;
                List<LayerInfo> groupLayers = layerGroupInfo.layers();
                List<StyleInfo> groupStyles = layerGroupInfo.styles();
                for (int count = 0; count < groupLayers.size(); count++) {
                    if (count < groupStyles.size() && groupStyles.get(count) != null) {
                        sldStyles.add(groupStyles.get(count).getStyle());
                    } else {
View Full Code Here

                    Object o = requestedLayerInfos.get(i);
                    Style style = oldStyles.isEmpty() ? null : (Style) oldStyles.get(i);

                    if (o instanceof LayerGroupInfo) {
                        LayerGroupInfo groupInfo = (LayerGroupInfo) o;
                        List<LayerInfo> layers = groupInfo.layers();
                        List<StyleInfo> styles = groupInfo.styles();
                        for (int j = 0; j < styles.size(); j++) {
                            StyleInfo si = styles.get(j);
                            if (si != null){
                                newStyles.add(si.getStyle());
View Full Code Here

                        throw new ServiceException(e);
                    }
                } else {
                    if (wms.getLayerGroupByName(layerName) != null) {
                        LayerGroupInfo group = wms.getLayerGroupByName(layerName);
                        List<LayerInfo> groupLayers = group.layers();
                        List<StyleInfo> groupStyles = group.styles();
                        for (int i = 0; i < groupLayers.size(); i++) {
                            LayerInfo layer = groupLayers.get(i);
                            layers.add(new MapLayerInfo(layer));
                            StyleInfo style = groupStyles.get(i);
View Full Code Here

                LayerGroupInfo groupInfo = wms.getLayerGroupByName(layerName);
                if (groupInfo == null || LayerGroupInfo.Mode.CONTAINER.equals(groupInfo.getMode())) {
                    throw new ServiceException(layerName + ": no such layer on this server",
                            "LayerNotDefined", getClass().getSimpleName());
                } else {
                    for (LayerInfo li : groupInfo.layers()) {
                        layer = new MapLayerInfo(li);
                        layers.add(layer);
                    }
                }
            } else {
View Full Code Here

            } else {

                LayerGroupInfo layerGroup = getWMS().getLayerGroupByName(layerName);
               
                if (layerGroup != null) {
                    List<LayerInfo> layerGroupLayers = layerGroup.layers();
                    List<StyleInfo> layerGroupStyles = layerGroup.getStyles();
                    for (int j = 0; j < layerGroupStyles.size(); j++) {
                        StyleInfo si = layerGroupStyles.get(j);
                        LayerInfo layer = layerGroupLayers.get(j);
                        currLayer = new MapLayerInfo(layer);
View Full Code Here

TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.