EDLDataset

EDLDataset

EDLDataset

An EDL dataset. More…

#include <edlstorage.h>

Inherits from EDLUnit

Public Functions

Name
EDLDataset(EDLGroup * parent =nullptr)
~EDLDataset()
virtual boolsave() override
boolisEmpty() const
QStringsetDataFile(const QString & fname, const QString & summary =QString())
QStringaddDataFilePart(const QString & fname, int index =-1)
EDLDataFiledataFile() const
QStringaddAuxDataFile(const QString & fname, const QString & key =QString(), const QString & summary =QString())
QStringaddAuxDataFilePart(const QString & fname, const QString & key =QString(), int index =-1)
voidsetDataScanPattern(const QString & wildcard, const QString & summary =QString())
Set a pattern to find data files.
voidaddAuxDataScanPattern(const QString & wildcard, const QString & summary =QString())
QStringpathForDataBasename(const QString & baseName)
Get absolute path for data with a given basename Retrieve an absolute path for the given basename in this dataset. The data is not registered with the dataset, to add it properly, you need to register a scan pattern. The use of this pattern is discouraged, try to add new data explicitly rather then implicitly.
QStringpathForDataPart(const EDLDataPart & dpart)
Return absolute path to data file on disk. This function will just return the absolute path of the given data part on disk. If the data part passed as parameter does not belong to this dataset, an invalid part will be returned. The function will not check for existence of the file!

Additional inherited members

Public Functions inherited from EDLUnit

Name
EDLUnit(EDLUnitKind kind, EDLUnit * parent =nullptr)
virtual~EDLUnit()
EDLUnitKindobjectKind() const
QStringobjectKindString() const
EDLUnit *parent() const
QStringname() const
virtual boolsetName(const QString & name)
QDateTimetimeCreated() const
voidsetTimeCreated(const QDateTime & time)
QUuidcollectionId() const
virtual voidsetCollectionId(const QUuid & uuid)
QStringcollectionShortTag() const
Get part of the long collection-id as a short tag in e.g. filenames.
voidaddAuthor(const EDLAuthor & author)
QList< EDLAuthor >authors() const
QStringpath() const
voidsetPath(const QString & path)
QStringrootPath() const
QHash< QString, QVariant >attributes() const
voidsetAttributes(const QHash< QString, QVariant > & attributes)
voidinsertAttribute(const QString & key, const QVariant & value)
QStringlastError() const
QStringserializeManifest()
QStringserializeAttributes()

Protected Functions inherited from EDLUnit

Name
voidsetObjectKind(const EDLUnitKind & kind)
voidsetParent(EDLUnit * parent)
voidsetLastError(const QString & message)
virtual voidsetRootPath(const QString & root)
voidsetDataObjects(std::optional< EDLDataFile > dataFile, const QList< EDLDataFile > & auxDataFiles =QList< EDLDataFile >())
boolsaveManifest()
boolsaveAttributes()
QStringgeneratorId() const
voidsetGeneratorId(const QString & idString)

Friends inherited from EDLUnit

Name
classEDLGroup

Detailed Description

class EDLDataset;

An EDL dataset.

A set of data files which belongs together (usually data of the same modality from the same source)

Public Functions Documentation

function EDLDataset

explicit EDLDataset(
    EDLGroup * parent =nullptr
)

function ~EDLDataset

~EDLDataset()

function save

virtual bool save() override

Reimplements: EDLUnit::save

function isEmpty

bool isEmpty() const

function setDataFile

QString setDataFile(
    const QString & fname,
    const QString & summary =QString()
)

function addDataFilePart

QString addDataFilePart(
    const QString & fname,
    int index =-1
)

function dataFile

EDLDataFile dataFile() const

function addAuxDataFile

QString addAuxDataFile(
    const QString & fname,
    const QString & key =QString(),
    const QString & summary =QString()
)

function addAuxDataFilePart

QString addAuxDataFilePart(
    const QString & fname,
    const QString & key =QString(),
    int index =-1
)

function setDataScanPattern

void setDataScanPattern(
    const QString & wildcard,
    const QString & summary =QString()
)

Set a pattern to find data files.

Parameters:

  • wildcard Wildcard to find generated data

Set a pattern to find generated data when the dataset object is saved, if the data was generated externally and could not be registered properly with addDataPartFilename().

function addAuxDataScanPattern

void addAuxDataScanPattern(
    const QString & wildcard,
    const QString & summary =QString()
)

function pathForDataBasename

QString pathForDataBasename(
    const QString & baseName
)

Get absolute path for data with a given basename Retrieve an absolute path for the given basename in this dataset. The data is not registered with the dataset, to add it properly, you need to register a scan pattern. The use of this pattern is discouraged, try to add new data explicitly rather then implicitly.

This function ensures the path to the selected data exists, but the data file itself may not be present on disk. An empty string may be returned in case no path could be created.

function pathForDataPart

QString pathForDataPart(
    const EDLDataPart & dpart
)

Return absolute path to data file on disk. This function will just return the absolute path of the given data part on disk. If the data part passed as parameter does not belong to this dataset, an invalid part will be returned. The function will not check for existence of the file!

Parameters:

  • dpart The data part to resolve

Return: Absolute filepath


Updated on 2024-11-06 at 17:10:29 +0000