Statistics
| Revision:

root / branches / dal_time_support / libraries / libFMap_dal / src / org / gvsig / fmap / dal / feature / FeatureCache.java @ 35970

History | View | Annotate | Download (2.65 KB)

1 31541 jpiera
/* 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
23
/*
24
* AUTHORS (In addition to CIT):
25
* 2009 {Iver T.I.}   {Task}
26
*/
27
28
package org.gvsig.fmap.dal.feature;
29
30
import org.gvsig.fmap.dal.exception.DataException;
31
import org.gvsig.fmap.dal.feature.spi.FeatureStoreProvider;
32
import org.gvsig.fmap.geom.primitive.Envelope;
33
34
/**
35
 * This class represents a vectorial cache that is used to save and retrieve
36
 * {@link FeatureSet}s. First time that a {@link FeatureStore} have to retrieve
37
 * data from a {@link FeatureStoreProvider} can save the {@link FeatureSet} in
38
 * the cache with its envelope. Next time that the store has to access to a envelope
39
 * contained in the previous envelope can retrieve the features directly
40
 * from the cache and it is not necessary to retrieve data from the provider.
41
 *
42
 * The cache supports different scales and creates
43
 *
44
 * @author <a href="mailto:jpiera@gvsig.org">Jorge Piera</a>
45
 */
46
public interface FeatureCache {
47
48
        /**
49
         * Delete all the features for a concrete scale.
50
         * @param scale
51
         * The scale.
52
         * @throws DataException
53
         */
54
        public void delete(double scale) throws DataException;
55
56
        /**
57
         * Delete all the features for all the scales in the cache system.
58
         * @throws DataException
59
         */
60
        public void deleteAll() throws DataException;
61
62
        /**
63
         * Add a set of features contained in a envelope for a concrete scale.
64
         * @param featureSet
65
         * The feature set retrieved from the server.
66
         * @throws DataException
67
         */
68 32735 vcaballero
        public void addFeatures(FeatureSet featureSet, FeatureStore featureStore) throws DataException;
69 31541 jpiera
70
        /**
71
         * Return a feature set form a concrete envelope and a scale.
72
         * @param envelope
73
         * The envelope.
74
         * @param scale
75
         * The scale.
76
         * @return
77
         * A feature set contained in the evelope.
78
         * @throws DataException
79
         */
80
        public FeatureSet getFeatureSet(Envelope envelope, double scale) throws DataException;
81
}