svn-gvsig-desktop / trunk / libraries / libFMap_dataFile / src / org / gvsig / data / datastores / vectorial / file / shp / SHPStoreParameters.java @ 20660
History | View | Annotate | Download (1.26 KB)
1 |
package org.gvsig.data.datastores.vectorial.file.shp; |
---|---|
2 |
|
3 |
import java.io.File; |
4 |
|
5 |
import org.gvsig.data.datastores.vectorial.file.dbf.DBFStoreParameters; |
6 |
import org.gvsig.data.datastores.vectorial.file.shp.utils.SHP; |
7 |
public class SHPStoreParameters extends DBFStoreParameters { |
8 |
private File shpfile; |
9 |
private File shxfile; |
10 |
private String srs = null; |
11 |
|
12 |
public boolean isValid() { |
13 |
return super.isValid() && ( shpfile != null ) && (shxfile != null ); |
14 |
} |
15 |
public String getDataStoreName() { |
16 |
return SHPStore.DATASTORE_NAME;
|
17 |
} |
18 |
public File getFile() { |
19 |
return getSHPFile();
|
20 |
} |
21 |
|
22 |
public void setFile(File aFile) { |
23 |
this.setSHPFile(aFile);
|
24 |
} |
25 |
|
26 |
public void setSHPFile(File aFile){ |
27 |
shpfile=aFile; |
28 |
if (super.getDBFFile() == null){ |
29 |
this.setDBFFile(SHP.getDbfFile(this.shpfile)); |
30 |
} |
31 |
if (this.shxfile == null){ |
32 |
this.shxfile = SHP.getShxFile(this.shpfile); |
33 |
} |
34 |
} |
35 |
|
36 |
protected File getSHPFile(){ |
37 |
return this.shpfile; |
38 |
} |
39 |
|
40 |
protected File getSHXFile(){ |
41 |
return this.shxfile; |
42 |
} |
43 |
|
44 |
protected void setSHXFile(File file){ |
45 |
this.shxfile = file;
|
46 |
} |
47 |
/**
|
48 |
* @return the srs
|
49 |
*/
|
50 |
public String getSRS() { |
51 |
return srs;
|
52 |
} |
53 |
/**
|
54 |
* @param srs the srs to set
|
55 |
*/
|
56 |
public void setSRS(String srs) { |
57 |
this.srs = srs;
|
58 |
} |
59 |
|
60 |
|
61 |
} |