Warning

This document is for an old release of Galaxy. You can alternatively view this page in the latest release if it exists or view the top of the latest release's documentation.

Source code for galaxy.dataset_collections.types

import logging
from abc import (
    ABCMeta,
    abstractmethod
)

import six

from galaxy import exceptions

log = logging.getLogger(__name__)


[docs]@six.add_metaclass(ABCMeta) class DatasetCollectionType(object):
[docs] @abstractmethod def generate_elements(self, dataset_instances): """ Generate DatasetCollectionElements with corresponding to the supplied dataset instances or throw exception if this is not a valid collection of the specified type. """
[docs]class BaseDatasetCollectionType(DatasetCollectionType): def _validation_failed(self, message): raise exceptions.ObjectAttributeInvalidException(message)