要从存储库中获取资产类型对象,请使用 RAMSession.getAllAssetTypes() 或 RAMSession.getAssetType(String)。
//Fetch Asset Type By Name
RAMAssetType assetType = session.getAssetType("My Asset Type");
//Fetch Asset Type By URI
assetType = session.getAssetTypeByURI(
"http://ramsrvr.example.com:8080/com.ibm.ram.repository.web/classif/assetTypesSchema.xmi#mynewassettype10");
//Fetch All Asset Types
RAMAssetType[] assetTypes = session.getAllAssetTypes();