root / branches / v2_0_0_prep / libraries / libFMap_dalfile / src / org / gvsig / fmap / dal / store / dxf / DXFStoreParameters.java @ 24498
History | View | Annotate | Download (1.81 KB)
1 | 24498 | jmvivo | package org.gvsig.fmap.dal.store.dxf; |
---|---|---|---|
2 | 23894 | jjdelcerro | |
3 | 24498 | jmvivo | import org.gvsig.fmap.dal.DataStoreParameters; |
4 | import org.gvsig.fmap.dal.DataTypes; |
||
5 | 23894 | jjdelcerro | |
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 | 24250 | jjdelcerro | this.addAttributeAlias("file", "filename"); |
18 | 23894 | jjdelcerro | return this; |
19 | } |
||
20 | |||
21 | public String getDataStoreName() { |
||
22 | 24167 | jmvivo | return DXFStoreProvider.NAME;
|
23 | 23894 | jjdelcerro | } |
24 | |||
25 | public String getDescription() { |
||
26 | 24167 | jmvivo | return DXFStoreProvider.DESCRIPTION;
|
27 | 23894 | jjdelcerro | } |
28 | |||
29 | public String getSRSID() { |
||
30 | 24250 | jjdelcerro | return (String) getAttribute("srsid"); |
31 | 23894 | jjdelcerro | } |
32 | |||
33 | public void setSRSID(String srsid) { |
||
34 | 24250 | jjdelcerro | setAttribute("srsid", srsid);
|
35 | 23894 | jjdelcerro | } |
36 | |||
37 | public String getFileName() { |
||
38 | 24250 | jjdelcerro | return (String) getAttribute("file"); |
39 | 23894 | jjdelcerro | } |
40 | |||
41 | public void setFileName(String file) { |
||
42 | 24250 | jjdelcerro | setAttribute("file", file);
|
43 | 23894 | jjdelcerro | } |
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 | 24167 | jmvivo | // 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 | 23912 | jmvivo | |
72 | 23894 | jjdelcerro | |
73 | 23912 | jmvivo | // public DataParameters getCopy() throws DataException {
|
74 | // DXFStoreParameters copy = new DXFStoreParameters();
|
||
75 | // this.copyValuesTo(copy);
|
||
76 | // return copy;
|
||
77 | // }
|
||
78 | |||
79 | 23894 | jjdelcerro | } |