Revision 44283 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/DefaultFeatureStore.java
DefaultFeatureStore.java | ||
---|---|---|
3056 | 3056 |
}; |
3057 | 3057 |
return repository; |
3058 | 3058 |
} |
3059 |
|
|
3059 |
|
|
3060 |
@Override |
|
3061 |
public Feature getSampleFeature() { |
|
3062 |
Feature sampleFeature; |
|
3063 |
try { |
|
3064 |
FeatureSelection theSelection = this.getFeatureSelection(); |
|
3065 |
if( theSelection!=null && !theSelection.isEmpty() ) { |
|
3066 |
sampleFeature = theSelection.first(); |
|
3067 |
} else { |
|
3068 |
sampleFeature = this.first(); |
|
3069 |
} |
|
3070 |
if( sampleFeature==null ) { |
|
3071 |
sampleFeature = this.createNewFeature(); |
|
3072 |
} |
|
3073 |
} catch (DataException ex) { |
|
3074 |
return null; |
|
3075 |
} |
|
3076 |
return sampleFeature; |
|
3077 |
} |
|
3078 |
|
|
3060 | 3079 |
} |
Also available in: Unified diff