EDLDataset
EDLDataset
An EDL dataset. More…
#include <edlstorage.h>
Inherits from EDLUnit
Public Functions
Name | |
---|---|
EDLDataset(EDLGroup * parent =nullptr) | |
~EDLDataset() | |
virtual bool | save() override |
bool | isEmpty() const |
QString | setDataFile(const QString & fname, const QString & summary =QString()) |
QString | addDataFilePart(const QString & fname, int index =-1) |
EDLDataFile | dataFile() const |
QString | addAuxDataFile(const QString & fname, const QString & key =QString(), const QString & summary =QString()) |
QString | addAuxDataFilePart(const QString & fname, const QString & key =QString(), int index =-1) |
void | setDataScanPattern(const QString & wildcard, const QString & summary =QString()) Set a pattern to find data files. |
void | addAuxDataScanPattern(const QString & wildcard, const QString & summary =QString()) |
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. |
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! |
Additional inherited members
Public Functions inherited from EDLUnit
Name | |
---|---|
EDLUnit(EDLUnitKind kind, EDLUnit * parent =nullptr) | |
virtual | ~EDLUnit() |
EDLUnitKind | objectKind() const |
QString | objectKindString() const |
EDLUnit * | parent() const |
QString | name() const |
virtual bool | setName(const QString & name) |
QDateTime | timeCreated() const |
void | setTimeCreated(const QDateTime & time) |
QUuid | collectionId() const |
virtual void | setCollectionId(const QUuid & uuid) |
QString | collectionShortTag() const Get part of the long collection-id as a short tag in e.g. filenames. |
void | addAuthor(const EDLAuthor & author) |
QList< EDLAuthor > | authors() const |
QString | path() const |
void | setPath(const QString & path) |
QString | rootPath() const |
QHash< QString, QVariant > | attributes() const |
void | setAttributes(const QHash< QString, QVariant > & attributes) |
void | insertAttribute(const QString & key, const QVariant & value) |
QString | lastError() const |
QString | serializeManifest() |
QString | serializeAttributes() |
Protected Functions inherited from EDLUnit
Name | |
---|---|
void | setObjectKind(const EDLUnitKind & kind) |
void | setParent(EDLUnit * parent) |
void | setLastError(const QString & message) |
virtual void | setRootPath(const QString & root) |
void | setDataObjects(std::optional< EDLDataFile > dataFile, const QList< EDLDataFile > & auxDataFiles =QList< EDLDataFile >()) |
bool | saveManifest() |
bool | saveAttributes() |
QString | generatorId() const |
void | setGeneratorId(const QString & idString) |
Friends inherited from EDLUnit
Name | |
---|---|
class | EDLGroup |
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