Revision 1854
org.gvsig.raster.postgis/trunk/org.gvsig.raster.postgis/org.gvsig.raster.postgis.io/src/main/java/org/gvsig/raster/postgis/io/PostGISRasterProvider.java | ||
---|---|---|
332 | 332 |
} |
333 | 333 |
} |
334 | 334 |
//System.out.println("***************************"); |
335 |
logger.info("...Overview selected: " + selectedProvider.getURI() + " W:" + selectedProvider.getWidth() + " H:" + selectedProvider.getHeight()); |
|
335 | 336 |
} |
336 | 337 |
|
337 | 338 |
public int getOverviewCount(int band) throws BandAccessException, RasterDriverException { |
org.gvsig.raster.tools/trunk/org.gvsig.raster.tools/org.gvsig.raster.tools.app/org.gvsig.raster.tools.app.basic/src/main/java/org/gvsig/raster/tools/app/basic/raster/gui/wizard/PrepareLayerAskWritableDirectory.java | ||
---|---|---|
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 |
package org.gvsig.raster.tools.app.basic.raster.gui.wizard; |
|
23 |
|
|
24 |
import java.util.Map; |
|
25 |
|
|
26 |
import org.gvsig.app.prepareAction.PrepareContext; |
|
27 |
import org.gvsig.app.prepareAction.PrepareDataStoreParameters; |
|
28 |
import org.gvsig.fmap.dal.DataStoreParameters; |
|
29 |
import org.gvsig.fmap.dal.coverage.store.parameter.RasterDataParameters; |
|
30 |
import org.gvsig.raster.tools.app.basic.raster.gui.wizard.proj.WritableFolderPanel; |
|
31 |
import org.gvsig.tools.exception.BaseException; |
|
32 |
|
|
33 |
/** |
|
34 |
* Mechanism to detect if a layer is in a folder with write permission. If the user does not have |
|
35 |
* permission to write, the application need a directory with this permission to write metadata files. |
|
36 |
* |
|
37 |
* @author Nacho Brodin (nachobrodin@gmail.com) |
|
38 |
*/ |
|
39 |
public class PrepareLayerAskWritableDirectory implements PrepareDataStoreParameters { |
|
40 |
|
|
41 |
public DataStoreParameters prepare(DataStoreParameters storeParameters, |
|
42 |
PrepareContext context) throws BaseException { |
|
43 |
if(!(storeParameters instanceof RasterDataParameters)) |
|
44 |
return storeParameters; |
|
45 |
WritableFolderPanel panel = new WritableFolderPanel(); |
|
46 |
|
|
47 |
return storeParameters; |
|
48 |
} |
|
49 |
|
|
50 |
public void post(DataStoreParameters storeParameters, PrepareContext context) { |
|
51 |
} |
|
52 |
|
|
53 |
public void pre(DataStoreParameters storeParameters, PrepareContext context) { |
|
54 |
} |
|
55 |
|
|
56 |
public void end(Object param) { |
|
57 |
|
|
58 |
} |
|
59 |
|
|
60 |
public String getDescription() { |
|
61 |
return "Detects folders with write permission"; |
|
62 |
} |
|
63 |
|
|
64 |
public String getName() { |
|
65 |
return "PrepareLayerAskWritableDirectory"; |
|
66 |
} |
|
67 |
|
|
68 |
public Object create() { |
|
69 |
return this; |
|
70 |
} |
|
71 |
|
|
72 |
public Object create(Object[] args) { |
|
73 |
return this; |
|
74 |
} |
|
75 |
|
|
76 |
@SuppressWarnings("unchecked") |
|
77 |
public Object create(Map args) { |
|
78 |
return this; |
|
79 |
} |
|
80 |
|
|
81 |
public void interrupted() { |
|
82 |
} |
|
83 |
|
|
84 |
} |
|
0 | 85 |
org.gvsig.raster.tools/trunk/org.gvsig.raster.tools/org.gvsig.raster.tools.app/org.gvsig.raster.tools.app.basic/src/main/java/org/gvsig/raster/tools/app/basic/raster/gui/wizard/proj/WritableFolderPanel.java | ||
---|---|---|
1 |
package org.gvsig.raster.tools.app.basic.raster.gui.wizard.proj; |
|
2 |
|
|
3 |
import java.awt.GridBagConstraints; |
|
4 |
import java.awt.GridBagLayout; |
|
5 |
import java.awt.Label; |
|
6 |
import java.awt.Point; |
|
7 |
import java.awt.event.ActionEvent; |
|
8 |
import java.awt.event.ActionListener; |
|
9 |
import java.io.File; |
|
10 |
|
|
11 |
import javax.swing.JButton; |
|
12 |
|
|
13 |
import org.cresques.Messages; |
|
14 |
import org.gvsig.andami.PluginServices; |
|
15 |
import org.gvsig.andami.ui.mdiManager.IWindow; |
|
16 |
import org.gvsig.andami.ui.mdiManager.WindowInfo; |
|
17 |
import org.gvsig.gui.beans.buttonspanel.ButtonsPanel; |
|
18 |
import org.gvsig.gui.beans.defaultbuttonspanel.DefaultButtonsPanel; |
|
19 |
import org.gvsig.raster.tools.app.basic.RasterToolsUtil; |
|
20 |
import org.gvsig.raster.tools.app.basic.raster.bean.createlayer.SelectDirectoryPanel; |
|
21 |
|
|
22 |
/** |
|
23 |
* Panel to select a writable folder |
|
24 |
* |
|
25 |
* @author Nacho Brodin (nachobrodin@gmail.com) |
|
26 |
*/ |
|
27 |
public class WritableFolderPanel extends DefaultButtonsPanel implements ActionListener, IWindow { |
|
28 |
private static final long serialVersionUID = 1L; |
|
29 |
private SelectDirectoryPanel selectDirectoryPanel = null; |
|
30 |
private Point posWindow = null; |
|
31 |
private int widthWindow = 290; |
|
32 |
private int heightWindow = 80; |
|
33 |
|
|
34 |
public WritableFolderPanel() { |
|
35 |
posWindow = RasterToolsUtil.iwindowPosition(widthWindow, heightWindow); |
|
36 |
initGUI(); |
|
37 |
PluginServices.getMDIManager().addWindow(this); |
|
38 |
} |
|
39 |
|
|
40 |
private void initGUI() { |
|
41 |
getButtonsPanel().addAccept(); |
|
42 |
getButtonsPanel().addCancel(); |
|
43 |
|
|
44 |
JButton accept = getButtonsPanel().getButton(ButtonsPanel.BUTTON_ACCEPT); |
|
45 |
JButton cancel = getButtonsPanel().getButton(ButtonsPanel.BUTTON_CANCEL); |
|
46 |
getButtonsPanel().getButton(ButtonsPanel.BUTTON_APPLY).setVisible(false); |
|
47 |
accept.setEnabled(false); |
|
48 |
accept.addActionListener(this); |
|
49 |
cancel.addActionListener(this); |
|
50 |
|
|
51 |
this.setLayout(new GridBagLayout()); |
|
52 |
GridBagConstraints gbc = new GridBagConstraints(); |
|
53 |
gbc.fill = GridBagConstraints.HORIZONTAL; |
|
54 |
gbc.weightx = 1; |
|
55 |
this.add(new Label(Messages.getText("folder_not_writable")), gbc); |
|
56 |
|
|
57 |
gbc.gridy = 1; |
|
58 |
this.add(getSelectDirectoryPanel(), gbc); |
|
59 |
|
|
60 |
getSelectDirectoryPanel().setListener(this); |
|
61 |
} |
|
62 |
|
|
63 |
public SelectDirectoryPanel getSelectDirectoryPanel() { |
|
64 |
if(selectDirectoryPanel == null) { |
|
65 |
selectDirectoryPanel = new SelectDirectoryPanel(); |
|
66 |
//selectDirectoryPanel.get |
|
67 |
} |
|
68 |
return selectDirectoryPanel; |
|
69 |
} |
|
70 |
|
|
71 |
public void actionPerformed(ActionEvent e) { |
|
72 |
if(e.getSource() == getButtonsPanel().getButton(ButtonsPanel.BUTTON_ACCEPT)) { |
|
73 |
PluginServices.getMDIManager().closeWindow(this); |
|
74 |
} |
|
75 |
|
|
76 |
if(e.getSource() == getButtonsPanel().getButton(ButtonsPanel.BUTTON_CANCEL)) { |
|
77 |
PluginServices.getMDIManager().closeWindow(this); |
|
78 |
} |
|
79 |
|
|
80 |
if(e.getSource() == getSelectDirectoryPanel()) { |
|
81 |
File f = new File(getSelectDirectoryPanel().getPath()); |
|
82 |
if(f.exists() && f.isDirectory() && f.canWrite()) { |
|
83 |
getButtonsPanel().getButton(ButtonsPanel.BUTTON_ACCEPT).setEnabled(true); |
|
84 |
} |
|
85 |
} |
|
86 |
} |
|
87 |
|
|
88 |
public WindowInfo getWindowInfo() { |
|
89 |
WindowInfo m_viewinfo = new WindowInfo(WindowInfo.MODALDIALOG); |
|
90 |
m_viewinfo.setTitle(Messages.getText("warning")); |
|
91 |
m_viewinfo.setHeight(heightWindow); |
|
92 |
m_viewinfo.setWidth(widthWindow); |
|
93 |
if (posWindow != null) { |
|
94 |
m_viewinfo.setX((int) posWindow.getX()); |
|
95 |
m_viewinfo.setY((int) posWindow.getY()); |
|
96 |
} |
|
97 |
return m_viewinfo; |
|
98 |
} |
|
99 |
|
|
100 |
public Object getWindowProfile() { |
|
101 |
return WindowInfo.DIALOG_PROFILE; |
|
102 |
} |
|
103 |
} |
|
0 | 104 |
org.gvsig.raster.tools/trunk/org.gvsig.raster.tools/org.gvsig.raster.tools.app/org.gvsig.raster.tools.app.basic/src/main/java/org/gvsig/raster/tools/app/basic/raster/bean/createlayer/SelectDirectoryPanel.java | ||
---|---|---|
49 | 49 |
private JTextField directoryTextField = null; |
50 | 50 |
private JLabel jLabelDirectory = null; |
51 | 51 |
private JButton jBChooseDirectory = null; |
52 |
private ActionListener listener = null; |
|
52 | 53 |
|
53 | 54 |
/** |
54 | 55 |
* Constructor. |
... | ... | |
84 | 85 |
getJBChooseDirectory().addActionListener(this); |
85 | 86 |
} |
86 | 87 |
|
88 |
public void setListener(ActionListener listener) { |
|
89 |
this.listener = listener; |
|
90 |
} |
|
91 |
|
|
87 | 92 |
/** |
88 | 93 |
* Obtiene el bot?n de asignaci?n de directorio |
89 | 94 |
* @return JButton |
... | ... | |
135 | 140 |
getDirectoryTextField().setText(chooser.getSelectedFile().toString()); |
136 | 141 |
else |
137 | 142 |
chooser.setLastPath(new File(getDirectoryTextField().getText())); |
143 |
|
|
144 |
if(listener != null) |
|
145 |
listener.actionPerformed(new ActionEvent(this, 0, getPath())); |
|
138 | 146 |
} |
139 | 147 |
|
140 | 148 |
/** |
org.gvsig.raster.tools/trunk/org.gvsig.raster.tools/org.gvsig.raster.tools.app/org.gvsig.raster.tools.app.basic/src/main/resources/text.properties | ||
---|---|---|
587 | 587 |
set_view_projection=Asignar proyecci?n |
588 | 588 |
error_saving_rois_rmf=Error salvando las ROI en el fichero de metadatos |
589 | 589 |
problems_loading_rois=Problemas cargando el fichero de ROI.\n La ejecuci?n de la aplicaci?n seguir? normalmente. |
590 |
remove_roi_file_link=?Quieres eliminar el enlace al fichero de ROIs? El fichero no se borrar? |
|
590 |
remove_roi_file_link=?Quieres eliminar el enlace al fichero de ROIs? El fichero no se borrar? |
|
591 |
folder_not_writable=La capa seleccionada est? en un directorio sin permiso de escritura. \n Por favor, seleccione un directorio donde pueda escribir para salvar metadatos. |
|
592 |
folder=Directorio |
org.gvsig.raster.tools/trunk/org.gvsig.raster.tools/org.gvsig.raster.tools.app/org.gvsig.raster.tools.app.basic/src/main/resources/text_en.properties | ||
---|---|---|
574 | 574 |
set_view_projection=Set projection |
575 | 575 |
error_saving_rois_rmf=Error saving the ROI in the metadata file |
576 | 576 |
problems_loading_rois=Problems loading regions of interest from the file.\n The execution of gvSIG will continue normally. |
577 |
remove_roi_file_link=Would you like to remove the link with the ROI file? This file will not be removed from disk. |
|
577 |
remove_roi_file_link=Would you like to remove the link with the ROI file? This file will not be removed from disk. |
|
578 |
folder_not_writable=The selected layer is in a not writable folder. \n Please, select a writable folder to save metadata |
|
579 |
folder=Folder |
org.gvsig.raster/trunk/org.gvsig.raster/org.gvsig.raster.lib/org.gvsig.raster.lib.api/src/main/java/org/gvsig/fmap/dal/coverage/store/parameter/RasterDataParameters.java | ||
---|---|---|
27 | 27 |
|
28 | 28 |
package org.gvsig.fmap.dal.coverage.store.parameter; |
29 | 29 |
|
30 |
import java.io.File; |
|
31 |
|
|
30 | 32 |
import org.cresques.cts.IProjection; |
31 | 33 |
import org.gvsig.fmap.dal.DataStoreParameters; |
32 | 34 |
|
... | ... | |
122 | 124 |
* @param frame |
123 | 125 |
*/ |
124 | 126 |
public int getFrame(); |
127 |
|
|
128 |
/** |
|
129 |
* Sets the folder to store RMF file |
|
130 |
* @param rmfFolder |
|
131 |
*/ |
|
132 |
public void setRMFFolder(File rmfFolder); |
|
133 |
|
|
134 |
/** |
|
135 |
* Gets the folder to store RMF file |
|
136 |
* @return |
|
137 |
*/ |
|
138 |
public File getRMFFolder(); |
|
125 | 139 |
} |
org.gvsig.raster/trunk/org.gvsig.raster/org.gvsig.raster.lib/org.gvsig.raster.lib.impl/src/main/java/org/gvsig/raster/impl/provider/DefaultRasterProvider.java | ||
---|---|---|
141 | 141 |
protected long lineCnt = 0; |
142 | 142 |
protected String uri; |
143 | 143 |
protected String selectedSubdatasetID = null; |
144 |
|
|
145 | 144 |
/** |
146 | 145 |
* Transformaci?n creada a partir de la informaci?n de georreferencia de la |
147 | 146 |
* propia imagen. Esta informaci?n est? en la cabecera o en ficheros |
... | ... | |
201 | 200 |
return getName(); |
202 | 201 |
} |
203 | 202 |
|
204 |
/* |
|
205 |
* (non-Javadoc) |
|
206 |
* @see org.gvsig.raster.impl.provider.RasterProvider#getFormatList() |
|
207 |
*/ |
|
208 | 203 |
public String[] getFormatList() { |
209 | 204 |
return null; |
210 | 205 |
} |
... | ... | |
218 | 213 |
protected void init() { |
219 | 214 |
} |
220 | 215 |
|
221 |
/* |
|
222 |
* (non-Javadoc) |
|
223 |
* @see org.gvsig.raster.impl.provider.RasterProvider#isTiled() |
|
224 |
*/ |
|
225 | 216 |
public boolean isTiled() { |
226 | 217 |
return false; |
227 | 218 |
} |
228 | 219 |
|
229 |
/* |
|
230 |
* (non-Javadoc) |
|
231 |
* @see org.gvsig.raster.impl.provider.RasterProvider#isTimeSupported() |
|
232 |
*/ |
|
233 | 220 |
public boolean isTimeSupported() { |
234 | 221 |
return false; |
235 | 222 |
} |
236 | 223 |
|
237 |
/* |
|
238 |
* (non-Javadoc) |
|
239 |
* @see java.lang.Object#clone() |
|
240 |
*/ |
|
241 | 224 |
public RasterProvider cloneProvider() throws CloneException { |
242 | 225 |
try { |
243 | 226 |
DataManagerProviderServices dataManager = (DataManagerProviderServices)DALLocator.getDataManager(); |
... | ... | |
261 | 244 |
* |
262 | 245 |
* @return SingleDataset, o null si hay problemas. |
263 | 246 |
*/ |
264 |
/*public static DefaultRasterProvider singleDatasetInstance(DataStoreProviderServices storeServices, DataStoreParameters param) throws RasterDriverException { |
|
265 |
DataManagerProviderServices dataManager = (DataManagerProviderServices)DALLocator.getDataManager(); |
|
266 |
try { |
|
267 |
return (DefaultRasterProvider)dataManager.createProvider(storeServices, param); |
|
268 |
} catch (InitializeException e) { |
|
269 |
throw new RasterDriverException("Error initializing provider", e); |
|
270 |
} catch (ProviderNotRegisteredException e) { |
|
271 |
throw new RasterDriverException("Provider not register error", e); |
|
272 |
} |
|
273 |
}*/ |
|
274 |
|
|
275 |
/** |
|
276 |
* Factoria para abrir distintos tipos de raster. |
|
277 |
* @param fName Nombre del fichero. |
|
278 |
* |
|
279 |
* @return SingleDataset, o null si hay problemas. |
|
280 |
*/ |
|
281 | 247 |
public static DefaultRasterProvider singleDatasetInstance(DataStoreProviderServices storeServices, String param) throws RasterDriverException { |
282 | 248 |
DataManagerProviderServices dataManager = (DataManagerProviderServices)DALLocator.getDataManager(); |
283 | 249 |
//We have to locate a provider's name which manages the selected file |
... | ... | |
480 | 446 |
|
481 | 447 |
abstract public int getBlockSize(); |
482 | 448 |
|
483 |
/* |
|
484 |
* (non-Javadoc) |
|
485 |
* @see org.gvsig.raster.impl.provider.RasterProvider#getOverviewHeight(int, int) |
|
486 |
*/ |
|
487 | 449 |
abstract public int getOverviewHeight(int band, int overview) throws BandAccessException, RasterDriverException; |
488 | 450 |
|
489 | 451 |
/** |
... | ... | |
578 | 540 |
this.dataType = dataType; |
579 | 541 |
} |
580 | 542 |
|
581 |
/* |
|
582 |
* (non-Javadoc) |
|
583 |
* @see org.gvsig.fmap.dal.coverage.dataset.RasterDataSet#getPixelSizeX() |
|
584 |
*/ |
|
585 | 543 |
public double getPixelSizeX() { |
586 | 544 |
return externalTransformation.getScaleX(); |
587 | 545 |
} |
588 | 546 |
|
589 |
/* |
|
590 |
* (non-Javadoc) |
|
591 |
* @see org.gvsig.fmap.dal.coverage.dataset.RasterDataSet#getPixelSizeY() |
|
592 |
*/ |
|
593 | 547 |
public double getPixelSizeY() { |
594 | 548 |
return externalTransformation.getScaleY(); |
595 | 549 |
} |
596 | 550 |
|
597 |
/* |
|
598 |
* (non-Javadoc) |
|
599 |
* @see org.gvsig.raster.impl.provider.RasterProvider#getNoDataValue() |
|
600 |
*/ |
|
601 | 551 |
public NoData getNoDataValue() { |
602 | 552 |
if(noData == null) { |
603 | 553 |
noData = RasterLocator.getManager().getDataStructFactory().createNoData(null, null, getRMFFile(), getBandCount()); |
... | ... | |
606 | 556 |
return noData; |
607 | 557 |
} |
608 | 558 |
|
609 |
/* |
|
610 |
* (non-Javadoc) |
|
611 |
* @see org.gvsig.raster.impl.provider.RasterProvider#setNoDataValue(org.gvsig.fmap.dal.coverage.datastruct.NoData) |
|
612 |
*/ |
|
613 | 559 |
public void setNoDataValue(NoData value) { |
614 | 560 |
this.noData = value; |
615 | 561 |
} |
... | ... | |
727 | 673 |
this.storeServices = provServices; |
728 | 674 |
} |
729 | 675 |
|
730 |
/* |
|
731 |
* (non-Javadoc) |
|
732 |
* @see org.gvsig.raster.impl.provider.RasterProvider#getOverviewWidth(int, int) |
|
733 |
*/ |
|
734 | 676 |
abstract public int getOverviewWidth(int band, int overview) throws BandAccessException, RasterDriverException; |
735 | 677 |
|
736 |
/* |
|
737 |
* (non-Javadoc) |
|
738 |
* @see org.gvsig.raster.impl.provider.RasterProvider#selectSubdataset() |
|
739 |
*/ |
|
740 | 678 |
public void selectSubdataset() {} |
741 | 679 |
|
742 | 680 |
/** |
... | ... | |
762 | 700 |
return rmfBlocksManager; |
763 | 701 |
} |
764 | 702 |
|
765 |
/* |
|
766 |
* (non-Javadoc) |
|
767 |
* @see org.gvsig.raster.impl.provider.RasterProvider#getRMFFile() |
|
768 |
*/ |
|
769 | 703 |
public String getRMFFile() { |
770 | 704 |
String tail = selectedSubdatasetID == null ? ".rmf" : "-sd" + selectedSubdatasetID + ".rmf"; |
771 |
return fileUtil.getNameWithoutExtension(getURI()) + tail; |
|
705 |
File rmfFolder = (getDataParameters() != null && getDataParameters() instanceof RasterDataParameters) ? |
|
706 |
((RasterDataParameters)getDataParameters()).getRMFFolder() : |
|
707 |
null; |
|
708 |
|
|
709 |
String fileName = getURI(); |
|
710 |
if(fileName.contains(File.separator)) { |
|
711 |
if(!fileName.endsWith(File.separator)) { |
|
712 |
fileName = fileName.substring(fileName.lastIndexOf(File.separator) + 1); |
|
713 |
fileName = fileUtil.getNameWithoutExtension(fileName); |
|
714 |
} |
|
715 |
} |
|
716 |
|
|
717 |
if(rmfFolder == null) { |
|
718 |
if(getURI().contains(File.separator)) { |
|
719 |
if(!getURI().endsWith(File.separator)) { |
|
720 |
String folder = getURI().substring(0, getURI().lastIndexOf(fileName)); |
|
721 |
if((getDataParameters() != null && getDataParameters() instanceof RasterDataParameters)) |
|
722 |
((RasterDataParameters)getDataParameters()).setRMFFolder(new File(folder)); |
|
723 |
} |
|
724 |
} |
|
725 |
return fileUtil.getNameWithoutExtension(getURI()) + tail; |
|
726 |
} else { |
|
727 |
return rmfFolder.getAbsolutePath() + File.separator + fileName + tail; |
|
728 |
} |
|
729 |
|
|
772 | 730 |
} |
773 | 731 |
|
774 |
/* |
|
775 |
* (non-Javadoc) |
|
776 |
* @see org.gvsig.raster.impl.provider.RasterProvider#isInside(java.awt.geom.Point2D) |
|
777 |
*/ |
|
778 | 732 |
public boolean isInside(Point2D p){ |
779 | 733 |
//Realizamos los calculos solo si el punto est? dentro del extent de la imagen rotada, as? nos ahorramos los calculos |
780 | 734 |
//cuando el puntero est? fuera |
... | ... | |
803 | 757 |
return false; |
804 | 758 |
} |
805 | 759 |
|
806 |
/* |
|
807 |
* (non-Javadoc) |
|
808 |
* @see org.gvsig.raster.impl.provider.RasterProvider#isMultiFile() |
|
809 |
*/ |
|
810 | 760 |
public boolean isMultiFile() { |
811 | 761 |
return false; |
812 | 762 |
} |
813 | 763 |
|
814 |
/* |
|
815 |
* (non-Javadoc) |
|
816 |
* @see org.gvsig.raster.impl.provider.RasterProvider#isMosaic() |
|
817 |
*/ |
|
818 | 764 |
public boolean isMosaic() { |
819 | 765 |
return false; |
820 | 766 |
} |
... | ... | |
833 | 779 |
return null; |
834 | 780 |
} |
835 | 781 |
|
836 |
/* |
|
837 |
* (non-Javadoc) |
|
838 |
* @see org.gvsig.raster.impl.dataset.RasterProvider#saveObjectToRmf(java.lang.Class, java.lang.Object) |
|
839 |
*/ |
|
840 | 782 |
@SuppressWarnings("unchecked") |
841 | 783 |
public void saveObjectToRmf(Class class1, Object value) throws RmfSerializerException { |
842 | 784 |
((DefaultProviderServices)RasterLocator.getManager().getProviderServices()).saveObjectToRmfFile(getRmfBlocksManager(), class1, value); |
... | ... | |
872 | 814 |
return serializerObject.getResult(); |
873 | 815 |
} |
874 | 816 |
|
875 |
/* |
|
876 |
* (non-Javadoc) |
|
877 |
* @see org.gvsig.raster.impl.dataset.RasterProvider#loadObjectFromRmf(java.lang.Class, java.lang.Object) |
|
878 |
*/ |
|
879 | 817 |
@SuppressWarnings("unchecked") |
880 | 818 |
public Object loadObjectFromRmf(Class class1, Object value) throws RmfSerializerException { |
881 | 819 |
return loadObjectFromRmfFile(getRmfBlocksManager(), class1, value); |
... | ... | |
932 | 870 |
return null; |
933 | 871 |
} |
934 | 872 |
|
935 |
/* |
|
936 |
* (non-Javadoc) |
|
937 |
* @see org.gvsig.raster.impl.dataset.RasterProvider#getColorTable() |
|
938 |
*/ |
|
939 | 873 |
public ColorTable getColorTable() { |
940 | 874 |
return colorTable; |
941 | 875 |
} |
942 | 876 |
|
943 |
/* |
|
944 |
* (non-Javadoc) |
|
945 |
* @see org.gvsig.raster.impl.provider.RasterProvider#getImageLegend() |
|
946 |
*/ |
|
947 | 877 |
public Image getImageLegend() { |
948 | 878 |
return null; |
949 | 879 |
} |
950 | 880 |
|
951 |
/* |
|
952 |
* (non-Javadoc) |
|
953 |
* @see org.gvsig.raster.impl.provider.RasterProvider#setColorTable(org.gvsig.fmap.dal.coverage.store.props.ColorTable) |
|
954 |
*/ |
|
955 | 881 |
public void setColorTable(ColorTable value) { |
956 | 882 |
colorTable = value; |
957 | 883 |
} |
958 | 884 |
|
959 |
/* |
|
960 |
* (non-Javadoc) |
|
961 |
* @see org.gvsig.raster.impl.dataset.RasterProvider#getTransparency() |
|
962 |
*/ |
|
963 | 885 |
public Transparency getTransparency() { |
964 | 886 |
return transparency; |
965 | 887 |
} |
966 | 888 |
|
967 |
/* |
|
968 |
* (non-Javadoc) |
|
969 |
* @see org.gvsig.raster.impl.provider.RasterProvider#getMetadata() |
|
970 |
*/ |
|
971 | 889 |
public Metadata getMetadata() { |
972 | 890 |
return null; |
973 | 891 |
} |
974 | 892 |
|
975 |
/* |
|
976 |
* (non-Javadoc) |
|
977 |
* @see org.gvsig.raster.impl.dataset.RasterProvider#getColorInterpretation() |
|
978 |
*/ |
|
979 | 893 |
public ColorInterpretation getColorInterpretation() { |
980 | 894 |
return this.colorInterpretation; |
981 | 895 |
} |
... | ... | |
1000 | 914 |
return stats; |
1001 | 915 |
} |
1002 | 916 |
|
1003 |
/* |
|
1004 |
* (non-Javadoc) |
|
1005 |
* @see org.gvsig.raster.impl.provider.RasterProvider#setStatistics(org.gvsig.fmap.dal.coverage.store.props.Statistics) |
|
1006 |
*/ |
|
1007 | 917 |
public void setStatistics(Statistics stats) throws RmfSerializerException { |
1008 | 918 |
this.stats = stats; |
1009 | 919 |
saveObjectToRmf(Statistics.class, stats); |
1010 | 920 |
} |
1011 | 921 |
|
1012 |
/* |
|
1013 |
* (non-Javadoc) |
|
1014 |
* @see org.gvsig.fmap.dal.coverage.store.props.Histogramable#getHistogramComputer() |
|
1015 |
*/ |
|
1016 | 922 |
public HistogramComputer getHistogramComputer() { |
1017 | 923 |
if (histogram == null) |
1018 | 924 |
histogram = new SimpleProviderHistogramComputer(this); |
... | ... | |
1023 | 929 |
//*********Implementing Disposable methods************ |
1024 | 930 |
//**************************************************** |
1025 | 931 |
|
1026 |
/* |
|
1027 |
* (non-Javadoc) |
|
1028 |
* @see org.gvsig.tools.dispose.impl.AbstractDisposable#doDispose() |
|
1029 |
*/ |
|
1030 | 932 |
public void doDispose() { |
1031 | 933 |
|
1032 | 934 |
} |
... | ... | |
1035 | 937 |
//*****Implementing DataStoreProvider methods********* |
1036 | 938 |
//**************************************************** |
1037 | 939 |
|
1038 |
/** |
|
1039 |
* Gets the specific parameter. All of them inherit from RasterStoreParameters |
|
1040 |
*/ |
|
1041 |
//public abstract RasterStoreParameters getRasterParameters(); |
|
1042 |
|
|
1043 | 940 |
@Override |
1044 | 941 |
public DataServerExplorer getExplorer() throws ReadException, |
1045 | 942 |
ValidateDataParametersException { |
... | ... | |
1067 | 964 |
return null; |
1068 | 965 |
} |
1069 | 966 |
|
1070 |
/* |
|
1071 |
* (non-Javadoc) |
|
1072 |
* @see org.gvsig.fmap.dal.spi.DataStoreProvider#getChilds() |
|
1073 |
*/ |
|
1074 | 967 |
@SuppressWarnings("unchecked") |
1075 | 968 |
public Iterator getChilds() { |
1076 | 969 |
return null; |
1077 | 970 |
} |
1078 | 971 |
|
1079 |
/* |
|
1080 |
* (non-Javadoc) |
|
1081 |
* @see org.gvsig.fmap.dal.spi.DataStoreProvider#getResource() |
|
1082 |
*/ |
|
1083 | 972 |
public ResourceProvider getResource() { |
1084 | 973 |
return null; |
1085 | 974 |
} |
1086 | 975 |
|
1087 |
/* |
|
1088 |
* (non-Javadoc) |
|
1089 |
* @see org.gvsig.fmap.dal.spi.DataStoreProvider#getSourceId() |
|
1090 |
*/ |
|
1091 | 976 |
public Object getSourceId() { |
1092 | 977 |
if( this.getDataParameters() instanceof RasterFileStoreParameters) |
1093 | 978 |
return ((RasterFileStoreParameters)this.getDataParameters()).getFile(); |
... | ... | |
1095 | 980 |
return this.getDataParameters().getURI(); |
1096 | 981 |
} |
1097 | 982 |
|
1098 |
/* |
|
1099 |
* (non-Javadoc) |
|
1100 |
* @see org.gvsig.fmap.dal.spi.DataStoreProvider#open() |
|
1101 |
*/ |
|
1102 | 983 |
public void open() throws OpenException { |
1103 | 984 |
} |
1104 | 985 |
|
... | ... | |
1114 | 995 |
return fileName; |
1115 | 996 |
} |
1116 | 997 |
|
1117 |
/* |
|
1118 |
* (non-Javadoc) |
|
1119 |
* @see org.gvsig.raster.impl.provider.RasterProvider#getFileSuffix() |
|
1120 |
*/ |
|
1121 | 998 |
public String getFileSuffix() { |
1122 | 999 |
return getURIOfFirstProvider().substring(getURIOfFirstProvider().lastIndexOf(".") + 1, getURIOfFirstProvider().length()); |
1123 | 1000 |
} |
1124 | 1001 |
|
1125 |
/* |
|
1126 |
* (non-Javadoc) |
|
1127 |
* @see org.gvsig.raster.impl.provider.RasterProvider#getURIOfFirstProvider() |
|
1128 |
*/ |
|
1129 | 1002 |
public String getURIOfFirstProvider() { |
1130 | 1003 |
return RasterLocator.getManager().getFileUtils().getFormatedRasterFileName(uri); |
1131 | 1004 |
} |
1132 | 1005 |
|
1133 |
/* |
|
1134 |
* (non-Javadoc) |
|
1135 |
* @see org.gvsig.raster.impl.provider.RasterProvider#getURI() |
|
1136 |
*/ |
|
1137 | 1006 |
public String getURI() { |
1138 | 1007 |
return uri; |
1139 | 1008 |
} |
... | ... | |
1154 | 1023 |
fileSize = sz; |
1155 | 1024 |
} |
1156 | 1025 |
|
1157 |
/* |
|
1158 |
* (non-Javadoc) |
|
1159 |
* @see org.gvsig.raster.impl.provider.RasterProvider#getProjection() |
|
1160 |
*/ |
|
1161 | 1026 |
public IProjection getProjection() { |
1162 | 1027 |
return proj; |
1163 | 1028 |
} |
... | ... | |
1172 | 1037 |
return (new Date()).getTime(); |
1173 | 1038 |
} |
1174 | 1039 |
|
1175 |
/* |
|
1176 |
* (non-Javadoc) |
|
1177 |
* @see org.gvsig.fmap.dal.coverage.dataset.RasterDataSet#setAffineTransform(java.awt.geom.AffineTransform) |
|
1178 |
*/ |
|
1179 | 1040 |
public void setAffineTransform(AffineTransform t) { |
1180 | 1041 |
externalTransformation = (AffineTransform) t.clone(); |
1181 | 1042 |
} |
1182 | 1043 |
|
1183 |
/* |
|
1184 |
* (non-Javadoc) |
|
1185 |
* @see org.gvsig.fmap.dal.coverage.dataset.RasterDataSet#getAffineTransform() |
|
1186 |
*/ |
|
1187 | 1044 |
public AffineTransform getAffineTransform() { |
1188 | 1045 |
return externalTransformation; |
1189 | 1046 |
} |
... | ... | |
1199 | 1056 |
externalTransformation.setToIdentity(); |
1200 | 1057 |
} |
1201 | 1058 |
|
1202 |
/* |
|
1203 |
* (non-Javadoc) |
|
1204 |
* @see org.gvsig.fmap.dal.coverage.dataset.RasterDataSet#getOwnAffineTransform() |
|
1205 |
*/ |
|
1206 | 1059 |
public AffineTransform getOwnAffineTransform() { |
1207 | 1060 |
return ownTransformation; |
1208 | 1061 |
} |
1209 |
|
|
1210 |
/* |
|
1211 |
* (non-Javadoc) |
|
1212 |
* @see org.gvsig.raster.impl.provider.RasterProvider#getInfoByPoint(double, double) |
|
1213 |
*/ |
|
1062 |
|
|
1214 | 1063 |
public String getInfoByPoint(double x, double y, ICancellable cancellable) throws InfoByPointException { |
1215 | 1064 |
return null; |
1216 | 1065 |
} |
... | ... | |
1219 | 1068 |
return null; |
1220 | 1069 |
} |
1221 | 1070 |
|
1222 |
/* |
|
1223 |
* (non-Javadoc) |
|
1224 |
* @see org.gvsig.raster.impl.provider.RasterProvider#setTileServer(java.lang.Class) |
|
1225 |
*/ |
|
1226 | 1071 |
public void setTileServer(Class<?> tileServer) throws InitializeException { |
1227 | 1072 |
|
1228 | 1073 |
} |
1229 | 1074 |
|
1230 |
/* |
|
1231 |
* (non-Javadoc) |
|
1232 |
* @see org.gvsig.raster.impl.provider.RasterProvider#getTileSize() |
|
1233 |
*/ |
|
1234 | 1075 |
public int[] getTileSize(int level) { |
1235 | 1076 |
return new int[]{0, 0}; |
1236 | 1077 |
} |
1237 | 1078 |
|
1238 |
/* |
|
1239 |
* (non-Javadoc) |
|
1240 |
* @see org.gvsig.raster.impl.provider.RasterProvider#isRasterEnclosed() |
|
1241 |
*/ |
|
1242 | 1079 |
public boolean isRasterEnclosed() { |
1243 | 1080 |
return false; |
1244 | 1081 |
} |
1245 | 1082 |
|
1246 |
/* |
|
1247 |
* (non-Javadoc) |
|
1248 |
* @see org.gvsig.raster.impl.provider.RasterProvider#getSourceType() |
|
1249 |
*/ |
|
1250 | 1083 |
public int getSourceType() { |
1251 | 1084 |
if(getURI().startsWith("PG:host")) |
1252 | 1085 |
return RasterDataStore.POSTGIS; |
... | ... | |
1264 | 1097 |
|
1265 | 1098 |
} |
1266 | 1099 |
|
1267 |
/* |
|
1268 |
* (non-Javadoc) |
|
1269 |
* @see org.gvsig.raster.impl.provider.RasterProvider#getTimeSerials() |
|
1270 |
*/ |
|
1271 | 1100 |
public TimeSeries getTimeSerials() throws RmfSerializerException { |
1272 | 1101 |
if(serialInfo == null) { |
1273 | 1102 |
serialInfo = new DefaultTimeSerials(); |
... | ... | |
1278 | 1107 |
return serialInfo; |
1279 | 1108 |
} |
1280 | 1109 |
|
1281 |
/* |
|
1282 |
* (non-Javadoc) |
|
1283 |
* @see org.gvsig.raster.impl.provider.RasterProvider#setTimeSerials(org.gvsig.fmap.dal.coverage.store.props.TimeSerials) |
|
1284 |
*/ |
|
1285 | 1110 |
public void setTimeSerials(TimeSeries serialInfo) throws RmfSerializerException { |
1286 | 1111 |
this.serialInfo = serialInfo; |
1287 | 1112 |
saveObjectToRmf(TimeSeries.class, serialInfo); |
1288 | 1113 |
} |
1289 | 1114 |
|
1290 |
/* |
|
1291 |
* (non-Javadoc) |
|
1292 |
* @see org.gvsig.raster.impl.provider.RasterProvider#getFileSizeByProvider() |
|
1293 |
*/ |
|
1294 | 1115 |
public long[] getFileSizeByProvider() { |
1295 | 1116 |
return new long[]{getFileSize()}; |
1296 | 1117 |
} |
1297 | 1118 |
|
1298 |
/* |
|
1299 |
* (non-Javadoc) |
|
1300 |
* @see org.gvsig.raster.impl.provider.RasterProvider#getFileNameByProvider() |
|
1301 |
*/ |
|
1302 | 1119 |
public String[] getURIByProvider() { |
1303 | 1120 |
//For providers with one file |
1304 | 1121 |
return new String[]{getURIOfFirstProvider()}; |
1305 | 1122 |
} |
1306 | 1123 |
|
1307 |
/* |
|
1308 |
* (non-Javadoc) |
|
1309 |
* @see org.gvsig.raster.impl.provider.RasterProvider#getBandCountByProvider() |
|
1310 |
*/ |
|
1311 | 1124 |
public int[] getBandCountByProvider() { |
1312 | 1125 |
return new int[]{getBandCount()}; |
1313 | 1126 |
} |
1314 | 1127 |
|
1315 |
/* |
|
1316 |
* (non-Javadoc) |
|
1317 |
* @see org.gvsig.raster.impl.provider.RasterProvider#getInternalProviderCount() |
|
1318 |
*/ |
|
1319 | 1128 |
public int getInternalProviderCount() { |
1320 | 1129 |
return 1; |
1321 | 1130 |
} |
1322 | 1131 |
|
1323 |
/* |
|
1324 |
* (non-Javadoc) |
|
1325 |
* @see org.gvsig.raster.impl.provider.RasterProvider#getInternalProvider(int) |
|
1326 |
*/ |
|
1327 | 1132 |
public RasterProvider getInternalProvider(int i) { |
1328 | 1133 |
return this; |
1329 | 1134 |
} |
1330 | 1135 |
|
1331 |
/* |
|
1332 |
* (non-Javadoc) |
|
1333 |
* @see org.gvsig.raster.impl.provider.RasterProvider#getURIByBand(int) |
|
1334 |
*/ |
|
1335 | 1136 |
public String getURIByBand(int band) { |
1336 | 1137 |
//No matter which band be selected. In providers with one file is always the first URI |
1337 | 1138 |
return getURIOfFirstProvider(); |
1338 | 1139 |
} |
1339 | 1140 |
|
1340 |
/* |
|
1341 |
* (non-Javadoc) |
|
1342 |
* @see org.gvsig.raster.impl.provider.RasterProvider#getBandPositionByProvider(int) |
|
1343 |
*/ |
|
1344 | 1141 |
public int getBandPositionByProvider(int band) { |
1345 | 1142 |
return band; |
1346 | 1143 |
} |
1347 | 1144 |
|
1348 |
/* |
|
1349 |
* (non-Javadoc) |
|
1350 |
* @see org.gvsig.raster.impl.provider.RasterProvider#getSubdatasetCount() |
|
1351 |
*/ |
|
1352 | 1145 |
public int getSubdatasetCount() { |
1353 | 1146 |
return 0; |
1354 | 1147 |
} |
1355 | 1148 |
|
1356 |
/* |
|
1357 |
* (non-Javadoc) |
|
1358 |
* @see org.gvsig.raster.impl.provider.RasterProvider#addFile(java.lang.String) |
|
1359 |
*/ |
|
1360 | 1149 |
public void addFile(String file) throws InvalidSourceException { |
1361 | 1150 |
//Do nothing |
1362 | 1151 |
} |
1363 | 1152 |
|
1364 |
/* |
|
1365 |
* (non-Javadoc) |
|
1366 |
* @see org.gvsig.raster.impl.provider.RasterProvider#removeFile(java.lang.String) |
|
1367 |
*/ |
|
1368 | 1153 |
public void removeFile(String file) { |
1369 | 1154 |
//Do nothing |
1370 | 1155 |
} |
1371 | 1156 |
|
1372 |
/* |
|
1373 |
* (non-Javadoc) |
|
1374 |
* @see org.gvsig.raster.impl.provider.RasterProvider#needEnhanced() |
|
1375 |
*/ |
|
1376 | 1157 |
public boolean needEnhanced() { |
1377 | 1158 |
return false; |
1378 | 1159 |
} |
... | ... | |
1440 | 1221 |
} |
1441 | 1222 |
} |
1442 | 1223 |
|
1443 |
/* |
|
1444 |
* (non-Javadoc) |
|
1445 |
* @see java.lang.Object#finalize() |
|
1446 |
*/ |
|
1447 | 1224 |
protected void finalize() throws Throwable { |
1448 | 1225 |
dataType = null; |
1449 | 1226 |
noData = null; |
org.gvsig.raster/trunk/org.gvsig.raster/org.gvsig.raster.lib/org.gvsig.raster.lib.impl/src/main/java/org/gvsig/raster/impl/store/AbstractRasterDataParameters.java | ||
---|---|---|
56 | 56 |
private static final String FIELD_ALPHABAND = "alphaband"; |
57 | 57 |
private static final String FIELD_VISIBLE = "visible"; |
58 | 58 |
private static final String FIELD_REPROJ_OPTION = "selected_option"; |
59 |
private static final String FIELD_RMF_FOLDER = "rmf_folder"; |
|
59 | 60 |
|
60 | 61 |
|
61 | 62 |
public static DynClass registerDynClass(String dynClassName) { |
... | ... | |
103 | 104 |
field.setMandatory(false); |
104 | 105 |
field.setHidden(true); |
105 | 106 |
|
107 |
field = dynClass.addDynFieldObject(FIELD_RMF_FOLDER); |
|
108 |
field.setDescription("Folder to store the RMF file"); |
|
109 |
field.setType(DataTypes.FILE); |
|
110 |
field.setMandatory(false); |
|
111 |
field.setHidden(true); |
|
112 |
|
|
106 | 113 |
return dynClass; |
107 | 114 |
} |
108 | 115 |
|
... | ... | |
133 | 140 |
return (this.getURI() != null); |
134 | 141 |
} |
135 | 142 |
|
136 |
/* |
|
137 |
* (non-Javadoc) |
|
138 |
* @see org.gvsig.fmap.dal.coverage.store.RasterStoreParameters#getURI() |
|
139 |
*/ |
|
140 | 143 |
public String getURI() { |
141 | 144 |
return (String) this.getDynValue(FIELD_URI); |
142 | 145 |
} |
143 | 146 |
|
144 |
/* |
|
145 |
* (non-Javadoc) |
|
146 |
* @see org.gvsig.fmap.dal.coverage.store.RasterStoreParameters#setURI(java.lang.String) |
|
147 |
*/ |
|
148 | 147 |
public void setURI(String uri) { |
149 | 148 |
this.setDynValue(FIELD_URI, uri); |
150 | 149 |
} |
150 |
|
|
151 |
public void setRMFFolder(File rmfFolder) { |
|
152 |
this.setDynValue(FIELD_RMF_FOLDER, rmfFolder); |
|
153 |
} |
|
154 |
|
|
155 |
public File getRMFFolder() { |
|
156 |
return (File) this.getDynValue(FIELD_RMF_FOLDER); |
|
157 |
} |
|
151 | 158 |
|
152 | 159 |
public String getSRSID() { |
153 | 160 |
IProjection srs = (IProjection) getDynValue(FIELD_CRS); |
... | ... | |
214 | 221 |
return 0; |
215 | 222 |
} |
216 | 223 |
|
217 |
/* |
|
218 |
* (non-Javadoc) |
|
219 |
* @see org.gvsig.fmap.dal.coverage.store.parameter.RasterDataParameters#isVisible() |
|
220 |
*/ |
|
221 | 224 |
public boolean isVisible() { |
222 | 225 |
Boolean b = (Boolean)getDynValue(FIELD_VISIBLE); |
223 | 226 |
if(b != null) |
... | ... | |
225 | 228 |
return true; |
226 | 229 |
} |
227 | 230 |
|
228 |
/* |
|
229 |
* (non-Javadoc) |
|
230 |
* @see org.gvsig.fmap.dal.coverage.store.parameter.RasterDataParameters#setVisible(boolean) |
|
231 |
*/ |
|
232 | 231 |
public void setVisible(boolean visible) { |
233 | 232 |
this.setDynValue(FIELD_VISIBLE, new Boolean(visible)); |
234 | 233 |
} |
235 | 234 |
|
236 |
/* |
|
237 |
* (non-Javadoc) |
|
238 |
* @see org.gvsig.fmap.dal.spi.AbstractDataParameters#loadFromState(org.gvsig.tools.persistence.PersistentState) |
|
239 |
*/ |
|
240 | 235 |
public void loadFromState(PersistentState state) throws PersistenceException { |
241 | 236 |
String uriString = null; |
242 | 237 |
try { |
... | ... | |
260 | 255 |
setAlphaBand(state.getInt(FIELD_ALPHABAND)); |
261 | 256 |
setFrame(state.getInt(FIELD_FRAME)); |
262 | 257 |
setVisible(state.getBoolean(FIELD_VISIBLE)); |
258 |
setRMFFolder(state.getFile(FIELD_RMF_FOLDER)); |
|
263 | 259 |
} |
264 | 260 |
|
265 |
/* |
|
266 |
* (non-Javadoc) |
|
267 |
* @see org.gvsig.fmap.dal.spi.AbstractDataParameters#saveToState(org.gvsig.tools.persistence.PersistentState) |
|
268 |
*/ |
|
269 | 261 |
public void saveToState(PersistentState state) throws PersistenceException { |
270 | 262 |
try { |
271 | 263 |
String uri = getURI(); |
... | ... | |
283 | 275 |
state.set(FIELD_ALPHABAND, getAlphaBand()); |
284 | 276 |
state.set(FIELD_FRAME, getFrame()); |
285 | 277 |
state.set(FIELD_VISIBLE, isVisible()); |
278 |
state.set(FIELD_RMF_FOLDER, getRMFFolder()); |
|
286 | 279 |
} |
287 | 280 |
|
288 | 281 |
public static void registerPersistence(DynStruct definition) { |
... | ... | |
291 | 284 |
definition.addDynFieldInt(FIELD_ALPHABAND).setMandatory(false); |
292 | 285 |
definition.addDynFieldInt(FIELD_FRAME).setMandatory(false); |
293 | 286 |
definition.addDynFieldBoolean(FIELD_VISIBLE).setMandatory(false); |
287 |
definition.addDynFieldFile(FIELD_RMF_FOLDER).setMandatory(false); |
|
294 | 288 |
} |
295 | 289 |
} |
org.gvsig.raster.cache/trunk/org.gvsig.raster.cache/org.gvsig.raster.cache.lib.impl/src/main/java/org/gvsig/raster/cache/tile/impl/pool/ThreadTask.java | ||
---|---|---|
44 | 44 |
* Cancels the task in progress and avoids that next tiles are gotten |
45 | 45 |
*/ |
46 | 46 |
public void cancelTaskInProgress() { |
47 |
currentJob.cancelTask(); |
|
47 |
if(currentJob != null) |
|
48 |
currentJob.cancelTask(); |
|
48 | 49 |
getMoreTiles = false; |
49 | 50 |
} |
50 | 51 |
|
Also available in: Unified diff