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