You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: docs/common/types.md
+4-4Lines changed: 4 additions & 4 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -7,9 +7,9 @@ sidebar_position: 2
7
7
These are types used throughout the rest of this specification and defined here once to avoid repetition.
8
8
9
9
-`string`: a valid UTF-8 string. While being processed in code, it might be in a different encoding temporarily, but in the public interface of Opencast, these are always valid UTF-8.
10
-
-`NonBlankString`: **N**on-**E**mpty string.
11
-
-`Neas`: **N**on-**E**mpty **A**SCII **S**tring.
12
-
-`Label`: non-empty, ASCII-only string that only consists of letters, numbers or `-._~!*:@,;`. This means a label is URL-safe except for use in the domain part.<sup>(2?)</sup>
10
+
-`NonBlankString`: A string that is not "blank", meaning it is not empty and does not consists only of [Unicode `White_Space`](https://www.unicode.org/Public/UCD/latest/ucd/PropList.txt).
11
+
-`NonBlankAsciiString`: A `NonBlankString` that is also restricted to only using ASCII characters.
12
+
-`Label`: a `NonBlankAsciiString` that only consists of letters, numbers or `-._~!*:@,;`. This means a label is URL-safe except for use in the domain part.<sup>(2?)</sup>
13
13
-`ID`: a `Label` that cannot be changed after being created.
14
14
-`Username`: TODO define rules for usernames
15
15
-`LangCode`: specifies a language and optionally a region, e.g. `en` or `en-US`. Based on the [IETF BCP 47 language tag specification](https://www.rfc-editor.org/info/rfc5646): a two letter language code, optionally followed by a hyphen and a two letter region tag.
@@ -30,7 +30,7 @@ Generally, this basically uses TypeScript syntax:
30
30
31
31
For most types, the JSON serialization is the obvious one, but there are some minor important details.
32
32
-`bool` as `bool`
33
-
-`string` and all "string with extra requirements" (e.g. `Label`, `ID`, `Neas`) as string
33
+
-`string` and all "string with extra requirements" (e.g. `Label`, `ID`, `NonBlankAsciiString`) as string
34
34
- Integers as number.
35
35
- Note on 64 bit integers: In JavaScript, there is only one `number` type, which is a 64 bit floating point number (`double`, `f64`).
36
36
Those can only exactly represent integers up to 2<sup>53</sup>.
Copy file name to clipboardExpand all lines: docs/event/assets.md
+2-2Lines changed: 2 additions & 2 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -9,10 +9,10 @@ Each asset has some asset-metadata that is stored in the DB, while the file itse
9
9
10
10
Every asset has this metadata attached to it:
11
11
-`id: ID`: unique identifier among all assets of all events. Assigned by Opencast and unchangable.
12
-
-`flavor: Neas` <sup>(1?)</sup>
12
+
-`flavor: NonBlankAsciiString` <sup>(1?)</sup>
13
13
-`tags: string[]` <sup>(1?)</sup>
14
14
-`properties: Map<Label, string>`: a `Label` to string map for custom properties. Values can be arbitrary strings.<sup>(7?)</sup>
15
-
-`mimeType: Neas`: a *lowercase*`Neas` representing the MIME-type of the asset.
15
+
-`mimeType: NonBlankAsciiString`: a *lowercase*`NonBlankAsciiString` representing the MIME-type of the asset.
16
16
-`size: uint64`: size of the file in bytes. This is always the actual file size and cannot be changed manually.
17
17
-`checksum`: Checksum/hash of the file. Consists of `type` (e.g. `md5`, `sha256`) and the hex encoded value. In the API (and maybe in the database?) this should be serialized as `<type>:<value>`, e.g. `sha256:e3b0c44298f...`.
18
18
-`source: bool`: whether this was directly uploaded by a user. `false` if it was processed or generated by Opencast.
0 commit comments