Statistics
| Revision:

svn-gvsig-desktop / trunk / org.gvsig.desktop / org.gvsig.desktop.library / org.gvsig.exportto / org.gvsig.exportto.lib / org.gvsig.exportto.lib.impl / src / main / java / org / gvsig / export / impl / service / DefaultExportAttribute.java @ 44300

History | View | Annotate | Download (1.82 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.export.impl.service;
7

    
8
import org.gvsig.export.ExportAttributes;
9
import org.gvsig.export.spi.AttributeNamesTranslator;
10
import org.gvsig.fmap.dal.feature.FeatureAttributeDescriptor;
11

    
12
public class DefaultExportAttribute implements ExportAttributes.ExportAttribute {
13

    
14
    private final FeatureAttributeDescriptor fad;
15
    private String newName = null;
16
    private int newDataType;
17
    private int size;
18
    private boolean exported;
19
    private AttributeNamesTranslator translator = null;
20

    
21
    public DefaultExportAttribute(FeatureAttributeDescriptor fad) {
22
        this.fad = fad;
23

    
24
    }
25

    
26
    @Override
27
    public FeatureAttributeDescriptor getDescriptor() {
28
        return this.fad;
29
    }
30

    
31
    @Override
32
    public String getName() {
33
        return this.fad.getName();
34
    }
35

    
36
    @Override
37
    public int getDataType() {
38
        return this.fad.getDataType().getType();
39
    }
40

    
41
    @Override
42
    public String getNewName() {
43
        if (this.newName == null) {
44
            return this.getName();
45
        }
46
        return this.newName;
47
    }
48

    
49
    public int getNewDataType() {
50

    
51
        return this.newDataType;
52
    }
53

    
54
    @Override
55
    public boolean isExported() {
56
        return this.exported;
57
    }
58

    
59
    @Override
60
    public void setNewName(String name) {
61
        this.newName = name;
62
    }
63

    
64
    @Override
65
    public void setExported(boolean exported) {
66
        this.exported = exported;
67
    }
68

    
69
    @Override
70
    public void setNewType(int dataType) {
71
        this.newDataType = dataType;
72
    }
73

    
74
    @Override
75
    public int getSize() {
76
        return this.size;
77
    }
78

    
79
    @Override
80
    public void setSize(int size) {
81
        this.size = size;
82
    }
83
    
84
}