Revision 11237 trunk/libraries/libRaster/src/org/gvsig/raster/dataset/RasterDataset.java
RasterDataset.java | ||
---|---|---|
115 | 115 |
protected DatasetStatistics stats = new DatasetStatistics(this); |
116 | 116 |
protected DatasetHistogram histogram = null; |
117 | 117 |
|
118 |
//TODO: ARQUITECTURA: Los drivers se registran siempre y cuando antes de hacer un openFile se haya llamado a XXDriver.class. Esto hay que revisarlo. |
|
119 |
|
|
120 | 118 |
static { |
121 | 119 |
Messages.addResourceFamily("org.cresques.translations.text", "org.cresques.ui"); |
122 |
|
|
123 |
//Punto de extensi?n para registro de drivers |
|
124 |
ExtensionPoints extensionPoints = ExtensionPointsSingleton.getInstance(); |
|
125 |
if (!extensionPoints.containsKey("RasterDriver")) { |
|
126 |
extensionPoints.put( |
|
127 |
new ExtensionPoint( |
|
128 |
"RasterDriver", |
|
129 |
"Raster Drivers for gvSIG raster library") |
|
130 |
); |
|
131 |
} |
|
132 | 120 |
} |
133 | 121 |
|
134 | 122 |
/** |
... | ... | |
138 | 126 |
* @param fName Nombre del fichero. |
139 | 127 |
* @return GeoRasterFile, o null si hay problemas. |
140 | 128 |
*/ |
141 |
public static RasterDataset open(IProjection proj, Object param) throws NotSupportedExtensionException, RasterDriverException{ |
|
129 |
public static RasterDataset open(IProjection proj, Object param) throws NotSupportedExtensionException, RasterDriverException {
|
|
142 | 130 |
String idFormat = null; |
143 | 131 |
|
144 | 132 |
if(param instanceof String) |
... | ... | |
154 | 142 |
|
155 | 143 |
if(clase == null){ |
156 | 144 |
ExtensionPoints extensionPoints = ExtensionPointsSingleton.getInstance(); |
157 |
ExtensionPoint extensionPoint = (ExtensionPoint)extensionPoints.get("RasterDriver");
|
|
145 |
ExtensionPoint extensionPoint = (ExtensionPoint)extensionPoints.get("RasterReader");
|
|
158 | 146 |
if(extensionPoint == null) |
159 | 147 |
return null; |
160 | 148 |
clase = (Class)extensionPoint.get(idFormat); |
... | ... | |
194 | 182 |
*/ |
195 | 183 |
public static boolean fileIsSupported(String fName) { |
196 | 184 |
ExtensionPoints extensionPoints = ExtensionPointsSingleton.getInstance(); |
197 |
ExtensionPoint extensionPoint = (ExtensionPoint)extensionPoints.get("RasterDriver");
|
|
185 |
ExtensionPoint extensionPoint = (ExtensionPoint)extensionPoints.get("RasterReader");
|
|
198 | 186 |
return (extensionPoint.get(fName.substring(fName.lastIndexOf(".") + 1, fName.length())) == null) ? false : true; |
199 | 187 |
} |
200 | 188 |
|
Also available in: Unified diff