svn-gvsig-desktop / trunk / org.gvsig.desktop / org.gvsig.desktop.library / org.gvsig.exportto / org.gvsig.exportto.swing / org.gvsig.exportto.swing.prov / org.gvsig.exportto.swing.prov.dbf / src / main / java / org / gvsig / export / dbf / service / ExportDBFParametersImpl.java @ 44386
History | View | Annotate | Download (1.47 KB)
1 |
package org.gvsig.export.dbf.service; |
---|---|
2 |
|
3 |
import java.io.File; |
4 |
import org.apache.commons.io.FilenameUtils; |
5 |
import org.gvsig.export.ExportLocator; |
6 |
import org.gvsig.export.spi.AbstractExportParameters; |
7 |
import org.gvsig.export.spi.AttributeNamesTranslator; |
8 |
import org.gvsig.export.spi.CutAttributeNamesTranslator; |
9 |
import org.gvsig.fmap.dal.feature.FeatureType; |
10 |
|
11 |
/**
|
12 |
*
|
13 |
* @author jjdelcerro
|
14 |
*/
|
15 |
public class ExportDBFParametersImpl |
16 |
extends AbstractExportParameters
|
17 |
implements ExportDBFParameters {
|
18 |
|
19 |
private String encoding; |
20 |
private File file; |
21 |
|
22 |
public ExportDBFParametersImpl(ExportDBFServiceFactory factory) {
|
23 |
super(factory);
|
24 |
AttributeNamesTranslator attr = new CutAttributeNamesTranslator(ExportDBFService.MAX_FIELD_NAME_LENGTH);
|
25 |
this.exportAttributes.setNamesTranslator(attr);
|
26 |
} |
27 |
|
28 |
@Override
|
29 |
public String getServiceName() { |
30 |
return ExportDBFServiceFactory.SERVICE_NAME;
|
31 |
} |
32 |
|
33 |
@Override
|
34 |
public String getEncoding() { |
35 |
return this.encoding; |
36 |
} |
37 |
|
38 |
@Override
|
39 |
public void setEncoding(String encoding) { |
40 |
this.encoding = encoding;
|
41 |
} |
42 |
|
43 |
@Override
|
44 |
public File getFile() { |
45 |
return this.file; |
46 |
} |
47 |
|
48 |
@Override
|
49 |
public void setFile(File file) { |
50 |
this.file = new File(FilenameUtils.removeExtension(file.getAbsolutePath()) + ".dbf"); |
51 |
} |
52 |
|
53 |
@Override
|
54 |
public void setSourceFeatureType(FeatureType sourceFeatureType) { |
55 |
super.setSourceFeatureType(sourceFeatureType);
|
56 |
|
57 |
} |
58 |
|
59 |
} |