svn-gvsig-desktop / branches / v2_0_0_prep / libraries / libFMap_dataFile / src / org / gvsig / fmap / data / feature / file / FileExplorer.java @ 24081
History | View | Annotate | Download (1.76 KB)
1 |
package org.gvsig.fmap.data.feature.file; |
---|---|
2 |
|
3 |
import java.io.File; |
4 |
|
5 |
import org.gvsig.fmap.data.DataManager; |
6 |
import org.gvsig.fmap.data.DataStore; |
7 |
import org.gvsig.fmap.data.DataStoreParameters; |
8 |
import org.gvsig.fmap.data.NewDataStoreParameters; |
9 |
import org.gvsig.fmap.data.exceptions.DataException; |
10 |
import org.gvsig.fmap.data.exceptions.InitializeException; |
11 |
import org.gvsig.fmap.data.exceptions.ReadException; |
12 |
import org.gvsig.fmap.data.exceptions.WriteException; |
13 |
import org.gvsig.fmap.data.feature.NewFeatureStoreParameters; |
14 |
import org.gvsig.fmap.data.feature.impl.AbstractFeatureExplorer; |
15 |
import org.gvsig.fmap.data.impl.DefaultDataManager; |
16 |
|
17 |
public abstract class FileExplorer extends AbstractFeatureExplorer { |
18 |
|
19 |
public boolean canCreate() { |
20 |
return false; |
21 |
} |
22 |
|
23 |
public DataStore createDataStore(DataStoreParameters dsp) throws InitializeException { |
24 |
DataManager manager = DefaultDataManager.getManager(); |
25 |
return manager.createStore(dsp);
|
26 |
} |
27 |
|
28 |
protected abstract boolean isValid(String file); |
29 |
protected abstract boolean isValid(File file); |
30 |
|
31 |
public DataStoreParameters add(NewFeatureStoreParameters ndsp) throws WriteException,InitializeException { |
32 |
throw new UnsupportedOperationException(); |
33 |
} |
34 |
|
35 |
public DataStoreParameters add(NewDataStoreParameters ndsp) throws WriteException, InitializeException { |
36 |
return this.add((NewFeatureStoreParameters)ndsp); |
37 |
} |
38 |
|
39 |
public void remove(DataStoreParameters dsp) throws ReadException { |
40 |
throw new UnsupportedOperationException(); |
41 |
|
42 |
} |
43 |
|
44 |
public NewDataStoreParameters createNewDataStoreParameter() {
|
45 |
throw new UnsupportedOperationException(); |
46 |
} |
47 |
|
48 |
/* (non-Javadoc)
|
49 |
* @see org.gvsig.fmap.data.DataExplorer#dispose()
|
50 |
*/
|
51 |
public void dispose() throws DataException { |
52 |
// No operation
|
53 |
|
54 |
} |
55 |
|
56 |
|
57 |
|
58 |
} |