def get_asset_model(self, environment_name, asset_name, hide_concerns=True): fontName, fontSize, apFontName = get_fonts(session_id=self.session_id) try: associationDictionary = self.db_proxy.classModel( environment_name, asset_name, hideConcerns=hide_concerns) associations = GraphicalAssetModel(list( associationDictionary.values()), environment_name, asset_name, hideConcerns=hide_concerns, db_proxy=self.db_proxy, fontName=fontName, fontSize=fontSize) dot_code = associations.graph() return dot_code except DatabaseProxyException as ex: self.close() raise ARMHTTPError(ex) except ARMException as ex: self.close() raise ARMHTTPError(ex) except Exception as ex: print(ex)
def get_asset_model(self, environment_name, with_concerns=True): fontName, fontSize, apFontName = get_fonts(session_id=self.session_id) try: associationDictionary = self.db_proxy.classModel(environment_name, hideConcerns=(with_concerns is False)) associations = GraphicalAssetModel(associationDictionary.values(), environment_name, db_proxy=self.db_proxy, fontName=fontName, fontSize=fontSize) dot_code = associations.graph() return dot_code except DatabaseProxyException as ex: self.close() raise ARMHTTPError(ex) except ARMException as ex: self.close() raise ARMHTTPError(ex) except Exception as ex: print(ex)
def get_component_asset_model(self,cName): fontName, fontSize, apFontName = get_fonts(session_id=self.session_id) try: associationDictionary = self.db_proxy.componentAssetModel(cName) associations = GraphicalAssetModel(associationDictionary.values(), db_proxy=self.db_proxy, fontName=fontName, fontSize=fontSize,isComponentAssetModel=True) dot_code = associations.graph() return dot_code except DatabaseProxyException as ex: self.close() raise ARMHTTPError(ex) except ARMException as ex: self.close() raise ARMHTTPError(ex) except Exception as ex: print(ex)
def get_component_asset_model(self,cName): fontName, fontSize, apFontName = get_fonts(session_id=self.session_id) try: associationDictionary = self.db_proxy.componentAssetModel(cName) associations = GraphicalAssetModel(associationDictionary.values(), db_proxy=self.db_proxy, fontName=fontName, fontSize=fontSize) dot_code = associations.graph() return dot_code except DatabaseProxyException as ex: self.close() raise ARMHTTPError(ex) except ARMException as ex: self.close() raise ARMHTTPError(ex) except Exception as ex: print(ex)
def get_asset_model(self, environment_name, asset_name, pathValues): fontName, fontSize, apFontName = get_fonts(session_id=self.session_id) hide_concerns = pathValues[0] if hide_concerns == '0' or hide_concerns == 0: hide_concerns = False else: hide_concerns = True if asset_name == 'all': asset_name = '' try: self.db_proxy.getDimensionId(environment_name, 'environment') if (asset_name != ''): self.db_proxy.getDimensionId(asset_name, 'asset') associationDictionary = self.db_proxy.classModel( environment_name, asset_name, hideConcerns=hide_concerns) associations = GraphicalAssetModel(list( associationDictionary.values()), environment_name, asset_name, hideConcerns=hide_concerns, db_proxy=self.db_proxy, fontName=fontName, fontSize=fontSize) dot_code = associations.graph() return dot_code except ObjectNotFound as ex: self.close() raise ObjectNotFoundHTTPError(ex) except DatabaseProxyException as ex: self.close() raise ARMHTTPError(ex) except ARMException as ex: self.close() raise ARMHTTPError(ex) except Exception as ex: print(ex)
def get_asset_model(self, environment_name, asset_name, hide_concerns=True): fontName, fontSize, apFontName = get_fonts(session_id=self.session_id) try: self.db_proxy.getDimensionId(environment_name,'environment') if (asset_name != ''): self.db_proxy.getDimensionId(asset_name,'asset') associationDictionary = self.db_proxy.classModel(environment_name, asset_name, hideConcerns=hide_concerns) associations = GraphicalAssetModel(list(associationDictionary.values()), environment_name, asset_name, hideConcerns=hide_concerns, db_proxy=self.db_proxy, fontName=fontName, fontSize=fontSize) dot_code = associations.graph() return dot_code except ObjectNotFound as ex: self.close() raise ObjectNotFoundHTTPError(ex) except DatabaseProxyException as ex: self.close() raise ARMHTTPError(ex) except ARMException as ex: self.close() raise ARMHTTPError(ex) except Exception as ex: print(ex)