/* (c) 2016 Open Source Geospatial Foundation - all rights reserved * This code is licensed under the GPL 2.0 license, available at the root * application directory. */ package org.geoserver.security.decorators; import it.geosolutions.imageio.maskband.DatasetLayout; import java.io.IOException; import java.util.List; import java.util.Set; import javax.media.jai.ImageLayout; import org.geotools.coverage.grid.GridCoverage2D; import org.geotools.coverage.grid.io.DimensionDescriptor; import org.geotools.coverage.grid.io.GranuleSource; import org.geotools.coverage.grid.io.HarvestedSource; import org.geotools.coverage.grid.io.OverviewPolicy; import org.geotools.coverage.grid.io.StructuredGridCoverage2DReader; import org.geotools.factory.Hints; import org.geotools.geometry.GeneralEnvelope; import org.opengis.coverage.grid.Format; import org.opengis.coverage.grid.GridEnvelope; import org.opengis.feature.simple.SimpleFeatureType; import org.opengis.parameter.GeneralParameterValue; import org.opengis.parameter.ParameterDescriptor; import org.opengis.referencing.crs.CoordinateReferenceSystem; import org.opengis.referencing.datum.PixelInCell; import org.opengis.referencing.operation.MathTransform; /** * Delegates every method to the delegate structured grid coverage reader. * Subclasses will override selected methods to perform their "decoration" job * * @author Daniele Romagnoli */ public abstract class DecoratingStructuredGridCoverage2DReader implements StructuredGridCoverage2DReader { StructuredGridCoverage2DReader delegate; public DecoratingStructuredGridCoverage2DReader(StructuredGridCoverage2DReader delegate) { this.delegate = delegate; } public Format getFormat() { return delegate.getFormat(); } public Object getSource() { return delegate.getSource(); } public String[] getMetadataNames() throws IOException { return delegate.getMetadataNames(); } public GeneralEnvelope getOriginalEnvelope() { return delegate.getOriginalEnvelope(); } public GeneralEnvelope getOriginalEnvelope(String coverageName) { return delegate.getOriginalEnvelope(coverageName); } public CoordinateReferenceSystem getCoordinateReferenceSystem() { return delegate.getCoordinateReferenceSystem(); } public CoordinateReferenceSystem getCoordinateReferenceSystem(String coverageName) { return delegate.getCoordinateReferenceSystem(coverageName); } public GridEnvelope getOriginalGridRange() { return delegate.getOriginalGridRange(); } public String[] getMetadataNames(String coverageName) throws IOException { return delegate.getMetadataNames(coverageName); } public GridEnvelope getOriginalGridRange(String coverageName) { return delegate.getOriginalGridRange(coverageName); } public MathTransform getOriginalGridToWorld(PixelInCell pixInCell) { return delegate.getOriginalGridToWorld(pixInCell); } public MathTransform getOriginalGridToWorld(String coverageName, PixelInCell pixInCell) { return delegate.getOriginalGridToWorld(coverageName, pixInCell); } public GridCoverage2D read(GeneralParameterValue[] parameters) throws IllegalArgumentException, IOException { return delegate.read(parameters); } public GridCoverage2D read(String coverageName, GeneralParameterValue[] parameters) throws IllegalArgumentException, IOException { return delegate.read(coverageName, parameters); } public String getMetadataValue(String name) throws IOException { return delegate.getMetadataValue(name); } public String getMetadataValue(String coverageName, String name) throws IOException { return delegate.getMetadataValue(coverageName, name); } public String[] listSubNames() throws IOException { return delegate.listSubNames(); } public String getCurrentSubname() throws IOException { return delegate.getCurrentSubname(); } public boolean hasMoreGridCoverages() throws IOException { return delegate.hasMoreGridCoverages(); } public void skip() throws IOException { delegate.skip(); } public void dispose() throws IOException { delegate.dispose(); } public Set<ParameterDescriptor<List>> getDynamicParameters() throws IOException { return delegate.getDynamicParameters(); } public Set<ParameterDescriptor<List>> getDynamicParameters(String coverageName) throws IOException { return delegate.getDynamicParameters(coverageName); } public double[] getReadingResolutions(OverviewPolicy policy, double[] requestedResolution) throws IOException { return delegate.getReadingResolutions(policy, requestedResolution); } public double[] getReadingResolutions(String coverageName, OverviewPolicy policy, double[] requestedResolution) throws IOException { return delegate.getReadingResolutions(coverageName, policy, requestedResolution); } public String[] getGridCoverageNames() throws IOException { return delegate.getGridCoverageNames(); } public int getGridCoverageCount() throws IOException { return delegate.getGridCoverageCount(); } public int getNumOverviews() { return delegate.getNumOverviews(); } public int getNumOverviews(String coverageName) { return delegate.getNumOverviews(coverageName); } public ImageLayout getImageLayout() throws IOException { return delegate.getImageLayout(); } public ImageLayout getImageLayout(String coverageName) throws IOException { return delegate.getImageLayout(coverageName); } public double[][] getResolutionLevels() throws IOException { return delegate.getResolutionLevels(); } public double[][] getResolutionLevels(String coverageName) throws IOException { return delegate.getResolutionLevels(coverageName); } @Override public GranuleSource getGranules(String coverageName, boolean readOnly) throws IOException, UnsupportedOperationException { return delegate.getGranules(coverageName, readOnly); } @Override public boolean isReadOnly() { return delegate.isReadOnly(); } @Override public void createCoverage(String coverageName, SimpleFeatureType schema) throws IOException, UnsupportedOperationException { delegate.createCoverage(coverageName, schema); } @Override public boolean removeCoverage(String coverageName) throws IOException, UnsupportedOperationException { return delegate.removeCoverage(coverageName); } @Override public boolean removeCoverage(String coverageName, boolean delete) throws IOException, UnsupportedOperationException { return delegate.removeCoverage(coverageName, delete); } @Override public void delete(boolean deleteData) throws IOException { delegate.delete(deleteData); } @Override public List<HarvestedSource> harvest(String defaultTargetCoverage, Object source, Hints hints) throws IOException, UnsupportedOperationException { return delegate.harvest(defaultTargetCoverage, source, hints); } @Override public List<DimensionDescriptor> getDimensionDescriptors(String coverageName) throws IOException { return delegate.getDimensionDescriptors(coverageName); } @Override public DatasetLayout getDatasetLayout() { return delegate.getDatasetLayout(); } @Override public DatasetLayout getDatasetLayout(String coverageName) { return delegate.getDatasetLayout(coverageName); } }