he value property.setValue( "foo" ); //get the value String value = (String) property.getValue();
Every property has a type. This {@link PropertyType} defines informationabout the property. This includes which java class the value of the property is an instance of, any restrictions on the value, etc... The type is available via the {@link #getType()} method.
Property property = ...; //get the type PropertyType type = property.getType(); //get the class of the value Class<String> valueClass = (Class<String>)type.getBinding();
A property can often be part of another entity such as a {@link Feature} or {@link ComplexAttribute}. When this is the case, the relationship between the property and its "container" is described by a {@link PropertyDescriptor}. The descriptor of a property defines things like nilablility, multiplicity, etc... See the javadoc of {@link PropertyDescriptor} for more details. Thedescriptor is available via the {@link #getDescriptor()} method.
Property property = ...; //get the descriptor PropertyDescriptor descriptor = property.getDescriptor()l //is the value allowed to be null? descriptor.isNillable(); //how many instances of this property are allowed? descriptor.getMaxOccurs();
@author Jody Garnett (Refractions Research)
@author Justin Deoliveira (The Open Planning Project)
@source $URL$