Package org.biopax.paxtools.examples
Class UseOfReflection
java.lang.Object
org.biopax.paxtools.examples.UseOfReflection
Examples on how to use Paxtools BioPAX property editors and accessors API
(based on java reflection).
- Author:
- rodche
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic SetgetBiopaxPropertyValues(BioPAXElement bpe, String property) Example 2.static Set<? extends BioPAXElement> getObjectBiopaxPropertyValues(BioPAXElement bpe, String property) Example 1.
-
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 objectproperty- BioPAX property- Returns:
- the BioPAX object property values or empty set
-
getBiopaxPropertyValues
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 objectproperty- BioPAX property- Returns:
- the BioPAX property values or null
-