Revision 17118

View differences:

trunk/extensions/extDwg/src-test/com/iver/cit/jdwglib/DwgFilesTestCase.java
59 59
import junit.framework.TestCase;
60 60

  
61 61
import com.hardcode.gdbms.driver.exceptions.InitializeDriverException;
62
import com.hardcode.gdbms.driver.exceptions.ReadDriverException;
62 63
import com.iver.cit.gvsig.drivers.dwg.DwgMemoryDriver;
63 64

  
64 65
/**
......
87 88
		super.tearDown();
88 89
		baseDataPath = null;
89 90
	}
90
	
91

  
91 92
	public void test1(){
92 93
		if(TEST_ALL){
93 94
			File[] directories = baseDataPath.listFiles();
......
117 118
			}//j
118 119
		}
119 120
	}
120
	
121

  
121 122
	//test para arreglar el problema de tipos mezclados double[] y Point2D
122
	public void testLwPline() throws InitializeDriverException{
123
	public void testLwPline() throws ReadDriverException{
123 124
		DwgMemoryDriver driver = new DwgMemoryDriver();
124 125
		String fileName = baseDataPath.
125 126
			getAbsolutePath() + "/2000/ORENSE-5.DWG";
126 127
		File file = new File(fileName);
127 128
		driver.open(file);
128 129
		driver.initialize();
129
		
130

  
130 131
		//now, the same file has problems with LwPolyline
131 132
		fileName = baseDataPath.
132 133
			getAbsolutePath() + "/14/ORENSE-5.DWG";
......
134 135
		driver.open(file);
135 136
		driver.initialize();
136 137
	}
137
	
138
	
139 138

  
139

  
140

  
140 141
}
141 142

  
trunk/extensions/extDwg/src/com/iver/cit/gvsig/drivers/dwg/DwgMemoryDriver.java
105 105
import java.awt.Color;
106 106
import java.awt.geom.Rectangle2D;
107 107
import java.io.File;
108
import java.io.FileNotFoundException;
108 109
import java.io.IOException;
109 110
import java.sql.Types;
110 111
import java.util.ArrayList;
......
114 115

  
115 116
import javax.swing.table.DefaultTableModel;
116 117

  
118
import com.hardcode.gdbms.driver.exceptions.FileNotFoundDriverException;
117 119
import com.hardcode.gdbms.driver.exceptions.InitializeDriverException;
118 120
import com.hardcode.gdbms.driver.exceptions.ReadDriverException;
119 121
import com.hardcode.gdbms.driver.exceptions.UnsupportedVersionDriverException;
......
293 295
	 * And finally, we can read the objects Vector, and convert this objects to
294 296
	 * the FMap object model.
295 297
	 */
296
	public void initialize() throws InitializeDriverException {
298
	public void initialize() throws ReadDriverException {
297 299
		if (isInitialized)
298 300
			return;
299 301
		else
......
323 325
							Messages.getText("Autodesk_converter"),
324 326
							autodeskUrl });
325 327
			throw new UnsupportedVersionDriverException(getName(),e1,description);
328
		} catch (FileNotFoundException e) {
329
			throw new FileNotFoundDriverException(getName(),e);
326 330
		} catch (IOException e) {
327 331
			throw new InitializeDriverException(getName(),e);
328 332
		}
......
476 480
		defaultLegend = LegendFactory
477 481
				.createVectorialUniqueValueLegend(getShapeType());
478 482
		defaultLegend.setClassifyingFieldNames(new String[] {"Color"});
483
		defaultLegend.setClassifyingFieldTypes(new int[]{Types.INTEGER,Types.VARCHAR,Types.VARCHAR,Types.VARCHAR,Types.INTEGER,Types.DOUBLE,Types.DOUBLE,Types.VARCHAR,Types.DOUBLE,Types.DOUBLE});
484

  
479 485
		defaultLegend.setDefaultSymbol(SymbologyFactory.
480 486
				createDefaultSymbolByShapeType(getShapeType(), Color.BLACK));
481 487

  

Also available in: Unified diff