@classmethod
def getAttrInfo(cls, client, attr):
    """Get information on an attribute.

        Query the EntityInfo of the entity from the ICAT server and
        retrieve information on one of the attributes from it.

        :param client: the ICAT client.
        :type client: :class:`icat.client.Client`
        :param attr: name of the attribute.
        :type attr: :class:`str`
        :return: information on the attribute.
        :raise ValueError: if this is an abstract entity class or if
            no attribute by that name is found.
        """
    if cls.BeanName is None:
        raise ValueError('Cannot get info for an abstract entity class.')
    info = client.getEntityInfo(cls.BeanName)
    for f in info.fields:
        if f.name == attr:
            return f
    else:
        if attr in cls.MetaAttr:
            f = client.factory.create('entityField')
            f.name = attr
            f.notNullable = False
            f.relType = 'ATTRIBUTE'
            if attr in {'createTime', 'modTime'}:
                f.type = 'Date'
            else:
                f.type = 'String'
            return f
        else:
            raise ValueError("Unknown attribute name '%s'." % attr)
