Package org.geoserver.wms.eo

Examples of org.geoserver.wms.eo.EoLayerType


                if ( property == LayerGroupEntryProvider.LAYER ) {
                    EoLayerGroupEntry entry = (EoLayerGroupEntry) itemModel.getObject();
                    return new Label( id, entry.getLayer().prefixedName());
                }
                if ( property == LayerGroupEntryProvider.TYPE) {
                    EoLayerType type = (EoLayerType) property.getModel(itemModel).getObject();
                    return new Label(id, (String) eoLayerTypeRenderer.getDisplayValue(type));
                }
                if ( property == LayerGroupEntryProvider.STYLE ) {
                    return styleLink( id, itemModel );
                }
View Full Code Here


        };
    }

    LayerInfo createLayer(String groupName, EoCoverageSelection selection, CatalogBuilder builder) {
        String coverageName = selection.getCoverageName();
        EoLayerType layerType = selection.getType();
        String name = coverageName;
        if(groupName != null) {
            name = groupName + "_" + name;
        }
        try {
            // build the coverage and enable its dimensions
            CoverageInfo resource = builder.buildCoverage(coverageName);
            boolean dimensionsPresent = enableDimensions(resource, layerType);
            if (!dimensionsPresent) {
                if(layerType == EoLayerType.BAND_COVERAGE) {
                    error(new ParamResourceModel("EoLayerGroupError.invalidBandCoverage", null, coverageName).getString());
                } else {
                    error(new ParamResourceModel("EoLayerGroupError.invalidLayer", null, coverageName).getString());
                }
                return null;
            }
           
            // update the name and save the coverage
            resource.setName(name);
            resource.setTitle(name);
            getCatalog().add(resource);

            // save the layer too
            LayerInfo layer = builder.buildLayer(resource);
                        layer.setName(name);
            layer.setTitle(name);
            layer.setEnabled(true);
            layer.setQueryable(true);
            layer.setType(LayerInfo.Type.RASTER);
            layer.getMetadata().put(EoLayerType.KEY, layerType.name());
            if(layerType == EoLayerType.BITMASK) {
                StyleInfo red = getCatalog().getStyleByName("red");
                if(red != null) {
                    layer.setDefaultStyle(red);
                } else {
View Full Code Here

            public void onClick(AjaxRequestTarget target, Form form) {
                popupWindow.setInitialHeight( 375 );
                popupWindow.setInitialWidth( 525 );
                popupWindow.setTitle(new ParamResourceModel("chooseLayer", this));
                layerTypes.processInput();
                final EoLayerType layerType = layerTypes.getModelObject();
                popupWindow.setContent( new EoLayerListPanel(popupWindow.getContentId(), layerType,  lgEntryPanel.entryProvider) {
                    @Override
                    protected void handleLayer(LayerInfo layer, AjaxRequestTarget target) {
                        popupWindow.close( target );
                       
View Full Code Here

        for (EoLayerGroupEntry entry : items) {
           
            if(!(entry.getLayer() instanceof LayerInfo)) {
                error(new ParamResourceModel("nestedLayerGroupInvalid", this));
            } else {
                EoLayerType type = entry.getLayerType();
               
                // count band and browse layers
                switch(type) {
                case BAND_COVERAGE:
                    bandsCount++;
View Full Code Here

TOP

Related Classes of org.geoserver.wms.eo.EoLayerType

Copyright © 2018 www.massapicom. 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.