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: src/models/Language.js
+6-2Lines changed: 6 additions & 2 deletions
Original file line number
Diff line number
Diff line change
@@ -3,6 +3,7 @@ import isGlottoCode from '../utilities/types/isGlottoCode.js';
3
3
importisISOCodefrom'../utilities/types/isISO.js';
4
4
importModelfrom'../core/Model.js';
5
5
importMultiLangStringfrom'./MultiLangString.js';
6
+
importTagsfrom'./Tags.js';
6
7
7
8
/**
8
9
* Validates a language abbreviation. Throws a type error if the input is not a valid abbreviation.
@@ -54,6 +55,7 @@ function validateISOCode(input) {
54
55
* @prop {String} glottolog - The Glottocode for this language
55
56
* @prop {String} iso - The ISO 639-3 code for this language
56
57
* @prop {models.MultiLangString} name - The name of this language
58
+
* @prop {models.Tags} tags - The tags for this language
57
59
* @prop {String} type - "Language"
58
60
*/
59
61
classLanguageextendsModel{
@@ -65,18 +67,20 @@ class Language extends Model {
65
67
* @param {String} [data.glottolog] The Glottolog Code for this language.
66
68
* @param {String} [data.iso] The ISO 639-3 code for this language.
67
69
* @param {Map|Object|String} [data.name] The name of this language. May be a string if English, an Object formatted as a [MultiLangString]{@link https://format.digitallinguistics.io/schemas/MultiLangString.html}, or a Map of language tags => transcriptions.
70
+
* @param {Map|Object} [data.tags] A Map or Object of tags for this Language, formatted as a [DLx Tags object]{@link https://format.digitallinguistics.io/schemas/Tags.html}.
Copy file name to clipboardExpand all lines: src/models/Text.js
+7-3Lines changed: 7 additions & 3 deletions
Original file line number
Diff line number
Diff line change
@@ -1,27 +1,31 @@
1
1
importModelfrom'../core/Model.js';
2
2
importMultiLangStringfrom'./MultiLangString.js';
3
+
importTagsfrom'./Tags.js';
3
4
importUtterancefrom'./Utterance.js';
4
5
5
6
/**
6
7
* A class representing a linguistic text, formatted according to the [DLx Data Format for a language]{@link https://format.digitallinguistics.io/schemas/Text.html}
7
8
* @memberof models
8
9
* @extends core.Model
10
+
* @prop {models.Tags} tags - The tags for this text
9
11
* @prop {models.MultiLangString} title - The title of this text
10
12
* @prop {core.Collection} utterances - An array of utterances in this text
11
13
*/
12
14
classTextextendsModel{
13
15
14
16
/**
15
17
* Create a new Text
16
-
* @param {Object} [data={}] The data to use for this Text. Data should be formatted according to the [DLx Data Format's guidelines for Text data]{@link https://format.digitallinguistics.io/schemas/Text.html}.
18
+
* @param {Object} [data={}] The data for this text, formatted as a [DLx Text object]{@link https://format.digitallinguistics.io/schemas/Text.html}.
19
+
* @param {Map|Object} [data.tags] The tags for this text, formatted as a [DLx Tags object]{@link https://format.digitallinguistics.io/schemas/Tags.html}.
0 commit comments