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