Categorizing Assets at the Category level
Hi,
We have a category schema structure like below.
Schema-->Category-->subcategory (all are check boxes).
But we would like categorize at the "Category" level Only. How do we achieve this Using Java code.
In the API we saw that for Categorization we require a string. In our case we don't have any value for string because we want the categorization as schema/category
asset.categorize(categorzation,string);
Please suggest.Thanks in advance
Regards,
Abhilash
One answer
Categorization in ram is structured as following:
Schema:Category->SubCategory->SubCategory .....
Assume: Software Development:Kind->Service->Interface
Schema:Category->SubCategory->SubCategory .....
Assume: Software Development:Kind->Service->Interface
RAMSession session = new RAMSession("https://server.ram/", "uid", "passwd"); session.setWebServiceTimeout(10000); RAMAsset asset = session.getAsset(new AssetIdentification("FC506B15-2A91-D60A-5995-B110045F26D0", "1.0")); RAMCategorySchema schema = session.getCategorySchema("Software Development"); RAMCategory cat = (RAMCategory)schema.getCategory("Kind"); RAMSubCategory sub = (RAMSubCategory)cat.getSubCategory("Service/Interface"); asset.categorize(sub); session.put(asset, new NullProgressMonitor()); session.release();