class VolumeMetadata

Properties

Collection $files

Methods

__construct(MediaType|null $type = null, string|null $name = null, string|null $url = null, string|null $handle = null)

No description

addFile(FileMetadata $file)

No description

Collection
getFiles()

No description

FileMetadata|null
getFile(string $name)

No description

bool
isEmpty()

Determine if there is any file metadata.

bool
hasAnnotations()

No description

bool
hasFileLabels()

No description

array
getAnnotationLabels(array $onlyLabels = [])

The returned array is indexed by label IDs.

array
getFileLabels(array $onlyLabels = [])

The returned array is indexed by label IDs.

array
getUsers(array $onlyLabels = [])

Get all users associated with annotations and/or file labels.

array
getMatchingUsers(array $map = [], array $onlyLabels = [])

No description

array
getMatchingLabels(array $map = [], array $onlyLabels = [])

No description

Details

at line 14
__construct(MediaType|null $type = null, string|null $name = null, string|null $url = null, string|null $handle = null)

No description

Parameters

MediaType|null $type
string|null $name
string|null $url
string|null $handle

at line 23
addFile(FileMetadata $file)

No description

Parameters

FileMetadata $file

at line 28
Collection getFiles()

No description

Return Value

Collection

at line 33
FileMetadata|null getFile(string $name)

No description

Parameters

string $name

Return Value

FileMetadata|null

at line 41
bool isEmpty()

Determine if there is any file metadata.

Return Value

bool

at line 52
bool hasAnnotations()

No description

Return Value

bool

at line 63
bool hasFileLabels()

No description

Return Value

bool

at line 77
array getAnnotationLabels(array $onlyLabels = [])

The returned array is indexed by label IDs.

Parameters

array $onlyLabels

Return Value

array

at line 92
array getFileLabels(array $onlyLabels = [])

The returned array is indexed by label IDs.

Parameters

array $onlyLabels

Return Value

array

at line 111
array getUsers(array $onlyLabels = [])

Get all users associated with annotations and/or file labels.

Parameters

array $onlyLabels

List of metadata label IDs to filter the list of users.

Return Value

array

Users indexed by ID.

at line 132
array getMatchingUsers(array $map = [], array $onlyLabels = [])

No description

Parameters

array $map

Optional map of metadata user IDs to database user IDs. Metadata users not in this list will be matched by their UUID (if any).

array $onlyLabels

Consider only users belonging to annotation labels or file labels with one of the specified metadata label IDs.

Return Value

array

Map of metadata user IDs to database user IDs or null if no match was found.

at line 172
array getMatchingLabels(array $map = [], array $onlyLabels = [])

No description

Parameters

array $map

Optional map of metadata label IDs to database label IDs. Metadata labels not in this list will be matched by their UUID (if any).

array $onlyLabels

Consider only labels with one of the specified metadata label IDs.

Return Value

array

Map of metadata label IDs to database label IDs or null if no match was found.