def gen_property_with_default(name, fget=None, fset=None, doc=""):
    """ Generates a property of a name either with a default fget or a default
    fset.

    @param name: property name
    @param fget: default fget
    @param fset: default fset
    @param doc: documentation for the property

    @type name: string
    @type fget: callable or None
    @type fset: callable or None
    @type doc: string
    """
    if fget == None and fset == None:
        raise NotImplementedError("fget or fset must be not null")

    internal_name = '%s%s' % ("_prop_", name)

    def getter(self):
        if not internal_name in dir(self):
            setattr(self, internal_name, "")
        return getattr(self, internal_name)

    def setter(self, value):
        return setattr(self, internal_name, value)

    if fget is None:
        return property(getter, fset, doc=doc)

    return property(fget, setter, doc=doc)