Revision 43755

View differences:

trunk/org.gvsig.desktop/org.gvsig.desktop.compat.cdc/org.gvsig.fmap.dal/org.gvsig.fmap.dal.impl/src/main/java/org/gvsig/fmap/dal/raster/impl/DefaultCoverageStore.java
27 27
import java.util.Iterator;
28 28
import java.util.Set;
29 29

  
30
import org.gvsig.fmap.dal.DataCache;
30 31
import org.gvsig.fmap.dal.DataManager;
31 32
import org.gvsig.fmap.dal.DataQuery;
32 33
import org.gvsig.fmap.dal.DataServerExplorer;
......
338 339
	public boolean hasDynValue(String name) {
339 340
		return this.metadata.hasDynValue(name);
340 341
	}
341
    
342

  
342 343
    @Override
343 344
    public boolean hasDynMethod(String name) {
344 345
        return ((DynObject_v2)this.metadata).hasDynMethod(name);
345
    }    
346
    }
346 347

  
347 348
	public void implement(DynClass dynClass) {
348 349
		this.metadata.implement(dynClass);
......
522 523
        DataStoreProviderFactory factory = dataManager.getStoreProviderFactory(parameters.getDataStoreName());
523 524
        return factory;
524 525
    }
526

  
527
    @Override
528
    public DataCache getCache() {
529
        // TODO Auto-generated method stub
530
        return null;
531
    }
525 532
}
trunk/org.gvsig.desktop/org.gvsig.desktop.compat.cdc/org.gvsig.fmap.dal/org.gvsig.fmap.dal.api/src/main/java/org/gvsig/fmap/dal/feature/FeatureCache.java
21 21
 * For any additional information, do not hesitate to contact us
22 22
 * at info AT gvsig.com, or visit our website www.gvsig.com.
23 23
 */
24
 
24

  
25 25
package org.gvsig.fmap.dal.feature;
26 26

  
27
import org.gvsig.fmap.dal.DataCache;
27 28
import org.gvsig.fmap.dal.exception.DataException;
28 29
import org.gvsig.fmap.geom.primitive.Envelope;
29 30

  
......
32 33
 * {@link FeatureSet}s. First time that a {@link FeatureStore} have to retrieve
33 34
 * data from a {@link FeatureStoreProvider} can save the {@link FeatureSet} in
34 35
 * the cache with its envelope. Next time that the store has to access to a envelope
35
 * contained in the previous envelope can retrieve the features directly 
36
 * contained in the previous envelope can retrieve the features directly
36 37
 * from the cache and it is not necessary to retrieve data from the provider.
37
 * 
38
 *
38 39
 * The cache supports different scales and creates
39
 *  
40
 *
40 41
 * @author <a href="mailto:jpiera@gvsig.org">Jorge Piera</a>
41 42
 */
42
public interface FeatureCache {
43
public interface FeatureCache extends DataCache{
43 44

  
44 45
	/**
45 46
	 * Delete all the features for a concrete scale.
......
48 49
	 * @throws DataException
49 50
	 */
50 51
	public void delete(double scale) throws DataException;
51
	
52

  
52 53
	/**
53
	 * Delete all the features for all the scales in the cache system.
54
	 * @throws DataException
55
	 */
56
	public void deleteAll() throws DataException;
57
	
58
	/**
59 54
	 * Add a set of features contained in a envelope for a concrete scale.
60 55
	 * @param featureSet
61 56
	 * The feature set retrieved from the server.
62 57
	 * @throws DataException
63 58
	 */
64 59
	public void addFeatures(FeatureSet featureSet, FeatureStore featureStore) throws DataException;
65
	
60

  
66 61
	/**
67 62
	 * Return a feature set form a concrete envelope and a scale.
68 63
	 * @param envelope
trunk/org.gvsig.desktop/org.gvsig.desktop.compat.cdc/org.gvsig.fmap.dal/org.gvsig.fmap.dal.api/src/main/java/org/gvsig/fmap/dal/DataStore.java
330 330
	public void useCache(String providerName, DynObject parameters) throws DataException;
331 331

  
332 332
	public DataStoreProviderFactory getProviderFactory();
333

  
334
    /**
335
     * @return
336
     */
337
    public DataCache getCache();
338

  
333 339
}
334 340

  
trunk/org.gvsig.desktop/org.gvsig.desktop.compat.cdc/org.gvsig.fmap.dal/org.gvsig.fmap.dal.api/src/main/java/org/gvsig/fmap/dal/DataCache.java
1
/* gvSIG. Desktop Geographic Information System.
2
 *
3
 * Copyright ? 2007-2018 gvSIG Association
4
 *
5
 * This program is free software; you can redistribute it and/or
6
 * modify it under the terms of the GNU General Public License
7
 * as published by the Free Software Foundation; either version 2
8
 * of the License, or (at your option) any later version.
9
 *
10
 * This program is distributed in the hope that it will be useful,
11
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
12
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
13
 * GNU General Public License for more details.
14
 *
15
 * You should have received a copy of the GNU General Public License
16
 * along with this program; if not, write to the Free Software
17
 * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
18
 * MA  02110-1301, USA.
19
 *
20
 * For any additional information, do not hesitate to contact us
21
 * at info AT gvsig.com, or visit our website www.gvsig.com.
22
 */
23
package org.gvsig.fmap.dal;
24

  
25
import org.gvsig.fmap.dal.exception.DataException;
26

  
27

  
28
/**
29
 * @author fdiaz
30
 *
31
 */
32
public interface DataCache {
33

  
34

  
35
    /**
36
     * Delete cache.
37
     * @throws DataException
38
     */
39
    public void deleteAll() throws DataException;
40

  
41

  
42
}

Also available in: Unified diff