Statistics
| Revision:

svn-gvsig-desktop / trunk / org.gvsig.desktop / org.gvsig.desktop.compat.cdc / org.gvsig.fmap.dal / org.gvsig.fmap.dal.impl / src / main / java / org / gvsig / fmap / dal / feature / impl / DefaultEditableFeatureAttributeDescriptor.java @ 45154

History | View | Annotate | Download (22.3 KB)

1
/**
2
 * gvSIG. Desktop Geographic Information System.
3
 *
4
 * Copyright (C) 2007-2013 gvSIG Association.
5
 *
6
 * This program is free software; you can redistribute it and/or
7
 * modify it under the terms of the GNU General Public License
8
 * as published by the Free Software Foundation; either version 3
9
 * of the License, or (at your option) any later version.
10
 *
11
 * This program is distributed in the hope that it will be useful,
12
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
13
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
14
 * GNU General Public License for more details.
15
 *
16
 * You should have received a copy of the GNU General Public License
17
 * along with this program; if not, write to the Free Software
18
 * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
19
 * MA  02110-1301, USA.
20
 *
21
 * For any additional information, do not hesitate to contact us
22
 * at info AT gvsig.com, or visit our website www.gvsig.com.
23
 */
24
package org.gvsig.fmap.dal.feature.impl;
25

    
26
import java.math.BigDecimal;
27
import java.text.DateFormat;
28
import java.util.HashMap;
29
import java.util.Locale;
30
import java.util.Objects;
31
import org.apache.commons.lang3.StringUtils;
32

    
33
import org.cresques.cts.IProjection;
34
import org.gvsig.expressionevaluator.Expression;
35
import org.gvsig.expressionevaluator.ExpressionUtils;
36
import org.gvsig.fmap.crs.CRSFactory;
37
import org.gvsig.fmap.dal.DALLocator;
38
import org.gvsig.fmap.dal.DataTypeUtils;
39
import org.gvsig.fmap.dal.DataTypes;
40
import org.gvsig.fmap.dal.expressionevaluator.FeatureAttributeEmulatorExpression;
41
import org.slf4j.Logger;
42
import org.slf4j.LoggerFactory;
43

    
44
import org.gvsig.fmap.dal.feature.EditableFeatureAttributeDescriptor;
45
import org.gvsig.fmap.dal.feature.EditableForeingKey;
46
import org.gvsig.fmap.dal.feature.FeatureAttributeEmulator;
47
import org.gvsig.fmap.dal.feature.FeatureType;
48
import org.gvsig.fmap.dal.feature.exception.AttributeFeatureTypeIntegrityException;
49
import org.gvsig.fmap.dal.feature.exception.AttributeFeatureTypeSizeException;
50
import org.gvsig.fmap.geom.Geometry;
51
import org.gvsig.fmap.geom.GeometryUtils;
52
import org.gvsig.fmap.geom.type.GeometryType;
53
import org.gvsig.timesupport.Interval;
54
import org.gvsig.tools.ToolsLocator;
55
import org.gvsig.tools.dataTypes.DataType;
56
import org.gvsig.tools.dynobject.DynField;
57
import org.gvsig.tools.evaluator.Evaluator;
58

    
59
public class DefaultEditableFeatureAttributeDescriptor extends
60
    DefaultFeatureAttributeDescriptor implements
61
    EditableFeatureAttributeDescriptor {
62
    
63
    private static Logger logger = LoggerFactory.getLogger(
64
        DefaultEditableFeatureAttributeDescriptor.class);
65

    
66
    private final DefaultFeatureAttributeDescriptor source;
67
    private boolean hasStrongChanges;
68
    private String originalName = null;
69

    
70
    protected DefaultEditableFeatureAttributeDescriptor(
71
        DefaultFeatureAttributeDescriptor other) {
72
        super(other);
73
        if (other instanceof DefaultEditableFeatureAttributeDescriptor) {
74
            DefaultEditableFeatureAttributeDescriptor other_edi =
75
                (DefaultEditableFeatureAttributeDescriptor) other;
76
            originalName = other_edi.getOriginalName();
77
            this.source = other_edi.getSource();
78
        } else {
79
            this.source = other;
80
        }
81
        hasStrongChanges = false;
82
    }
83

    
84
    public DefaultEditableFeatureAttributeDescriptor(FeatureType type, boolean strongChanges) {
85
        super(type);
86
        this.source = null;
87
        hasStrongChanges = strongChanges;
88
    }
89

    
90
    public DefaultFeatureAttributeDescriptor getSource() {
91
        return this.source;
92
    }
93
    
94
    public void fixAll() {
95
        super.fixAll();
96
    }
97
    
98
    public void checkIntegrity() throws AttributeFeatureTypeIntegrityException {
99
        AttributeFeatureTypeIntegrityException ex =
100
            new AttributeFeatureTypeIntegrityException(getName());
101
        if (this.size < 0) {
102
            ex.add(new AttributeFeatureTypeSizeException(this.size));
103
        }
104

    
105
        if( this.dataType.isObject() && this.objectClass == null ) {
106
            logger.warn("Incorrect data type object, objectClass is null.");
107
            ex.add(new AttributeFeatureTypeIntegrityException(this.name));
108
        }
109
        
110
        // TODO: Add other integrity checks...
111

    
112
        if (ex.size() > 0) {
113
            throw ex;
114
        }
115
    }
116

    
117
    public EditableFeatureAttributeDescriptor setAllowNull(boolean allowNull) {
118
        updateStrongChanges(this.allowNull, allowNull);
119
        this.allowNull = allowNull;
120
        return this;
121
    }
122
    
123
    @Override
124
    public EditableForeingKey getForeingKey() {
125
        if( this.foreingKey==null ) {
126
            this.foreingKey = new DefaultForeingKey();
127
            this.foreingKey.setDescriptor(this);
128
        }
129
        return this.foreingKey;
130
    }
131

    
132
    public EditableFeatureAttributeDescriptor setDataType(DataType dataType) {
133
        updateStrongChanges(this.dataType, dataType);
134
        this.dataType = dataType;
135
        return this;
136
    }
137
    
138
    public EditableFeatureAttributeDescriptor setDataType(int type) {
139
        updateStrongChanges(this.dataType, type);
140
        this.dataType = ToolsLocator.getDataTypesManager().get(type);
141
        return this;
142
    }
143

    
144
    public EditableFeatureAttributeDescriptor setDefaultValue(
145
        Object defaultValue) {
146
        updateStrongChanges(this.defaultValue, defaultValue);
147
        this.defaultValue = defaultValue;
148
        return this;
149
    }
150

    
151
    public EditableFeatureAttributeDescriptor setAvoidCachingAvailableValues(boolean avoidCachingAvailableValues) {
152
        this.avoidCachingAvailableValues = avoidCachingAvailableValues;
153
        return this;
154
    }
155
    
156
    public EditableFeatureAttributeDescriptor setEvaluator(Evaluator evaluator) {
157
        updateStrongChanges(this.evaluator, evaluator);
158
        this.evaluator = evaluator;
159
        return this;
160
    }
161

    
162
    @Override
163
    public EditableFeatureAttributeDescriptor setFeatureAttributeEmulator(FeatureAttributeEmulator featureAttributeEmulator) {
164
        this.featureAttributeEmulator = featureAttributeEmulator;
165
        return this;
166
    }
167
    
168
    @Override
169
    public EditableFeatureAttributeDescriptor setFeatureAttributeEmulator(Expression expression) {
170
        if( ExpressionUtils.isPhraseEmpty(expression) ) {
171
            this.setFeatureAttributeEmulator((FeatureAttributeEmulator)null);
172
            return this;
173
        } 
174
        FeatureAttributeEmulatorExpression emulator = DALLocator.getDataManager().createFeatureAttributeEmulatorExpression(
175
                this.getFeatureType(),
176
                expression
177
        );
178
        return this.setFeatureAttributeEmulator(emulator);
179
    }
180

    
181
    @Override
182
    public EditableFeatureAttributeDescriptor setFeatureAttributeEmulator(String expression) {
183
        if( StringUtils.isBlank(expression) ) {
184
            this.setFeatureAttributeEmulator((FeatureAttributeEmulator)null);
185
            return this;
186
        } 
187
        return this.setFeatureAttributeEmulator(ExpressionUtils.createExpression(expression));
188
    }
189
        
190
    @Override
191
    public EditableFeatureAttributeDescriptor setGeometryType(int type) {
192
        this.geometryType = type;
193
        if( this.geometrySubType == Geometry.SUBTYPES.UNKNOWN ) {
194
            this.geometrySubType = Geometry.SUBTYPES.GEOM2D;
195
        }
196
        this.geomType = null;
197
        return this;
198
    }
199

    
200
    public EditableFeatureAttributeDescriptor setGeometrySubType(int subType) {
201
        this.geometrySubType = subType;
202
        this.geomType = null;
203
        return this;
204
    }
205

    
206
    public EditableFeatureAttributeDescriptor setGeometryType(
207
        GeometryType geometryType) {
208
        updateStrongChanges(this.geomType, geometryType);
209
        this.geomType = geometryType;
210
        this.geometryType = this.geomType.getType();
211
        this.geometrySubType = this.geomType.getSubType();
212
        return this;
213
    }
214

    
215
    @Override
216
    public EditableFeatureAttributeDescriptor setGeometryType(String geometryType) {
217
        if( StringUtils.isBlank(geometryType) ) {
218
            throw new IllegalArgumentException("Invalid geometry type (null)");
219
        }
220
        String separators = ":/-!;#@";
221
        Character sep = null;
222
        for (char ch : separators.toCharArray()) {
223
            if( geometryType.indexOf(ch)>=0 ) {
224
                sep = ch;
225
                break;
226
            }
227
        }
228
        if( sep == null ) {
229
            throw new IllegalArgumentException("Invalid geometry type ("+geometryType+") can't find separator, format can be GEOMETRYTYPE["+separators+"]GEOMETRYSUBTYPE");
230
        }
231
        String[] xx = geometryType.split("["+sep+"]");
232
        int theGeomType = GeometryUtils.getGeometryType(xx[0]);
233
        int theGeomSubtype = GeometryUtils.getGeometrySubtype(xx[1]);
234
        this.setGeometryType(theGeomType, theGeomSubtype);
235
        return this;
236
    }
237
            
238
    @Override
239
    public EditableFeatureAttributeDescriptor setGeometryType(int type, int subType) {
240
        this.geometryType = type;
241
        this.geometrySubType = subType;
242
        this.geomType = null;
243
        return this;
244
    }
245

    
246
    public EditableFeatureAttributeDescriptor setIsPrimaryKey(
247
        boolean isPrimaryKey) {
248
        updateStrongChanges(this.primaryKey, primaryKey);
249
        this.primaryKey = isPrimaryKey;
250
        return this;
251
    }
252

    
253
    public EditableFeatureAttributeDescriptor setIsReadOnly(boolean isReadOnly) {
254
        updateStrongChanges(this.readOnly, readOnly);
255
        this.readOnly = isReadOnly;
256
        return this;
257
    }
258

    
259
    public EditableFeatureAttributeDescriptor setMaximumOccurrences(
260
        int maximumOccurrences) {
261
        updateStrongChanges(this.maximumOccurrences, maximumOccurrences);
262
        this.maximumOccurrences = maximumOccurrences;
263
        return this;
264
    }
265

    
266
    public EditableFeatureAttributeDescriptor setMinimumOccurrences(
267
        int minimumOccurrences) {
268
        updateStrongChanges(this.minimumOccurrences, minimumOccurrences);
269
        this.minimumOccurrences = minimumOccurrences;
270
        return this;
271
    }
272

    
273
    @Override
274
    public EditableFeatureAttributeDescriptor setName(String name) {
275
        if( StringUtils.equals(this.name, name) ) {
276
            return this;
277
        }
278
        if (originalName == null) {
279
            originalName = this.name;
280
            if (!isComputed()) {
281
                hasStrongChanges = true;
282
            }
283
        }
284
        super.setName(name);
285
        if (!isComputed()) {
286
            hasStrongChanges = true;
287
        }
288
        return this;
289
    }
290
    
291
    public String getOriginalName() {
292
        return originalName;
293
    }
294

    
295
    public EditableFeatureAttributeDescriptor setObjectClass(Class theClass) {
296
        updateStrongChanges(this.objectClass, theClass);
297
        this.objectClass = theClass;
298
        return this;
299
    }
300

    
301
    @Override
302
    public EditableFeatureAttributeDescriptor setPrecision(int precision) {
303
        updateStrongChanges(this.precision, precision);
304
        this.precision = precision;
305
        return this;
306
    }
307

    
308
    @Override
309
    public EditableFeatureAttributeDescriptor setScale(int scale) {
310
        updateStrongChanges(this.scale, scale);
311
        this.scale = scale;
312
        this.coerceContext = null;
313
        this.mathContext = null;
314
        return this;
315
    }
316

    
317
    @Override
318
    public EditableFeatureAttributeDescriptor setSRS(IProjection SRS) {
319
        updateStrongChanges(this.SRS, SRS);
320
        this.SRS = SRS;
321
        return this;
322
    }
323

    
324
    @Override
325
    public EditableFeatureAttributeDescriptor setSRS(String SRS) {
326
        if( StringUtils.isBlank(SRS) ) {
327
            this.setSRS((IProjection)null);
328
            return this;
329
        }
330
        SRS = SRS.replace('@', ':');
331
        IProjection proj = CRSFactory.getCRS(SRS);
332
        this.setSRS(proj);
333
        return this;
334
    }
335
    
336
    public EditableFeatureAttributeDescriptor setInterval(Interval interval) {
337
        updateStrongChanges(this.getInterval(), interval);
338
        super.setInterval(interval);
339
        return this;
340
    }
341

    
342
    public EditableFeatureAttributeDescriptor setSize(int size) {
343
        updateStrongChanges(this.size, size);
344
        this.size = size;
345
        return this;
346
    }
347

    
348
    public boolean hasStrongChanges() {
349
        return hasStrongChanges;
350
    }
351

    
352
    @Override
353
    public EditableFeatureAttributeDescriptor setAdditionalInfo(
354
        String infoName, Object value) {
355
        return this.setAdditionalInfo(infoName, Objects.toString(value, ""));
356
    }
357
    
358
    public EditableFeatureAttributeDescriptor setAdditionalInfo(
359
        String infoName, String value) {
360
        if (this.additionalInfo == null) {
361
            this.additionalInfo = new HashMap();
362
        }
363
        this.additionalInfo.put(infoName, value);
364
        return this;
365
    }
366

    
367
    public EditableFeatureAttributeDescriptor setIsAutomatic(boolean isAutomatic) {
368
        this.isAutomatic = isAutomatic;
369
        if( isAutomatic ) {
370
            this.setReadOnly(true);
371
        }
372
        return this;
373
    }
374
    
375
    public EditableFeatureAttributeDescriptor setIsTime(boolean isTime) {
376
        updateStrongChanges(this.isTime, isTime);
377
        this.isTime = isTime;
378
        return this;
379
    }
380

    
381
    public EditableFeatureAttributeDescriptor setDateFormat(DateFormat dateFormat) {
382
        this.dateFormat = dateFormat;
383
        return this;
384
    }
385

    
386
    public EditableFeatureAttributeDescriptor setIsIndexed(boolean isIndexed) {
387
        updateStrongChanges(this.indexed, isIndexed);
388
        this.indexed = isIndexed;
389
        return this;
390
    }
391
    
392
    public EditableFeatureAttributeDescriptor setAllowIndexDuplicateds(boolean allowDuplicateds) {
393
        updateStrongChanges(this.allowIndexDuplicateds, allowDuplicateds);
394
        this.allowIndexDuplicateds = allowDuplicateds;
395
        return this;
396
    }
397

    
398
    public EditableFeatureAttributeDescriptor setIsIndexAscending(boolean ascending) {
399
        updateStrongChanges(this.isIndexAscending, ascending);
400
        this.isIndexAscending = ascending;
401
        return this;
402
    }
403

    
404
    @Override
405
    public EditableFeatureAttributeDescriptor setDataProfileName(String dataProfile) {
406
        super.setDataProfileName(dataProfile);
407
        return this;
408
    }
409

    
410
    private void updateStrongChanges(int previous, int newvalue) {
411
        if( isComputed() ) {
412
            return;
413
        }
414
        if( previous == newvalue ) {
415
            return;
416
        }
417
        this.hasStrongChanges = true;
418
    }
419

    
420
    private void updateStrongChanges(DataType previous, int newvalue) {
421
        if( isComputed() ) {
422
            return;
423
        }
424
        if( previous!=null ) {
425
            if( previous.getType() == newvalue ) {
426
                return;
427
            }
428
        }
429
        this.hasStrongChanges = true;
430
    }
431

    
432
    private void updateStrongChanges(boolean previous, boolean newvalue) {
433
        if( isComputed() ) {
434
            return;
435
        }
436
        if( previous == newvalue ) {
437
            return;
438
        }
439
        this.hasStrongChanges = true;
440
    }
441

    
442
    private void updateStrongChanges(Object previous, Object newvalue) {
443
        if( isComputed() ) {
444
            return;
445
        }
446
        if( Objects.equals(newvalue, previous) ) {
447
            return;
448
        }
449
        this.hasStrongChanges = true;
450
    }
451

    
452
    @Override
453
    public EditableFeatureAttributeDescriptor setLocale(Locale locale) {
454
      if( locale == null ) {
455
        this.locale = Locale.ENGLISH;
456
      } else {
457
        this.locale = locale;
458
      }
459
      this.coerceContext = null;
460
      this.mathContext = null;
461
      return this;
462
    }
463

    
464
    public EditableFeatureAttributeDescriptor setLocale(String locale) {
465
      Locale l;
466
      try {
467
        String s = DataTypeUtils.toString(locale, null);
468
        if( StringUtils.isBlank(s) ) {
469
          return this.setLocale((Locale)null);
470
        }
471
        l = new Locale(s);
472
        return this.setLocale(l);
473
      } catch(Exception ex) {
474
          return this.setLocale((Locale)null);
475
      }
476
    }
477
    
478
    @Override
479
    public EditableFeatureAttributeDescriptor setRoundMode(int roundMode) {
480
      switch(roundMode) {
481
        case BigDecimal.ROUND_UP:
482
        case BigDecimal.ROUND_DOWN:
483
        case BigDecimal.ROUND_CEILING:
484
        case BigDecimal.ROUND_FLOOR:
485
        case BigDecimal.ROUND_HALF_UP:
486
        case BigDecimal.ROUND_HALF_DOWN:
487
        case BigDecimal.ROUND_HALF_EVEN:
488
        case BigDecimal.ROUND_UNNECESSARY:
489
          this.roundMode = roundMode;
490
          this.coerceContext = null;
491
          this.mathContext = null;
492
          break;
493
        default:
494
          throw new IllegalArgumentException("round mode '"+roundMode+"' not valid.");
495
      }
496
      return this;
497
    }
498

    
499
    @Override
500
    public EditableFeatureAttributeDescriptor set(String name, Object value) {
501
        if( StringUtils.isBlank(name)) {
502
            throw new IllegalArgumentException("Name can't be empty");
503
        }
504
        String ss; 
505
        switch(name.trim().toLowerCase()) {
506
            case "isavoidcachingavailablevalues":
507
            case "avoidcachingavailablevalues":
508
            case "nocachingavailablevalues":
509
                this.setAvoidCachingAvailableValues(DataTypeUtils.toBoolean(value, false));
510
                break;
511
            case "availablevalues":
512
                this.setAvailableValuesExpression(DataTypeUtils.toString(value, null));
513
                break;
514
            case "isreadonly":
515
            case "readonly":
516
                this.setIsReadOnly(DataTypeUtils.toBoolean(value, false));
517
                break;
518
            case "mandatory":
519
                this.setMandatory(DataTypeUtils.toBoolean(value, false));
520
                break;
521
            case "hidden":
522
                this.setHidden(DataTypeUtils.toBoolean(value, false));
523
                break;
524
            case "allownull":
525
                this.setAllowNull(DataTypeUtils.toBoolean(value, false));
526
                break;
527
            case "pk":
528
            case "ispk":
529
            case "primarykey":
530
            case "isprimarykey":
531
                this.setIsPrimaryKey(DataTypeUtils.toBoolean(value, false));
532
                break;
533
            case "isautomatic":
534
            case "automatic":
535
                this.setIsAutomatic(DataTypeUtils.toBoolean(value, false));
536
                break;
537
            case "time":
538
            case "istime":
539
                this.setIsTime(DataTypeUtils.toBoolean(value, false));
540
                break;
541
            case "profile":
542
                this.setDataProfileName(DataTypeUtils.toString(value, null));
543
                break;
544
            case "group":
545
                this.setGroup(DataTypeUtils.toString(value, null));
546
                break;
547
            case "description":
548
                this.setDescription(DataTypeUtils.toString(value, null));
549
                break;
550
            case "label":
551
                this.setLabel(DataTypeUtils.toString(value, null));
552
                break;
553
            case "shortlabel":
554
                this.setShortLabel(DataTypeUtils.toString(value, null));
555
                break;
556
            case "expression":
557
                this.setFeatureAttributeEmulator(DataTypeUtils.toString(value, null));
558
                break;
559
            case "size":
560
                this.setSize(DataTypeUtils.toInteger(value, 50));
561
                break;
562
            case "precision":
563
                this.setPrecision(DataTypeUtils.toInteger(value, 10));
564
                break;
565
            case "scale":
566
                this.setScale(DataTypeUtils.toInteger(value, 10));
567
                break;
568
            case "roundmode":
569
              this.setRoundMode(DataTypeUtils.toInteger(value, BigDecimal.ROUND_UNNECESSARY));
570
              break;
571
            case "locale":
572
              this.setLocale(DataTypeUtils.toString(value, null));
573
              break;
574
            case "order":
575
                this.setOrder(DataTypeUtils.toInteger(value, 0));
576
                break;
577
            case "fk":
578
            case "foreingkey":
579
                this.getForeingKey().setForeingKey(DataTypeUtils.toBoolean(value, false));
580
                break;
581
            case "fk_code":
582
            case "foreingkey_code":
583
            case "foreingkey.code":
584
                this.getForeingKey().setCodeName(DataTypeUtils.toString(value, ""));
585
                break;
586
            case "fk_label":
587
            case "foreingkey_label":
588
            case "foreingkey.label":
589
                this.getForeingKey().setLabelFormula(DataTypeUtils.toString(value, ""));
590
                break;
591
            case "fk.closedlist":
592
            case "foreingkey_closedlist":
593
            case "foreingkey.closedlist":
594
                this.getForeingKey().setClosedList(DataTypeUtils.toBoolean(value, false));
595
                break;
596
            case "fk_table":
597
            case "foreingkey_table":
598
            case "foreingkey.table":
599
                this.getForeingKey().setTableName(DataTypeUtils.toString(value, null));
600
                break;
601
            case "interval":
602
                this.setInterval(DataTypeUtils.toInterval(value, null));
603
                break;
604
            case "geomtype":
605
            case "geometrytype":
606
                this.setGeometryType(DataTypeUtils.toString(value, null));
607
                break;
608
            case "srs":
609
                this.setSRS(DataTypeUtils.toString(value, null));
610
                break;
611
            case "relation":
612
                this.setRelationType(toRelation(value));
613
                break;
614
            case "name":
615
                this.setName(DataTypeUtils.toString(value, null));
616
                break;
617
            case "type":
618
            case "datatype":
619
                ss = DataTypeUtils.toString(value, null);
620
                if( !StringUtils.isBlank(ss) ) {
621
                    this.setDataType(ToolsLocator.getDataTypesManager().getType(ss));
622
                }
623
                break;
624
            default:
625
                throw new IllegalArgumentException("Name attribute '"+name+"' not valid.");
626
        }     
627
        return this;
628
    }
629
    
630
    private int toRelation(Object value) {
631
      if (value == null) {
632
        return DynField.RELATION_TYPE_NONE;
633
      }
634
      Integer x = (Integer) DataTypeUtils.coerce(DataTypes.INT,value, null);
635
      if (x != null) {
636
        return x;
637
      }
638
      try {
639
        String s = value.toString().toUpperCase();
640
        switch (s) {
641
          case "NONE":
642
          default:
643
            return DynField.RELATION_TYPE_NONE;
644
          case "IDENTITY":
645
            return DynField.RELATION_TYPE_IDENTITY;
646
          case "COLLABORATION":
647
            return DynField.RELATION_TYPE_COLLABORATION;
648
          case "COMPOSITION":
649
            return DynField.RELATION_TYPE_COMPOSITION;
650
          case "AGGREGATE":
651
            return DynField.RELATION_TYPE_AGGREGATE;
652
        }
653
      } catch(Exception ex) {
654
        return DynField.RELATION_TYPE_NONE;
655
      }
656
    }
657

    
658
  @Override
659
  public EditableFeatureAttributeDescriptor setDisplaySize(int size) {
660
    this.displaySize = size;
661
    return this;
662
  }
663
}