public static Set getBiopaxPropertyValues(BioPAXElement bpe, String property) {

		// get the BioPAX L3 property editors map
		EditorMap em = SimpleEditorMap.L3;

		// get the 'organism' biopax property editor, 
		// if exists for this type of bpe
		@SuppressWarnings("unchecked") PropertyEditor<BioPAXElement, Object> editor
			= (PropertyEditor<BioPAXElement, Object>) em
				.getEditorForProperty(property, bpe.getModelInterface());

		// if the biopax object does have such property, get values
		if (editor != null) {
			return editor.getValueFromBean(bpe);
		} else 
			return null;
	}
public static Set getBiopaxPropertyValues ( BioPAXElement bpe , String property ) { EditorMap em = SimpleEditorMap . L3 ; @ SuppressWarnings ( "unchecked" ) PropertyEditor < BioPAXElement , Object > editor = ( PropertyEditor < BioPAXElement , Object > ) em . getEditorForProperty ( property , bpe . getModelInterface ( ) ) ; if ( editor != null ) { return editor . getValueFromBean ( bpe ) ; } else return null ; }
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.

@param bpe BioPAX object
@param property BioPAX property
@return the BioPAX property values or null