1 // File Description
2 /// \file DataSetTypes.h
3 /// \brief Defines the public DataSet component classes.
4 //
5 // Author: Derek Barnett
6 
7 #ifndef DATASETTYPES_H
8 #define DATASETTYPES_H
9 
10 #include <string>
11 #include "pbbam/BamFile.h"
12 #include "pbbam/Config.h"
13 #include "pbbam/DataSetXsd.h"
14 #include "pbbam/internal/DataSetBaseTypes.h"
15 
16 namespace PacBio {
17 namespace BAM {
18 
19 /// \brief The DataSetMetadata class represents the %DataSetMetadata child
20 ///        element in DataSetXML.
21 ///
22 /// A few top-level elements are built-in, but as pbbam is not primarily a
23 /// DataSetXML API, most of the metadata hierarchy needs to be manually managed.
24 ///
25 class PBBAM_EXPORT DataSetMetadata : public internal::DataSetElement
26 {
27 public:
28     /// \name Constructors & Related Methods
29     /// \{
30 
31     /// \brief Constructs a DataSetMetadata with required fields.
32     DataSetMetadata(const std::string& numRecords, const std::string& totalLength);
33 
34     /// \}
35 
36 public:
37     /// \name Operators
38     /// \{
39 
40     /// \brief Merges DataSetMetadata contents.
41     ///
42     /// Adds contents of \p other to this metadata object
43     ///
44     /// \param[in] other  some other metadata to add to this one
45     /// \returns reference to this object
46     ///
47     DataSetMetadata& operator+=(const DataSetMetadata& other);
48 
49     /// \}
50 
51 public:
52     /// \name Child Elements
53     /// \{
54 
55     /// \brief Fetches the text of the NumRecords element.
56     ///
57     /// \returns const reference to element text (empty string if not present)
58     ///
59     const std::string& NumRecords() const;
60 
61     /// \brief Fetches the text of the TotalLength element.
62     ///
63     /// \returns const reference to element text (empty string if not present)
64     ///
65     const std::string& TotalLength() const;
66 
67     /// \brief Fetches the Provenance element.
68     ///
69     /// \returns const reference to child element
70     /// \throws std::runtime_error if element does not exist
71     ///
72     const PacBio::BAM::Provenance& Provenance() const;
73 
74     /// \}
75 
76 public:
77     /// \name Child Elements
78     /// \{
79 
80     /// \brief Fetches the text of the NumRecords element.
81     ///
82     /// This element will be created if it does not yet exist.
83     ///
84     /// \returns non-const reference to element text
85     ///
86     std::string& NumRecords();
87 
88     /// \brief Fetches the text of the TotalLength element.
89     ///
90     /// This element will be created if it does not yet exist.
91     ///
92     /// \returns non-const reference to element text
93     ///
94     std::string& TotalLength();
95 
96     /// \brief Fetches Provenance element.
97     ///
98     /// This element will be created if it does not yet exist.
99     ///
100     /// \returns non-const reference to child element
101     ///
102     PacBio::BAM::Provenance& Provenance();
103 
104     /// \}
105 
106 public:
107     /// \name Child Elements
108     /// \{
109 
110     /// \brief Sets the text of the NumRecords element.
111     ///
112     /// This element will be created if it does not yet exist.
113     ///
114     /// \returns reference to this metadata object
115     ///
116     DataSetMetadata& NumRecords(const std::string& numRecords);
117 
118     /// \brief Sets the text of the TotalLength element.
119     ///
120     /// This element will be created if it does not yet exist.
121     ///
122     /// \returns reference to this metadata object
123     ///
124     DataSetMetadata& TotalLength(const std::string& totalLength);
125 
126     /// \brief Sets the Provenance child element.
127     ///
128     /// This element will be created if it does not yet exist.
129     ///
130     /// \returns reference to this metadata object
131     ///
132     DataSetMetadata& Provenance(const PacBio::BAM::Provenance& provenance);
133 
134     /// \}
135 };
136 
137 /// \brief The ExtensionElement class represents an %ExtensionElement element in
138 ///        DataSetXML.
139 ///
140 class PBBAM_EXPORT ExtensionElement : public internal::DataSetElement
141 {
142 public:
143     ExtensionElement();
144 };
145 
146 /// \brief The Extensions class represents an %Extensions element in DataSetXML.
147 ///
148 /// The Extensions element is essentially just a list of ExtensionElement
149 /// objects.
150 ///
151 class PBBAM_EXPORT Extensions : public internal::DataSetListElement<ExtensionElement>
152 {
153 public:
154     /// \brief Creates an empty extensions list.
155     Extensions();
156 };
157 
158 class ExternalResources;
159 
160 /// \brief The ExternalResource class represents an %ExternalResource element in
161 ///        DataSetXML.
162 ///
163 /// An ExternalResource can itself have a child element, ExternalResources, that
164 /// lists related files (e.g. index files).
165 ///
166 class PBBAM_EXPORT ExternalResource : public internal::IndexedDataType
167 {
168 public:
169     /// \brief Creates an ExternalResource from a BamFile object.
170     ///
171     /// The metatype & resourceId are automatically set.
172     ///
173     ExternalResource(const BamFile& bamFile);
174 
175     /// \brief Creates an ExternalResource with provided \p metatype and
176     ///        \p filename as resource ID.
177     ///
178     ExternalResource(const std::string& metatype, const std::string& filename);
179 
180 public:
181     /// \brief Fetches the resource's ExternalResources child element.
182     ///
183     /// \returns const reference to child element
184     /// \throws std::runtime_error if element does not exist
185     ///
186     const PacBio::BAM::ExternalResources& ExternalResources() const;
187 
188 public:
189     /// \brief Fetches the resource's ExternalResources child element.
190     ///
191     /// This element will be created if it does not yet exist.
192     ///
193     /// \returns non-const reference to child element
194     ///
195     PacBio::BAM::ExternalResources& ExternalResources();
196 
197     /// \brief Sets this resource's ExternalResources child element.
198     ///
199     /// This element will be created if it does not yet exist.
200     ///
201     /// \param[in] resources  new value for the element
202     /// \returns reference to this resource object
203     ///
204     ExternalResource& ExternalResources(const PacBio::BAM::ExternalResources& resources);
205 
206 public:
207     /// \brief Converts an ExternalResource to a BamFile object
208     ///
209     /// \returns corresponding BamFile object for this ExternalResource
210     /// \throws std::runtime_error if fails to open %BAM file (e.g. does not
211     ///         exist, not a %BAM file, etc.)
212     ///
213     /// \deprecated Use the results from DataSet::BamFiles instead. This method
214     ///             cannot resolve relative filepaths and will be removed in the
215     ///             near future.
216     ///
217     BamFile ToBamFile() const;
218 };
219 
220 /// \brief The ExternalResources class represents an %ExternalResources element
221 ///        in DataSetXML.
222 ///
223 /// The ExternalResources element is essentially just a list of ExternalResource
224 /// elements.
225 ///
226 class PBBAM_EXPORT ExternalResources : public internal::DataSetListElement<ExternalResource>
227 {
228 public:
229     /// \brief Creates an empty resource list.
230     ExternalResources();
231 
232     /// \brief Merges \p other resource list with this one.
233     ExternalResources& operator+=(const ExternalResources& other);
234 
235 public:
236     /// \brief Adds an ExternalResource to this list.
237     void Add(const ExternalResource& ext);
238 
239     /// \brief Removes an ExternalResource from this list.
240     void Remove(const ExternalResource& ext);
241 
242 public:
243     /// \brief Converts resource list to BamFile objects.
244     ///
245     /// \deprecated Use DataSet::BamFiles instead. This method cannot resolve
246     ///             relative filepaths and will be removed in the near future.
247     ///
248     std::vector<BamFile> BamFiles() const;
249 };
250 
251 /// \brief The FileIndex class represents a %FileIndex element in DataSetXML.
252 ///
253 /// A FileIndex is used as an auxiliary to an ExternalResource, providing
254 /// information about a data file's index file (e.g. for %BAM files, *.bai or
255 /// *.pbi).
256 ///
257 class PBBAM_EXPORT FileIndex : public internal::InputOutputDataType
258 {
259 public:
260     /// \brief Creates a FileIndex with provided \p metatype and \p filename as
261     ///        resource ID.
262     ///
263     FileIndex(const std::string& metatype, const std::string& filename);
264 };
265 
266 /// \brief The FileIndices class represents a %FileIndices element in DataSetXML.
267 ///
268 /// The FileIndices element is essentially just a list of FileIndex elements,
269 /// providing information about a data file's index files (e.g. for %BAM files
270 /// this will usually be *.bai and/or *.pbi).
271 ///
272 class PBBAM_EXPORT FileIndices : public internal::DataSetListElement<FileIndex>
273 {
274 public:
275     /// \brief Creates an empty index list.
276     FileIndices();
277 
278 public:
279     /// \brief Adds a FileIndex to this list.
280     void Add(const FileIndex& index);
281 
282     /// \brief Removes a FileIndex from this list.
283     void Remove(const FileIndex& index);
284 };
285 
286 /// \brief The Filter class represents a %Filter element in DataSetXML.
287 ///
288 /// The Filter element allows analysis pipelines to describe filters on data
289 /// that should be respected downstream, without needing to create filtered
290 /// intermediate files.
291 ///
292 /// A filter consists of a list of Property elements, each of which must be
293 /// passed (logical AND) to pass the filter, e.g. property1 && property2 &&
294 /// property3.
295 ///
296 class PBBAM_EXPORT Filter : public internal::DataSetElement
297 {
298 public:
299     /// \brief Creates an empty filter.
300     Filter();
301 
302 public:
303     /// \brief Fetches the filter's property list element.
304     ///
305     /// \returns const reference to child element
306     /// \throws std::runtime_error if element does not exist
307     ///
308     const PacBio::BAM::Properties& Properties() const;
309 
310 public:
311     /// \brief Fetches the filter's property list child element.
312     ///
313     /// This element will be created if it does not yet exist.
314     ///
315     /// \returns non-const reference to child element
316     ///
317     PacBio::BAM::Properties& Properties();
318 
319     /// \brief Sets this filter's Properties child element.
320     ///
321     /// This element will be created if it does not yet exist.
322     ///
323     /// \param[in] properties new value for the element
324     /// \returns reference to this filter object
325     ///
326     Filter& Properties(const PacBio::BAM::Properties& properties);
327 };
328 
329 /// \brief The Filters class represents a %Filters list element in DataSetXML.
330 ///
331 /// The Filters element is essentially a list of Filter elements. For analysis
332 /// purpose, each filter is considered separately (logical OR) to consider which
333 /// data passes, e.g. filter1 || filter2 || filter3.
334 ///
335 class PBBAM_EXPORT Filters : public internal::DataSetListElement<Filter>
336 {
337 public:
338     /// \brief Creates an empty filter list.
339     Filters();
340 
341     /// \brief Merges \p other filter list with this one.
342     Filters& operator+=(const Filters& other);
343 
344 public:
345     /// \brief Adds a filter to this list.
346     void Add(const Filter& filter);
347 
348     /// \brief Removes a filter from this list.
349     void Remove(const Filter& filter);
350 };
351 
352 /// \brief The ParentTool class represents a %ParentTool element in DataSetXML.
353 ///
354 class PBBAM_EXPORT ParentTool : public internal::BaseEntityType
355 {
356 public:
357     /// \brief Creates an empty %ParentTool element.
358     ParentTool();
359 };
360 
361 /// \brief The Property class represents a %Property element in DataSetXML.
362 ///
363 /// A Property is the primary building block of %DataSetXML filtering. The
364 /// %Property element describes a data record's property (or field), some value,
365 /// and a comparison operator.
366 ///
367 /// For example, one could filter all %BAM records with a read accuracy at or
368 /// above 0.9. In C++ this could be constructed like:
369 /// \code{.cpp}
370 /// Property p("accuracy", "0.9", ">=");
371 /// \endcode
372 ///
373 class PBBAM_EXPORT Property : public internal::DataSetElement
374 {
375 public:
376     /// \brief Constructs a filter property.
377     Property(const std::string& name, const std::string& value, const std::string& op);
378 
379 public:
380     /// \brief Fetches the value of property's Name attribute.
381     ///
382     /// \returns const reference to attribute value
383     ///
384     const std::string& Name() const;
385 
386     /// \brief Fetches the value of property's Operator attribute.
387     ///
388     /// \returns const reference to attribute value
389     ///
390     const std::string& Operator() const;
391 
392     /// \brief Fetches the value of property's Value attribute.
393     ///
394     /// \returns const reference to attribute value
395     ///
396     const std::string& Value() const;
397 
398 public:
399     /// \brief Fetches the value of property's Name attribute.
400     ///
401     /// \returns non-const reference to attribute value
402     ///
403     std::string& Name();
404 
405     /// \brief Fetches the value of property's Operator attribute.
406     ///
407     /// \returns non-const reference to attribute value
408     ///
409     std::string& Operator();
410 
411     /// \brief Fetches the value of property's Value attribute.
412     ///
413     /// \returns nonconst reference to attribute value
414     ///
415     std::string& Value();
416 
417 public:
418     /// \brief Sets this property's Name attribute.
419     ///
420     /// \param[in] name  new value for the attribute
421     /// \returns reference to this property object
422     ///
423     Property& Name(const std::string& name);
424 
425     /// \brief Sets this property's Operator attribute.
426     ///
427     /// \param[in] op  new value for the attribute
428     /// \returns reference to this property object
429     ///
430     Property& Operator(const std::string& op);
431 
432     /// \brief Sets this property's Value attribute.
433     ///
434     /// \param[in] value  new value for the attribute
435     /// \returns reference to this property object
436     ///
437     Property& Value(const std::string& value);
438 };
439 
440 /// \brief The Properties class represents a %Properties list element in
441 ///        DataSetXML.
442 ///
443 /// The Properties element is essentially a list of Property elements.
444 ///
445 class PBBAM_EXPORT Properties : public internal::DataSetListElement<Property>
446 {
447 public:
448     /// \brief Creates an empty property list.
449     Properties();
450 
451 public:
452     /// \brief Adds a property to this list.
453     void Add(const Property& property);
454 
455     /// \brief Removes a property from this list.
456     void Remove(const Property& property);
457 };
458 
459 /// \brief The Provenance class represents a %Provenance element in DataSetXML.
460 ///
461 class PBBAM_EXPORT Provenance : public internal::DataSetElement
462 {
463 public:
464     /// \brief Creates a empty provenance element.
465     Provenance();
466 
467 public:
468     /// \brief Fetches the value of CreatedBy attribute.
469     ///
470     /// \returns const reference to attribute value (empty string if not
471     ///          present)
472     ///
473     const std::string& CreatedBy() const;
474 
475     /// \brief Fetches the value of CommonServicesInstanceId attribute.
476     ///
477     /// \returns const reference to attribute value (empty string if not
478     ///          present)
479     ///
480     const std::string& CommonServicesInstanceId() const;
481 
482     /// \brief Fetches the value of CreatorUserId attribute.
483     ///
484     /// \returns const reference to attribute value (empty string if not
485     ///          present)
486     ///
487     const std::string& CreatorUserId() const;
488 
489     /// \brief Fetches the value of ParentJobId attribute.
490     ///
491     /// \returns const reference to attribute value (empty string if not
492     ///          present)
493     ///
494     const std::string& ParentJobId() const;
495 
496     /// \brief Fetches the ParentTool child element.
497     ///
498     /// \returns const reference to child element
499     /// \throws std::runtime_error if element does not exist
500     ///
501     const PacBio::BAM::ParentTool& ParentTool() const;
502 
503 public:
504     /// \brief Fetches the value of CreatedBy attribute.
505     ///
506     /// This attribute will be created if it does not yet exist.
507     ///
508     /// \returns non-const reference to attribute value (empty string if this is
509     ///          a new attribute)
510     ///
511     std::string& CreatedBy();
512 
513     /// \brief Fetches the value of CommonServicesInstanceId attribute.
514     ///
515     /// This attribute will be created if it does not yet exist.
516     ///
517     /// \returns non-const reference to attribute value (empty string if this is
518     ///          a new attribute)
519     ///
520     std::string& CommonServicesInstanceId();
521 
522     /// \brief Fetches the value of CreatorUserId attribute.
523     ///
524     /// This attribute will be created if it does not yet exist.
525     ///
526     /// \returns non-const reference to attribute value (empty string if this is
527     ///          a new attribute)
528     ///
529     std::string& CreatorUserId();
530 
531     /// \brief Fetches the value of ParentJobId attribute.
532     ///
533     /// This attribute will be created if it does not yet exist.
534     ///
535     /// \returns non-const reference to attribute value (empty string if this is
536     ///          a new attribute)
537     ///
538     std::string& ParentJobId();
539 
540     /// \brief Fetches the ParentTool element element.
541     ///
542     /// This element will be created if it does not yet exist.
543     ///
544     /// \returns non-const reference to child element
545     ///
546     PacBio::BAM::ParentTool& ParentTool();
547 
548 public:
549     /// \brief Sets the CreatedBy attribute.
550     ///
551     /// This attribute will be created if it does not yet exist.
552     ///
553     /// \param[in] createdBy  new value for the attribute
554     /// \returns reference to this object
555     ///
556     Provenance& CreatedBy(const std::string& createdBy);
557 
558     /// \brief Sets the CommonServicesInstanceId attribute.
559     ///
560     /// This attribute will be created if it does not yet exist.
561     ///
562     /// \param[in] id  new value for the attribute
563     /// \returns reference to this object
564     ///
565     Provenance& CommonServicesInstanceId(const std::string& id);
566 
567     /// \brief Sets the CreatorUserId attribute.
568     ///
569     /// This attribute will be created if it does not yet exist.
570     ///
571     /// \param[in] id  new value for the attribute
572     /// \returns reference to this object
573     ///
574     Provenance& CreatorUserId(const std::string& id);
575 
576     /// \brief Sets the ParentJobId attribute.
577     ///
578     /// This attribute will be created if it does not yet exist.
579     ///
580     /// \param[in] id  new value for the attribute
581     /// \returns reference to this object
582     ///
583     Provenance& ParentJobId(const std::string& id);
584 
585     /// \brief Sets the ParentTool child element.
586     ///
587     /// This element will be created if it does not yet exist.
588     ///
589     /// \param[in] tool  new value for the element
590     /// \returns reference to this dataset object
591     ///
592     Provenance& ParentTool(const PacBio::BAM::ParentTool& tool);
593 };
594 
595 class SubDataSets;
596 
597 /// \brief The DataSetBase class provides the attributes & child elements shared
598 ///        by all dataset types.
599 ///
600 /// Client code should not need to use this class directly. It should be
601 /// considered as more of an implementation detail and may in fact be removed
602 /// from public API in the future. The top-level DataSet is the recommended
603 /// entry point.
604 ///
605 class PBBAM_EXPORT DataSetBase : public internal::StrictEntityType
606 {
607 public:
608     /// \brief Creates a DataSetBase object, or one of its subclasses, from an
609     ///        XML element name (e.g. SubreadSet)
610     ///
611     static std::shared_ptr<DataSetBase> Create(const std::string& typeName);
612 
613 public:
614     /// \brief Creates an empty, generic DataSetBase.
615     DataSetBase();
616 
617 protected:
618     /// \brief Creates a DataSetBase with key values initialized.
619     DataSetBase(const std::string& metatype, const std::string& label, const XsdType& xsd);
620 
621     /// \brief Returns a new DataSetBase containing a deep copy of contents
622     DataSetBase* DeepCopy() const;
623 
624 public:
625     /// \brief Merges dataset contents.
626     ///
627     /// Adds contents of \p other to this dataset object
628     ///
629     /// \param[in] other  some other dataset to add to this one
630     /// \returns reference to this dataset object
631     ///
632     DataSetBase& operator+=(const DataSetBase& other);
633 
634 public:
635     /// \brief Fetches the dataset's ExternalResources element.
636     ///
637     /// \returns const reference to child element
638     /// \throws std::runtime_error if element does not exist
639     ///
640     const PacBio::BAM::ExternalResources& ExternalResources() const;
641 
642     /// \brief Fetches the dataset's Filters element.
643     ///
644     /// \returns const reference to child element
645     ///
646     const PacBio::BAM::Filters& Filters() const;
647 
648     /// \brief Fetches the dataset's DataSetMetadata element.
649     ///
650     /// \returns const reference to child element
651     ///
652     const PacBio::BAM::DataSetMetadata& Metadata() const;
653 
654     /// \brief Fetches the dataset's DataSets element.
655     ///
656     /// \returns const reference to child element
657     ///
658     const PacBio::BAM::SubDataSets& SubDataSets() const;
659 
660 public:
661     /// \brief Access this dataset's namespace info.
662     ///
663     /// \returns const reference to dataset's NamespaceRegistry
664     ///
665     const NamespaceRegistry& Namespaces() const;
666 
667 public:
668     /// \brief Fetches the dataset's ExternalResources element.
669     ///
670     /// This element will be created if it does not yet exist.
671     ///
672     /// \returns non-const reference to child element
673     ///
674     PacBio::BAM::ExternalResources& ExternalResources();
675 
676     /// \brief Fetches the dataset's Filters element.
677     ///
678     /// This element will be created if it does not yet exist.
679     ///
680     /// \returns non-const reference to child element
681     ///
682     PacBio::BAM::Filters& Filters();
683 
684     /// \brief Fetches the dataset's DataSetMetadata element.
685     ///
686     /// This element will be created if it does not yet exist.
687     ///
688     /// \returns non-const reference to child element
689     ///
690     PacBio::BAM::DataSetMetadata& Metadata();
691 
692     /// \brief Fetches the dataset's DataSets element.
693     ///
694     /// This element will be created if it does not yet exist.
695     ///
696     /// \returns non-const reference to child element
697     ///
698     PacBio::BAM::SubDataSets& SubDataSets();
699 
700 public:
701     /// \brief Sets this dataset's ExternalResources element.
702     ///
703     /// This element will be created if it does not yet exist.
704     ///
705     /// \param[in] resources  new value for the element
706     /// \returns reference to this dataset object
707     ///
708     DataSetBase& ExternalResources(const PacBio::BAM::ExternalResources& resources);
709 
710     /// \brief Sets this dataset's Filters element.
711     ///
712     /// This element will be created if it does not yet exist.
713     ///
714     /// \param[in] filters  new value for the element
715     /// \returns reference to this dataset object
716     ///
717     DataSetBase& Filters(const PacBio::BAM::Filters& filters);
718 
719     /// \brief Sets this dataset's DataSetMetadata element.
720     ///
721     /// This element will be created if it does not yet exist.
722     ///
723     /// \param[in] metadata  new value for the element
724     /// \returns reference to this dataset object
725     ///
726     DataSetBase& Metadata(const PacBio::BAM::DataSetMetadata& metadata);
727 
728     /// \brief Sets this dataset's DataSets element.
729     ///
730     /// This element will be created if it does not yet exist.
731     ///
732     /// \param[in] subdatasets  new value for the element
733     /// \returns reference to this dataset object
734     ///
735     DataSetBase& SubDataSets(const PacBio::BAM::SubDataSets& subdatasets);
736 
737 public:
738     /// \brief Access this dataset's namespace info.
739     ///
740     /// \returns non-const reference to dataset's NamespaceRegistry
741     ///
742     NamespaceRegistry& Namespaces();
743 
744 private:
745     NamespaceRegistry registry_;
746 };
747 
748 /// \brief The AlignmentSet class represents an %AlignmentSet root element in
749 ///        DataSetXML.
750 ///
751 class PBBAM_EXPORT AlignmentSet : public DataSetBase
752 {
753 public:
754     /// \brief Creates an empty AlignmentSet dataset.
755     AlignmentSet();
756 };
757 
758 /// \brief The BarcodeSet class represents a %BarcodeSet root element in
759 ///        DataSetXML.
760 ///
761 class PBBAM_EXPORT BarcodeSet : public DataSetBase
762 {
763 public:
764     /// \brief Creates an empty BarcodeSet dataset.
765     BarcodeSet();
766 };
767 
768 /// \brief The ConsensusAlignmentSet class represents a %ConsensusAlignmentSet
769 ///        root element in DataSetXML.
770 ///
771 class PBBAM_EXPORT ConsensusAlignmentSet : public DataSetBase
772 {
773 public:
774     /// \brief Creates an empty ConsensusAlignmentSet dataset.
775     ConsensusAlignmentSet();
776 };
777 
778 /// \brief The ConsensusReadSet class represents a %ConsensusReadSet root
779 ///        element in DataSetXML.
780 ///
781 class PBBAM_EXPORT ConsensusReadSet : public DataSetBase
782 {
783 public:
784     /// \brief Creates an empty ConsensusReadSet dataset.
785     ConsensusReadSet();
786 };
787 
788 /// \brief The ContigSet class represents a %ContigSet root element in
789 ///        DataSetXML.
790 ///
791 class PBBAM_EXPORT ContigSet : public DataSetBase
792 {
793 public:
794     /// \brief Creates an empty ContigSet dataset.
795     ContigSet();
796 };
797 
798 /// \brief The HdfSubreadSet class represents a %HdfSubreadSet root element in
799 ///        DataSetXML.
800 ///
801 class PBBAM_EXPORT HdfSubreadSet : public DataSetBase
802 {
803 public:
804     /// \brief Creates an empty HdfSubreadSet dataset.
805     HdfSubreadSet();
806 };
807 
808 /// \brief The ReferenceSet class represents a %ReferenceSet root element in
809 ///        DataSetXML.
810 ///
811 class PBBAM_EXPORT ReferenceSet : public DataSetBase
812 {
813 public:
814     /// \brief Creates an empty ReferenceSet dataset.
815     ReferenceSet();
816 };
817 
818 /// \brief The SubDataSets class represents a %DataSets list element in
819 ///        DataSetXML.
820 ///
821 /// The SubDataSets element is essentially a list of DataSets.
822 ///
823 class PBBAM_EXPORT SubDataSets : public internal::DataSetListElement<DataSetBase>
824 {
825 public:
826     /// \brief Creates an empty list of sub-datasets.
827     SubDataSets();
828 
829 public:
830     /// \brief Adds \p other sub-dataset to this list.
831     SubDataSets& operator+=(const DataSetBase& other);  // single
832 
833     /// \brief Adds \p other sub-dataset list to this list.
834     SubDataSets& operator+=(const SubDataSets& other);  // list
835 
836 public:
837     /// \brief Adds a sub-dataset to this list.
838     void Add(const DataSetBase& subdataset);
839 
840     /// \brief Removes a sub-dataset from this list.
841     void Remove(const DataSetBase& subdataset);
842 };
843 
844 /// \brief The SubreadSet class represents a %SubreadSet root element in
845 ///        DataSetXML.
846 ///
847 class PBBAM_EXPORT SubreadSet : public DataSetBase
848 {
849 public:
850     /// \brief Creates an empty SubreadSet dataset.
851     SubreadSet();
852 };
853 
854 /// \brief The TranscriptSet class represents a %TranscriptSet root element in
855 ///        DataSetXML.
856 ///
857 class PBBAM_EXPORT TranscriptSet : public DataSetBase
858 {
859 public:
860     /// \brief Creates an empty TranscriptSet dataset.
861     TranscriptSet();
862 };
863 
864 }  // namespace BAM
865 }  // namespace PacBio
866 
867 #include "internal/DataSetTypes.inl"
868 
869 #endif  // DATASETTYPES_H
870