gvsig-raster / org.gvsig.raster / trunk / org.gvsig.raster / org.gvsig.raster.io / org.gvsig.raster.io.base / src / main / java / org / gvsig / fmap / dal / coverage / dataset / io / server / LizardTechFilesystemServerExplorer.java @ 238
History | View | Annotate | Download (4.49 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 |
|
23 |
/*
|
24 |
* AUTHORS (In addition to CIT):
|
25 |
* 2009 IVER T.I {{Task}}
|
26 |
*/
|
27 |
|
28 |
package org.gvsig.fmap.dal.coverage.dataset.io.server; |
29 |
|
30 |
import java.io.File; |
31 |
|
32 |
import org.gvsig.fmap.dal.DALLocator; |
33 |
import org.gvsig.fmap.dal.DataManager; |
34 |
import org.gvsig.fmap.dal.DataServerExplorer; |
35 |
import org.gvsig.fmap.dal.DataStoreParameters; |
36 |
import org.gvsig.fmap.dal.NewDataStoreParameters; |
37 |
import org.gvsig.fmap.dal.coverage.RasterLocator; |
38 |
import org.gvsig.fmap.dal.coverage.dataset.io.MrSidProvider; |
39 |
import org.gvsig.fmap.dal.exception.CreateException; |
40 |
import org.gvsig.fmap.dal.exception.DataException; |
41 |
import org.gvsig.fmap.dal.exception.RemoveException; |
42 |
import org.gvsig.fmap.dal.serverexplorer.filesystem.impl.AbstractFilesystemServerExplorerProvider; |
43 |
import org.gvsig.fmap.dal.serverexplorer.filesystem.spi.FilesystemServerExplorerProviderServices; |
44 |
import org.gvsig.raster.impl.store.AbstractRasterFileDataParameters; |
45 |
import org.gvsig.raster.util.DefaultProviderServices; |
46 |
|
47 |
public class LizardTechFilesystemServerExplorer extends AbstractFilesystemServerExplorerProvider { |
48 |
|
49 |
/*
|
50 |
* (non-Javadoc)
|
51 |
* @see org.gvsig.fmap.dal.serverexplorer.filesystem.spi.FilesystemServerExplorerProvider#canCreate()
|
52 |
*/
|
53 |
public boolean canCreate() { |
54 |
return false; |
55 |
} |
56 |
|
57 |
/*
|
58 |
* (non-Javadoc)
|
59 |
* @see org.gvsig.fmap.dal.serverexplorer.filesystem.spi.FilesystemServerExplorerProvider#canCreate(org.gvsig.fmap.dal.NewDataStoreParameters)
|
60 |
*/
|
61 |
public boolean canCreate(NewDataStoreParameters parameters) { |
62 |
return false; |
63 |
} |
64 |
|
65 |
/*
|
66 |
* (non-Javadoc)
|
67 |
* @see org.gvsig.fmap.dal.serverexplorer.filesystem.spi.FilesystemServerExplorerProvider#create(org.gvsig.fmap.dal.NewDataStoreParameters, boolean)
|
68 |
*/
|
69 |
public void create(NewDataStoreParameters parameters, boolean overwrite) |
70 |
throws CreateException {
|
71 |
throw new UnsupportedOperationException(); |
72 |
} |
73 |
|
74 |
/*
|
75 |
* (non-Javadoc)
|
76 |
* @see org.gvsig.fmap.dal.serverexplorer.filesystem.spi.FilesystemServerExplorerProvider#getCreateParameters()
|
77 |
*/
|
78 |
public NewDataStoreParameters getCreateParameters() throws DataException { |
79 |
return null; |
80 |
} |
81 |
|
82 |
/*
|
83 |
* (non-Javadoc)
|
84 |
* @see org.gvsig.fmap.dal.serverexplorer.filesystem.spi.FilesystemServerExplorerProvider#initialize(org.gvsig.fmap.dal.serverexplorer.filesystem.spi.FilesystemServerExplorerProviderServices)
|
85 |
*/
|
86 |
public void initialize( |
87 |
FilesystemServerExplorerProviderServices serverExplorer) { |
88 |
} |
89 |
|
90 |
/*
|
91 |
* (non-Javadoc)
|
92 |
* @see org.gvsig.fmap.dal.serverexplorer.filesystem.spi.FilesystemServerExplorerProvider#remove(org.gvsig.fmap.dal.DataStoreParameters)
|
93 |
*/
|
94 |
public void remove(DataStoreParameters parameters) throws RemoveException { |
95 |
throw new UnsupportedOperationException(); |
96 |
} |
97 |
|
98 |
/*
|
99 |
* (non-Javadoc)
|
100 |
* @see org.gvsig.fmap.dal.serverexplorer.filesystem.FilesystemFileFilter#getDataStoreProviderName()
|
101 |
*/
|
102 |
public String getDataStoreProviderName() { |
103 |
return MrSidProvider.NAME;
|
104 |
} |
105 |
|
106 |
/*
|
107 |
* (non-Javadoc)
|
108 |
* @see java.io.FileFilter#accept(java.io.File)
|
109 |
*/
|
110 |
public boolean accept(File pathname) { |
111 |
return ((DefaultProviderServices)RasterLocator.getManager().getProviderServices()).fileIsSupported(pathname.getName(), MrSidProvider.class);
|
112 |
} |
113 |
|
114 |
/*
|
115 |
* (non-Javadoc)
|
116 |
* @see org.gvsig.fmap.dal.serverexplorer.filesystem.FilesystemFileFilter#getDescription()
|
117 |
*/
|
118 |
public String getDescription() { |
119 |
return MrSidProvider.DESCRIPTION;
|
120 |
} |
121 |
|
122 |
public DataStoreParameters getParameters(File file) throws DataException { |
123 |
DataManager manager = DALLocator.getDataManager(); |
124 |
AbstractRasterFileDataParameters params = (AbstractRasterFileDataParameters) manager |
125 |
.createStoreParameters(this.getDataStoreProviderName());
|
126 |
params.setFile(file); |
127 |
return params;
|
128 |
} |
129 |
|
130 |
public int getMode() { |
131 |
return DataServerExplorer.MODE_RASTER;
|
132 |
} |
133 |
|
134 |
} |