A review on the physiology of Insulin like Growth Factor-I (IGF-I) ... by Debnath, Surajit / Advances in Environmental Biology.
The spring piston airgun generates power using a powerful spring-loaded piston that is housed within a compression chamber. Cocking the gun (using a break barrel, side lever, or under lever mechanism) causes the piston assembly to compress the spring. When the spring is released it pushes the piston forward compressing a column of air in the chamber behind the pellet.
When the spring is release, it 'springs' back to its original configuration. By connecting the spring to a belt that turns an electric motor, electricity can be generated. So it follows that a generator using magnets to store energy in the form of a sort of a magnetic spring will be able to generate energy.