Revision 44160 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/DataServerExplorer.java
DataServerExplorer.java | ||
---|---|---|
23 | 23 |
*/ |
24 | 24 |
package org.gvsig.fmap.dal; |
25 | 25 |
|
26 |
import java.io.Closeable; |
|
26 | 27 |
import java.io.File; |
28 |
import java.io.IOException; |
|
29 |
import java.io.InputStream; |
|
30 |
import java.io.OutputStream; |
|
27 | 31 |
import java.util.List; |
28 | 32 |
|
29 | 33 |
import org.gvsig.fmap.dal.exception.DataException; |
... | ... | |
38 | 42 |
*/ |
39 | 43 |
public interface DataServerExplorer extends Disposable, DataFactoryUnit { |
40 | 44 |
|
45 |
public interface DataResource extends Closeable { |
|
46 |
public boolean exists(); |
|
47 |
|
|
48 |
public InputStream asInputStream() throws IOException; |
|
49 |
|
|
50 |
public OutputStream asOutputStream() throws IOException; |
|
51 |
|
|
52 |
public void close(); |
|
53 |
} |
|
54 |
|
|
41 | 55 |
/** |
42 | 56 |
* Returns the DataServerExplorer's name |
43 | 57 |
* |
... | ... | |
159 | 173 |
* @param resourceName |
160 | 174 |
* @return file resource or null |
161 | 175 |
* @throws DataException |
176 |
* @deprecated use getResource |
|
162 | 177 |
*/ |
163 | 178 |
public File getResourcePath(DataStore dataStore, String resourceName) throws DataException; |
164 | 179 |
|
180 |
/** |
|
181 |
* Return the DataResource associated to this name and store. If the |
|
182 |
* resource not exists or the explorer don't support this opperation return |
|
183 |
* null. |
|
184 |
* |
|
185 |
* @param dataStore |
|
186 |
* @param resourceName |
|
187 |
* @return the DataResource or null |
|
188 |
* @throws DataException |
|
189 |
*/ |
|
190 |
public DataResource getResource(DataStore dataStore, String resourceName) throws DataException; |
|
165 | 191 |
} |
Also available in: Unified diff