Revision 45784 trunk/org.gvsig.desktop/org.gvsig.desktop.compat.cdc/org.gvsig.fmap.dal/org.gvsig.fmap.dal.file/org.gvsig.fmap.dal.file.csv/src/main/java/org/gvsig/fmap/dal/store/csv/FieldTypeParser.java

View differences:

FieldTypeParser.java
31 31
    public Map<String, String> tags = new HashMap<>();
32 32
    public Map<String, String> typetags = new HashMap<>();
33 33
    public Map<String, String> assignments = new HashMap<>();
34
    public Map<String, String> typeAssignments = new HashMap<>();
34 35
    // Valores obtenidos desde la deteccion automatica desde los datos
35 36
    public AutomaticDetectionOfTypes.DetectedValue detectedValue = null;
36 37
    private String typename = "string";
......
57 58
        this.tags = new HashMap<>();
58 59
        this.typetags = new HashMap<>();
59 60
        this.assignments = new HashMap<>();
61
        this.typeAssignments = new HashMap<>();
60 62
    }
61 63

  
62 64
    public void copyFrom(FieldTypeParser other) {
......
69 71
        this.typetags.putAll(other.typetags);
70 72
        this.assignments = new HashMap<>();
71 73
        this.assignments.putAll(other.assignments);
74
        this.typeAssignments = new HashMap<>();
75
        this.typeAssignments.putAll(other.typeAssignments);
72 76
    }
73 77

  
74 78
    private int getType(String value) {
......
165 169
                        }
166 170
                        break;
167 171
                    }
172
                case "typeset":
173
                    {
174
                        String x = StringUtils.trim(args[n++]);
175
                        int pos = x.indexOf("=");
176
                        if (pos < 0) {
177
                            this.typeAssignments.put(x, null);
178
                        } else {
179
                            this.typeAssignments.put(StringUtils.trim(StringUtils.substring(x, 0, pos)), StringUtils.trim(StringUtils.substring(x, pos + 1)));
180
                        }
181
                        break;
182
                    }
168 183
                default:
169 184
                    if (StringUtils.isNumeric(option) && this.size == 0) {
170 185
                        try {

Also available in: Unified diff