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 / DefaultFeatureType.java @ 42471

History | View | Annotate | Download (21.5 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.lang.ref.WeakReference;
27
import java.util.ArrayList;
28
import java.util.Arrays;
29
import java.util.Collections;
30
import java.util.HashSet;
31
import java.util.Iterator;
32
import java.util.List;
33
import java.util.Set;
34
import java.util.zip.CRC32;
35

    
36
import org.cresques.cts.IProjection;
37

    
38
import org.gvsig.fmap.dal.DataTypes;
39
import org.gvsig.fmap.dal.exception.DataException;
40
import org.gvsig.fmap.dal.feature.EditableFeatureType;
41
import org.gvsig.fmap.dal.feature.Feature;
42
import org.gvsig.fmap.dal.feature.FeatureAttributeDescriptor;
43
import org.gvsig.fmap.dal.feature.FeatureAttributeEmulator;
44
import org.gvsig.fmap.dal.feature.FeatureRules;
45
import org.gvsig.fmap.dal.feature.FeatureType;
46
import org.gvsig.tools.dynobject.DynClass;
47
import org.gvsig.tools.dynobject.DynField;
48
import org.gvsig.tools.dynobject.DynMethod;
49
import org.gvsig.tools.dynobject.DynObject;
50
import org.gvsig.tools.dynobject.DynObjectValueItem;
51
import org.gvsig.tools.dynobject.DynStruct;
52
import org.gvsig.tools.dynobject.exception.DynMethodException;
53
import org.gvsig.tools.dynobject.exception.DynObjectValidateException;
54

    
55
public class DefaultFeatureType extends ArrayList<FeatureAttributeDescriptor> implements FeatureType,
56
                DynClass {
57

    
58
        /**
59
         *
60
         */
61
        private static final long serialVersionUID = -7988721447349282215L;
62

    
63
        private DefaultFeatureRules rules;
64
        protected boolean hasEvaluators;
65
        protected boolean hasEmulators;
66
        protected String defaultGeometryAttributeName;
67
        protected int defaultGeometryAttributeIndex;
68
        protected int defaultTimeAttributeIndex;
69
        private String id;
70
        protected boolean hasOID;
71
        protected boolean allowAtomaticValues;
72
        protected FeatureAttributeDescriptor[] pk = null;
73
        protected String internalID = null;
74

    
75
        private List srsList = null; 
76

    
77
        protected DefaultFeatureType(String id) {
78
                this.internalID = Integer.toHexString((int) (Math.random()*100000)).toUpperCase();
79
                this.id = id;
80
                this.rules = new DefaultFeatureRules();
81
                this.hasEvaluators = false;
82
                this.hasEmulators = false;
83
                this.defaultGeometryAttributeName = null;
84
                this.defaultGeometryAttributeIndex = -1;
85
                this.defaultTimeAttributeIndex = -1;
86
                this.allowAtomaticValues = false;
87
        }
88

    
89
        protected DefaultFeatureType() {
90
                this("default");
91
        }
92

    
93
        protected DefaultFeatureType(DefaultFeatureType other) {
94
                this("default");
95
                initialize(other, true);
96
        }
97

    
98
        protected DefaultFeatureType(DefaultFeatureType other,
99
                        boolean copyAttributes) {
100
                this("default");
101
                initialize(other, copyAttributes);
102
        }
103
        
104
        protected void initialize(DefaultFeatureType other, boolean copyAttributes) {
105
                this.id = other.getId();
106
                if (copyAttributes) {
107
                        Iterator iter = other.iterator();
108
                        DefaultFeatureAttributeDescriptor attr;
109
                        while (iter.hasNext()) {
110
                                attr = (DefaultFeatureAttributeDescriptor) iter.next();
111
                                this.intitalizeAddAttibute(attr);
112
                        }
113
                }
114
                this.defaultGeometryAttributeName = other.defaultGeometryAttributeName;
115
                this.hasEvaluators = other.hasEvaluators;
116
                this.hasEmulators = other.hasEmulators;
117
                this.rules = (DefaultFeatureRules) other.rules.getCopy();
118
                this.defaultGeometryAttributeIndex = other.defaultGeometryAttributeIndex;
119
                this.defaultTimeAttributeIndex = other.defaultTimeAttributeIndex;
120
                this.hasOID = other.hasOID;
121
                this.id = other.id; // XXX ???? copiar o no esto????
122
                this.internalID = other.internalID;
123
        }
124

    
125
        protected void intitalizeAddAttibute(DefaultFeatureAttributeDescriptor attr) {
126
                super.add(attr.getCopy());
127
        }
128

    
129
        public String getId() {
130
                return this.id;
131
        }
132

    
133
        public Object get(String name) {
134
                FeatureAttributeDescriptor attr;
135
                Iterator iter = this.iterator();
136
                while (iter.hasNext()) {
137
                        attr = (FeatureAttributeDescriptor) iter.next();
138
                        if (attr.getName().equalsIgnoreCase(name)) {
139
                                return attr;
140
                        }
141
                }
142
                return null;
143
        }
144

    
145
        public FeatureAttributeDescriptor getAttributeDescriptor(String name) {
146
                FeatureAttributeDescriptor attr;
147
                Iterator iter = this.iterator();
148
                while (iter.hasNext()) {
149
                        attr = (FeatureAttributeDescriptor) iter.next();
150
                        if (attr.getName().equalsIgnoreCase(name)) {
151
                                return attr;
152
                        }
153
                }
154
                return null;
155
        }
156

    
157
        public FeatureAttributeDescriptor getAttributeDescriptor(int index) {
158
                return (FeatureAttributeDescriptor) super.get(index);
159
        }
160

    
161
        public FeatureType getCopy() {
162
                return new DefaultFeatureType(this);
163
        }
164

    
165
        public int getDefaultGeometryAttributeIndex() {
166
                return this.defaultGeometryAttributeIndex;
167
        }
168

    
169
        public String getDefaultGeometryAttributeName() {
170
                return this.defaultGeometryAttributeName;
171
        }
172

    
173
        public EditableFeatureType getEditable() {
174
                return new DefaultEditableFeatureType(this);
175
        }
176

    
177
        public int getIndex(String name) {
178
                FeatureAttributeDescriptor attr;
179
                Iterator iter = this.iterator();
180
                while (iter.hasNext()) {
181
                        attr = (FeatureAttributeDescriptor) iter.next();
182
                        if (attr.getName().equalsIgnoreCase(name)) {
183
                                return attr.getIndex();
184
                        }
185
                }
186
                return -1;
187
        }
188

    
189
        public FeatureRules getRules() {
190
                return this.rules;
191
        }
192

    
193
        public boolean hasEvaluators() {
194
                return this.hasEvaluators;
195
        }
196

    
197
        public boolean hasEmulators() {
198
                return this.hasEmulators;
199
        }
200

    
201
        public List getSRSs() {
202
                if (this.srsList == null) {
203
                        ArrayList tmp = new ArrayList();
204
                        Iterator iter = iterator();
205
                        Iterator tmpIter;
206
                        boolean allreadyHave;
207
                        IProjection tmpSRS;
208
                        FeatureAttributeDescriptor attr;
209
                        while (iter.hasNext()){
210
                                attr = (FeatureAttributeDescriptor) iter.next();
211
                                if (attr.getDataType().getType() == DataTypes.GEOMETRY
212
                                                && attr.getSRS() != null) {
213
                                        allreadyHave = false;
214
                                        tmpIter = tmp.iterator();
215
                                        while (tmpIter.hasNext()) {
216
                                                tmpSRS = (IProjection) tmpIter.next();
217
                                                if (tmpSRS.getAbrev().equals(attr.getSRS().getAbrev())) {
218
                                                        allreadyHave = true;
219
                                                        break;
220
                                                }
221
                                        }
222
                                        if (!allreadyHave) {
223
                                                tmp.add(attr.getSRS());
224
                                        }
225
                                }
226
                        }
227
                        this.srsList = Collections.unmodifiableList(tmp);
228
                }
229
                return this.srsList;
230
        }
231

    
232
        public IProjection getDefaultSRS() {
233
                if (this.getDefaultGeometryAttributeIndex() < 0) {
234
                        return null;
235
                }
236
                return this.getAttributeDescriptor(
237
                                this.getDefaultGeometryAttributeIndex()).getSRS();
238
        }
239

    
240
        public void validateFeature(Feature feature, int mode) throws DataException {
241
            DefaultFeatureRules rules = (DefaultFeatureRules) this.getRules();
242
            rules.validate(feature,mode);
243
        }
244

    
245
        public FeatureType getSubtype(String[] names) throws DataException {
246
                if( names==null || names.length <1) {
247
                    return (FeatureType) this.clone();
248
                }
249
                return new SubtypeFeatureType(this, names, null);
250
        }
251

    
252
        public FeatureType getSubtype(String[] names, String[] constantsNames) throws DataException {
253
                if( (names==null || names.length <1) && (constantsNames==null || constantsNames.length <1) ) {
254
                    return (FeatureType) this.clone();
255
                }
256
                return new SubtypeFeatureType(this, names,constantsNames);
257
        }
258

    
259
        public boolean isSubtypeOf(FeatureType featureType) {
260
                return false;
261
        }
262

    
263

    
264

    
265
        class SubtypeFeatureType extends DefaultFeatureType {
266
                /**
267
                 *
268
                 */
269
                private static final long serialVersionUID = 6913732960073922540L;
270
                WeakReference parent;
271

    
272
                SubtypeFeatureType(DefaultFeatureType parent, String[] names, String[] constantsNames)
273
                        throws DataException {
274
                    super(parent, false);
275
                    DefaultFeatureAttributeDescriptor attrcopy;
276
                    DefaultFeatureAttributeDescriptor attr;
277
                    Set attrnames = null;
278

    
279
                    // Copy attributes
280
                    if ( names != null && names.length > 0 ) {
281
                        attrnames = new HashSet();
282
                        attrnames.addAll(Arrays.asList(names));
283
                        if ( parent.hasEmulators ) {
284
                            for ( int i = 0; i < parent.size(); i++ ) {
285
                                attr = (DefaultFeatureAttributeDescriptor) parent.getAttributeDescriptor(i);
286
                                FeatureAttributeEmulator emulator = attr.getFeatureAttributeEmulator();
287
                                if ( emulator != null ) {
288
                                    String ss[] = emulator.getRequiredFieldNames();
289
                                    if ( ss != null ) {
290
                                        attrnames.addAll(Arrays.asList(ss));
291
                                    }
292
                                }
293
                            }
294
                        }
295
                        Iterator it = attrnames.iterator();
296
                        int i = 0;
297
                        while ( it.hasNext() ) {
298
                            String name = (String) it.next();
299
                            attr = (DefaultFeatureAttributeDescriptor) parent
300
                                    .getAttributeDescriptor(name);
301
                            if ( attr == null ) {
302
                                throw new SubtypeFeatureTypeNameException(name, parent
303
                                        .getId());
304
                            }
305
                            attrcopy = new DefaultFeatureAttributeDescriptor(attr);
306
                            this.add(attrcopy);
307
                            attrcopy.index = i++;
308
                        }
309

    
310
                    } else {
311
                        for ( int i = 0; i < parent.size(); i++ ) {
312
                            attr = (DefaultFeatureAttributeDescriptor) parent.getAttributeDescriptor(i);
313
                            attrcopy = new DefaultFeatureAttributeDescriptor(attr);
314
                            this.add(attrcopy);
315
                            attrcopy.index = i;
316
                        }
317
                    }
318

    
319
                    // Set the consttants attributes.
320
                    if ( constantsNames != null && constantsNames.length > 0 ) {
321
                        for ( int i = 0; i < constantsNames.length; i++ ) {
322
                            if ( attrnames != null && attrnames.contains(constantsNames[i]) ) {
323
                                continue;
324
                            }
325
                            attr = (DefaultFeatureAttributeDescriptor) this.getAttributeDescriptor(constantsNames[i]);
326
                            attr.setConstantValue(true);
327
                        }
328
                    }
329

    
330
                    // Add missing pk fiels if any
331
                    if ( !parent.hasOID() ) {
332
                        Iterator iter = parent.iterator();
333
                        while ( iter.hasNext() ) {
334
                            attr = (DefaultFeatureAttributeDescriptor) iter.next();
335
                            if ( attr.isPrimaryKey() && this.getIndex(attr.getName()) < 0 ) {
336
                                attrcopy = new DefaultFeatureAttributeDescriptor(attr);
337
                                this.add(attrcopy);
338
                                attrcopy.index = this.size() - 1;
339
                            }
340
                        }
341
                    }
342

    
343
                    this.defaultGeometryAttributeIndex = this
344
                            .getIndex(this.defaultGeometryAttributeName);
345
                    if ( this.defaultGeometryAttributeIndex < 0 ) {
346
                        this.defaultGeometryAttributeName = null;
347
                    }
348
                    this.parent = new WeakReference(parent);
349
                }
350

    
351
                public FeatureType getSubtype(String[] names) throws DataException {
352
                        return new SubtypeFeatureType((DefaultFeatureType) this.parent
353
                                        .get(), names, null);
354
                }
355

    
356
                public boolean isSubtypeOf(FeatureType featureType) {
357
                        if (featureType == null) {
358
                                return false;
359
                        }
360
                        FeatureType parent = (FeatureType) this.parent.get();
361
                        return featureType.equals(parent);
362
                }
363

    
364
                public EditableFeatureType getEditable() {
365
                        throw new UnsupportedOperationException();
366
                }
367
        }
368

    
369
        public class SubtypeFeatureTypeNameException extends DataException {
370

    
371
                /**
372
                 *
373
                 */
374
                private static final long serialVersionUID = -4414242486723260101L;
375
                private final static String MESSAGE_FORMAT = "Attribute name '%(name)s' not found in type (%(type)s).";
376
                private final static String MESSAGE_KEY = "_SubtypeFeatureTypeNameException";
377

    
378
                public SubtypeFeatureTypeNameException(String name, String type) {
379
                        super(MESSAGE_FORMAT, MESSAGE_KEY, serialVersionUID);
380
                        setValue("name", name);
381
                        setValue("type", type);
382
                }
383
        }
384

    
385
        public boolean hasOID() {
386
                return hasOID;
387
        }
388
        public String toString(){
389
                StringBuffer s = new StringBuffer();
390
                s.append(this.getId());
391
                s.append(":[");
392
                String attName;
393
                for (int i = 0; i < size(); i++) {
394
                        attName =((FeatureAttributeDescriptor)get(i)).getName().toString();
395
                        s.append(attName);
396
                        if (i < size() - 1) {
397
                                s.append(',');
398
                        }
399
                }
400
                s.append(']');
401
                return s.toString();
402
        }
403

    
404
        public Iterator iterator() {
405
                return getIterator(super.iterator());
406
        }
407

    
408
        protected Iterator getIterator(Iterator iter) {
409
                return new DelegatedIterator(iter);
410
        }
411

    
412
        protected class DelegatedIterator implements Iterator {
413

    
414
                protected Iterator iterator;
415

    
416
                public DelegatedIterator(Iterator iter) {
417
                        this.iterator = iter;
418
                }
419

    
420
                public boolean hasNext() {
421
                        return iterator.hasNext();
422
                }
423

    
424
                public Object next() {
425
                        return iterator.next();
426
                }
427

    
428
                public void remove() {
429
                        throw new UnsupportedOperationException();
430
                }
431

    
432
        }
433

    
434
        public boolean allowAutomaticValues() {
435
                return this.allowAtomaticValues;
436
        }
437

    
438
        public FeatureAttributeDescriptor[] getAttributeDescriptors() {
439
                return (FeatureAttributeDescriptor[]) super
440
                                .toArray(new FeatureAttributeDescriptor[super.size()]);
441
        }
442

    
443
        public FeatureAttributeDescriptor[] getPrimaryKey() {
444
                if (pk == null) {
445
                        List pkList = new ArrayList();
446
                        Iterator iter = super.iterator();
447
                        FeatureAttributeDescriptor attr;
448
                        while (iter.hasNext()){
449
                                attr = (FeatureAttributeDescriptor) iter.next();
450
                                if (attr.isPrimaryKey()){
451
                                        pkList.add(attr);
452
                                }
453
                        }
454
                        pk = (FeatureAttributeDescriptor[]) pkList
455
                                        .toArray(new FeatureAttributeDescriptor[pkList.size()]);
456
                }
457
                return pk;
458
        }
459

    
460
        public FeatureAttributeDescriptor getDefaultGeometryAttribute() {
461
                if (this.defaultGeometryAttributeIndex < 0) {
462
                        return null;
463
                }
464
                return (FeatureAttributeDescriptor) super
465
                                .get(this.defaultGeometryAttributeIndex);
466
        }
467

    
468

    
469

    
470
        public boolean equals(Object other) {
471
                if (this == other) {
472
                        return true;
473
                }
474
                if (!(other instanceof DefaultFeatureType)) {
475
                        return false;
476
                }
477
                DefaultFeatureType otherType = (DefaultFeatureType) other;
478
                if (!this.id.equals(otherType.id)) {
479
                        return false;
480
                }
481
                if (this.size() != otherType.size()) {
482
                        return false;
483
                }
484
                FeatureAttributeDescriptor attr,attrOther;
485
                Iterator iter,iterOther;
486
                iter = this.iterator();
487
                iterOther = otherType.iterator();
488
                while (iter.hasNext()) {
489
                        attr = (FeatureAttributeDescriptor) iter.next();
490
                        attrOther = (FeatureAttributeDescriptor) iterOther.next();
491
                        if (!attr.equals(attrOther)) {
492
                                return false;
493
                        }
494
                }
495

    
496
                if (defaultGeometryAttributeName != otherType.defaultGeometryAttributeName) {
497
                        if (defaultGeometryAttributeName == null) {
498
                                return false;
499
                        }
500
                        return defaultGeometryAttributeName
501
                                        .equals(otherType.defaultGeometryAttributeName);
502

    
503
                }
504
                return true;
505

    
506
        }
507

    
508
        /**
509
         * Start of DynClass interface implementation
510
         * READONLY
511
         */
512

    
513
        public DynField addDynField(String name) {
514
                throw new UnsupportedOperationException();
515
        }
516

    
517
        public DynField getDeclaredDynField(String name) {
518
                return (DynField) getAttributeDescriptor(name);
519
        }
520

    
521
        public DynField[] getDeclaredDynFields() {
522
                return (DynField[]) getAttributeDescriptors();
523
        }
524

    
525
        public String getDescription() {
526
                return null;
527
        }
528

    
529
        public DynField getDynField(String name) {
530
                return (DynField) getAttributeDescriptor(name);
531
        }
532

    
533
        public DynField[] getDynFields() {
534
                return (DynField[]) getAttributeDescriptors();
535
        }
536

    
537
        public String getName() {
538
                return this.id + "_" + internalID;
539
        }
540

    
541
        public void removeDynField(String name) {
542
                throw new UnsupportedOperationException();
543

    
544
        }
545

    
546
        public void addDynMethod(DynMethod dynMethod) {
547
                throw new UnsupportedOperationException();
548

    
549
        }
550

    
551
        public void extend(DynClass dynClass) {
552
                throw new UnsupportedOperationException();
553

    
554
        }
555

    
556
        public void extend(String dynClassName) {
557
                throw new UnsupportedOperationException();
558

    
559
        }
560

    
561
        public void extend(String namespace, String dynClassName) {
562
                throw new UnsupportedOperationException();
563

    
564
        }
565

    
566
        public DynMethod getDeclaredDynMethod(String name)
567
                        throws DynMethodException {
568
                return null;
569
        }
570

    
571
        public DynMethod[] getDeclaredDynMethods() throws DynMethodException {
572
                return null;
573
        }
574

    
575
        public DynMethod getDynMethod(String name) throws DynMethodException {
576
                return null;
577
        }
578

    
579
        public DynMethod getDynMethod(int code) throws DynMethodException {
580
                return null;
581
        }
582

    
583
        public DynMethod[] getDynMethods() throws DynMethodException {
584
                return null;
585
        }
586

    
587
        public DynClass[] getSuperDynClasses() {
588
                return null;
589
        }
590

    
591
        public boolean isInstance(DynObject dynObject) {
592
                if (dynObject.getDynClass().getName() == getName()) {
593
                        return true;
594
                }
595
                return false;
596
        }
597

    
598
        public DynObject newInstance() {
599

    
600
                throw new UnsupportedOperationException();
601
        }
602

    
603
        public void removeDynMethod(String name) {
604
                throw new UnsupportedOperationException();
605

    
606
        }
607

    
608
        public DynField addDynFieldChoice(String name, int type,
609
                        Object defaultValue, DynObjectValueItem[] values,
610
                        boolean mandatory, boolean persistent) {
611
                throw new UnsupportedOperationException();
612
        }
613

    
614
        public DynField addDynFieldRange(String name, int type,
615
                        Object defaultValue, Object min, Object max, boolean mandatory,
616
                        boolean persistent) {
617
                throw new UnsupportedOperationException();
618
        }
619

    
620
        public DynField addDynFieldSingle(String name, int type,
621
                        Object defaultValue, boolean mandatory, boolean persistent) {
622
                throw new UnsupportedOperationException();
623
        }
624

    
625
        public void validate(DynObject object) throws DynObjectValidateException {
626
                //FIXME: not sure it's the correct code
627
                if (object instanceof Feature) {
628
                        Feature fea = (Feature) object;
629
                        if (fea.getType().equals(this)) {
630
                                return;
631
                        }
632
                }
633
                throw new DynObjectValidateException(this.id);
634
        }
635

    
636
        public DynField addDynFieldLong(String name) {
637
                throw new UnsupportedOperationException();
638
        }
639

    
640
        public DynField addDynFieldChoice(String name, int type,
641
                        Object defaultValue, DynObjectValueItem[] values) {
642
                throw new UnsupportedOperationException();
643
        }
644

    
645
        public DynField addDynFieldRange(String name, int type,
646
                        Object defaultValue, Object min, Object max) {
647
                throw new UnsupportedOperationException();
648
        }
649

    
650
        public DynField addDynFieldSingle(String name, int type, Object defaultValue) {
651
                throw new UnsupportedOperationException();
652
        }
653

    
654
        public DynField addDynFieldString(String name) {
655
                throw new UnsupportedOperationException();
656
        }
657
        
658
        public DynField addDynFieldInt(String name) {
659
                throw new UnsupportedOperationException();
660
        }
661
        
662
        public DynField addDynFieldDouble(String name) {
663
                throw new UnsupportedOperationException();
664
        }
665
        
666
        public DynField addDynFieldFloat(String name) {
667
                throw new UnsupportedOperationException();
668
        }
669

    
670
        public DynField addDynFieldBoolean(String name) {
671
                throw new UnsupportedOperationException();
672
        }
673

    
674
        public DynField addDynFieldList(String name) {
675
                throw new UnsupportedOperationException();
676
        }
677

    
678
        public DynField addDynFieldMap(String name) {
679
                throw new UnsupportedOperationException();
680
        }
681

    
682
        public DynField addDynFieldObject(String name) {
683
                throw new UnsupportedOperationException();
684
        }
685

    
686
        public DynField addDynFieldSet(String name) {
687
                throw new UnsupportedOperationException();
688
        }
689

    
690
        public DynField addDynFieldArray(String name) {
691
                throw new UnsupportedOperationException();
692
        }
693

    
694
        public DynField addDynFieldDate(String name) {
695
                throw new UnsupportedOperationException();
696
        }
697

    
698
        public void extend(DynStruct struct) {
699
                throw new UnsupportedOperationException();
700
        }
701

    
702
        public String getFullName() {
703
        // TODO: usar el DynClassName
704
                return this.id;
705
        }
706

    
707
        public String getNamespace() {
708
                return "DALFeature";
709
        }
710

    
711
        public DynStruct[] getSuperDynStructs() {
712
                return null;
713
        }
714

    
715
        public void setDescription(String description) {
716
                throw new UnsupportedOperationException();
717
        }
718

    
719
        public void setNamespace(String namespace) {
720
                throw new UnsupportedOperationException();
721
        }
722

    
723
        public DynField addDynFieldFile(String name) {
724
                throw new UnsupportedOperationException();
725
        }
726

    
727
        public DynField addDynFieldFolder(String name) {
728
                throw new UnsupportedOperationException();
729
        }
730

    
731
        public DynField addDynFieldURL(String name) {
732
                throw new UnsupportedOperationException();
733
        }
734

    
735
        public DynField addDynFieldURI(String name) {
736
                throw new UnsupportedOperationException();
737
        }
738

    
739
    public boolean isExtendable(DynStruct dynStruct) {
740
        return false;
741
    }
742

    
743
        public void extend(DynStruct[] structs) {
744
                // TODO Auto-generated method stub
745
                
746
        }
747

    
748
        public void remove(DynStruct superDynStruct) {
749
                // TODO Auto-generated method stub
750
                
751
        }
752

    
753
        public void removeAll(DynStruct[] superDynStruct) {
754
                // TODO Auto-generated method stub
755
                
756
        }
757

    
758
        public FeatureAttributeDescriptor getDefaultTimeAttribute() {
759
                if (this.defaultTimeAttributeIndex < 0) {
760
                        return null;
761
                }
762
                return (FeatureAttributeDescriptor) super
763
                                .get(this.defaultTimeAttributeIndex);
764
        }
765
}