Revision 5521

View differences:

trunk/libraries/libFMap/src/com/iver/cit/gvsig/fmap/drivers/dgn/DgnMemoryDriver.java
3 3
 * display DGN's. His DGNLib is more advanced, and must be
4 4
 * used as reference.
5 5
 * DGNLib:  http://dgnlib.maptools.org/
6
 * 
7
 * (Thanks, Frank :). For this, and for your very good job with 
6
 *
7
 * (Thanks, Frank :). For this, and for your very good job with
8 8
 * shapefiles. And also for GDAL!!!!
9 9
 */
10 10

  
......
99 99
	private String path;
100 100
	private File m_Fich;
101 101
	private DriverAttributes attr = new DriverAttributes();
102
	
102

  
103 103
	/**
104 104
	 * @see com.iver.cit.gvsig.fmap.drivers.VectorialFileDriver#open(java.io.File)
105 105
	 */
......
112 112
	 */
113 113
	public void initialize() throws IOException {
114 114
		float heightText = 10;
115
		
115

  
116 116
		attr.setLoadedInMemory(true);
117 117

  
118 118
		m_DgnReader = new DGNReader(m_Fich.getAbsolutePath());
......
163 163
				aux = null;
164 164

  
165 165
				// if ((elemento.element_id > 3800) && (elemento.element_id < 3850))
166
				// 	m_DgnReader.DGNDumpElement(m_DgnReader.getInfo(),elemento,""); 
166
				// 	m_DgnReader.DGNDumpElement(m_DgnReader.getInfo(),elemento,"");
167 167
				if ((elemento.stype == DGNFileHeader.DGNST_MULTIPOINT) ||
168 168
						(elemento.stype == DGNFileHeader.DGNST_ARC) ||
169 169
						(elemento.stype == DGNFileHeader.DGNST_CELL_HEADER) ||
......
347 347
							}
348 348

  
349 349
							if (elemento.complex != 0) {
350
								// Si es un agujero o 
350
								// Si es un agujero o
351 351
								// es la primera entidad del agujero, lo a?adimos sin unir al anterior
352 352
								if (bFirstHoleEntity ||
353 353
										((psLine.type == DGNFileHeader.DGNT_SHAPE) &&
......
413 413

  
414 414
						/* Line2D.Double ejeMayor = new Line2D.Double(psArc.origin.x - psArc.primary_axis, psArc.origin.y,
415 415
						   psArc.origin.x + psArc.primary_axis, psArc.origin.y);
416
						
416

  
417 417
						   lyrLines.addShape(new FShape(FConstant.SHAPE_TYPE_POLYLINE, new GeneralPathX(ejeMayor)), auxRow); */
418 418

  
419 419
						// lyrLines.addShape(new FShape(FConstant.SHAPE_TYPE_POLYLINE, elShapeArc), auxRow);
......
426 426
							}
427 427

  
428 428
							// SI LA ELIPSE ES UN AGUJERO, SE A?ADE SIN PEGAR
429
							// Y EL ELEMENTO ES UN POLIGONO		               	   
429
							// Y EL ELEMENTO ES UN POLIGONO
430 430
							if (bFirstHoleEntity ||
431 431
									((elemento.type == DGNFileHeader.DGNT_SHAPE) &&
432 432
									((elemento.properties & 0x8000) != 0))) {
......
490 490
				auxRow = complexRow;
491 491
			}
492 492

  
493
			// System.err.println("Entidad compuesta. bInsideCell = " + bInsideCell + " auxRow = " + auxRow[ID_FIELD_ENTITY]);			
493
			// System.err.println("Entidad compuesta. bInsideCell = " + bInsideCell + " auxRow = " + auxRow[ID_FIELD_ENTITY]);
494 494
			addShape(new FPolyline2D(elementoCompuesto), auxRow);
495 495

  
496 496
			if (bEsPoligono) {
......
530 530
		   Color color=new Color(0,0,0,0);
531 531
		   big.setBackground(color);
532 532
		   big.clearRect(0, 0, 1, 1);
533
		   Paint fillProv = null; 
533
		   Paint fillProv = null;
534 534
		   Rectangle2D rProv = new Rectangle();
535
		   rProv.setFrame(0, 0,1,1); 
536
		   fillProv = new TexturePaint(bi,rProv); */		    
535
		   rProv.setFrame(0, 0,1,1);
536
		   fillProv = new TexturePaint(bi,rProv); */
537 537
			for (long j = 0; j < rs.getRowCount(); j++) {
538 538
				clave = (IntValue) rs.getFieldValue(j, ID_FIELD_COLOR);
539 539

  
......
550 550
					theSymbol.setStyle(FConstant.SYMBOL_STYLE_DGNSPECIAL);
551 551
					theSymbol.setSize(3);
552 552
					theSymbol.setSizeInPixels(true);
553
					
553

  
554 554
					// theSymbol.setStyle(FConstant.SYMBOL_STYLE_FILL_TRANSPARENT);
555 555
					defaultLegend.addSymbol(clave, theSymbol);
556 556
				}
......
611 611
     */
612 612
    public void write(DataWare arg0) throws DriverException {
613 613
        // TODO Auto-generated method stub
614
        
614

  
615 615
    }
616 616

  
617 617
    /* (non-Javadoc)
......
619 619
     */
620 620
    public void close() throws IOException {
621 621
        // TODO Auto-generated method stub
622
        
622

  
623 623
    }
624 624

  
625 625
	public File getFile() {
626 626
		return m_Fich;
627 627
	}
628 628

  
629
	public boolean isWritable() {
630
		return m_Fich.canWrite();
631
	}
632

  
629 633
}
trunk/libraries/libFMap/src/com/iver/cit/gvsig/fmap/drivers/VectorialDriver.java
61 61
	 */
62 62
	int getShapeType();
63 63

  
64
	
64

  
65 65
	/**
66 66
     * Obtiene el n?mero de geometr?as que contiene
67 67
     * la capa
......
71 71
     * @throws IOException Si se produce alg?n error
72 72
     */
73 73
    int getShapeCount() throws IOException;
74
	
74

  
75 75
	/**
76 76
	 * Devuelve los atributos que necesitemos conocer de un driver.
77 77
	 * Por ejemplo, si se carga en memoria, o cualquier otra cosa que
78 78
	 * necesitemos. Pasa a trav?s del adapter para que una FLayer pueda
79 79
	 * conocer ciertos aspectos del driver que le est? entregando las
80 80
	 * features.
81
	 * 
81
	 *
82 82
	 * @return
83 83
	 */
84 84
	DriverAttributes getDriverAttributes();
......
92 92
     * @throws IOException Si se produce alg?n error
93 93
     */
94 94
    Rectangle2D getFullExtent() throws IOException;
95
    
95

  
96 96
    public IGeometry getShape(int index) throws IOException;
97 97

  
98 98

  
99 99
	void reLoad() throws IOException;
100

  
101

  
102
	boolean isWritable();
100 103
}
trunk/libraries/libFMap/src/com/iver/cit/gvsig/fmap/drivers/dxf/DXFMemoryDriver.java
874 874

  
875 875
	}
876 876

  
877
	public boolean isWritable() {
878
		return m_Fich.canWrite();
879
	}
880

  
877 881
}
trunk/libraries/libFMap/src/com/iver/cit/gvsig/fmap/drivers/ConcreteMemoryDriver.java
2 2
 * Created on 09-nov-2005
3 3
 *
4 4
 * gvSIG. Sistema de Informaci?n Geogr?fica de la Generalitat Valenciana
5
 * 
5
 *
6 6
 * Copyright (C) 2004 IVER T.I. and Generalitat Valenciana.
7
 * 
7
 *
8 8
 * This program is free software; you can redistribute it and/or
9 9
 * modify it under the terms of the GNU General Public License
10 10
 * as published by the Free Software Foundation; either version 2
11 11
 * of the License, or (at your option) any later version.
12
 *  
12
 *
13 13
 * This program is distributed in the hope that it will be useful,
14 14
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
15 15
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
16 16
 * GNU General Public License for more details.
17
 * 
17
 *
18 18
 * You should have received a copy of the GNU General Public License
19 19
 * along with this program; if not, write to the Free Software
20 20
 * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111-1307, USA.
21
 *  
21
 *
22 22
 * For more information, contact:
23 23
 *
24 24
 *  Generalitat Valenciana
......
30 30
 *      +34 963862235
31 31
 *   gvsig@gva.es
32 32
 *      www.gvsig.gva.es
33
 * 
33
 *
34 34
 *    or
35
 * 
35
 *
36 36
 *   IVER T.I. S.A
37 37
 *   Salamanca 50
38 38
 *   46005 Valencia
39 39
 *   Spain
40
 * 
40
 *
41 41
 *   +34 963163400
42 42
 *   dac@iver.es
43 43
 */
......
51 51

  
52 52
    int shapeType = FShape.MULTI;
53 53
    String name;
54
    
54

  
55 55
    public void setShapeType(int shapeType)
56 56
    {
57 57
        this.shapeType = shapeType;
58 58
    }
59
    
59

  
60 60
    public int getShapeType() {
61 61
        return shapeType;
62 62
    }
63 63

  
64 64
    /**
65
     * 
65
     *
66 66
     */
67 67
    public ConcreteMemoryDriver() {
68 68
    }
69 69

  
70
    public String getName() {        
70
    public String getName() {
71 71
        return name;
72 72
    }
73 73

  
......
83 83

  
84 84
    }
85 85

  
86
	public boolean isWritable() {
87
		return true;
88
	}
89

  
86 90
}
trunk/libraries/libFMap/src/com/iver/cit/gvsig/fmap/drivers/shp/IndexedShpDriver.java
971 971
		shpWriter.setFlatness(flatness);
972 972
	}
973 973

  
974
	public boolean isWritable() {
975
		return fileShp.canWrite();
976
	}
977

  
974 978
}

Also available in: Unified diff