Class UseOfReflection

java.lang.Object
org.biopax.paxtools.examples.UseOfReflection

public final class UseOfReflection extends Object
Examples on how to use Paxtools BioPAX property editors and accessors API (based on java reflection).
Author:
rodche
  • Constructor Details

    • UseOfReflection

      public UseOfReflection()
  • Method Details

    • getObjectBiopaxPropertyValues

      public static Set<? extends BioPAXElement> getObjectBiopaxPropertyValues(BioPAXElement bpe, String property)
      Example 1. How to get values from an object biopax property if the type of the biopax object is not known at runtime, and you do not want to always remember the domain and range of the property nor write many if-else statements to find out.
      Parameters:
      bpe - BioPAX object
      property - BioPAX property
      Returns:
      the BioPAX object property values or empty set
    • getBiopaxPropertyValues

      public static Set getBiopaxPropertyValues(BioPAXElement bpe, String property)
      Example 2. How to get values from a biopax property if the type of the biopax object is not known at runtime, and you do not want to always remember the domain and range of the property nor write many if-else statements to find out.
      Parameters:
      bpe - BioPAX object
      property - BioPAX property
      Returns:
      the BioPAX property values or null