Class PropertyImpl
- Object
-
- PropertyImpl
-
- All Implemented Interfaces:
Property
- Direct Known Subclasses:
AssociationImpl,AttributeImpl
public abstract class PropertyImpl extends Object implements Property
Implementation of Property.- Author:
- Justin Deoliveira, The Open Planning Project
-
-
Field Summary
Fields Modifier and Type Field Description protected PropertyDescriptordescriptordescriptor of the propertyprotected Objectvaluecontent of the property
-
Constructor Summary
Constructors Modifier Constructor Description protectedPropertyImpl(Object value, PropertyDescriptor descriptor)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description booleanequals(Object obj)PropertyDescriptorgetDescriptor()ThePropertyDscriptorof the property, null if this is a top-level value.NamegetName()The name of the property with respect to its descriptor.PropertyTypegetType()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.ObjectgetUserData(Object key)ObjectgetValue()The value or content of the property.inthashCode()booleanisNillable()Flag indicating ifnullis an acceptable value for the property.voidsetValue(Object value)Sets the value or content of the property.StringtoString()-
Methods inherited from interface Property
hasUserData
-
-
-
-
Field Detail
-
value
protected Object value
content of the property
-
descriptor
protected PropertyDescriptor descriptor
descriptor of the property
-
-
Constructor Detail
-
PropertyImpl
protected PropertyImpl(Object value, PropertyDescriptor descriptor)
-
-
Method Detail
-
getValue
public Object getValue()
Description copied from interface:PropertyThe 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
public void setValue(Object value)
Description copied from interface:PropertySets 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
nullifgetDescriptor().isNillable()istrue.
-
getDescriptor
public PropertyDescriptor getDescriptor()
Description copied from interface:PropertyThePropertyDscriptorof 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
FeatureorComplexAttribute.- Specified by:
getDescriptorin interfaceProperty- Returns:
- The property descriptor, null if this is a top-level value.
- See Also:
ComplexAttribute
-
getName
public Name getName()
Description copied from interface:PropertyThe name of the property with respect to its descriptor.This method is convenience for
getDescriptor().getName().
-
getType
public PropertyType getType()
Description copied from interface:PropertyThe 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:PropertyFlag indicating ifnullis an acceptable value for the property.This method is convenience for
getDescriptor().isNillable().- Specified by:
isNillablein interfaceProperty- Returns:
trueif the value of the property is allowed to benull, otherwisefalse.
-
getUserData
public Map<Object,Object> getUserData()
Description copied from interface:PropertyA 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:
getUserDatain interfaceProperty- Returns:
- A map of user data.
-
-