public class ObjectPropertyEditor<D extends BioPAXElement,R extends BioPAXElement> extends AbstractPropertyEditor<D,R>
addMethod, checkRestrictions, log, property, removeMethod, setMethod
getMethod
domain, multipleCardinality, range
Constructor and Description |
---|
ObjectPropertyEditor(String property,
Method getMethod,
Class<D> domain,
Class<R> range,
boolean multipleCardinality)
Full constructor.
|
Modifier and Type | Method and Description |
---|---|
void |
addRangeRestriction(Class<? extends BioPAXElement> domain,
Set<Class<? extends BioPAXElement>> ranges)
This method adds a range restriction to the property editor.
|
protected void |
checkRestrictions(R value,
D bean)
Checks if the bean and the value are consistent with the cardinality rules of
the model.
|
protected Method |
findInverseGetMethod() |
PropertyAccessor<R,? super D> |
getInverseAccessor() |
Method |
getInverseGetMethod() |
Map<Class<? extends BioPAXElement>,Set<Class<? extends BioPAXElement>>> |
getRestrictedRanges() |
Set<Class<? extends BioPAXElement>> |
getRestrictedRangesFor(Class<? extends D> restrictedDomain) |
boolean |
hasInverseLink() |
boolean |
isCompleteBackward() |
boolean |
isCompleteForward() |
boolean |
isInverseMultipleCardinality() |
void |
setRangeRestriction(Map<Class<? extends BioPAXElement>,Set<Class<? extends BioPAXElement>>> restrictedRanges)
This method sets all range restrictions.
|
String |
toString() |
addMaxCardinalityRestriction, createPropertyEditor, detectRange, getAddMethod, getGetMethod, getMaxCardinality, getPrimarySetMethod, getProperty, getRemoveMethod, getSetMethod, getUnknown, invokeMethod, isInstanceOfAtLeastOne, parseValueFromString, removeValueFromBean, removeValueFromBean, setValueToBean, setValueToBean
getValueFromBean, isMultipleCardinality, isUnknown
getDomain, getRange, getValueFromBeans, isMultipleCardinality
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
getDomain, getRange, getValueFromBean, getValueFromBeans, isMultipleCardinality, isUnknown
public ObjectPropertyEditor(String property, Method getMethod, Class<D> domain, Class<R> range, boolean multipleCardinality)
property
- Name of the property, e.g. entityReference.getMethod
- A "Method" class that represents the getter method. e.g. getEntityReference()domain
- name of the domain of this property. e.g. PhysicalEntityrange
- name of the range of this property. e.g. EntityReference.multipleCardinality
- false if this property is functional, e.g. many-to-one or one-to-one.public Map<Class<? extends BioPAXElement>,Set<Class<? extends BioPAXElement>>> getRestrictedRanges()
public boolean isCompleteForward()
public boolean isCompleteBackward()
public boolean isInverseMultipleCardinality()
public Method getInverseGetMethod()
public PropertyAccessor<R,? super D> getInverseAccessor()
public String toString()
toString
in interface PropertyEditor<D extends BioPAXElement,R extends BioPAXElement>
toString
in class AbstractPropertyEditor<D extends BioPAXElement,R extends BioPAXElement>
public void addRangeRestriction(Class<? extends BioPAXElement> domain, Set<Class<? extends BioPAXElement>> ranges)
EditorMap
during initialization. Use this method if you need to add restrictions that are not specified in
the model.domain
- subdomain of the property to be restrictedranges
- valid ranges for this subdomain.public void setRangeRestriction(Map<Class<? extends BioPAXElement>,Set<Class<? extends BioPAXElement>>> restrictedRanges)
EditorMap
during initialization. Use this method if you need to add restrictions that are not specified in
the model.restrictedRanges
- a set of range restrictions specified as a map.protected void checkRestrictions(R value, D bean)
AbstractPropertyEditor
checkRestrictions
in class AbstractPropertyEditor<D extends BioPAXElement,R extends BioPAXElement>
value
- Value that is related to the objectbean
- Object that is related to the valuepublic Set<Class<? extends BioPAXElement>> getRestrictedRangesFor(Class<? extends D> restrictedDomain)
restrictedDomain
- a subdomain that is restricted.public boolean hasInverseLink()
protected Method findInverseGetMethod()
.EntityReference#getEntityReferenceOf()
.Copyright © 2015 BioPAX. All rights reserved.