svn-gvsig-desktop / branches / v2_0_0_prep / libraries / libFMap_dataFile / src / org / gvsig / fmap / data / store / dbf / DBFStoreParameters.java @ 24250
History | View | Annotate | Download (1.73 KB)
1 |
package org.gvsig.fmap.data.store.dbf; |
---|---|
2 |
|
3 |
import java.io.File; |
4 |
|
5 |
import org.gvsig.fmap.data.DataStoreParameters; |
6 |
import org.gvsig.fmap.data.DataTypes; |
7 |
import org.gvsig.tools.exception.NotYetImplemented; |
8 |
import org.gvsig.tools.persistence.PersistenceException; |
9 |
import org.gvsig.tools.persistence.PersistentState; |
10 |
|
11 |
public class DBFStoreParameters extends DataStoreParameters { |
12 |
|
13 |
|
14 |
public DBFStoreParameters() {
|
15 |
super();
|
16 |
initialize(); |
17 |
} |
18 |
|
19 |
public DataStoreParameters initialize() {
|
20 |
this.addParameter("dbfFile", DataTypes.STRING, "Ruta al fichero dbf", |
21 |
null);
|
22 |
this.addAttributeAlias("dbfFile", "filename"); |
23 |
this.addAttributeAlias("dbfFile", "file"); |
24 |
return this; |
25 |
} |
26 |
|
27 |
public String getDataStoreName() { |
28 |
return DBFStoreProvider.NAME;
|
29 |
} |
30 |
|
31 |
public boolean isValid() { |
32 |
return (this.getDBFFile() != null); |
33 |
} |
34 |
|
35 |
public String getFile() { |
36 |
return this.getDBFFile(); |
37 |
} |
38 |
|
39 |
public void setFile(File aFile) { |
40 |
this.setDBFFile(aFile);
|
41 |
} |
42 |
|
43 |
public void setFile(String aFileName) { |
44 |
this.setDBFFile(aFileName);
|
45 |
} |
46 |
|
47 |
protected String getDBFFile() { |
48 |
return (String) this.getAttribute("dbfFile"); |
49 |
} |
50 |
|
51 |
protected void setDBFFile(File aFile) { |
52 |
this.setAttribute("dbfFile", aFile.getPath()); |
53 |
} |
54 |
|
55 |
protected void setDBFFile(String aFileName) { |
56 |
this.setAttribute("dbfFile", aFileName); |
57 |
} |
58 |
|
59 |
public String getDescription() { |
60 |
return DBFStoreProvider.DESCRIPTION;
|
61 |
} |
62 |
|
63 |
public void getState(PersistentState arg0) throws PersistenceException { |
64 |
// TODO Auto-generated method stub
|
65 |
throw new NotYetImplemented(); |
66 |
} |
67 |
|
68 |
public void setState(PersistentState state) throws PersistenceException { |
69 |
// TODO Auto-generated method stub
|
70 |
super.setState(state);
|
71 |
throw new NotYetImplemented(); |
72 |
} |
73 |
|
74 |
|
75 |
|
76 |
} |