Hello, I have a org.geotools.data.ows.Layer and I want to query all its data to form a matrix. How do I query the layer?

thanxs!