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