[udig-devel] creating a feature with default values
Jody Garnett
jgarnett at refractions.net
Fri May 2 12:11:26 PDT 2008
andrea antonello wrote:
>> Your approach sounded okay. What exactly about it was wrong?
>>
> I think I am yet trying to understand what exactly is inside the
> attributetype object. I tried to do something like:
>
AttributeType has a bunch of other settings (ie isNillable and so on).
When ever I have to figure out something like this I save my work for
tothers...
Object attributes[] = DataUtilities.defaultValues( featureType );
attributes[0] = geometry?
featureType.create( attributes );
There is also a method for dealing with a single AttributeType
Object value = DataUtilities.defaultValue( attributeTypes[0] );
> Should this work?
>
Your example looked fine (and similar to the code in DataUtilities), I
think you now may be arguing with your DataStore or working with invalid
data?
Jody
More information about the udig-devel
mailing list