Revision 44716 trunk/org.gvsig.desktop/org.gvsig.desktop.compat.cdc/org.gvsig.fmap.dal/org.gvsig.fmap.dal.impl/src/main/java/org/gvsig/fmap/dal/feature/impl/DefaultFeatureType.java
DefaultFeatureType.java | ||
---|---|---|
23 | 23 |
*/ |
24 | 24 |
package org.gvsig.fmap.dal.feature.impl; |
25 | 25 |
|
26 |
import java.io.File; |
|
26 | 27 |
import java.lang.ref.WeakReference; |
27 | 28 |
import java.util.ArrayList; |
28 | 29 |
import java.util.Arrays; |
... | ... | |
32 | 33 |
import java.util.Iterator; |
33 | 34 |
import java.util.LinkedHashSet; |
34 | 35 |
import java.util.List; |
36 |
import java.util.Objects; |
|
35 | 37 |
import java.util.Set; |
36 | 38 |
import java.util.function.Predicate; |
37 | 39 |
import java.util.zip.CRC32; |
38 |
import org.apache.commons.collections4.ListUtils; |
|
39 | 40 |
import org.apache.commons.lang3.ArrayUtils; |
40 | 41 |
import org.apache.commons.lang3.StringUtils; |
41 | 42 |
|
... | ... | |
68 | 69 |
import org.gvsig.tools.persistence.PersistentState; |
69 | 70 |
import org.gvsig.tools.persistence.exception.PersistenceException; |
70 | 71 |
|
72 |
@SuppressWarnings("UseSpecificCatch") |
|
71 | 73 |
public class DefaultFeatureType |
72 | 74 |
extends ArrayList<FeatureAttributeDescriptor> |
73 | 75 |
implements |
... | ... | |
1240 | 1242 |
} |
1241 | 1243 |
return true; |
1242 | 1244 |
} |
1245 |
|
|
1246 |
public void writeAsDALFile(File file) { |
|
1247 |
try { |
|
1248 |
DALFile dalFile = DALFile.getDALFile(); |
|
1249 |
dalFile.setFeatureType(this); |
|
1250 |
if( !dalFile.isEmpty() ) { |
|
1251 |
dalFile.write(file); |
|
1252 |
} |
|
1253 |
} catch (Exception ex) { |
|
1254 |
throw new RuntimeException("Can't write as DAL file ("+Objects.toString(file)+").", ex); |
|
1255 |
} |
|
1256 |
} |
|
1243 | 1257 |
} |
Also available in: Unified diff