code: public static IReactionSet getAllReactions(IReactionScheme scheme) {
          IReactionSet reactionSet = scheme.getBuilder().newInstance(IReactionSet.class);
  
          // A ReactionScheme can contain other IRreactionSet objects
          if (scheme.getReactionSchemeCount() != 0) for (IReactionScheme schemeInt : scheme.reactionSchemes()) {
              for (IReaction reaction : getAllReactions(schemeInt).reactions())
                  reactionSet.addReaction(reaction);
          }
          for (IReaction reaction : scheme.reactions())
              reactionSet.addReaction(reaction);
  
          return reactionSet;
      }
docs: Get all IReaction's object from a given IReactionScheme.
  
  @param  scheme The IReactionScheme to extract
  @return        The IReactionSet