Revision 10626 trunk/applications/appgvSIG/src/com/iver/cit/gvsig/project/documents/view/ProjectView.java
ProjectView.java | ||
---|---|---|
46 | 46 |
import java.util.TreeMap; |
47 | 47 |
import java.util.Map.Entry; |
48 | 48 |
|
49 |
import com.hardcode.gdbms.driver.exceptions.ReadDriverException; |
|
49 | 50 |
import com.iver.andami.PluginServices; |
50 | 51 |
import com.iver.andami.ui.mdiManager.IWindow; |
51 |
import com.iver.cit.gvsig.fmap.DriverException; |
|
52 | 52 |
import com.iver.cit.gvsig.fmap.MapContext; |
53 | 53 |
import com.iver.cit.gvsig.fmap.drivers.DriverIOException; |
54 | 54 |
import com.iver.cit.gvsig.fmap.layers.FLayer; |
... | ... | |
126 | 126 |
* @see com.iver.cit.gvsig.project.documents.ProjectDocument#setXMLEntity(com.iver.utiles.XMLEntity) |
127 | 127 |
*/ |
128 | 128 |
public void setXMLEntity03(XMLEntity xml) |
129 |
throws XMLException, DriverException, DriverIOException {
|
|
129 |
throws XMLException, ReadDriverException {
|
|
130 | 130 |
super.setXMLEntity03(xml); |
131 | 131 |
int numViews = xml.getIntProperty("numViews"); |
132 | 132 |
ProjectDocument.NUMS.put(ProjectViewFactory.registerName,new Integer(numViews)); |
... | ... | |
155 | 155 |
* @see com.iver.cit.gvsig.project.documents.ProjectDocument#setXMLEntity(com.iver.utiles.XMLEntity) |
156 | 156 |
*/ |
157 | 157 |
public void setXMLEntity(XMLEntity xml) |
158 |
throws XMLException, DriverException, DriverIOException, OpenException {
|
|
158 |
throws XMLException, ReadDriverException, OpenException {
|
|
159 | 159 |
try{ |
160 | 160 |
super.setXMLEntity(xml); |
161 | 161 |
int currentChild=0; |
... | ... | |
233 | 233 |
if (layer instanceof AlphanumericData) { |
234 | 234 |
try { |
235 | 235 |
project.exportToXMLDataSource(root,((AlphanumericData)layer).getRecordset().getName()); |
236 |
} catch (DriverException e) { |
|
236 |
} catch (ReadDriverException e) {
|
|
237 | 237 |
throw new SaveException(e,layer.getName()); |
238 | 238 |
} |
239 | 239 |
|
... | ... | |
245 | 245 |
} |
246 | 246 |
} |
247 | 247 |
|
248 |
public void importFromXML(XMLEntity root, XMLEntity typeRoot, int elementIndex, Project project, boolean removeDocumentsFromRoot) throws XMLException, DriverException, OpenException { |
|
248 |
public void importFromXML(XMLEntity root, XMLEntity typeRoot, int elementIndex, Project project, boolean removeDocumentsFromRoot) throws XMLException, ReadDriverException, OpenException {
|
|
249 | 249 |
XMLEntity element = typeRoot.getChild(elementIndex); |
250 |
|
|
251 |
try { |
|
252 |
this.setXMLEntity(element); |
|
253 |
} catch (DriverIOException e) { |
|
254 |
throw new OpenException(e,"Open error"); |
|
255 |
} |
|
250 |
this.setXMLEntity(element); |
|
256 | 251 |
project.addDocument(this); |
257 | 252 |
if (removeDocumentsFromRoot) { |
258 | 253 |
typeRoot.removeChild(elementIndex); |
Also available in: Unified diff