Revision 23303 branches/v2_0_0_prep/libraries/libFMap_data/src/org/gvsig/fmap/data/feature/AttributeDescriptor.java

View differences:

AttributeDescriptor.java
78 78
	private int originalPosition=-1;
79 79
	private boolean isNew=false;
80 80
	private Class objectClass;
81
	private WeakReference wfFeatureType=null;
81
	private WeakReference wfFeatureType;
82 82

  
83 83
	protected AttributeDescriptor(FeatureType featureType) {
84 84
		this.wfFeatureType = new WeakReference(featureType);
......
92 92

  
93 93
	protected FeatureType getFeatureType(){
94 94
		if (this.wfFeatureType == null){
95
			return null;
95
			throw new RuntimeException();
96
			//			return null;
96 97
		}
97
		return (FeatureType) this.wfFeatureType.get();
98
		FeatureType ftype = (FeatureType) this.wfFeatureType.get();
99
		if (ftype == null) {
100
			throw new RuntimeException();
101
		}
102
		return ftype;
98 103
	}
99 104

  
100 105
	public boolean isFromFeatureType(FeatureType featureType){
......
380 385
	    newFD.srs = this.srs;
381 386
	    newFD.allowNull = this.allowNull;
382 387
	    newFD.evaluator = this.evaluator;
388
	    newFD.expression = this.expression;
389
		newFD.evaluated = this.evaluated;
390
		newFD.readOnly = this.readOnly;
391
		newFD.objectClass = this.objectClass;
392
		newFD.originalPosition = this.originalPosition;
383 393
	}
384 394

  
385 395
	public void loadFrom(FeatureAttributeDescriptor otherFAD) {
......
548 558
		return this.getName() + "{" + this.getDataType() + "}";
549 559
	}
550 560

  
561
	protected void setFeatureType(DefaultFeatureType defaultFeatureType) {
562
		// FIXME
563
		//		this.wfFeatureType = new WeakReference(featureType);
564
	}
551 565

  
566

  
552 567
}

Also available in: Unified diff