org.biopax.paxtools.controller
Class EnumeratedPropertyEditor<D extends BioPAXElement,R extends java.lang.Enum>

java.lang.Object
  extended by org.biopax.paxtools.controller.SimplePropertyAccessor<D,R>
      extended by org.biopax.paxtools.controller.PropertyEditor<D,R>
          extended by org.biopax.paxtools.controller.EnumeratedPropertyEditor<D,R>
All Implemented Interfaces:
PropertyAccessor<D,R>

public class EnumeratedPropertyEditor<D extends BioPAXElement,R extends java.lang.Enum>
extends PropertyEditor<D,R>

Provides an ENUM class compatible editor by extending the PropertyEditor.

See Also:
PropertyEditor

Field Summary
protected  java.lang.Class<D> domain
          This is the Class representing the domain of the property.
protected  boolean multipleCardinality
          This is false if there is a cardinality restriction of one on the property.
protected  java.lang.Class<R> range
          This is the Class representing the range of the property.
 
Fields inherited from class org.biopax.paxtools.controller.PropertyEditor
addMethod, log, property, removeMethod, setMethod
 
Fields inherited from class org.biopax.paxtools.controller.SimplePropertyAccessor
getMethod
 
Constructor Summary
EnumeratedPropertyEditor(java.lang.String property, java.lang.reflect.Method getMethod, java.lang.Class<D> domain, java.lang.Class<R> range, boolean multipleCardinality)
           
 
Method Summary
 java.lang.Class<D> getDomain()
          Returns the domain of the property.
 java.lang.Class<R> getRange()
          Returns the range of the editor.
 boolean isMultipleCardinality()
          Checks if the property to which editor is assigned has multiple cardinality.
protected  R parseValueFromString(java.lang.String value)
           
 
Methods inherited from class org.biopax.paxtools.controller.PropertyEditor
addMaxCardinalityRestriction, checkRestrictions, createPropertyEditor, detectRange, getAddMethod, getGetMethod, getMaxCardinality, getPrimarySetMethod, getProperty, getRemoveMethod, getSetMethod, getUnknown, invokeMethod, isInstanceOfAtLeastOne, removeValueFromBean, removeValueFromBean, setValueToBean, setValueToBean, toString
 
Methods inherited from class org.biopax.paxtools.controller.SimplePropertyAccessor
getValueFromBean, isMultipleCardinality, isUnknown
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

domain

protected java.lang.Class<D extends BioPAXElement> domain
This is the Class representing the domain of the property.


range

protected java.lang.Class<R> range
This is the Class representing the range of the property. It is by default an object.


multipleCardinality

protected final boolean multipleCardinality
This is false if there is a cardinality restriction of one on the property.

Constructor Detail

EnumeratedPropertyEditor

public EnumeratedPropertyEditor(java.lang.String property,
                                java.lang.reflect.Method getMethod,
                                java.lang.Class<D> domain,
                                java.lang.Class<R> range,
                                boolean multipleCardinality)
Method Detail

parseValueFromString

protected R parseValueFromString(java.lang.String value)
Overrides:
parseValueFromString in class PropertyEditor<D extends BioPAXElement,R extends java.lang.Enum>

getDomain

public java.lang.Class<D> getDomain()
Returns the domain of the property.

Specified by:
getDomain in interface PropertyAccessor<D extends BioPAXElement,R>
Returns:
the domain of the editor

getRange

public java.lang.Class<R> getRange()
Returns the range of the editor.

Specified by:
getRange in interface PropertyAccessor<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:
isMultipleCardinality in interface PropertyAccessor<D extends BioPAXElement,R>
Returns:
true if editor belongs to a multiple cardinality property.


Copyright © 2011 BioPAX. All Rights Reserved.