import DISNET.objects.DisnetObject as DisnetObject class DisnetIdMapObject(DisnetObject.DisnetObject): """Class to instance objects of type Disnet Id Map""" def __init__(self, id: (str, int), vocabulary: str, source: str): DisnetObject.DisnetObject.__init__(self, id) self.__vocabulary = vocabulary self.__source = source def getVocabulary(self) -> (str, int): """Returns the vocabulary""" return self.__vocabulary def getSource(self) -> (str, int): """Returns the source""" return self.__source def info(self) -> str: """Returns the information of the Disease as a string""" return "DisnetIdMap: [source: + " + self.__source + ", disnetId: " + self.getId() + ", vocabulary: " + self.__vocabulary + "]" def __eq__(self, other) -> bool: """Equals to other Disease""" if isinstance(other, DisnetIdMapObject): equalID = self.getId() == other.getId() equalName = self.__source == other.getSource() equalVocab = self.__vocabulary == other.getVocabulary() return equalID and equalName and equalVocab else: return False