from BasicElement import BasicElement from PropertyLink import PropertyLink from PhysicalProperty import PhysicalProperty from Entity import Entity class PhysicalEntity (Entity) : def AddPropertyLink(self, propertylink): if propertylink.__class__.__name__ != "PhysicalPropertyLink": raise AssertionError, "Invalid property link" self.propertylinks.append(propertylink) def GetPropertyLocalName(self, name): for i in self.propertylinks: if(i.property.name == name): return i.localname return "invalid"