import enum
from itertools import count


class Workspace:
    ...


class WorkspaceDataType(enum.Enum):
    Ensemble = enum.auto()
    Catalog = enum.auto()
    Intent = enum.auto()


class Ensemble:
    """Represents an organized collection of catalogs."""
    _count = count(1)

    def __init__(self, parent=None, name=""):
        # super(Ensemble, self).__init__(parent)

        self._name = name
        self._count = next(self._count)

    @property
    def name(self):
        if not self._name:
            self._name = f"Ensemble {self._count}"
        return self._name

    @name.setter
    def name(self, name):
        if not name:
            return
        self._name = name
