root / org.gvsig.gpe / library / trunk / org.gvsig.gpe / org.gvsig.gpe.exportto / org.gvsig.gpe.exportto.kml / src / main / java / org / gvsig / gpe / exportto / kml / service / ExportKMLParametersImpl.java @ 1132
History | View | Annotate | Download (1.8 KB)
1 | 874 | omartinez | package org.gvsig.gpe.exportto.kml.service; |
---|---|---|---|
2 | |||
3 | import java.io.File; |
||
4 | import org.apache.commons.io.FilenameUtils; |
||
5 | 950 | omartinez | import org.cresques.cts.IProjection; |
6 | 1103 | omartinez | import org.gvsig.export.spi.AbstractExportParametersGeometryFile; |
7 | 950 | omartinez | import org.gvsig.export.spi.ExportServiceFactory; |
8 | import org.gvsig.fmap.crs.CRSFactory; |
||
9 | 874 | omartinez | |
10 | /**
|
||
11 | *
|
||
12 | * @author osc
|
||
13 | */
|
||
14 | public class ExportKMLParametersImpl |
||
15 | 1103 | omartinez | extends AbstractExportParametersGeometryFile
|
16 | 874 | omartinez | implements ExportKMLParameters
|
17 | { |
||
18 | private String mimeType = null; |
||
19 | private boolean useLabels = false; |
||
20 | private boolean attsAsBalloon = false; |
||
21 | |||
22 | private File file; |
||
23 | |||
24 | 950 | omartinez | public ExportKMLParametersImpl(ExportServiceFactory factory) {
|
25 | super(factory);
|
||
26 | IProjection targetproj = CRSFactory.getCRS("EPSG:4326");
|
||
27 | this.setTargetProjection(targetproj);
|
||
28 | this.getExportAttributes().setActive(true); |
||
29 | 1132 | omartinez | this.fileHelper.setFileExtension(".kml"); |
30 | 950 | omartinez | } |
31 | |||
32 | 874 | omartinez | @Override
|
33 | public String getServiceName() { |
||
34 | return ExportKMLServiceFactory.SERVICE_NAME;
|
||
35 | } |
||
36 | |||
37 | @Override
|
||
38 | public String getMimeType() { |
||
39 | return this.mimeType; |
||
40 | } |
||
41 | |||
42 | @Override
|
||
43 | public boolean getUseLabels() { |
||
44 | return this.useLabels; |
||
45 | } |
||
46 | |||
47 | @Override
|
||
48 | public boolean getAttsAsBalloon() { |
||
49 | return this.attsAsBalloon; |
||
50 | } |
||
51 | |||
52 | 1103 | omartinez | // @Override
|
53 | // public File getFile() {
|
||
54 | // return this.file;
|
||
55 | // }
|
||
56 | //
|
||
57 | // @Override
|
||
58 | // public void setFile(File file) {
|
||
59 | // this.file = new File(FilenameUtils.removeExtension(file.getAbsolutePath()) + ".kml");
|
||
60 | // }
|
||
61 | 874 | omartinez | |
62 | @Override
|
||
63 | public void setUseLabels(boolean value) { |
||
64 | this.useLabels = value;
|
||
65 | } |
||
66 | |||
67 | @Override
|
||
68 | public void setAttsAsBalloon(boolean value) { |
||
69 | this.attsAsBalloon = value;
|
||
70 | } |
||
71 | |||
72 | @Override
|
||
73 | public void setMimeType(String value) { |
||
74 | this.mimeType = value;
|
||
75 | } |
||
76 | } |