Revision 30038
branches/v2_0_0_prep/libraries/libFMap_mapcontext/src/org/gvsig/fmap/mapcontext/layers/vectorial/FLayerFileVectorial.java | ||
---|---|---|
8 | 8 |
import org.gvsig.fmap.dal.DALLocator; |
9 | 9 |
import org.gvsig.fmap.dal.exception.ReadException; |
10 | 10 |
import org.gvsig.fmap.dal.feature.FeatureStore; |
11 |
import org.gvsig.fmap.mapcontext.MapContextException; |
|
12 | 11 |
import org.gvsig.fmap.mapcontext.MapContextLocator; |
13 | 12 |
import org.gvsig.fmap.mapcontext.exceptions.DriverLayerException; |
14 | 13 |
import org.gvsig.fmap.mapcontext.exceptions.FileLayerException; |
... | ... | |
21 | 20 |
import org.gvsig.fmap.mapcontext.rendering.legend.IVectorLegend; |
22 | 21 |
import org.gvsig.fmap.mapcontext.rendering.legend.styling.ILabelingStrategy; |
23 | 22 |
import org.gvsig.tools.dynobject.exception.DynMethodException; |
24 |
import org.gvsig.tools.exception.BaseException; |
|
25 |
import org.gvsig.tools.locator.LocatorException; |
|
26 | 23 |
import org.gvsig.utils.XMLEntity; |
27 | 24 |
import org.gvsig.utils.XMLException; |
28 | 25 |
|
... | ... | |
126 | 123 |
this.setAvailable(false); |
127 | 124 |
throw new DriverLayerException(getName(),null); |
128 | 125 |
} |
129 |
} catch (ReadException e2) { |
|
130 |
throw new LoadLayerException(getName(),e2); |
|
131 | 126 |
} catch (DriverLayerException e2) { |
132 | 127 |
throw new LoadLayerException(getName(),e2); |
133 | 128 |
} |
... | ... | |
158 | 153 |
if (this.getLegend() == null) { |
159 | 154 |
// this.getFeatureStore().getMetadata(). |
160 | 155 |
Object obj=null; |
161 |
try { |
|
162 |
// FIXME arreglar esto |
|
163 |
obj = this.getFeatureStore().getDynValue( |
|
164 |
"WithDefaultLegend"); |
|
165 |
} catch (BaseException e1) { |
|
166 |
throw new ReadException(getName(), e1); |
|
167 |
} |
|
156 |
// FIXME arreglar esto |
|
157 |
obj = this.getFeatureStore().getDynValue( |
|
158 |
"WithDefaultLegend"); |
|
168 | 159 |
if (obj!=null && ((Boolean)obj).booleanValue()) { |
169 | 160 |
ILegend legend = null; |
170 | 161 |
try { |
branches/v2_0_0_prep/libraries/libFMap_mapcontext/src/org/gvsig/fmap/mapcontext/layers/vectorial/FLyrVect.java | ||
---|---|---|
75 | 75 |
import org.gvsig.fmap.geom.type.GeometryType; |
76 | 76 |
import org.gvsig.fmap.geom.type.GeometryTypeNotSupportedException; |
77 | 77 |
import org.gvsig.fmap.geom.type.GeometryTypeNotValidException; |
78 |
import org.gvsig.fmap.mapcontext.MapContextException; |
|
79 | 78 |
import org.gvsig.fmap.mapcontext.MapContextLocator; |
80 | 79 |
import org.gvsig.fmap.mapcontext.ViewPort; |
81 | 80 |
import org.gvsig.fmap.mapcontext.exceptions.LegendLayerException; |
... | ... | |
588 | 587 |
PersistentState stateFeatureStore=manager.getState(getFeatureStore()); |
589 | 588 |
stateFeatureStore.set("tagName","featureStore"); |
590 | 589 |
// xml.addChild(((XMLEntityState)stateFeatureStore).getXMLEntity()); |
591 |
} catch (ReadException e) { |
|
592 |
throw new XMLLayerException(getName(),e); |
|
593 | 590 |
} catch (PersistenceException e) { |
594 | 591 |
throw new XMLLayerException(getName(),e); |
595 | 592 |
} catch (PersistenceValidateExceptions e) { |
... | ... | |
963 | 960 |
} |
964 | 961 |
|
965 | 962 |
public boolean isWritable() { |
966 |
try { |
|
967 |
return getFeatureStore().allowWrite(); |
|
968 |
} catch (ReadException e) { |
|
969 |
e.printStackTrace(); |
|
970 |
} |
|
971 |
return false; |
|
963 |
return getFeatureStore().allowWrite(); |
|
972 | 964 |
} |
973 | 965 |
|
974 | 966 |
public FLayer cloneLayer() throws Exception { |
... | ... | |
1117 | 1109 |
super.load(); |
1118 | 1110 |
} |
1119 | 1111 |
|
1120 |
public FeatureStore getFeatureStore() throws ReadException {
|
|
1112 |
public FeatureStore getFeatureStore() { |
|
1121 | 1113 |
return (FeatureStore)getDataStore(); |
1122 | 1114 |
} |
1123 | 1115 |
|
branches/v2_0_0_prep/libraries/libFMap_mapcontext/src/org/gvsig/fmap/mapcontext/layers/vectorial/VectorLayer.java | ||
---|---|---|
1 | 1 |
package org.gvsig.fmap.mapcontext.layers.vectorial; |
2 | 2 |
|
3 |
import org.gvsig.fmap.dal.feature.FeatureStore; |
|
3 | 4 |
import org.gvsig.fmap.mapcontext.layers.operations.ClassifiableVectorial; |
4 | 5 |
import org.gvsig.fmap.mapcontext.layers.operations.InfoByPoint; |
5 | 6 |
import org.gvsig.fmap.mapcontext.layers.operations.SingleLayer; |
... | ... | |
8 | 9 |
public interface VectorLayer extends SingleLayer, ILabelable, InfoByPoint, |
9 | 10 |
ClassifiableVectorial { |
10 | 11 |
|
12 |
FeatureStore getFeatureStore(); |
|
11 | 13 |
} |
branches/v2_0_0_prep/libraries/libFMap_mapcontext/src/org/gvsig/fmap/mapcontext/layers/vectorial/FLayerVectorialDB.java | ||
---|---|---|
46 | 46 |
import org.gvsig.fmap.crs.CRSFactory; |
47 | 47 |
import org.gvsig.fmap.dal.DataStore; |
48 | 48 |
import org.gvsig.fmap.dal.exception.ReadException; |
49 |
import org.gvsig.fmap.mapcontext.MapContextException; |
|
50 | 49 |
import org.gvsig.fmap.mapcontext.MapContextLocator; |
51 | 50 |
import org.gvsig.fmap.mapcontext.exceptions.DriverLayerException; |
52 | 51 |
import org.gvsig.fmap.mapcontext.exceptions.LegendLayerException; |
... | ... | |
59 | 58 |
import org.gvsig.tools.dynobject.exception.DynFieldNotFoundException; |
60 | 59 |
import org.gvsig.tools.dynobject.exception.DynMethodException; |
61 | 60 |
import org.gvsig.tools.dynobject.exception.DynMethodNotSupportedException; |
62 |
import org.gvsig.tools.exception.BaseException; |
|
63 |
import org.gvsig.tools.locator.LocatorException; |
|
64 | 61 |
import org.gvsig.utils.XMLEntity; |
65 | 62 |
import org.gvsig.utils.XMLException; |
66 | 63 |
|
... | ... | |
96 | 93 |
this.setAvailable(false); |
97 | 94 |
throw new NameLayerException(this.getName(),null); |
98 | 95 |
} |
99 |
try { |
|
100 |
if (this.getFeatureStore() == null) { |
|
101 |
this.setAvailable(false); |
|
102 |
//TODO: traducir??? |
|
103 |
throw new DriverLayerException(this.getName(),null); |
|
104 |
} |
|
105 |
} catch (ReadException e1) { |
|
106 |
throw new LoadLayerException(getName(),e1); |
|
96 |
if (this.getFeatureStore() == null) { |
|
97 |
this.setAvailable(false); |
|
98 |
//TODO: traducir??? |
|
99 |
throw new DriverLayerException(this.getName(),null); |
|
107 | 100 |
} |
108 | 101 |
if (this.getProjection() == null) { |
109 | 102 |
this.setAvailable(false); |
... | ... | |
160 | 153 |
if (this.getLegend() == null) { |
161 | 154 |
// this.getFeatureStore().getMetadata(). |
162 | 155 |
Object obj=null; |
163 |
try { |
|
164 | 156 |
// // FIXME arraglar esto |
165 |
obj = this.getFeatureStore().getDynValue( |
|
166 |
"WithDefaultLegend"); |
|
167 |
} catch (BaseException e1) { |
|
168 |
throw new ReadException(getName(), e1); |
|
169 |
} |
|
157 |
obj = this.getFeatureStore().getDynValue( |
|
158 |
"WithDefaultLegend"); |
|
170 | 159 |
if (obj!=null && ((Boolean)obj).booleanValue()) { |
171 | 160 |
ILegend legend = null; |
172 | 161 |
try { |
... | ... | |
188 | 177 |
this.setLegend(legend); |
189 | 178 |
} |
190 | 179 |
obj = null; |
191 |
try { |
|
192 |
// FIXME Arreglar esto |
|
193 |
obj = this.getFeatureStore().getDynValue("LabelingStrategy"); |
|
194 |
} catch (BaseException e) { |
|
195 |
throw new ReadException(getName(), e); |
|
196 |
} |
|
180 |
// FIXME Arreglar esto |
|
181 |
obj = this.getFeatureStore().getDynValue("LabelingStrategy"); |
|
197 | 182 |
if (obj!=null && ((Boolean)obj).booleanValue()){ |
198 | 183 |
ILabelingStrategy labeler=null; |
199 | 184 |
try { |
Also available in: Unified diff