/
file-representation.ts
37 lines (32 loc) · 1.14 KB
/
file-representation.ts
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
import {
Constants,
ReadAudioFileValue,
ReadDocumentFileValue,
ReadMovingImageFileValue,
ReadStillImageFileValue
} from '@dasch-swiss/dsp-js';
import { Region } from './still-image/still-image.component';
/**
* represents a file value including its annotations.
*/
export class FileRepresentation {
/**
*
* @param fileValue a [[ReadAudioFileValue | ReadDocumentFileValue | ReadMovingImageFileValue | ReadStillImageFileValue]] representing a file value
* @param annotations[] an array of [[Region]] --> TODO: will be expanded with [[Sequence]]
*/
constructor(
readonly fileValue: ReadAudioFileValue | ReadDocumentFileValue | ReadMovingImageFileValue | ReadStillImageFileValue,
readonly annotations?: Region[]
) {
}
}
export class RepresentationConstants {
static audio = Constants.AudioFileValue;
static document = Constants.DocumentFileValue;
static movingImage = Constants.MovingImageFileValue;
static stillImage = Constants.StillImageFileValue;
static text = Constants.TextFileValue;
static region = Constants.Region;
static color = Constants.ColorValue;
};