def __str__(self): """ Prints its name in a form that allows for quick identification of an attribute, without needing a bulky name that does not match the name used. """ return "%s|%s|%s" % (self.getContainingTypeName(), self.__class__.__name__, ElementRepresentative.getName(self))
def getName(self): """ Mostly normal getName(), except it includes a means to make a type name if the type is the child of an element or some other tag. That name should look like this: `elementName`|`type tag type` No parameters """ name = ElementRepresentative.getName(self) if not name == None: return name # We are implicitly defined in an element element = self.parent name = '%s|%s' % (element.name, self.tagType) element.typeName = name return name
def getName(self): """ Mostly normal getName(), except it includes a means to make a type name if the type is the child of an element or some other tag. That name should look like this: `elementName`|`type tag type` No parameters """ name = ElementRepresentative.getName(self) if not name == None: return name # We are implicitly defined in an element element = self.parent name = '%s|%s' % (element.name, self.tagType) element.typeName = name return name