Use theRAMCategorySchema.getCategories() and RAMCategorySchema.getCategory(String categoryName) methods to fetch all the categories from the within a category schema.
//Get all Categories in a Category Schema
RAMCategory[] categories = (RAMCategory[])automobilesSchema.getCategories();
//Get a Category by name
RAMCategory modelCategory = (RAMCategory)automobilesSchema.getCategory("Model");