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 @ 41342

History | View | Annotate | Download (21.4 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

    
35
import org.cresques.cts.IProjection;
36

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

    
54
public class DefaultFeatureType extends ArrayList implements FeatureType,
55
                DynClass {
56

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

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

    
74
        private List srsList = null; 
75

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

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

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

    
97
        protected DefaultFeatureType(DefaultFeatureType other,
98
                        boolean copyAttributes) {
99
                this("default");
100
                initialize(other, copyAttributes);
101
        }
102

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

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

    
127
        public String getId() {
128
                return this.id;
129
        }
130

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

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

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

    
159
        public FeatureType getCopy() {
160
                return new DefaultFeatureType(this);
161
        }
162

    
163
        public int getDefaultGeometryAttributeIndex() {
164
                return this.defaultGeometryAttributeIndex;
165
        }
166

    
167
        public String getDefaultGeometryAttributeName() {
168
                return this.defaultGeometryAttributeName;
169
        }
170

    
171
        public EditableFeatureType getEditable() {
172
                return new DefaultEditableFeatureType(this);
173
        }
174

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

    
187
        public FeatureRules getRules() {
188
                return this.rules;
189
        }
190

    
191
        public boolean hasEvaluators() {
192
                return this.hasEvaluators;
193
        }
194

    
195
        public boolean hasEmulators() {
196
                return this.hasEmulators;
197
        }
198

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

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

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

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

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

    
257
        public boolean isSubtypeOf(FeatureType featureType) {
258
                return false;
259
        }
260

    
261

    
262

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

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

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

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

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

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

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

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

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

    
362
                public EditableFeatureType getEditable() {
363
                        throw new UnsupportedOperationException();
364
                }
365
        }
366

    
367
        public class SubtypeFeatureTypeNameException extends DataException {
368

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

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

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

    
402
        public Iterator iterator() {
403
                return getIterator(super.iterator());
404
        }
405

    
406
        protected Iterator getIterator(Iterator iter) {
407
                return new DelegatedIterator(iter);
408
        }
409

    
410
        protected class DelegatedIterator implements Iterator {
411

    
412
                protected Iterator iterator;
413

    
414
                public DelegatedIterator(Iterator iter) {
415
                        this.iterator = iter;
416
                }
417

    
418
                public boolean hasNext() {
419
                        return iterator.hasNext();
420
                }
421

    
422
                public Object next() {
423
                        return iterator.next();
424
                }
425

    
426
                public void remove() {
427
                        throw new UnsupportedOperationException();
428
                }
429

    
430
        }
431

    
432
        public boolean allowAutomaticValues() {
433
                return this.allowAtomaticValues;
434
        }
435

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

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

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

    
466

    
467

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

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

    
501
                }
502
                return true;
503

    
504
        }
505

    
506
        /**
507
         * Start of DynClass interface implementation
508
         * READONLY
509
         */
510

    
511
        public DynField addDynField(String name) {
512
                throw new UnsupportedOperationException();
513
        }
514

    
515
        public DynField getDeclaredDynField(String name) {
516
                return (DynField) getAttributeDescriptor(name);
517
        }
518

    
519
        public DynField[] getDeclaredDynFields() {
520
                return (DynField[]) getAttributeDescriptors();
521
        }
522

    
523
        public String getDescription() {
524
                return null;
525
        }
526

    
527
        public DynField getDynField(String name) {
528
                return (DynField) getAttributeDescriptor(name);
529
        }
530

    
531
        public DynField[] getDynFields() {
532
                return (DynField[]) getAttributeDescriptors();
533
        }
534

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

    
539
        public void removeDynField(String name) {
540
                throw new UnsupportedOperationException();
541

    
542
        }
543

    
544
        public void addDynMethod(DynMethod dynMethod) {
545
                throw new UnsupportedOperationException();
546

    
547
        }
548

    
549
        public void extend(DynClass dynClass) {
550
                throw new UnsupportedOperationException();
551

    
552
        }
553

    
554
        public void extend(String dynClassName) {
555
                throw new UnsupportedOperationException();
556

    
557
        }
558

    
559
        public void extend(String namespace, String dynClassName) {
560
                throw new UnsupportedOperationException();
561

    
562
        }
563

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

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

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

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

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

    
585
        public DynClass[] getSuperDynClasses() {
586
                return null;
587
        }
588

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

    
596
        public DynObject newInstance() {
597

    
598
                throw new UnsupportedOperationException();
599
        }
600

    
601
        public void removeDynMethod(String name) {
602
                throw new UnsupportedOperationException();
603

    
604
        }
605

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

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

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

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

    
634
        public DynField addDynFieldLong(String name) {
635
                throw new UnsupportedOperationException();
636
        }
637

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

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

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

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

    
668
        public DynField addDynFieldBoolean(String name) {
669
                throw new UnsupportedOperationException();
670
        }
671

    
672
        public DynField addDynFieldList(String name) {
673
                throw new UnsupportedOperationException();
674
        }
675

    
676
        public DynField addDynFieldMap(String name) {
677
                throw new UnsupportedOperationException();
678
        }
679

    
680
        public DynField addDynFieldObject(String name) {
681
                throw new UnsupportedOperationException();
682
        }
683

    
684
        public DynField addDynFieldSet(String name) {
685
                throw new UnsupportedOperationException();
686
        }
687

    
688
        public DynField addDynFieldArray(String name) {
689
                throw new UnsupportedOperationException();
690
        }
691

    
692
        public DynField addDynFieldDate(String name) {
693
                throw new UnsupportedOperationException();
694
        }
695

    
696
        public void extend(DynStruct struct) {
697
                throw new UnsupportedOperationException();
698
        }
699

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

    
705
        public String getNamespace() {
706
                return "DALFeature";
707
        }
708

    
709
        public DynStruct[] getSuperDynStructs() {
710
                return null;
711
        }
712

    
713
        public void setDescription(String description) {
714
                throw new UnsupportedOperationException();
715
        }
716

    
717
        public void setNamespace(String namespace) {
718
                throw new UnsupportedOperationException();
719
        }
720

    
721
        public DynField addDynFieldFile(String name) {
722
                throw new UnsupportedOperationException();
723
        }
724

    
725
        public DynField addDynFieldFolder(String name) {
726
                throw new UnsupportedOperationException();
727
        }
728

    
729
        public DynField addDynFieldURL(String name) {
730
                throw new UnsupportedOperationException();
731
        }
732

    
733
        public DynField addDynFieldURI(String name) {
734
                throw new UnsupportedOperationException();
735
        }
736

    
737
    public boolean isExtendable(DynStruct dynStruct) {
738
        return false;
739
    }
740

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

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

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

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