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 @ 41212
History | View | Annotate | Download (19.6 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.Collections; |
29 |
import java.util.Iterator; |
30 |
import java.util.List; |
31 |
|
32 |
import org.cresques.cts.IProjection; |
33 |
|
34 |
import org.gvsig.fmap.dal.DataTypes; |
35 |
import org.gvsig.fmap.dal.exception.DataException; |
36 |
import org.gvsig.fmap.dal.feature.EditableFeatureType; |
37 |
import org.gvsig.fmap.dal.feature.Feature; |
38 |
import org.gvsig.fmap.dal.feature.FeatureAttributeDescriptor; |
39 |
import org.gvsig.fmap.dal.feature.FeatureRules; |
40 |
import org.gvsig.fmap.dal.feature.FeatureType; |
41 |
import org.gvsig.tools.dynobject.DynClass; |
42 |
import org.gvsig.tools.dynobject.DynField; |
43 |
import org.gvsig.tools.dynobject.DynMethod; |
44 |
import org.gvsig.tools.dynobject.DynObject; |
45 |
import org.gvsig.tools.dynobject.DynObjectValueItem; |
46 |
import org.gvsig.tools.dynobject.DynStruct; |
47 |
import org.gvsig.tools.dynobject.exception.DynMethodException; |
48 |
import org.gvsig.tools.dynobject.exception.DynObjectValidateException; |
49 |
|
50 |
public class DefaultFeatureType extends ArrayList implements FeatureType, |
51 |
DynClass { |
52 |
|
53 |
/**
|
54 |
*
|
55 |
*/
|
56 |
private static final long serialVersionUID = -7988721447349282215L; |
57 |
|
58 |
private DefaultFeatureRules rules;
|
59 |
protected boolean hasEvaluators; |
60 |
protected String defaultGeometryAttributeName; |
61 |
protected int defaultGeometryAttributeIndex; |
62 |
protected int defaultTimeAttributeIndex; |
63 |
private String id; |
64 |
protected boolean hasOID; |
65 |
protected boolean allowAtomaticValues; |
66 |
protected FeatureAttributeDescriptor[] pk = null; |
67 |
private String internalID = null; |
68 |
|
69 |
private List srsList = null; |
70 |
|
71 |
protected DefaultFeatureType(String id) { |
72 |
this.internalID = Integer.toHexString((int) (Math.random()*100000)).toUpperCase(); |
73 |
this.id = id;
|
74 |
this.rules = new DefaultFeatureRules(); |
75 |
this.hasEvaluators = false; |
76 |
this.defaultGeometryAttributeName = null; |
77 |
this.defaultGeometryAttributeIndex = -1; |
78 |
this.defaultTimeAttributeIndex = -1; |
79 |
this.allowAtomaticValues = false; |
80 |
} |
81 |
|
82 |
protected DefaultFeatureType() {
|
83 |
this("default"); |
84 |
} |
85 |
|
86 |
protected DefaultFeatureType(DefaultFeatureType other) {
|
87 |
this("default"); |
88 |
initialize(other, true);
|
89 |
} |
90 |
|
91 |
protected DefaultFeatureType(DefaultFeatureType other,
|
92 |
boolean copyAttributes) {
|
93 |
this("default"); |
94 |
initialize(other, copyAttributes); |
95 |
} |
96 |
|
97 |
protected void initialize(DefaultFeatureType other, boolean copyAttributes) { |
98 |
this.id = other.getId();
|
99 |
if (copyAttributes) {
|
100 |
Iterator iter = other.iterator();
|
101 |
DefaultFeatureAttributeDescriptor attr; |
102 |
while (iter.hasNext()) {
|
103 |
attr = (DefaultFeatureAttributeDescriptor) iter.next(); |
104 |
this.intitalizeAddAttibute(attr);
|
105 |
} |
106 |
} |
107 |
this.defaultGeometryAttributeName = other.defaultGeometryAttributeName;
|
108 |
this.hasEvaluators = other.hasEvaluators;
|
109 |
this.rules = (DefaultFeatureRules) other.rules.getCopy();
|
110 |
this.defaultGeometryAttributeIndex = other.defaultGeometryAttributeIndex;
|
111 |
this.defaultTimeAttributeIndex = other.defaultTimeAttributeIndex;
|
112 |
this.hasOID = other.hasOID;
|
113 |
this.id = other.id; // XXX ???? copiar o no esto???? |
114 |
} |
115 |
|
116 |
protected void intitalizeAddAttibute(DefaultFeatureAttributeDescriptor attr) { |
117 |
super.add(attr.getCopy());
|
118 |
} |
119 |
|
120 |
public String getId() { |
121 |
return this.id; |
122 |
} |
123 |
|
124 |
public Object get(String name) { |
125 |
FeatureAttributeDescriptor attr; |
126 |
Iterator iter = this.iterator(); |
127 |
while (iter.hasNext()) {
|
128 |
attr = (FeatureAttributeDescriptor) iter.next(); |
129 |
if (attr.getName().equalsIgnoreCase(name)) {
|
130 |
return attr;
|
131 |
} |
132 |
} |
133 |
return null; |
134 |
} |
135 |
|
136 |
public FeatureAttributeDescriptor getAttributeDescriptor(String name) { |
137 |
FeatureAttributeDescriptor attr; |
138 |
Iterator iter = this.iterator(); |
139 |
while (iter.hasNext()) {
|
140 |
attr = (FeatureAttributeDescriptor) iter.next(); |
141 |
if (attr.getName().equalsIgnoreCase(name)) {
|
142 |
return attr;
|
143 |
} |
144 |
} |
145 |
return null; |
146 |
} |
147 |
|
148 |
public FeatureAttributeDescriptor getAttributeDescriptor(int index) { |
149 |
return (FeatureAttributeDescriptor) super.get(index); |
150 |
} |
151 |
|
152 |
public FeatureType getCopy() {
|
153 |
return new DefaultFeatureType(this); |
154 |
} |
155 |
|
156 |
public int getDefaultGeometryAttributeIndex() { |
157 |
return this.defaultGeometryAttributeIndex; |
158 |
} |
159 |
|
160 |
public String getDefaultGeometryAttributeName() { |
161 |
return this.defaultGeometryAttributeName; |
162 |
} |
163 |
|
164 |
public EditableFeatureType getEditable() {
|
165 |
return new DefaultEditableFeatureType(this); |
166 |
} |
167 |
|
168 |
public int getIndex(String name) { |
169 |
FeatureAttributeDescriptor attr; |
170 |
Iterator iter = this.iterator(); |
171 |
while (iter.hasNext()) {
|
172 |
attr = (FeatureAttributeDescriptor) iter.next(); |
173 |
if (attr.getName().equalsIgnoreCase(name)) {
|
174 |
return attr.getIndex();
|
175 |
} |
176 |
} |
177 |
return -1; |
178 |
} |
179 |
|
180 |
public FeatureRules getRules() {
|
181 |
return this.rules; |
182 |
} |
183 |
|
184 |
public boolean hasEvaluators() { |
185 |
return this.hasEvaluators; |
186 |
} |
187 |
|
188 |
public List getSRSs() { |
189 |
if (this.srsList == null) { |
190 |
ArrayList tmp = new ArrayList(); |
191 |
Iterator iter = iterator();
|
192 |
Iterator tmpIter;
|
193 |
boolean allreadyHave;
|
194 |
IProjection tmpSRS; |
195 |
FeatureAttributeDescriptor attr; |
196 |
while (iter.hasNext()){
|
197 |
attr = (FeatureAttributeDescriptor) iter.next(); |
198 |
if (attr.getDataType().getType() == DataTypes.GEOMETRY
|
199 |
&& attr.getSRS() != null) {
|
200 |
allreadyHave = false;
|
201 |
tmpIter = tmp.iterator(); |
202 |
while (tmpIter.hasNext()) {
|
203 |
tmpSRS = (IProjection) tmpIter.next(); |
204 |
if (tmpSRS.getAbrev().equals(attr.getSRS().getAbrev())) {
|
205 |
allreadyHave = true;
|
206 |
break;
|
207 |
} |
208 |
} |
209 |
if (!allreadyHave) {
|
210 |
tmp.add(attr.getSRS()); |
211 |
} |
212 |
} |
213 |
} |
214 |
this.srsList = Collections.unmodifiableList(tmp); |
215 |
} |
216 |
return this.srsList; |
217 |
} |
218 |
|
219 |
public IProjection getDefaultSRS() {
|
220 |
if (this.getDefaultGeometryAttributeIndex() < 0) { |
221 |
return null; |
222 |
} |
223 |
return this.getAttributeDescriptor( |
224 |
this.getDefaultGeometryAttributeIndex()).getSRS();
|
225 |
} |
226 |
|
227 |
public void validateFeature(Feature feature, int mode) { |
228 |
if (Feature.UPDATE == mode){
|
229 |
((DefaultFeatureRules)getRules()).validate(feature); |
230 |
} |
231 |
} |
232 |
|
233 |
public FeatureType getSubtype(String[] names) throws DataException { |
234 |
if( names==null || names.length <1) { |
235 |
return (FeatureType) this.clone(); |
236 |
} |
237 |
return new SubtypeFeatureType(this, names, null); |
238 |
} |
239 |
|
240 |
public FeatureType getSubtype(String[] names, String[] constantsNames) throws DataException { |
241 |
if( (names==null || names.length <1) && (constantsNames==null || constantsNames.length <1) ) { |
242 |
return (FeatureType) this.clone(); |
243 |
} |
244 |
return new SubtypeFeatureType(this, names,constantsNames); |
245 |
} |
246 |
|
247 |
public boolean isSubtypeOf(FeatureType featureType) { |
248 |
return false; |
249 |
} |
250 |
|
251 |
|
252 |
|
253 |
class SubtypeFeatureType extends DefaultFeatureType { |
254 |
/**
|
255 |
*
|
256 |
*/
|
257 |
private static final long serialVersionUID = 6913732960073922540L; |
258 |
WeakReference parent;
|
259 |
|
260 |
SubtypeFeatureType(DefaultFeatureType parent, String[] names, String[] constantsNames) |
261 |
throws DataException {
|
262 |
super(parent, false); |
263 |
DefaultFeatureAttributeDescriptor attrcopy; |
264 |
DefaultFeatureAttributeDescriptor attr; |
265 |
|
266 |
// Copy attributes
|
267 |
if (names != null && names.length > 0) { |
268 |
for (int i = 0; i < names.length; i++) { |
269 |
attr = (DefaultFeatureAttributeDescriptor) parent |
270 |
.getAttributeDescriptor(names[i]); |
271 |
if (attr == null) { |
272 |
throw new SubtypeFeatureTypeNameException(names[i], parent |
273 |
.getId()); |
274 |
} |
275 |
attrcopy = new DefaultFeatureAttributeDescriptor(attr);
|
276 |
this.add(attrcopy);
|
277 |
attrcopy.index = i; |
278 |
} |
279 |
} else {
|
280 |
for( int i=0; i<parent.size(); i++ ) { |
281 |
attr = (DefaultFeatureAttributeDescriptor) parent.getAttributeDescriptor(i); |
282 |
attrcopy = new DefaultFeatureAttributeDescriptor(attr);
|
283 |
this.add(attrcopy);
|
284 |
attrcopy.index = i; |
285 |
} |
286 |
} |
287 |
|
288 |
// Set the consttants attributes.
|
289 |
if (constantsNames != null && constantsNames.length > 0) { |
290 |
for (int i = 0; i < constantsNames.length; i++) { |
291 |
attr = (DefaultFeatureAttributeDescriptor) this.getAttributeDescriptor(constantsNames[i]);
|
292 |
attr.setConstantValue(true);
|
293 |
} |
294 |
} |
295 |
|
296 |
// Add missing pk fiels if any
|
297 |
if (!parent.hasOID()) {
|
298 |
Iterator iter = parent.iterator();
|
299 |
while (iter.hasNext()) {
|
300 |
attr = (DefaultFeatureAttributeDescriptor) iter.next(); |
301 |
if (attr.isPrimaryKey()
|
302 |
&& this.getIndex(attr.getName()) < 0) { |
303 |
attrcopy = new DefaultFeatureAttributeDescriptor(attr);
|
304 |
this.add(attrcopy);
|
305 |
attrcopy.index = this.size() - 1; |
306 |
} |
307 |
} |
308 |
} |
309 |
|
310 |
this.defaultGeometryAttributeIndex = this |
311 |
.getIndex(this.defaultGeometryAttributeName);
|
312 |
if (this.defaultGeometryAttributeIndex < 0) { |
313 |
this.defaultGeometryAttributeName = null; |
314 |
} |
315 |
this.parent = new WeakReference(parent); |
316 |
} |
317 |
|
318 |
public FeatureType getSubtype(String[] names) throws DataException { |
319 |
return new SubtypeFeatureType((DefaultFeatureType) this.parent |
320 |
.get(), names, null);
|
321 |
} |
322 |
|
323 |
public boolean isSubtypeOf(FeatureType featureType) { |
324 |
if (featureType == null) { |
325 |
return false; |
326 |
} |
327 |
FeatureType parent = (FeatureType) this.parent.get();
|
328 |
return featureType.equals(parent);
|
329 |
} |
330 |
|
331 |
public EditableFeatureType getEditable() {
|
332 |
throw new UnsupportedOperationException(); |
333 |
} |
334 |
} |
335 |
|
336 |
public class SubtypeFeatureTypeNameException extends DataException { |
337 |
|
338 |
/**
|
339 |
*
|
340 |
*/
|
341 |
private static final long serialVersionUID = -4414242486723260101L; |
342 |
private final static String MESSAGE_FORMAT = "Attribute name '%(name)s' not found in type (%(type)s)."; |
343 |
private final static String MESSAGE_KEY = "_SubtypeFeatureTypeNameException"; |
344 |
|
345 |
public SubtypeFeatureTypeNameException(String name, String type) { |
346 |
super(MESSAGE_FORMAT, MESSAGE_KEY, serialVersionUID);
|
347 |
setValue("name", name);
|
348 |
setValue("type", type);
|
349 |
} |
350 |
} |
351 |
|
352 |
public boolean hasOID() { |
353 |
return hasOID;
|
354 |
} |
355 |
public String toString(){ |
356 |
StringBuffer s = new StringBuffer(); |
357 |
s.append(this.getId());
|
358 |
s.append(":[");
|
359 |
String attName;
|
360 |
for (int i = 0; i < size(); i++) { |
361 |
attName =((FeatureAttributeDescriptor)get(i)).getName().toString(); |
362 |
s.append(attName); |
363 |
if (i < size() - 1) { |
364 |
s.append(',');
|
365 |
} |
366 |
} |
367 |
s.append(']');
|
368 |
return s.toString();
|
369 |
} |
370 |
|
371 |
public Iterator iterator() { |
372 |
return getIterator(super.iterator()); |
373 |
} |
374 |
|
375 |
protected Iterator getIterator(Iterator iter) { |
376 |
return new DelegatedIterator(iter); |
377 |
} |
378 |
|
379 |
protected class DelegatedIterator implements Iterator { |
380 |
|
381 |
protected Iterator iterator; |
382 |
|
383 |
public DelegatedIterator(Iterator iter) { |
384 |
this.iterator = iter;
|
385 |
} |
386 |
|
387 |
public boolean hasNext() { |
388 |
return iterator.hasNext();
|
389 |
} |
390 |
|
391 |
public Object next() { |
392 |
return iterator.next();
|
393 |
} |
394 |
|
395 |
public void remove() { |
396 |
throw new UnsupportedOperationException(); |
397 |
} |
398 |
|
399 |
} |
400 |
|
401 |
public boolean allowAutomaticValues() { |
402 |
return this.allowAtomaticValues; |
403 |
} |
404 |
|
405 |
public FeatureAttributeDescriptor[] getAttributeDescriptors() { |
406 |
return (FeatureAttributeDescriptor[]) super |
407 |
.toArray(new FeatureAttributeDescriptor[super.size()]); |
408 |
} |
409 |
|
410 |
public FeatureAttributeDescriptor[] getPrimaryKey() { |
411 |
if (pk == null) { |
412 |
List pkList = new ArrayList(); |
413 |
Iterator iter = super.iterator(); |
414 |
FeatureAttributeDescriptor attr; |
415 |
while (iter.hasNext()){
|
416 |
attr = (FeatureAttributeDescriptor) iter.next(); |
417 |
if (attr.isPrimaryKey()){
|
418 |
pkList.add(attr); |
419 |
} |
420 |
} |
421 |
pk = (FeatureAttributeDescriptor[]) pkList
|
422 |
.toArray(new FeatureAttributeDescriptor[pkList.size()]);
|
423 |
} |
424 |
return pk;
|
425 |
} |
426 |
|
427 |
public FeatureAttributeDescriptor getDefaultGeometryAttribute() {
|
428 |
if (this.defaultGeometryAttributeIndex < 0) { |
429 |
return null; |
430 |
} |
431 |
return (FeatureAttributeDescriptor) super |
432 |
.get(this.defaultGeometryAttributeIndex);
|
433 |
} |
434 |
|
435 |
|
436 |
|
437 |
public boolean equals(Object other) { |
438 |
if (this == other) { |
439 |
return true; |
440 |
} |
441 |
if (!(other instanceof DefaultFeatureType)) { |
442 |
return false; |
443 |
} |
444 |
DefaultFeatureType otherType = (DefaultFeatureType) other; |
445 |
if (!this.id.equals(otherType.id)) { |
446 |
return false; |
447 |
} |
448 |
if (this.size() != otherType.size()) { |
449 |
return false; |
450 |
} |
451 |
FeatureAttributeDescriptor attr,attrOther; |
452 |
Iterator iter,iterOther;
|
453 |
iter = this.iterator();
|
454 |
iterOther = otherType.iterator(); |
455 |
while (iter.hasNext()) {
|
456 |
attr = (FeatureAttributeDescriptor) iter.next(); |
457 |
attrOther = (FeatureAttributeDescriptor) iterOther.next(); |
458 |
if (!attr.equals(attrOther)) {
|
459 |
return false; |
460 |
} |
461 |
} |
462 |
|
463 |
if (defaultGeometryAttributeName != otherType.defaultGeometryAttributeName) {
|
464 |
if (defaultGeometryAttributeName == null) { |
465 |
return false; |
466 |
} |
467 |
return defaultGeometryAttributeName
|
468 |
.equals(otherType.defaultGeometryAttributeName); |
469 |
|
470 |
} |
471 |
return true; |
472 |
|
473 |
} |
474 |
|
475 |
/**
|
476 |
* Start of DynClass interface implementation
|
477 |
* READONLY
|
478 |
*/
|
479 |
|
480 |
public DynField addDynField(String name) { |
481 |
throw new UnsupportedOperationException(); |
482 |
} |
483 |
|
484 |
public DynField getDeclaredDynField(String name) { |
485 |
return (DynField) getAttributeDescriptor(name);
|
486 |
} |
487 |
|
488 |
public DynField[] getDeclaredDynFields() { |
489 |
return (DynField[]) getAttributeDescriptors(); |
490 |
} |
491 |
|
492 |
public String getDescription() { |
493 |
return null; |
494 |
} |
495 |
|
496 |
public DynField getDynField(String name) { |
497 |
return (DynField) getAttributeDescriptor(name);
|
498 |
} |
499 |
|
500 |
public DynField[] getDynFields() { |
501 |
return (DynField[]) getAttributeDescriptors(); |
502 |
} |
503 |
|
504 |
public String getName() { |
505 |
return this.id + "_" + internalID; |
506 |
} |
507 |
|
508 |
public void removeDynField(String name) { |
509 |
throw new UnsupportedOperationException(); |
510 |
|
511 |
} |
512 |
|
513 |
public void addDynMethod(DynMethod dynMethod) { |
514 |
throw new UnsupportedOperationException(); |
515 |
|
516 |
} |
517 |
|
518 |
public void extend(DynClass dynClass) { |
519 |
throw new UnsupportedOperationException(); |
520 |
|
521 |
} |
522 |
|
523 |
public void extend(String dynClassName) { |
524 |
throw new UnsupportedOperationException(); |
525 |
|
526 |
} |
527 |
|
528 |
public void extend(String namespace, String dynClassName) { |
529 |
throw new UnsupportedOperationException(); |
530 |
|
531 |
} |
532 |
|
533 |
public DynMethod getDeclaredDynMethod(String name) |
534 |
throws DynMethodException {
|
535 |
return null; |
536 |
} |
537 |
|
538 |
public DynMethod[] getDeclaredDynMethods() throws DynMethodException { |
539 |
return null; |
540 |
} |
541 |
|
542 |
public DynMethod getDynMethod(String name) throws DynMethodException { |
543 |
return null; |
544 |
} |
545 |
|
546 |
public DynMethod getDynMethod(int code) throws DynMethodException { |
547 |
return null; |
548 |
} |
549 |
|
550 |
public DynMethod[] getDynMethods() throws DynMethodException { |
551 |
return null; |
552 |
} |
553 |
|
554 |
public DynClass[] getSuperDynClasses() { |
555 |
return null; |
556 |
} |
557 |
|
558 |
public boolean isInstance(DynObject dynObject) { |
559 |
if (dynObject.getDynClass().getName() == getName()) {
|
560 |
return true; |
561 |
} |
562 |
return false; |
563 |
} |
564 |
|
565 |
public DynObject newInstance() {
|
566 |
|
567 |
throw new UnsupportedOperationException(); |
568 |
} |
569 |
|
570 |
public void removeDynMethod(String name) { |
571 |
throw new UnsupportedOperationException(); |
572 |
|
573 |
} |
574 |
|
575 |
public DynField addDynFieldChoice(String name, int type, |
576 |
Object defaultValue, DynObjectValueItem[] values, |
577 |
boolean mandatory, boolean persistent) { |
578 |
throw new UnsupportedOperationException(); |
579 |
} |
580 |
|
581 |
public DynField addDynFieldRange(String name, int type, |
582 |
Object defaultValue, Object min, Object max, boolean mandatory, |
583 |
boolean persistent) {
|
584 |
throw new UnsupportedOperationException(); |
585 |
} |
586 |
|
587 |
public DynField addDynFieldSingle(String name, int type, |
588 |
Object defaultValue, boolean mandatory, boolean persistent) { |
589 |
throw new UnsupportedOperationException(); |
590 |
} |
591 |
|
592 |
public void validate(DynObject object) throws DynObjectValidateException { |
593 |
//FIXME: not sure it's the correct code
|
594 |
if (object instanceof Feature) { |
595 |
Feature fea = (Feature) object; |
596 |
if (fea.getType().equals(this)) { |
597 |
return;
|
598 |
} |
599 |
} |
600 |
throw new DynObjectValidateException(this.id); |
601 |
} |
602 |
|
603 |
public DynField addDynFieldLong(String name) { |
604 |
throw new UnsupportedOperationException(); |
605 |
} |
606 |
|
607 |
public DynField addDynFieldChoice(String name, int type, |
608 |
Object defaultValue, DynObjectValueItem[] values) { |
609 |
throw new UnsupportedOperationException(); |
610 |
} |
611 |
|
612 |
public DynField addDynFieldRange(String name, int type, |
613 |
Object defaultValue, Object min, Object max) { |
614 |
throw new UnsupportedOperationException(); |
615 |
} |
616 |
|
617 |
public DynField addDynFieldSingle(String name, int type, Object defaultValue) { |
618 |
throw new UnsupportedOperationException(); |
619 |
} |
620 |
|
621 |
public DynField addDynFieldString(String name) { |
622 |
throw new UnsupportedOperationException(); |
623 |
} |
624 |
|
625 |
public DynField addDynFieldInt(String name) { |
626 |
throw new UnsupportedOperationException(); |
627 |
} |
628 |
|
629 |
public DynField addDynFieldDouble(String name) { |
630 |
throw new UnsupportedOperationException(); |
631 |
} |
632 |
|
633 |
public DynField addDynFieldFloat(String name) { |
634 |
throw new UnsupportedOperationException(); |
635 |
} |
636 |
|
637 |
public DynField addDynFieldBoolean(String name) { |
638 |
throw new UnsupportedOperationException(); |
639 |
} |
640 |
|
641 |
public DynField addDynFieldList(String name) { |
642 |
throw new UnsupportedOperationException(); |
643 |
} |
644 |
|
645 |
public DynField addDynFieldMap(String name) { |
646 |
throw new UnsupportedOperationException(); |
647 |
} |
648 |
|
649 |
public DynField addDynFieldObject(String name) { |
650 |
throw new UnsupportedOperationException(); |
651 |
} |
652 |
|
653 |
public DynField addDynFieldSet(String name) { |
654 |
throw new UnsupportedOperationException(); |
655 |
} |
656 |
|
657 |
public DynField addDynFieldArray(String name) { |
658 |
throw new UnsupportedOperationException(); |
659 |
} |
660 |
|
661 |
public DynField addDynFieldDate(String name) { |
662 |
throw new UnsupportedOperationException(); |
663 |
} |
664 |
|
665 |
public void extend(DynStruct struct) { |
666 |
throw new UnsupportedOperationException(); |
667 |
} |
668 |
|
669 |
public String getFullName() { |
670 |
// TODO: usar el DynClassName
|
671 |
return this.id; |
672 |
} |
673 |
|
674 |
public String getNamespace() { |
675 |
return "DALFeature"; |
676 |
} |
677 |
|
678 |
public DynStruct[] getSuperDynStructs() { |
679 |
return null; |
680 |
} |
681 |
|
682 |
public void setDescription(String description) { |
683 |
throw new UnsupportedOperationException(); |
684 |
} |
685 |
|
686 |
public void setNamespace(String namespace) { |
687 |
throw new UnsupportedOperationException(); |
688 |
} |
689 |
|
690 |
public DynField addDynFieldFile(String name) { |
691 |
throw new UnsupportedOperationException(); |
692 |
} |
693 |
|
694 |
public DynField addDynFieldFolder(String name) { |
695 |
throw new UnsupportedOperationException(); |
696 |
} |
697 |
|
698 |
public DynField addDynFieldURL(String name) { |
699 |
throw new UnsupportedOperationException(); |
700 |
} |
701 |
|
702 |
public DynField addDynFieldURI(String name) { |
703 |
throw new UnsupportedOperationException(); |
704 |
} |
705 |
|
706 |
public boolean isExtendable(DynStruct dynStruct) { |
707 |
return false; |
708 |
} |
709 |
|
710 |
public void extend(DynStruct[] structs) { |
711 |
// TODO Auto-generated method stub
|
712 |
|
713 |
} |
714 |
|
715 |
public void remove(DynStruct superDynStruct) { |
716 |
// TODO Auto-generated method stub
|
717 |
|
718 |
} |
719 |
|
720 |
public void removeAll(DynStruct[] superDynStruct) { |
721 |
// TODO Auto-generated method stub
|
722 |
|
723 |
} |
724 |
|
725 |
public FeatureAttributeDescriptor getDefaultTimeAttribute() {
|
726 |
if (this.defaultTimeAttributeIndex < 0) { |
727 |
return null; |
728 |
} |
729 |
return (FeatureAttributeDescriptor) super |
730 |
.get(this.defaultTimeAttributeIndex);
|
731 |
} |
732 |
} |