Class: DRE

DRE(data)

Class representing a Dual Recorder Event (our internal name. In the UI and Engage, a Dual Recorder file.) The user records a native, then records himself telling the same story. The desktop Stages app has tools to enable the user to transcribe and compare the two texts, to aid in higher-level language learning.

Constructor

new DRE(data)

Creates a DRE object
Parameters:
Name Type Description
data DRE | Object
Source:

Extends

Members

_id :string

Unique ID for the DRE
Type:
  • string
Default Value:
  • ''
Source:

activityPlanIds :Array.<string>

_id's of the ActivityPlans this CLA File is linked to. If empty array, this CLA File was created without an ActivityPlan. To find a specific task in an ActivityPlan that is linked to this CLA File, search through the ActivityPlan's tasks for this CLA File's _id in taskClaFileId. _id's are appended to the end of the list when this CLA File is linked to an ActivityPlan. So, the first ActivityPlan in the list is the one this CLA File was created through (or if the CLA File was not created through an Activity Plan, the first ActivityPlan this CLA File was linked to), unless the user explicitly disassociates this CLA File from that original ActivityPlan.
Type:
  • Array.<string>
Overrides:
Source:

canLinkToTask :boolean

if true, show this item in Pending (unless deferToStage prevents it)
Type:
  • boolean
Overrides:
Source:

deferToStage :number

Do not show this item in Pending until User.getClaStageNumber() of the user's CLA Stage is at least this number.
Type:
  • number
Overrides:
Source:

fileNumber :number

file number
Type:
  • number
Overrides:
Source:

imported :boolean

true if the file was imported from a previous export
Type:
  • boolean
Overrides:
Source:

linkedFiles :Array.<string>

Array of file numbers (not _id's)
Type:
  • Array.<string>
Overrides:
Default Value:
  • []
Source:

note :string

Any notes the user wants to make about the DRE. Might be about the topic or genre or the helper used, the situation, etc.
Type:
  • string
Default Value:
  • ''
Source:

readOnly :boolean

true if we should prevent editing the file
Type:
  • boolean
Overrides:
Source:

recording1 :string

Recording 1 file name (no path, but does include the extension)
Type:
  • string
Source:

recording2 :string

Recording 2 file name (no path, but does include the extension)
Type:
  • string
Source:

speaker1 :string

the speaker in recording1 (_id of the speaker in the Person table)
Type:
  • string
Source:

speaker2 :string

the speaker in recording2 (_id of the speaker in the Person table)
Type:
  • string
Source:

splitCompareText1 :Array.<Array.<object>>

Array of array of objects. Each string in splitText1 is here broken into an array of objects of shape:
Type:
  • Array.<Array.<object>>
Source:
Examples
{ text: string, className: string }

Example (except the text will be orthographic):
{ text: 'The story begins like this', className: 'text-highlight-6' }

If the text has been highlighted by the user on the Compare Transcriptions tab, className will be set to the highlight number, which corresponds to a color in the desktop app.

If the text has not been highlighted, className will be an empty string.

splitCompareText2 :Array.<string>

Array of array of objects. Each string in splitText2 is here broken into an array of objects of shape:
Type:
  • Array.<string>
Source:
Examples
{ text: string, className: string }

Example (except the text will be orthographic):
{ text: 'Here is how the story begins', className: 'text-highlight-6' }

If the text has been highlighted by the user on the Compare Transcriptions tab, className will be set to the highlight number, which corresponds to a color in the desktop app.

If the text has not been highlighted, className will be an empty string.

splitText1 :Array.<string>

transcription1, broken into sections by the user to match equivalent sections of transcription2
Type:
  • Array.<string>
Source:

splitText2 :Array.<string>

transcription2, broken into sections by the user to match equivalent sections of transcription1
Type:
  • Array.<string>
Source:

splitTextColorDetails

Observations and Notes by color, for each row of this DRE.
Source:
Examples
[{ [className]: { observations: string, notes: string }, ... }, ...]

For className, see StagesApp-Desktop 'highlights' constant main.scss $text-highlights

Observations are intended to be entered while comparing texts.

Notes are intended to be entered after discussing Observations with the helper.

Example where the DRE text has been aligned into 4 rows (splitText1 and splitText2 have lengths of 4),
and the second and third rows have some highlighting:
[ {},
  { 'text-highlight-7': { observations: 'I used na before every paragraph, but he used na, da, dyadi, and tebes.', notes: '' }, { 'text-highlight-3': { observations: '', notes: '' } },
  { 'text-highlight-3': { observations: 'why did he add -em?', notes: 'he said that suffix is used on verbs when children perform the action' } },
  {},
]

title :string

Title of the DRE
Type:
  • string
Default Value:
  • ''
Source:

transcription1 :string

Transcription 1 plain text
Type:
  • string
Source:

transcription2 :string

Transcription 2 plain text
Type:
  • string
Source:

Methods

claFileType()

The type of CLA File this is (e.g., CultureEvent, DRE) This method must be overridden in any class that extends CLAFile
Overrides:
Source:

isCE() → {boolean}

returns true if this CLAFile is a CultureEvent
Overrides:
Source:
Returns:
Type
boolean

isDRE() → {boolean}

returns true if this CLAFile is a DRE
Overrides:
Source:
Returns:
Type
boolean

isPE() → {boolean}

returns true if this CLAFile is a PE
Overrides:
Source:
Returns:
Type
boolean

set(data) → {DRE}

Creates an updated DRE object
Parameters:
Name Type Description
data DRE | Object
Source:
Returns:
Type
DRE