org.biopax.paxtools.controller
Class UnionPropertyAccessor<D extends BioPAXElement>

java.lang.Object
  extended by org.biopax.paxtools.controller.UnionPropertyAccessor<D>
All Implemented Interfaces:
PropertyAccessor<D,java.lang.Object>

public class UnionPropertyAccessor<D extends BioPAXElement>
extends java.lang.Object
implements PropertyAccessor<D,java.lang.Object>


Constructor Summary
UnionPropertyAccessor(java.util.Set<PropertyAccessor<? extends D,?>> union, java.lang.Class<D> domain)
           
 
Method Summary
 java.lang.Class<D> getDomain()
          Returns the domain of the property.
 java.lang.Class getRange()
          Returns the range of the editor.
 java.util.Set getValueFromBean(D bean)
          Returns the value of the bean using the default #getMethod.
 boolean isMultipleCardinality()
          Checks if the property to which editor is assigned has multiple cardinality.
 boolean isUnknown(java.lang.Object value)
          Checks if the value is unkown.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

UnionPropertyAccessor

public UnionPropertyAccessor(java.util.Set<PropertyAccessor<? extends D,?>> union,
                             java.lang.Class<D> domain)
Method Detail

getDomain

public java.lang.Class<D> getDomain()
Description copied from interface: PropertyAccessor
Returns the domain of the property.

Specified by:
getDomain in interface PropertyAccessor<D extends BioPAXElement,java.lang.Object>
Returns:
the domain of the editor

getRange

public java.lang.Class getRange()
Description copied from interface: PropertyAccessor
Returns the range of the editor.

Specified by:
getRange in interface PropertyAccessor<D extends BioPAXElement,java.lang.Object>
Returns:
a class

isMultipleCardinality

public boolean isMultipleCardinality()
Description copied from interface: PropertyAccessor
Checks if the property to which editor is assigned has multiple cardinality.

Specified by:
isMultipleCardinality in interface PropertyAccessor<D extends BioPAXElement,java.lang.Object>
Returns:
true if editor belongs to a multiple cardinality property.

getValueFromBean

public java.util.Set getValueFromBean(D bean)
                               throws IllegalBioPAXArgumentException
Description copied from interface: PropertyAccessor
Returns the value of the bean using the default #getMethod.

Specified by:
getValueFromBean in interface PropertyAccessor<D extends BioPAXElement,java.lang.Object>
Parameters:
bean - the object whose property is requested
Returns:
an object as the value
Throws:
IllegalBioPAXArgumentException

isUnknown

public boolean isUnknown(java.lang.Object value)
Description copied from interface: PropertyAccessor
Checks if the value is unkown. In this context a value is regarded to be unknown if it is null (unset).

Specified by:
isUnknown in interface PropertyAccessor<D extends BioPAXElement,java.lang.Object>
Parameters:
value - the value to be checked
Returns:
true if the value is unknown


Copyright © 2011 BioPAX. All Rights Reserved.