public class SoundEvent extends Event
Constructor and Description |
---|
SoundEvent(String id) |
SoundEvent(String id,
String sound_t) |
SoundEvent(String id,
String sound_t,
String associated_text) |
Modifier and Type | Method and Description |
---|---|
String |
get_associated_text_lang() |
String |
get_associated_text() |
Long |
get_duration() |
Double |
get_imprecise_sound_volume() |
Boolean |
get_requires_new_text_element() |
String |
get_sound_t() |
void |
set_associated_text_element(String element_id)
Relates this SoundEvent to an existing TextElement
|
void |
set_associated_text(String associated_text)
Adds the raw text associated to this SoundEvent
|
void |
set_associated_text(String associated_text,
String language)
Adds the raw text and language associated to this SoundEvent
|
void |
set_duration(Long duration) |
void |
set_imprecise_sound_volume(Double imprecise_sound_volume) |
void |
set_sound_t(String sound_t) |
JSONObject |
to_json()
The Event is converted to JSON format
|
InfantiumResponse |
validate_event(List<String> elements_list)
Check that the current Event is valid
|
get_happens, get_id, get_t, set_happens, set_id, set_t
public SoundEvent(String id)
id
- public String get_sound_t()
public void set_sound_t(String sound_t)
sound_t
- the sound_t to setpublic Double get_imprecise_sound_volume()
public void set_imprecise_sound_volume(Double imprecise_sound_volume)
imprecise_sound_volume
- the imprecise_sound_volume to setpublic Long get_duration()
public void set_duration(Long duration)
duration
- the duration to setpublic String get_associated_text()
public String get_associated_text_lang()
public void set_associated_text(String associated_text)
associated_text
- the associated_text to setpublic void set_associated_text_element(String element_id)
element_id
- the TextElement referenced by this Eventpublic void set_associated_text(String associated_text, String language)
associated_text
- the associated_text to setpublic Boolean get_requires_new_text_element()
public InfantiumResponse validate_event(List<String> elements_list)
validate_event
in class Event
public JSONObject to_json() throws JSONException
to_json
in class Event
JSONException