svn-gvsig-desktop / trunk / libraries / libFMap / src / com / iver / cit / gvsig / fmap / layers / FLyrVect.java @ 1283
History | View | Annotate | Download (15.8 KB)
1 |
/* gvSIG. Sistema de Informaci?n Geogr?fica de la Generalitat Valenciana
|
---|---|
2 |
*
|
3 |
* Copyright (C) 2004 IVER T.I. and Generalitat Valenciana.
|
4 |
*
|
5 |
* This program is free software; you can redistribute it and/or
|
6 |
* modify it under the terms of the GNU General Public License
|
7 |
* as published by the Free Software Foundation; either version 2
|
8 |
* of the License, or (at your option) any later version.
|
9 |
*
|
10 |
* This program is distributed in the hope that it will be useful,
|
11 |
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
12 |
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
13 |
* GNU General Public License for more details.
|
14 |
*
|
15 |
* You should have received a copy of the GNU General Public License
|
16 |
* along with this program; if not, write to the Free Software
|
17 |
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307,USA.
|
18 |
*
|
19 |
* For more information, contact:
|
20 |
*
|
21 |
* Generalitat Valenciana
|
22 |
* Conselleria d'Infraestructures i Transport
|
23 |
* Av. Blasco Ib??ez, 50
|
24 |
* 46010 VALENCIA
|
25 |
* SPAIN
|
26 |
*
|
27 |
* +34 963862235
|
28 |
* gvsig@gva.es
|
29 |
* www.gvsig.gva.es
|
30 |
*
|
31 |
* or
|
32 |
*
|
33 |
* IVER T.I. S.A
|
34 |
* Salamanca 50
|
35 |
* 46005 Valencia
|
36 |
* Spain
|
37 |
*
|
38 |
* +34 963163400
|
39 |
* dac@iver.es
|
40 |
*/
|
41 |
package com.iver.cit.gvsig.fmap.layers; |
42 |
|
43 |
import com.hardcode.driverManager.DriverLoadException; |
44 |
|
45 |
import com.hardcode.gdbms.engine.data.DataSource; |
46 |
import com.hardcode.gdbms.engine.instruction.FieldNotFoundException; |
47 |
import com.hardcode.gdbms.engine.values.DoubleValue; |
48 |
import com.hardcode.gdbms.engine.values.FloatValue; |
49 |
import com.hardcode.gdbms.engine.values.NullValue; |
50 |
import com.hardcode.gdbms.engine.values.Value; |
51 |
|
52 |
import com.iver.cit.gvsig.fmap.DriverException; |
53 |
import com.iver.cit.gvsig.fmap.ViewPort; |
54 |
import com.iver.cit.gvsig.fmap.core.IGeometry; |
55 |
import com.iver.cit.gvsig.fmap.core.v02.FLabel; |
56 |
import com.iver.cit.gvsig.fmap.core.v02.FSymbol; |
57 |
import com.iver.cit.gvsig.fmap.drivers.DriverIOException; |
58 |
import com.iver.cit.gvsig.fmap.drivers.VectorialFileDriver; |
59 |
import com.iver.cit.gvsig.fmap.layers.layerOperations.AlphanumericData; |
60 |
import com.iver.cit.gvsig.fmap.layers.layerOperations.ClassifiableVectorial; |
61 |
import com.iver.cit.gvsig.fmap.layers.layerOperations.Labelable; |
62 |
import com.iver.cit.gvsig.fmap.layers.layerOperations.RandomVectorialData; |
63 |
import com.iver.cit.gvsig.fmap.layers.layerOperations.Selectable; |
64 |
import com.iver.cit.gvsig.fmap.layers.layerOperations.SingleLayer; |
65 |
import com.iver.cit.gvsig.fmap.layers.layerOperations.VectorialData; |
66 |
import com.iver.cit.gvsig.fmap.operations.Cancellable; |
67 |
import com.iver.cit.gvsig.fmap.operations.strategies.FeatureVisitor; |
68 |
import com.iver.cit.gvsig.fmap.operations.strategies.Strategy; |
69 |
import com.iver.cit.gvsig.fmap.operations.strategies.StrategyManager; |
70 |
import com.iver.cit.gvsig.fmap.operations.strategies.VisitException; |
71 |
import com.iver.cit.gvsig.fmap.rendering.Legend; |
72 |
import com.iver.cit.gvsig.fmap.rendering.LegendChangedEvent; |
73 |
import com.iver.cit.gvsig.fmap.rendering.LegendFactory; |
74 |
import com.iver.cit.gvsig.fmap.rendering.VectorialLegend; |
75 |
|
76 |
import com.iver.utiles.XMLEntity; |
77 |
|
78 |
import org.apache.log4j.Logger; |
79 |
|
80 |
import org.cresques.cts.ICoordTrans; |
81 |
|
82 |
import java.awt.Graphics2D; |
83 |
import java.awt.geom.Point2D; |
84 |
import java.awt.geom.Rectangle2D; |
85 |
import java.awt.image.BufferedImage; |
86 |
|
87 |
import java.util.ArrayList; |
88 |
import java.util.BitSet; |
89 |
|
90 |
|
91 |
/**
|
92 |
* Capa b?sica Vectorial.
|
93 |
*
|
94 |
* @author Fernando Gonz?lez Cort?s
|
95 |
*/
|
96 |
|
97 |
//TODO Cuando no sea para pruebas debe no ser public
|
98 |
public class FLyrVect extends FLyrDefault implements Labelable, Selectable, |
99 |
AlphanumericData, ClassifiableVectorial, SingleLayer, VectorialData, |
100 |
RandomVectorialData { |
101 |
private static Logger logger = Logger.getLogger(FLyrVect.class.getName()); |
102 |
|
103 |
/** Leyenda de la capa vectorial */
|
104 |
private VectorialLegend legend;
|
105 |
private int typeShape = -1; |
106 |
private SelectionSupport selectionSupport = new SelectionSupport(); |
107 |
private LayerChangeSupport layerChangeSupport = new LayerChangeSupport(); |
108 |
private VectorialAdapter source;
|
109 |
private SelectableDataSource sds;
|
110 |
|
111 |
/**
|
112 |
* A?ade un SelectionListener a la lista de listeners.
|
113 |
*
|
114 |
* @param listener SelectionListener.
|
115 |
*/
|
116 |
public void addSelectionListener(SelectionListener listener) { |
117 |
selectionSupport.addSelectionListener(listener); |
118 |
} |
119 |
|
120 |
/**
|
121 |
* Borra un selectionListener de la lista de listeners.
|
122 |
*
|
123 |
* @param listener SelectionListener
|
124 |
*/
|
125 |
public void removeSelectionListener(SelectionListener listener) { |
126 |
selectionSupport.removeSelectionListener(listener); |
127 |
} |
128 |
|
129 |
/**
|
130 |
* Cuando ocurre un evento de cambio en la selecci?n, ?ste puede ser uno de
|
131 |
* una gran cantidad de eventos. Con el fin de no propagar todos estos
|
132 |
* eventos, se realiza la propagaci?n de manera manual al final de la
|
133 |
* "r?faga" de eventos
|
134 |
*/
|
135 |
public void fireSelectionEvents() { |
136 |
selectionSupport.fireSelectionEvents(); |
137 |
} |
138 |
|
139 |
/**
|
140 |
* Devuelve el VectorialAdapater de la capa.
|
141 |
*
|
142 |
* @return VectorialAdapter.
|
143 |
*/
|
144 |
public VectorialAdapter getSource() {
|
145 |
return source;
|
146 |
} |
147 |
|
148 |
/**
|
149 |
* Inserta el VectorialAdapter a la capa.
|
150 |
*
|
151 |
* @param va VectorialAdapter.
|
152 |
*/
|
153 |
public void setSource(VectorialAdapter va) { |
154 |
source = va; |
155 |
} |
156 |
|
157 |
/**
|
158 |
* @see com.iver.cit.gvsig.fmap.layers.LayerOperations#getFullExtent()
|
159 |
*/
|
160 |
public Rectangle2D getFullExtent() throws DriverException { |
161 |
try {
|
162 |
Rectangle2D rAux;
|
163 |
logger.debug("source.start()");
|
164 |
source.start(); |
165 |
rAux = source.getFullExtent(); |
166 |
logger.debug("source.stop()");
|
167 |
source.stop(); |
168 |
|
169 |
// Si existe reproyecci?n, reproyectar el extent
|
170 |
ICoordTrans ct = getCoordTrans(); |
171 |
|
172 |
if (ct != null) { |
173 |
Point2D pt1 = new Point2D.Double(rAux.getMinX(), rAux.getMinY()); |
174 |
Point2D pt2 = new Point2D.Double(rAux.getMaxX(), rAux.getMaxY()); |
175 |
pt1 = ct.convert(pt1, null);
|
176 |
pt2 = ct.convert(pt2, null);
|
177 |
rAux = new Rectangle2D.Double(); |
178 |
rAux.setFrameFromDiagonal(pt1, pt2); |
179 |
} |
180 |
|
181 |
return rAux;
|
182 |
} catch (DriverIOException e) {
|
183 |
throw new DriverException(e); |
184 |
} |
185 |
} |
186 |
|
187 |
/**
|
188 |
* @see com.iver.cit.gvsig.fmap.layers.LayerOperations#draw(java.awt.image.BufferedImage,
|
189 |
* java.awt.Graphics2D, com.iver.cit.gvsig.fmap.ViewPort)
|
190 |
*/
|
191 |
public void draw(BufferedImage image, Graphics2D g, ViewPort viewPort, |
192 |
Cancellable cancel) throws DriverException {
|
193 |
|
194 |
|
195 |
|
196 |
Strategy strategy = StrategyManager.getStrategy(this);
|
197 |
|
198 |
strategy.draw(image, g, viewPort, cancel); |
199 |
|
200 |
if (getVirtualLayers() != null) { |
201 |
getVirtualLayers().draw(image, g, viewPort, cancel); |
202 |
} |
203 |
|
204 |
if (getLayerText() != null) { |
205 |
getLayerText().draw(image, g, viewPort, cancel); |
206 |
} |
207 |
} |
208 |
|
209 |
/**
|
210 |
* @see com.iver.cit.gvsig.fmap.layers.FLayer#print(java.awt.Graphics2D,
|
211 |
* com.iver.cit.gvsig.fmap.ViewPort,
|
212 |
* com.iver.cit.gvsig.fmap.operations.Cancellable)
|
213 |
*/
|
214 |
public void print(Graphics2D g, ViewPort viewPort, Cancellable cancel) |
215 |
throws DriverException {
|
216 |
Strategy strategy = StrategyManager.getStrategy(this);
|
217 |
|
218 |
strategy.print(g, viewPort, cancel); |
219 |
|
220 |
if (getLayerText() != null) { |
221 |
getLayerText().draw(null, g, viewPort, cancel);
|
222 |
} |
223 |
} |
224 |
|
225 |
/**
|
226 |
* @see com.iver.cit.gvsig.fmap.layers.VectorialOperations#createLabelLayer(int)
|
227 |
*/
|
228 |
public FLayer createLabelLayer(int fieldId) { |
229 |
ArrayList labels = new ArrayList(); |
230 |
|
231 |
try {
|
232 |
VectorialAdapter adapter = getSource(); |
233 |
DataSource ds = getRecordset();
|
234 |
logger.debug("adapter.start()");
|
235 |
adapter.start(); |
236 |
ds.start(); |
237 |
|
238 |
VectorialFileDriver driver = (VectorialFileDriver) adapter.getDriver(); |
239 |
int sc;
|
240 |
|
241 |
sc = adapter.getShapeCount(); |
242 |
|
243 |
VectorialLegend l = (VectorialLegend) getLegend(); |
244 |
int idFieldHeightText = -1; |
245 |
int idFieldRotationText = -1; |
246 |
boolean bWithHeightText = false; |
247 |
|
248 |
if (l.getLabelHeightField() != null) { |
249 |
bWithHeightText = true;
|
250 |
idFieldHeightText = ds.getFieldIndexByName(l.getLabelHeightField()); |
251 |
} |
252 |
|
253 |
boolean bWithRotationText = false; |
254 |
|
255 |
if (l.getLabelRotationField() != null) { |
256 |
bWithRotationText = true;
|
257 |
idFieldRotationText = ds.getFieldIndexByName(l.getLabelRotationField()); |
258 |
} |
259 |
|
260 |
for (int i = 0; i < sc; i++) { |
261 |
Value val = ds.getFieldValue(i, fieldId); |
262 |
|
263 |
if ((val instanceof NullValue) || (val == null)) { |
264 |
continue;
|
265 |
} |
266 |
|
267 |
IGeometry geom = adapter.getShape(i); |
268 |
|
269 |
if (geom == null) { |
270 |
continue;
|
271 |
} |
272 |
|
273 |
FSymbol symbol = l.getSymbol(i); |
274 |
|
275 |
// TODO: El m?todo contenedor (createLabelLayer) debe recoger
|
276 |
// los par?metros de posicionamiento y de allowDuplicates
|
277 |
// if (i >= 328)
|
278 |
// System.out.println("i= " + i + " " + val.toString());
|
279 |
FLabel[] lbls = geom.createLabels(0, true); |
280 |
|
281 |
for (int j = 0; j < lbls.length; j++) { |
282 |
if (lbls[j] != null) { |
283 |
lbls[j].setString(val.toString()); |
284 |
|
285 |
if (bWithHeightText) {
|
286 |
FloatValue height = (FloatValue) ds.getFieldValue(i, |
287 |
idFieldHeightText); |
288 |
lbls[j].setHeight(height.getValue()); |
289 |
} else {
|
290 |
lbls[j].setHeight(symbol.getFontSize()); |
291 |
} |
292 |
|
293 |
if (bWithRotationText) {
|
294 |
DoubleValue rotation = (DoubleValue) ds.getFieldValue(i, |
295 |
idFieldRotationText); |
296 |
lbls[j].setRotation(rotation.getValue()); |
297 |
} |
298 |
labels.add(lbls[j]); |
299 |
} |
300 |
|
301 |
|
302 |
} |
303 |
} |
304 |
|
305 |
long t2 = System.currentTimeMillis(); |
306 |
logger.debug("adapter.stop()");
|
307 |
ds.stop(); |
308 |
adapter.stop(); |
309 |
} catch (DriverIOException e) {
|
310 |
e.printStackTrace(); |
311 |
} catch (DriverException e) {
|
312 |
e.printStackTrace(); |
313 |
} catch (com.hardcode.gdbms.engine.data.DriverException e) {
|
314 |
// TODO Auto-generated catch block
|
315 |
e.printStackTrace(); |
316 |
} catch (FieldNotFoundException e) {
|
317 |
// TODO Auto-generated catch block
|
318 |
e.printStackTrace(); |
319 |
} |
320 |
|
321 |
FLyrText layerText = new FLyrText(labels);
|
322 |
|
323 |
try {
|
324 |
layerText.setLegend((VectorialLegend) getLegend()); |
325 |
} catch (FieldNotFoundException e1) {
|
326 |
// TODO Auto-generated catch block
|
327 |
e1.printStackTrace(); |
328 |
} catch (DriverException e1) {
|
329 |
// TODO Auto-generated catch block
|
330 |
e1.printStackTrace(); |
331 |
} |
332 |
|
333 |
setLayerText(layerText); |
334 |
|
335 |
return layerText;
|
336 |
} |
337 |
|
338 |
/**
|
339 |
* @see com.iver.cit.gvsig.fmap.layers.VectorialOperations#removeLabels()
|
340 |
*/
|
341 |
public void removeLabels() { |
342 |
setLayerText(null);
|
343 |
} |
344 |
|
345 |
/**
|
346 |
* @see com.iver.cit.gvsig.fmap.layers.VectorialOperations#createIndex()
|
347 |
*/
|
348 |
public void createIndex() { |
349 |
} |
350 |
|
351 |
/**
|
352 |
* @see com.iver.cit.gvsig.fmap.layers.VectorialOperations#process(com.iver.cit.gvsig.fmap.operations.strategies.FeatureVisitor,
|
353 |
* com.iver.cit.gvsig.fmap.operations.selection.VectorialSubSet)
|
354 |
*/
|
355 |
public void process(FeatureVisitor visitor, BitSet subset) |
356 |
throws DriverException, VisitException {
|
357 |
Strategy s = StrategyManager.getStrategy(this);
|
358 |
s.process(visitor, subset); |
359 |
} |
360 |
|
361 |
/**
|
362 |
* @see com.iver.cit.gvsig.fmap.layers.layerOperations.VectorialData#process(com.iver.cit.gvsig.fmap.operations.strategies.FeatureVisitor)
|
363 |
*/
|
364 |
public void process(FeatureVisitor visitor) |
365 |
throws DriverException, VisitException {
|
366 |
Strategy s = StrategyManager.getStrategy(this);
|
367 |
s.process(visitor); |
368 |
} |
369 |
|
370 |
/**
|
371 |
* @see com.iver.cit.gvsig.fmap.layers.CommonOperations#setSelection(com.iver.cit.gvsig.fmap.operations.selection.VectorialSubSet)
|
372 |
*/
|
373 |
public void setSelection(FBitSet selection) { |
374 |
selectionSupport.setSelection(selection); |
375 |
fireSelectionEvents(); |
376 |
} |
377 |
|
378 |
/**
|
379 |
* @see com.iver.cit.gvsig.fmap.layers.CommonOperations#isSelected(int)
|
380 |
*/
|
381 |
public boolean isSelected(int index) { |
382 |
return selectionSupport.isSelected(index);
|
383 |
} |
384 |
|
385 |
/**
|
386 |
* @see com.iver.cit.gvsig.fmap.layers.CommonOperations#getSelection()
|
387 |
*/
|
388 |
public FBitSet getSelection() {
|
389 |
return selectionSupport.getSelection();
|
390 |
} |
391 |
|
392 |
/**
|
393 |
* @see com.iver.cit.gvsig.fmap.layers.CommonOperations#clearSelection()
|
394 |
*/
|
395 |
public void clearSelection() { |
396 |
selectionSupport.clearSelection(); |
397 |
} |
398 |
|
399 |
/**
|
400 |
* @see com.iver.cit.gvsig.fmap.layers.CommonOperations#queryByRect(java.awt.geom.Rectangle2D)
|
401 |
*/
|
402 |
public BitSet queryByRect(Rectangle2D rect) throws DriverException { |
403 |
Strategy s = StrategyManager.getStrategy(this);
|
404 |
|
405 |
return s.queryByRect(rect);
|
406 |
} |
407 |
|
408 |
/**
|
409 |
* @see com.iver.cit.gvsig.fmap.layers.CommonOperations#getRecordset()
|
410 |
*/
|
411 |
public SelectableDataSource getRecordset() throws DriverException { |
412 |
if (sds == null) { |
413 |
//Nombre en el GDBMS de la tabla
|
414 |
String name = this.toString(); |
415 |
|
416 |
try {
|
417 |
DataSource ds = source.getRecordset(name);
|
418 |
|
419 |
if (ds == null) { |
420 |
return null; |
421 |
} |
422 |
|
423 |
sds = new SelectableDataSource(ds);
|
424 |
sds.setSelectionSupport(selectionSupport); |
425 |
} catch (DriverLoadException e) {
|
426 |
throw new DriverException(e); |
427 |
} |
428 |
} |
429 |
|
430 |
return sds;
|
431 |
} |
432 |
|
433 |
/**
|
434 |
* @see com.iver.cit.gvsig.fmap.layers.CommonOperations#setLegend(int,
|
435 |
* com.iver.cit.gvsig.fmap.rendering.Legend)
|
436 |
*/
|
437 |
public void setLegend(VectorialLegend r) |
438 |
throws DriverException, FieldNotFoundException {
|
439 |
VectorialLegend oldLegend = legend; |
440 |
legend = r; |
441 |
|
442 |
try {
|
443 |
legend.setDataSource(getRecordset()); |
444 |
|
445 |
if (legend.getLabelField() != null) { |
446 |
sds.start(); |
447 |
int idLabelField = getRecordset().getFieldIndexByName(legend.getLabelField());
|
448 |
createLabelLayer(idLabelField); |
449 |
sds.stop(); |
450 |
} |
451 |
else
|
452 |
removeLabels(); |
453 |
} catch (DriverException e) {
|
454 |
throw new DriverException(e); |
455 |
} catch (FieldNotFoundException e) {
|
456 |
// TODO Auto-generated catch block
|
457 |
e.printStackTrace(); |
458 |
} catch (com.hardcode.gdbms.engine.data.DriverException e) {
|
459 |
throw new DriverException(e); |
460 |
} |
461 |
|
462 |
LegendChangedEvent e = LegendChangedEvent.createLegendChangedEvent(oldLegend, legend); |
463 |
callLegendChanged(e); |
464 |
} |
465 |
|
466 |
/**
|
467 |
* Devuelve la Leyenda de la capa.
|
468 |
*
|
469 |
* @return Leyenda.
|
470 |
*/
|
471 |
public Legend getLegend() {
|
472 |
return legend;
|
473 |
} |
474 |
|
475 |
/**
|
476 |
* Devuelve el tipo de shape que contiene la capa.
|
477 |
*
|
478 |
* @return tipo de shape.
|
479 |
*
|
480 |
* @throws DriverException
|
481 |
*/
|
482 |
public int getShapeType() throws DriverException { |
483 |
if (typeShape == -1) { |
484 |
try {
|
485 |
logger.debug("source.start()");
|
486 |
source.start(); |
487 |
typeShape = source.getShapeType(); |
488 |
logger.debug("source.stop()");
|
489 |
source.stop(); |
490 |
} catch (DriverIOException e) {
|
491 |
throw new DriverException(e); |
492 |
} |
493 |
} |
494 |
|
495 |
return typeShape;
|
496 |
} |
497 |
|
498 |
/**
|
499 |
* @see com.iver.cit.gvsig.fmap.layers.FLayer#getProperties()
|
500 |
*/
|
501 |
public XMLEntity getXMLEntity() {
|
502 |
XMLEntity xml = super.getXMLEntity();
|
503 |
xml.addChild(legend.getXMLEntity()); |
504 |
xml.addChild(selectionSupport.getXMLEntity()); |
505 |
|
506 |
if (source instanceof VectorialFileAdapter) { |
507 |
xml.putProperty("file", ((VectorialFileAdapter) source).getFile());
|
508 |
} else if (source instanceof VectorialDBAdapter) { |
509 |
} else if (source instanceof WFSAdapter) { |
510 |
} |
511 |
|
512 |
xml.putProperty("driverName", getSource().getDriver().getName());
|
513 |
|
514 |
return xml;
|
515 |
} |
516 |
|
517 |
/**
|
518 |
* @see com.iver.cit.gvsig.fmap.layers.FLyrDefault#setXMLEntity(com.iver.utiles.XMLEntity)
|
519 |
*/
|
520 |
public void setXMLEntity(XMLEntity xml) |
521 |
throws XMLException {
|
522 |
|
523 |
super.setXMLEntity(xml);
|
524 |
legend = LegendFactory.createFromXML(xml.getChild(0));
|
525 |
|
526 |
try {
|
527 |
// legend.setDataSource(getRecordset());
|
528 |
setLegend(legend); |
529 |
} catch (FieldNotFoundException e) {
|
530 |
throw new XMLException(e); |
531 |
} catch (DriverException e) {
|
532 |
throw new XMLException(e); |
533 |
} |
534 |
|
535 |
selectionSupport.setXMLEntity(xml.getChild(1));
|
536 |
} |
537 |
|
538 |
/**
|
539 |
* A?ade un LegendListener a la lista de Listeners.
|
540 |
*
|
541 |
* @param listener LegendListener.
|
542 |
*/
|
543 |
public void addLegendListener(LegendListener listener) { |
544 |
layerChangeSupport.addLayerListener(listener); |
545 |
} |
546 |
|
547 |
/**
|
548 |
* Llamada al m?todo callLegendChanged de los listener.
|
549 |
*
|
550 |
* @param e Evento.
|
551 |
*/
|
552 |
private void callLegendChanged(LegendChangedEvent e) { |
553 |
layerChangeSupport.callLegendChanged(e); |
554 |
} |
555 |
|
556 |
/**
|
557 |
* Borra un LegendListener de la lista de Listeners
|
558 |
*
|
559 |
* @param listener LegendListener.
|
560 |
*/
|
561 |
public void removeLegendListener(LegendListener listener) { |
562 |
layerChangeSupport.removeLayerListener(listener); |
563 |
} |
564 |
|
565 |
/**
|
566 |
* @see com.iver.cit.gvsig.fmap.layers.CommonOperations#changeRecordsetName()
|
567 |
*/
|
568 |
public void changeRecordsetName(String newName) throws DriverException { |
569 |
source.changeRecordsetName(newName); |
570 |
} |
571 |
|
572 |
/**
|
573 |
* Sobreimplementaci?n del m?todo toString para que las bases de datos
|
574 |
* identifiquen la capa.
|
575 |
*
|
576 |
* @return DOCUMENT ME!
|
577 |
*/
|
578 |
public String toString() { |
579 |
/*
|
580 |
* Se usa internamente para que la parte de datos
|
581 |
* identifique de forma un?voca las tablas
|
582 |
*/
|
583 |
String ret = super.toString(); |
584 |
|
585 |
return "layer" + ret.substring(ret.indexOf('@') + 1); |
586 |
} |
587 |
} |