Examples of DimensionInfo


Examples of org.geoserver.catalog.DimensionInfo

    }
   
    private boolean checkDimensions(EoLayerGroupEntry entry) {
        LayerInfo layer = (LayerInfo) entry.getLayer();
        MetadataMap metadata = layer.getResource().getMetadata();
        DimensionInfo timeDimension = metadata.get(ResourceInfo.TIME, DimensionInfo.class);
        boolean timeAvaiable = timeDimension != null && timeDimension.isEnabled();
        if(!timeAvaiable) {
            error(new ParamResourceModel("EoLayerGroupError.invalidLayer", null, layer.getName()).getString());
            return false;
        } else if(entry.getLayerType() != EoLayerType.BAND_COVERAGE) {
            return true;
        }
       
        // ok, has time, and it's a band layer. Does it have any extra dimension that can be
        // imagined to be used as a band selector?
        DimensionInfo elevationDimension = metadata.get(ResourceInfo.ELEVATION, DimensionInfo.class);
        if(elevationDimension != null && elevationDimension.isEnabled()) {
            return true;
        }
       
        // look for custom dimensions
        for (String key : metadata.keySet()) {
            if(key != null && key.startsWith(ResourceInfo.CUSTOM_DIMENSION_PREFIX)) {
                DimensionInfo di = metadata.get(key, DimensionInfo.class);
                if(di != null && di.isEnabled()) {
                    return true;
                }
            }
        }
       
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.