001    //$HeadURL: svn+ssh://rbezema@svn.wald.intevation.org/deegree/base/tags/2.1/src/org/deegree/model/coverage/grid/RawDataReader.java $
002    /*----------------    FILE HEADER  ------------------------------------------
003    
004     This file is part of deegree.
005     Copyright (C) 2001-2006 by:
006     EXSE, Department of Geography, University of Bonn
007     http://www.giub.uni-bonn.de/deegree/
008     lat/lon GmbH
009     http://www.lat-lon.de
010    
011     This library is free software; you can redistribute it and/or
012     modify it under the terms of the GNU Lesser General Public
013     License as published by the Free Software Foundation; either
014     version 2.1 of the License, or (at your option) any later version.
015    
016     This library is distributed in the hope that it will be useful,
017     but WITHOUT ANY WARRANTY; without even the implied warranty of
018     MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
019     Lesser General Public License for more details.
020    
021     You should have received a copy of the GNU Lesser General Public
022     License along with this library; if not, write to the Free Software
023     Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
024    
025     Contact:
026    
027     Andreas Poth
028     lat/lon GmbH
029     Aennchenstr. 19
030     53115 Bonn
031     Germany
032     E-Mail: poth@lat-lon.de
033    
034     Klaus Greve
035     Department of Geography
036     University of Bonn
037     Meckenheimer Allee 166
038     53115 Bonn
039     Germany
040     E-Mail: klaus.greve@uni-bonn.de
041    
042     
043     ---------------------------------------------------------------------------*/
044    package org.deegree.model.coverage.grid;
045    
046    import java.io.IOException;
047    import java.io.InputStream;
048    
049    import org.deegree.datatypes.parameter.GeneralParameterValueIm;
050    import org.deegree.datatypes.parameter.InvalidParameterNameException;
051    import org.deegree.datatypes.parameter.InvalidParameterValueException;
052    import org.deegree.datatypes.parameter.ParameterNotFoundException;
053    import org.deegree.model.spatialschema.Envelope;
054    import org.deegree.ogcwebservices.wcs.configuration.File;
055    import org.deegree.ogcwebservices.wcs.describecoverage.CoverageOffering;
056    
057    /**
058     * 
059     * 
060     * @version $Revision: 6259 $
061     * @author <a href="mailto:poth@lat-lon.de">Andreas Poth</a>
062     * @author last edited by: $Author: bezema $
063     * 
064     * @version $Revision: 6259 $, $Date: 2007-03-20 10:15:15 +0100 (Di, 20 Mär 2007) $
065     */
066    public class RawDataReader extends AbstractGridCoverageReader {
067    
068        /**
069         * @param source
070         * @param description
071         * @param format
072         */
073        public RawDataReader( File source, CoverageOffering description, Format format ) {
074            super( source, description, source.getEnvelope(), format );
075        }
076    
077        /**
078         * @param source
079         * @param description
080         * @param envelope
081         * @param format
082         */
083        public RawDataReader( InputStream source, CoverageOffering description, Envelope envelope,
084                              Format format ) {
085            super( source, description, envelope, format );
086        }
087    
088        /**
089         * Read the grid coverage from the current stream position, and move to the next grid coverage.
090         * 
091         * @param parameters
092         *            An optional set of parameters. Should be any or all of the parameters returned by
093         *            {@link "org.opengis.coverage.grid.Format#getReadParameters"}.
094         * @return A new {@linkplain GridCoverage grid coverage} from the input source.
095         * @throws InvalidParameterNameException
096         *             if a parameter in <code>parameters</code> doesn't have a recognized name.
097         * @throws InvalidParameterValueException
098         *             if a parameter in <code>parameters</code> doesn't have a valid value.
099         * @throws ParameterNotFoundException
100         *             if a parameter was required for the operation but was not provided in the
101         *             <code>parameters</code> list.
102         * @throws IOException
103         *             if a read operation failed for some other input/output reason, including
104         *             {@link java.io.FileNotFoundException} if no file with the given <code>name</code>
105         *             can be found, or {@link javax.imageio.IIOException} if an error was thrown by the
106         *             underlying image library.
107         */
108        public GridCoverage read( GeneralParameterValueIm[] parameters )
109                                throws InvalidParameterNameException, InvalidParameterValueException,
110                                ParameterNotFoundException, IOException {
111            return null;
112        }
113    
114        /**
115         * Allows any resources held by this object to be released. The result of calling any other
116         * method subsequent to a call to this method is undefined. It is important for applications to
117         * call this method when they know they will no longer be using this
118         * <code>GridCoverageReader</code>. Otherwise, the reader may continue to hold on to
119         * resources indefinitely.
120         * 
121         * @throws IOException
122         *             if an error occured while disposing resources (for example while closing a file).
123         */
124        public void dispose()
125                                throws IOException {
126            if ( source instanceof InputStream ) {
127                ( (InputStream) source ).close();
128            }
129        }
130    
131    }
132    
133    /***************************************************************************************************
134     * <code>
135     Changes to this class. What the people have been up to:
136    
137     $Log$
138     Revision 1.5  2007/03/13 12:58:26  wanhoff
139     Fixed Javadoc (@param, @link)
140    
141     Revision 1.4  2007/02/09 17:27:59  poth
142     *** empty log message ***
143    
144     Revision 1.3  2006/04/06 20:25:26  poth
145     *** empty log message ***
146    
147     Revision 1.2  2006/03/30 21:20:26  poth
148     *** empty log message ***
149    
150     Revision 1.1.1.1  2005/01/05 10:36:07  poth
151     no message
152    
153     Revision 1.1  2004/08/23 07:00:16  ap
154     no message
155    
156     </code>
157     **************************************************************************************************/