Revision 41055
trunk/org.gvsig.desktop/org.gvsig.desktop.library/org.gvsig.symbology/org.gvsig.symbology.lib/org.gvsig.symbology.lib.impl/src/main/java/org/gvsig/symbology/fmap/mapcontext/rendering/legend/impl/SingleSymbolLegend.java | ||
---|---|---|
167 | 167 |
throws PersistenceException { |
168 | 168 |
// Set parent properties |
169 | 169 |
super.loadFromState(state); |
170 |
LOG.warn("FIXME: SingleSymbolLegend.loadFromState"); |
|
170 |
// LOG.warn("FIXME: SingleSymbolLegend.loadFromState");
|
|
171 | 171 |
} |
172 | 172 |
|
173 | 173 |
public void saveToState(PersistentState state) throws PersistenceException { |
174 | 174 |
// Save parent properties |
175 | 175 |
super.saveToState(state); |
176 |
LOG.warn("FIXME: SingleSymbolLegend.saveToState"); |
|
176 |
// LOG.warn("FIXME: SingleSymbolLegend.saveToState");
|
|
177 | 177 |
} |
178 | 178 |
|
179 | 179 |
public static class RegisterPersistence implements Callable { |
trunk/org.gvsig.desktop/org.gvsig.desktop.library/org.gvsig.symbology/org.gvsig.symbology.lib/org.gvsig.symbology.lib.impl/src/main/java/org/gvsig/symbology/fmap/mapcontext/rendering/legend/driver/impl/PersistenceBasedLegendReader.java | ||
---|---|---|
28 | 28 |
import java.io.IOException; |
29 | 29 |
import java.io.InputStream; |
30 | 30 |
|
31 |
import org.gvsig.fmap.geom.Geometry; |
|
32 |
import org.gvsig.fmap.geom.GeometryLocator; |
|
33 |
import org.gvsig.fmap.geom.type.GeometryType; |
|
34 |
import org.gvsig.fmap.geom.type.GeometryTypeNotSupportedException; |
|
35 |
import org.gvsig.fmap.geom.type.GeometryTypeNotValidException; |
|
31 | 36 |
import org.gvsig.fmap.mapcontext.exceptions.IncompatibleLegendReadException; |
32 | 37 |
import org.gvsig.fmap.mapcontext.exceptions.ReadLegendException; |
33 | 38 |
import org.gvsig.fmap.mapcontext.rendering.legend.ILegend; |
34 | 39 |
import org.gvsig.fmap.mapcontext.rendering.legend.IVectorLegend; |
35 | 40 |
import org.gvsig.fmap.mapcontext.rendering.legend.driver.ILegendReader; |
36 | 41 |
import org.gvsig.tools.ToolsLocator; |
42 |
import org.gvsig.tools.locator.LocatorException; |
|
37 | 43 |
import org.gvsig.tools.persistence.PersistenceManager; |
38 | 44 |
|
39 | 45 |
|
... | ... | |
61 | 67 |
|
62 | 68 |
if (resp instanceof IVectorLegend) { |
63 | 69 |
IVectorLegend vleg = (IVectorLegend) resp; |
64 |
if (vleg.getShapeType() != geometryType) { |
|
70 |
|
|
71 |
GeometryType foundgt = null; |
|
72 |
try { |
|
73 |
foundgt = GeometryLocator.getGeometryManager().getGeometryType( |
|
74 |
vleg.getShapeType(), Geometry.SUBTYPES.GEOM2D); |
|
75 |
} catch (Exception e) { |
|
65 | 76 |
throw new IncompatibleLegendReadException( |
77 |
inFile, geometryType, e); |
|
78 |
} |
|
79 |
|
|
80 |
if (geometryType != Geometry.TYPES.GEOMETRY && |
|
81 |
!foundgt.isTypeOf(geometryType)) { |
|
82 |
|
|
83 |
throw new IncompatibleLegendReadException( |
|
66 | 84 |
inFile, |
67 | 85 |
geometryType, |
68 | 86 |
new Exception("Geometry type found: " + vleg.getShapeType())); |
Also available in: Unified diff