def buildRiskObstacleModel(p, apName, envName, graphName): from cairis.legacy.kaosxdot import KaosXDotParser from cairis.legacy.KaosModel import KaosModel assocs = p.riskObstacleModel(apName, envName) model = KaosModel(list(assocs.values()), envName, 'obstacle', apName) parser = KaosXDotParser('obstacle', model.graph()) graph = parser.parse() drawGraph(graph, graphName) return True
def buildComponentAssetModel(p, cName, graphName): from cairis.legacy.kaosxdot import KaosXDotParser from cairis.legacy.AssetModel import AssetModel assocs = p.componentAssetModel(cName) model = AssetModel(list(assocs.values()), '') parser = KaosXDotParser('class', model.graph()) graph = parser.parse() drawGraph(graph, graphName) return True
def buildComponentGoalModel(p, cName, graphName): from cairis.legacy.kaosxdot import KaosXDotParser from cairis.legacy.KaosModel import KaosModel assocs = p.componentGoalModel(cName) model = KaosModel(list(assocs.values()), '', 'template_goal') parser = KaosXDotParser('goal', model.graph()) graph = parser.parse() drawGraph(graph, graphName) return True
def buildConceptMap(p,envName,graphName): from cairis.core.kaosxdot import KaosXDotParser from cairis.core.ConceptMapModel import ConceptMapModel model = ConceptMapModel(list(p.conceptMapModel(envName).values()),envName,'',True) if (model.size() == 0): return False parser = KaosXDotParser('conceptmap',model.graph()) parser.cfSet = True graph = parser.parse() drawGraph(graph,graphName) return True