|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
ObjectPropertyTypeImpl
public abstract class PropertyTypeImpl
Field Summary | |
---|---|
protected Class<?> |
binding
|
protected InternationalString |
description
|
protected boolean |
isAbstract
|
protected Name |
name
|
protected List<Filter> |
restrictions
|
protected PropertyType |
superType
|
protected Map<Object,Object> |
userData
|
Constructor Summary | |
---|---|
PropertyTypeImpl(Name name,
Class<?> binding,
boolean isAbstract,
List<Filter> restrictions,
PropertyType superType,
InternationalString description)
|
Method Summary | |
---|---|
boolean |
equals(Object other)
Equality based on property PropertyType.getName() . |
Class<?> |
getBinding()
The java class that values of properties of the property type are bound to. |
InternationalString |
getDescription()
Human readable description of this property type. |
Name |
getName()
The name of the property type. |
List<Filter> |
getRestrictions()
List of restrictions used define valid values for properties of this property type. |
PropertyType |
getSuper()
The parent type of the property type. |
Map<Object,Object> |
getUserData()
A map of "user data" which enables applications to store "application-specific" information against a property type. |
int |
hashCode()
Hashcode override based on PropertyType.getName() . |
boolean |
isAbstract()
Flag indicating if the type is abstract or not. |
String |
toString()
|
Methods inherited from class Object |
---|
clone, finalize, getClass, notify, notifyAll, wait, wait, wait |
Field Detail |
---|
protected final Name name
protected final Class<?> binding
protected final boolean isAbstract
protected final PropertyType superType
protected final List<Filter> restrictions
protected final InternationalString description
protected final Map<Object,Object> userData
Constructor Detail |
---|
public PropertyTypeImpl(Name name, Class<?> binding, boolean isAbstract, List<Filter> restrictions, PropertyType superType, InternationalString description)
Method Detail |
---|
public Name getName()
PropertyType
Note that this is not the same name as Property.getName()
, which
is the name of the instance of the type, not the type itself.
The returned name is a qualified name made up of two parts. The first
a namespace uri (Name.getNamespaceURI()
, and the second a local
part (Name.getLocalPart()
.
This value is never null
.
getName
in interface PropertyType
public Class<?> getBinding()
PropertyType
This value is never null
.
getBinding
in interface PropertyType
public boolean isAbstract()
PropertyType
isAbstract
in interface PropertyType
true
if the type is abstract, otherwise false
.public List<Filter> getRestrictions()
PropertyType
Each restriction is a Filter
object in which the property is
passed through. If Filter.evaluate(Object)
returns true
the restriction is met. If false
is returned then the
restriction has not been met and the property should be considered invalid.
Remember to check getSuper().getRestrictions() as well.
This method returns an empty set in the case of no restrictions and should
not return null
.
getRestrictions
in interface PropertyType
public PropertyType getSuper()
PropertyType
This method returns null
if no super type is defined.
The super type may contain additional restrictions to be considered against properties of the the property type.
getSuper
in interface PropertyType
null
.public InternationalString getDescription()
PropertyType
getDescription
in interface PropertyType
public int hashCode()
PropertyType
PropertyType.getName()
.
hashCode
in interface PropertyType
hashCode
in class Object
public boolean equals(Object other)
PropertyType
PropertyType.getName()
.
equals
in interface PropertyType
equals
in class Object
true
if other is a PropertyType with the same namepublic Map<Object,Object> getUserData()
PropertyType
As an example, consider an application that builds a PropertyType from an xml schema. A useful bit of information to attach to the PropertyType is the original schema itself, in whatever construct it might be stored in:
XSDComplexTypeDefinition complexTypeDef = ...;
PropertyType type = buildPropertyType( complexTypeDef );
type.getUserData().put( XSDComplexTypeDefintion.class, complexTypeDef );
getUserData
in interface PropertyType
public String toString()
toString
in class Object
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |