schema: added a method to get a schema.

Related with #2.