|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectorg.biopax.paxtools.controller.PropertyEditor
public abstract class PropertyEditor
This is the base class for all property editors. Each property controller is responsible for manipulating a certain property for a given class of objects (domain).
| Field Summary | |
|---|---|
protected java.lang.reflect.Method |
addMethod
This variable stores the method to invoke for adding the given value to the property managed by this editor. |
protected java.lang.Class |
domain
This is the Class representing the domain of the property. |
protected java.lang.reflect.Method |
getMethod
This variable stores the method to invoke for getting the value of the property on a given bean. |
protected static org.apache.commons.logging.Log |
log
|
protected boolean |
multipleCardinality
This is false if there is a cardinality restriction of one on the property. |
protected java.lang.String |
property
Local OWL name of the property |
protected java.lang.Class |
range
This is the Class representing the range of the property. |
protected java.lang.reflect.Method |
removeMethod
This variable stores the method for removing the value of the property on a given bean. |
protected java.lang.reflect.Method |
setMethod
This variable stores the method to invoke for setting a property to the to the given value. |
| Constructor Summary | |
|---|---|
PropertyEditor(java.lang.String property,
java.lang.reflect.Method getMethod,
java.lang.Class domain,
java.lang.Class range,
boolean multipleCardinality)
|
|
| Method Summary | |
|---|---|
void |
addMaxCardinalityRestriction(java.lang.Class domain,
int max)
|
protected void |
checkRestrictions(java.lang.Object bean,
java.lang.Object value)
|
static PropertyEditor |
createPropertyEditor(java.lang.Class domain,
java.lang.String property)
This method creates a property reflecting on the domain and property. |
java.lang.reflect.Method |
getAddMethod()
|
java.lang.Class |
getDomain()
|
java.lang.reflect.Method |
getGetMethod()
|
java.lang.Integer |
getMaxCardinality(java.lang.Class restrictedDomain)
|
java.lang.reflect.Method |
getPrimarySetMethod()
|
java.lang.String |
getProperty()
|
java.lang.Class |
getRange()
|
java.lang.reflect.Method |
getRemoveMethod()
|
java.lang.reflect.Method |
getSetMethod()
|
java.lang.Object |
getValueFromBean(java.lang.Object bean)
|
protected void |
invokeMethod(java.lang.reflect.Method method,
java.lang.Object bean,
java.lang.Object value)
|
protected boolean |
isInstanceOfAtLeastOne(java.util.Set<java.lang.Class> classes,
java.lang.Object value)
|
boolean |
isMultipleCardinality()
|
boolean |
isUnknown(java.lang.Object value)
|
void |
removePropertyFromBean(java.lang.Object value,
java.lang.Object bean)
|
void |
setPropertyToBean(java.lang.Object value,
java.lang.Object bean)
|
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
protected static org.apache.commons.logging.Log log
protected java.lang.reflect.Method setMethod
multiple cardinality, the
returned method is expected to have a Set as its only
parameter.
protected java.lang.reflect.Method getMethod
Set otherwise an instance of
range
protected java.lang.reflect.Method addMethod
range as its only parameter, otherwise
expected to be null.
protected java.lang.reflect.Method removeMethod
range as its only parameter, otherwise expected to be null
protected java.lang.Class domain
protected java.lang.Class range
protected java.lang.String property
protected boolean multipleCardinality
| Constructor Detail |
|---|
public PropertyEditor(java.lang.String property,
java.lang.reflect.Method getMethod,
java.lang.Class domain,
java.lang.Class range,
boolean multipleCardinality)
| Method Detail |
|---|
public static PropertyEditor createPropertyEditor(java.lang.Class domain,
java.lang.String property)
domain - paxtools level2 interface that maps to the corresponding owl
level2.property - to be managed by the constructed controller.
public java.lang.reflect.Method getAddMethod()
public java.lang.Class getDomain()
public java.lang.reflect.Method getGetMethod()
public java.lang.String getProperty()
public java.lang.Class getRange()
public java.lang.reflect.Method getRemoveMethod()
public java.lang.reflect.Method getSetMethod()
public boolean isMultipleCardinality()
public void addMaxCardinalityRestriction(java.lang.Class domain,
int max)
public java.lang.Integer getMaxCardinality(java.lang.Class restrictedDomain)
protected boolean isInstanceOfAtLeastOne(java.util.Set<java.lang.Class> classes,
java.lang.Object value)
public boolean isUnknown(java.lang.Object value)
public void removePropertyFromBean(java.lang.Object value,
java.lang.Object bean)
protected void invokeMethod(java.lang.reflect.Method method,
java.lang.Object bean,
java.lang.Object value)
public void setPropertyToBean(java.lang.Object value,
java.lang.Object bean)
protected void checkRestrictions(java.lang.Object bean,
java.lang.Object value)
public java.lang.Object getValueFromBean(java.lang.Object bean)
public java.lang.reflect.Method getPrimarySetMethod()
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||