(The following reply has been shared to @knutwa-ext and the rest of his group through another platform, but it is now copied here for other readers.)
If the scenario is that you will always have a bunch of different types of files with specific names in a bundle (possibly with some of them optional), and that you will use a specific tool to create this bundle,
I think the correct solution would be to implement a “composite datatype” as already suggested by @bjoern.gruening (I believe, however you called it “complex datatype”…). See:
I suggest you subclass HTML for this. To put it simply, a Galaxy dataset is implemented as a main file that is shown to the user, connected to a hidden directory of whatever files you want. Then, the main dataset file that is shown to the user would be a HTML file containing a description of your full bundle and possibly links to the individual files. Those files should then be added as extra files to the dataset.
You can implement this without the need to implement a new datatype class in Galaxy. Instead, you can just define a HTML subtype directly in the
datatypes_conf.xml file, ensuring that your tools do not allow to open just any HTML file in history. Custom dataset subtype in the code would be needed if you want to allow the datatype to be automatically "sniffed’, or display specific overview content to the Galaxy history box itself.
See: Advanced Tool Development Topics — Planemo 0.74.4 documentation
With such a solution, you don’t need to use data collections at all. Data collections could, however, be used if you need to represent a higher level collection of such bundles
BTW: I see that the Galaxy devs have exported the datatypes part of the code base into a standalone pypi package: galaxy-data · PyPI
See: Document: Tool datatypes_conf.xml · Issue #8565 · galaxyproject/galaxy · GitHub
So adding a custom datatype to that package would make it possible to reuse the same functionality from the command line, if needed. As a minimum, you should then provide a one-liner pull request to that package with the contents of the datatypes_conf.xml that you want to add. Then, automagically, all updated Galaxy servers will support your data type.