Stimulus

Stimulus

The Stimulus is a minimal customization of a LanguageDatum which allows the user to add additional information which can be used for experiments.

Constructor

new Stimulus()

Source:

Extends

Members

cloneDeprecated

Source:
Inherited From:
Clone the current Datum and return the clone. The clone is put in the current Session, regardless of the origin Datum's Session. //TODO it doesn tlook liek this is the case below:

decrypt

Source:
Inherited From:
Decrypts the datum if it was encrypted

encrypt

Source:
Inherited From:
Encrypts the datum if it is confidential

exportAsCSV

Source:
Inherited From:
This takes as an argument the order of fields and then creates a row of csv.

exportAsPlainText

Source:
Inherited From:
This function simply takes the utterance gloss and translation and puts them out as plain text so the user can do as they wish.

getValidationStatus

Source:
Inherited From:
This function is used to get the most prominent datumstate (now called ValidationStatus) eg "CheckedWithSeberina" or "Deleted" or "ToBeChecked"

getValidationStatusColor

Source:
Inherited From:
This function is used to colour a datum background to make visually salient the validation status of the datum.

laTeXiT

Source:
Inherited From:
The LaTeXiT function automatically mark-ups an example in LaTeX code (\exg. \"a) and then copies it on the export modal so that when the user switches over to their LaTeX file they only need to paste it in. We did a poll on Facebook among EGGers, and other linguists we know and found that Linguex was very popular, and GB4E, so we did the export in GB4E.

matchesSingleCriteria

Source:
Inherited From:
Determines whether the given object to search through matches the given search criteria.

morphemes

Source:
Inherited From:
Morphemes of the datum, if morphemes is empty it will provide the utterance or the orthography as a last resort copy

processQueryString

Source:
Inherited From:
Process the given string into an array of tokens where each token is either a search criteria or an operator (AND or OR). Also makes each search criteria token lowercase, so that searches will be case- insensitive.

putInTrash

Source:
Inherited From:
Make the model marked as Deleted, mapreduce function will ignore the deleted models so that it does not show in the app, but deleted model remains in the database until the admin empties the trash. Also remove it from the view so the user cant see it.

saveAndInterConnectInApp

Source:
Inherited From:
Accepts two functions to call back when save is successful or fails. If the fail callback is not overridden it will alert failure to the user. - Adds the datum to the top of the default data list in the corpus if it is in the right corpus - Adds the datum to the datums container if it wasnt there already - Adds an activity to the logged in user with diff in what the user changed.

setAsCurrentDatum

Source:
Inherited From:
Deprecated:
  • Yes
Accepts two functions success will be called if sucessfull, otherwise it will attempt to render the current datum views. If the datum isn't in the current corpus it will call the fail callback or it will alert a bug to the user. Override the fail callback if you don't want the alert.

updateDatumState

Source:
Inherited From:
This function is used to set the primary status of the datum, eg. put Deleted as the first item in the validation status.