/[schmitzm]/trunk/src/appl/data/LateLoadable.java
ViewVC logotype

Diff of /trunk/src/appl/data/LateLoadable.java

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 2 by mojays, Tue Feb 24 22:43:52 2009 UTC revision 256 by alfonx, Fri Jul 31 14:43:47 2009 UTC
# Line 1  Line 1 
1  package appl.data;  /*******************************************************************************
2     * Copyright (c) 2009 Martin O. J. Schmitz.
3  import schmitzm.data.WritableGrid;   *
4     * This file is part of the SCHMITZM library - a collection of utility
5  /**   * classes based on Java 1.6, focusing (not only) on Java Swing
6   * Defines the base functionality of late loading. Late loading means that the   * and the Geotools library.
7   * data is loaded into memory only when it is accessed (for example by   *
8   * <code>getRasterSample(..)</code>-Methods when implemented for   * The SCHMITZM project is hosted at:
9   * {@link WritableGrid}s). Notice that this class can be used with any datatype   * http://wald.intevation.org/projects/schmitzm/
10   * (not only grids).   *
11   *   * This program is free software; you can redistribute it and/or
12   * @author Dominik Appl   * modify it under the terms of the GNU Lesser General Public License
13   */   * as published by the Free Software Foundation; either version 3
14  public interface LateLoadable {   * of the License, or (at your option) any later version.
15          /**   *
16           * Answers if the data type supports late loading   * This program is distributed in the hope that it will be useful,
17           *   * but WITHOUT ANY WARRANTY; without even the implied warranty of
18           * @return true, if late loading is supported   * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
19           */   * GNU General Public License for more details.
20          public boolean isLateLoadable();   *
21     * You should have received a copy of the GNU Lesser General Public License (license.txt)
22          /**   * along with this program; if not, write to the Free Software
23           * Loads the Data into the memory if this function supported. Else it should   * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.
24           * be already loaded   * or try this link: http://www.gnu.org/licenses/lgpl.html
25           *   *
26           * @throws LoadingException   * Contributors:
27           *             if the loading fails   *     Martin O. J. Schmitz - initial API and implementation
28           */   *     Stefan A. Krüger - additional utility classes
29          public void loadData() throws LoadingException;   ******************************************************************************/
30    package appl.data;
31          /**  
32           * Unloads the Data onto disk or into nirvana, depending on implementation.  import schmitzm.data.WritableGrid;
33           * Or does nothing, if late loading is not supported. <b>NOTICE</b>:  
34           * UNLOADING DOES NOT MEAN, THAT DATA IS WRITTEN BACK TO THE SOURCE. It may  /**
35           * be stored in a temporary file for later loading/export, depending on   * Defines the base functionality of late loading. Late loading means that the
36           * implementation.   * data is loaded into memory only when it is accessed (for example by
37           */   * <code>getRasterSample(..)</code>-Methods when implemented for
38          public void unloadData();   * {@link WritableGrid}s). Notice that this class can be used with any datatype
39     * (not only grids).
40  }   *
41     * @author Dominik Appl
42     */
43    public interface LateLoadable {
44            /**
45             * Answers if the data type supports late loading
46             *
47             * @return true, if late loading is supported
48             */
49            public boolean isLateLoadable();
50    
51            /**
52             * Loads the Data into the memory if this function supported. Else it should
53             * be already loaded
54             *
55             * @throws LoadingException
56             *             if the loading fails
57             */
58            public void loadData() throws LoadingException;
59    
60            /**
61             * Unloads the Data onto disk or into nirvana, depending on implementation.
62             * Or does nothing, if late loading is not supported. <b>NOTICE</b>:
63             * UNLOADING DOES NOT MEAN, THAT DATA IS WRITTEN BACK TO THE SOURCE. It may
64             * be stored in a temporary file for later loading/export, depending on
65             * implementation.
66             */
67            public void unloadData();
68    
69    }

Legend:
Removed from v.2  
changed lines
  Added in v.256

[email protected]
ViewVC Help
Powered by ViewVC 1.1.26