gvsig-raster / org.gvsig.raster.cache / trunk / org.gvsig.raster.cache / org.gvsig.raster.cache.lib.api / src / main / java / org / gvsig / raster / cache / tile / layer / TiledLayer.java @ 1057
History | View | Annotate | Download (2.1 KB)
1 |
/* gvSIG. Geographic Information System of the Valencian Government
|
---|---|
2 |
*
|
3 |
* Copyright (C) 2007-2008 Infrastructures and Transports Department
|
4 |
* of the Valencian Government (CIT)
|
5 |
*
|
6 |
* This program is free software; you can redistribute it and/or
|
7 |
* modify it under the terms of the GNU General Public License
|
8 |
* as published by the Free Software Foundation; either version 2
|
9 |
* of the License, or (at your option) any later version.
|
10 |
*
|
11 |
* This program is distributed in the hope that it will be useful,
|
12 |
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
13 |
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
14 |
* GNU General Public License for more details.
|
15 |
*
|
16 |
* You should have received a copy of the GNU General Public License
|
17 |
* along with this program; if not, write to the Free Software
|
18 |
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
|
19 |
* MA 02110-1301, USA.
|
20 |
*
|
21 |
*/
|
22 |
package org.gvsig.raster.cache.tile.layer; |
23 |
|
24 |
import java.util.ArrayList; |
25 |
|
26 |
import org.gvsig.raster.cache.tile.Tile; |
27 |
import org.gvsig.raster.cache.tile.exception.TileGettingException; |
28 |
import org.gvsig.raster.cache.tile.provider.TileListener; |
29 |
import org.gvsig.tools.task.Cancellable; |
30 |
|
31 |
/**
|
32 |
* API interface for a cached layer
|
33 |
*
|
34 |
* @author Nacho Brodin (nachobrodin@gmail.com)
|
35 |
*/
|
36 |
public interface TiledLayer { |
37 |
|
38 |
/**
|
39 |
* Gets a tile
|
40 |
* @param tile
|
41 |
* @return
|
42 |
* @throws TileGettingException
|
43 |
*/
|
44 |
public Tile getTile(Tile tile) throws TileGettingException; |
45 |
|
46 |
/**
|
47 |
* Gets a list of tiles
|
48 |
* @param tiles
|
49 |
* @param listener
|
50 |
* @throws TileGettingException
|
51 |
*/
|
52 |
public void getTiles(ArrayList<Tile> tiles, TileListener listener, Cancellable status) throws TileGettingException; |
53 |
|
54 |
/**
|
55 |
* Gets the base directory for this layer. This function builds an unique identifier
|
56 |
* for a layer with a limited length.
|
57 |
* @return
|
58 |
*/
|
59 |
public String getBaseLayerDirectory(); |
60 |
|
61 |
/**
|
62 |
* Returns the ID of this layer.
|
63 |
* The ID is the name of the directory where the tiles are stored.
|
64 |
* @return
|
65 |
*/
|
66 |
public String getID(); |
67 |
|
68 |
/**
|
69 |
* Deletes the files of this layer
|
70 |
* @return Size of information that was deleted
|
71 |
*/
|
72 |
public long delete(); |
73 |
} |