public abstract class PropertyImpl extends Object implements Property
| Modifier and Type | Field and Description |
|---|---|
protected PropertyDescriptor |
descriptor
descriptor of the property
|
protected Map<Object,Object> |
userData
user data
|
protected Object |
value
content of the property
|
| Modifier | Constructor and Description |
|---|---|
protected |
PropertyImpl(Object value,
PropertyDescriptor descriptor) |
| Modifier and Type | Method and Description |
|---|---|
boolean |
equals(Object obj) |
PropertyDescriptor |
getDescriptor()
The
PropertyDscriptor of the property, null if this is a top-level value. |
Name |
getName()
The name of the property with respect to its descriptor.
|
PropertyType |
getType()
The type of the property.
|
Map<Object,Object> |
getUserData()
A map of "user data" which enables applications to store "application-specific" information
against a property.
|
Object |
getValue()
The value or content of the property.
|
int |
hashCode() |
boolean |
isNillable()
Flag indicating if
null is an acceptable value for the property. |
void |
setValue(Object value)
Sets the value or content of the property.
|
String |
toString() |
protected Object value
protected PropertyDescriptor descriptor
protected PropertyImpl(Object value, PropertyDescriptor descriptor)
public Object getValue()
PropertyThe class of this object is defined by getType().getBinding().
This value may be null. In this case getDescriptor().isNillable()
would be true.
public void setValue(Object value)
PropertyThe class of newValue should be the same as or a subclass of
getType().getBinding().
newValue may be null if getDescriptor().isNillable() is
true.
public PropertyDescriptor getDescriptor()
PropertyPropertyDscriptor of the property, null if this is a top-level value.
The descriptor provides information about the property with respect to its containing
entity (more often then not a Feature or ComplexAttribute.
getDescriptor in interface PropertyComplexAttributepublic Name getName()
PropertyThis method is convenience for getDescriptor().getName().
public PropertyType getType()
PropertyThe type contains information about the value or content of the property such as its java class.
This value is also available via getDescriptor().getType().
public boolean isNillable()
Propertynull is an acceptable value for the property.
This method is convenience for getDescriptor().isNillable().
isNillable in interface Propertytrue if the value of the property is allowed to be null,
otherwise false.public Map<Object,Object> getUserData()
PropertyAn example of information that may wish to be stored along with an attribute could be its srs information (in the case of a geometric attribute ).
GeometryAttribute attribute = ...;
//set the crs
CoordinateReferenceSystem crs = CRS.decode("EPSG:4326");
attribute.setCRS( crs );
//set the srs
attribute.getUserData().put( "srs", "EPSG:4326" );
getUserData in interface PropertyCopyright © 1996–2019 Geotools. All rights reserved.