org.biopax.paxtools.controller
Class PathAccessor

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

public class PathAccessor
extends java.lang.Object

This class accepts an xPath like syntax to access a property path from a bean.


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.
 
Constructor Summary
PathAccessor(java.util.List<PropertyAccessor<? extends BioPAXElement,? extends BioPAXElement>> objectAccessors, PropertyAccessor lastStep)
           
PathAccessor(java.lang.String path, BioPAXLevel level)
           
 
Method Summary
 java.lang.Class<D> getDomain()
          Returns the domain of the property.
 java.lang.Class<R> getRange()
          Returns the range of the editor.
 java.util.Set getValueFromBean(BioPAXElement 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
 

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

PathAccessor

public PathAccessor(java.util.List<PropertyAccessor<? extends BioPAXElement,? extends BioPAXElement>> objectAccessors,
                    PropertyAccessor lastStep)

PathAccessor

public PathAccessor(java.lang.String path,
                    BioPAXLevel level)
Method Detail

getValueFromBean

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

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).

Parameters:
value - the value to be checked
Returns:
true if the value is unknown

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.