Package org.biopax.paxtools.controller
Class PropertyAccessorAdapter<D extends BioPAXElement,R>
java.lang.Object
org.biopax.paxtools.controller.PropertyAccessorAdapter<D,R>
- All Implemented Interfaces:
PropertyAccessor<D,R>
- Direct Known Subclasses:
DecoratingPropertyAccessor,PathAccessor,SimplePropertyAccessor,UnionPropertyAccessor
public abstract class PropertyAccessorAdapter<D extends BioPAXElement,R>
extends Object
implements PropertyAccessor<D,R>
Adapter class for all property accessors.
-
Field Summary
FieldsModifier and TypeFieldDescriptionThis is the Class representing the domain of the property.protected booleanThis is false if there is a cardinality restriction of one on the property.This is the Class representing the range of the property. -
Constructor Summary
ConstructorsModifierConstructorDescriptionprotectedPropertyAccessorAdapter(Class<D> domain, Class<R> range, boolean multipleCardinality) -
Method Summary
Modifier and TypeMethodDescriptionReturns the domain of the property.getRange()Returns the range of the editor.getValueFromBeans(Collection<? extends D> beans) Returns the values for a collection of beans using the default getMethod.booleanChecks if the property to which editor is assigned has multiple cardinality.Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface org.biopax.paxtools.controller.PropertyAccessor
getValueFromBean, isUnknown
-
Field Details
-
domain
This is the Class representing the domain of the property. -
range
This is the Class representing the range of the property. It is by default an object. -
multipleCardinality
protected boolean multipleCardinalityThis is false if there is a cardinality restriction of one on the property.
-
-
Constructor Details
-
PropertyAccessorAdapter
-
-
Method Details
-
getDomain
Returns the domain of the property.- Specified by:
getDomainin interfacePropertyAccessor<D extends BioPAXElement,R> - Returns:
- the domain of the editor
-
getRange
Returns the range of the editor.- Specified by:
getRangein interfacePropertyAccessor<D extends BioPAXElement,R> - Returns:
- a class
-
isMultipleCardinality
public boolean isMultipleCardinality()Checks if the property to which editor is assigned has multiple cardinality.- Specified by:
isMultipleCardinalityin interfacePropertyAccessor<D extends BioPAXElement,R> - Returns:
- true if editor belongs to a multiple cardinality property.
-
getValueFromBeans
public Set<? extends R> getValueFromBeans(Collection<? extends D> beans) throws IllegalBioPAXArgumentException Description copied from interface:PropertyAccessorReturns the values for a collection of beans using the default getMethod.- Specified by:
getValueFromBeansin interfacePropertyAccessor<D extends BioPAXElement,R> - Parameters:
beans- collection of BioPAX objects- Returns:
- an object as the value
- Throws:
IllegalBioPAXArgumentException
-