Revision 20626 trunk/libraries/libFMap_dataFile/src/org/gvsig/data/datastores/vectorial/file/dxf/DXFStore.java
DXFStore.java | ||
---|---|---|
90 | 90 |
protected final static int ID_FIELD_HEIGHTTEXT = 8; |
91 | 91 |
|
92 | 92 |
protected final static int ID_FIELD_ROTATIONTEXT = 9; |
93 |
private DriverAttributes attr = new DriverAttributes(); |
|
94 |
private DxfFile.EntityFactory featureMaker; |
|
95 |
private DxfFile.VarSettings headerManager; |
|
96 | 93 |
private DxfFile dxfFeatureFile; |
97 |
private IObjList.vector features; |
|
98 | 94 |
private AttrInTableLabelingStrategy labeling; |
99 | 95 |
|
100 | 96 |
private VectorialUniqueValueLegend defaultLegend; |
... | ... | |
334 | 330 |
return DATASTORE_NAME; |
335 | 331 |
} |
336 | 332 |
|
337 |
public void open() throws OpenException { |
|
338 |
this.observable.notifyObservers(this, |
|
339 |
new FeatureStoreNotification(this,FeatureStoreNotification.BEFORE_OPEN) |
|
340 |
); |
|
333 |
protected void doOpen() throws OpenException { |
|
341 | 334 |
float heightText = 10; |
342 | 335 |
|
343 |
attr.setLoadedInMemory(true); |
|
344 | 336 |
|
345 |
|
|
346 |
featureMaker = new DxfFeatureMaker(projection); |
|
347 |
headerManager = new DxfHeaderManager(); |
|
337 |
DxfFile.EntityFactory featureMaker = new DxfFeatureMaker(projection); |
|
338 |
DxfFile.VarSettings headerManager = new DxfHeaderManager(); |
|
348 | 339 |
dxfFeatureFile = new DxfFile(projection, dxfFile.getAbsolutePath(), |
349 | 340 |
featureMaker, headerManager); |
350 | 341 |
try { |
... | ... | |
352 | 343 |
} catch (Exception e1) { |
353 | 344 |
throw new OpenException(getName(),e1); |
354 | 345 |
} |
355 |
features = (IObjList.vector) ((DxfFeatureMaker) featureMaker) |
|
346 |
IObjList.vector features = (IObjList.vector) ((DxfFeatureMaker) featureMaker)
|
|
356 | 347 |
.getObjects(); |
357 | 348 |
String acadVersion = (String) ((DxfHeaderManager) headerManager) |
358 | 349 |
.getAcadVersion(); |
... | ... | |
940 | 931 |
// } // for |
941 | 932 |
|
942 | 933 |
|
943 |
this.observable.notifyObservers(this, |
|
944 |
new FeatureStoreNotification(this,FeatureStoreNotification.AFTER_OPEN) |
|
945 |
); |
|
946 |
|
|
947 | 934 |
} |
948 | 935 |
|
949 |
public void close() throws CloseException { |
|
950 |
this.observable.notifyObservers(this, |
|
951 |
new FeatureStoreNotification(this,FeatureStoreNotification.BEFORE_CLOSE) |
|
952 |
); |
|
953 |
super.close(); |
|
954 |
features.clear(); |
|
955 |
this.observable.notifyObservers(this, |
|
956 |
new FeatureStoreNotification(this,FeatureStoreNotification.AFTER_CLOSE) |
|
957 |
); |
|
958 |
|
|
936 |
protected void doClose() throws CloseException { |
|
937 |
super.doClose(); |
|
959 | 938 |
} |
960 | 939 |
|
961 |
public void dispose() throws CloseException { |
|
962 |
this.observable.notifyObservers(this, |
|
963 |
new FeatureStoreNotification(this,FeatureStoreNotification.BEFORE_DISPOSE) |
|
964 |
); |
|
940 |
protected void doDispose() throws CloseException { |
|
965 | 941 |
close(); |
966 |
this.observable.notifyObservers(this, |
|
967 |
new FeatureStoreNotification(this,FeatureStoreNotification.AFTER_DISPOSE) |
|
968 |
); |
|
942 |
super.doDispose(); |
|
969 | 943 |
} |
970 | 944 |
|
971 | 945 |
public boolean isEditable() { |
Also available in: Unified diff