There's a RichSimpleFeature class that you can import that implicitly provides nice methods for getting these attributes.