|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
ObjectPropertyImpl
public abstract class PropertyImpl
Implementation of Property.
Field Summary | |
---|---|
protected PropertyDescriptor |
descriptor
descriptor of the property |
protected Map<Object,Object> |
userData
user data |
protected Object |
value
content of the property |
Constructor Summary | |
---|---|
protected |
PropertyImpl(Object value,
PropertyDescriptor descriptor)
|
Method Summary | |
---|---|
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()
|
Methods inherited from class Object |
---|
clone, finalize, getClass, notify, notifyAll, wait, wait, wait |
Field Detail |
---|
protected Object value
protected PropertyDescriptor descriptor
protected final Map<Object,Object> userData
Constructor Detail |
---|
protected PropertyImpl(Object value, PropertyDescriptor descriptor)
Method Detail |
---|
public Object getValue()
Property
The class of this object is defined by
getType().getBinding()
.
This value may be null
. In this case
getDescriptor().isNillable()
would be true
.
getValue
in interface Property
public void setValue(Object value)
Property
The class of newValue should be the same as or a subclass of
getType().getBinding()
.
newValue may be null
if
getDescriptor().isNillable()
is true
.
setValue
in interface Property
value
- The new value of the property.public PropertyDescriptor getDescriptor()
Property
PropertyDscriptor
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 Property
ComplexAttribute
public Name getName()
Property
This method is convenience for getDescriptor().getName()
.
getName
in interface Property
public PropertyType getType()
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()
.
getType
in interface Property
public boolean isNillable()
Property
null
is an acceptable value for the
property.
This method is convenience for getDescriptor().isNillable()
.
isNillable
in interface Property
true
if the value of the property is allowed to be
null
, otherwise false
.public Map<Object,Object> getUserData()
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" );
getUserData
in interface Property
public boolean equals(Object obj)
equals
in class Object
public int hashCode()
hashCode
in class Object
public String toString()
toString
in class Object
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |