Class PropertyImpl
- All Implemented Interfaces:
Property
- Direct Known Subclasses:
AssociationImpl
,AttributeImpl
- Author:
- Justin Deoliveira, The Open Planning Project
-
Field Summary
FieldsModifier and TypeFieldDescriptionprotected PropertyDescriptor
descriptor of the propertyprotected Object
content of the property -
Constructor Summary
ConstructorsModifierConstructorDescriptionprotected
PropertyImpl
(Object value, PropertyDescriptor descriptor) -
Method Summary
Modifier and TypeMethodDescriptionboolean
ThePropertyDscriptor
of the property, null if this is a top-level value.getName()
The name of the property with respect to its descriptor.getType()
The type of the property.A map of "user data" which enables applications to store "application-specific" information against a property.getUserData
(Object key) getValue()
The value or content of the property.int
hashCode()
boolean
Flag indicating ifnull
is an acceptable value for the property.void
Sets the value or content of the property.toString()
Methods inherited from interface Property
hasUserData
-
Field Details
-
value
content of the property -
descriptor
descriptor of the property
-
-
Constructor Details
-
PropertyImpl
-
-
Method Details
-
getValue
Description copied from interface:Property
The value or content of the property.The class of this object is defined by
getType().getBinding()
.This value may be
null
. In this casegetDescriptor().isNillable()
would betrue
. -
setValue
Description copied from interface:Property
Sets the value or content of the property.The class of newValue should be the same as or a subclass of
getType().getBinding()
.newValue may be
null
ifgetDescriptor().isNillable()
istrue
. -
getDescriptor
Description copied from interface:Property
ThePropertyDscriptor
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
orComplexAttribute
.- Specified by:
getDescriptor
in interfaceProperty
- Returns:
- The property descriptor, null if this is a top-level value.
- See Also:
-
getName
Description copied from interface:Property
The name of the property with respect to its descriptor.This method is convenience for
getDescriptor().getName()
. -
getType
Description copied from interface:Property
The type of the property.The type contains information about the value or content of the property such as its java class.
This value is also available via
getDescriptor().getType()
. -
isNillable
public boolean isNillable()Description copied from interface:Property
Flag indicating ifnull
is an acceptable value for the property.This method is convenience for
getDescriptor().isNillable()
.- Specified by:
isNillable
in interfaceProperty
- Returns:
true
if the value of the property is allowed to benull
, otherwisefalse
.
-
getUserData
Description copied from interface:Property
A map of "user data" which enables applications to store "application-specific" information against a property.An 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" );
- Specified by:
getUserData
in interfaceProperty
- Returns:
- A map of user data.
-
getUserData
-
equals
-
hashCode
public int hashCode() -
toString
-