root / branches / v2_0_0_prep / libraries / libFMap_dataFile / src / org / gvsig / fmap / data / store / dxf / DXFStoreParameters.java @ 24250
History | View | Annotate | Download (1.81 KB)
1 |
package org.gvsig.fmap.data.store.dxf; |
---|---|
2 |
|
3 |
import org.gvsig.fmap.data.DataStoreParameters; |
4 |
import org.gvsig.fmap.data.DataTypes; |
5 |
|
6 |
public class DXFStoreParameters extends DataStoreParameters { |
7 |
|
8 |
public DXFStoreParameters() {
|
9 |
super();
|
10 |
initialize(); |
11 |
} |
12 |
|
13 |
public DataStoreParameters initialize() {
|
14 |
this.addParameter("srsid", DataTypes.STRING, |
15 |
"SRS en el que se encuentra el fichero", "EPSG:23030"); |
16 |
this.addParameter("file", DataTypes.STRING, "ruta al fichero", null); |
17 |
this.addAttributeAlias("file", "filename"); |
18 |
return this; |
19 |
} |
20 |
|
21 |
public String getDataStoreName() { |
22 |
return DXFStoreProvider.NAME;
|
23 |
} |
24 |
|
25 |
public String getDescription() { |
26 |
return DXFStoreProvider.DESCRIPTION;
|
27 |
} |
28 |
|
29 |
public String getSRSID() { |
30 |
return (String) getAttribute("srsid"); |
31 |
} |
32 |
|
33 |
public void setSRSID(String srsid) { |
34 |
setAttribute("srsid", srsid);
|
35 |
} |
36 |
|
37 |
public String getFileName() { |
38 |
return (String) getAttribute("file"); |
39 |
} |
40 |
|
41 |
public void setFileName(String file) { |
42 |
setAttribute("file", file);
|
43 |
} |
44 |
|
45 |
public boolean isValid() { |
46 |
if (getSRSID() == null || getSRSID().equals("")) { |
47 |
return false; |
48 |
} |
49 |
if (getFileName() == null) { |
50 |
return false; |
51 |
} |
52 |
return true; |
53 |
} |
54 |
|
55 |
// public XMLEntity getXMLEntity() {
|
56 |
// XMLEntity xmlEntity = super.getXMLEntity();
|
57 |
// xmlEntity.putProperty("srsid", this.getSRSID());
|
58 |
// xmlEntity.putProperty("file", this.getFileName());
|
59 |
// return xmlEntity;
|
60 |
// }
|
61 |
//
|
62 |
// public void loadFromXMLEntity(XMLEntity xmlEntity)
|
63 |
// throws InitializeException {
|
64 |
// try {
|
65 |
// this.setSRSID(xmlEntity.getStringProperty("srsid"));
|
66 |
// this.setFileName(xmlEntity.getStringProperty("file"));
|
67 |
// } catch (NotExistInXMLEntity e) {
|
68 |
// throw new InitializeException(e);
|
69 |
// }
|
70 |
// }
|
71 |
|
72 |
|
73 |
// public DataParameters getCopy() throws DataException {
|
74 |
// DXFStoreParameters copy = new DXFStoreParameters();
|
75 |
// this.copyValuesTo(copy);
|
76 |
// return copy;
|
77 |
// }
|
78 |
|
79 |
} |