使用 RAMCategorySchema.getCategories() 和 RAMCategorySchema.getCategory(String categoryName) 方法来访存类别模式中的所有类别。如果此模式是通过 RAMAsset.getCategorySchemas() 或 RAMAsset.getCategorySchema(String schemaName) 访存的,那么它仅包含对资产设置了子类别的类别。
//Get all Categories in a Category Schema
RAMCategory[] categories = (RAMCategory[])automobilesSchema.getCategories();
//Get a Category by name
RAMCategory modelCategory = (RAMCategory)automobilesSchema.getCategory("Model");