6 from utils.attr
import check_attr_type, check_attr_range
7 from common.range
import noteType_range
10 """! "Statement is a class representating a narrative description that refines or complements Definition." (LMF)
13 """! @brief Constructor.
14 Statement instances are owned by Definition.
15 @return A Statement instance.
39 """! @brief Destructor.
40 Release TextRepresentation instances.
43 del text_representation
46 def set_note(self, note, type=None, language=None):
48 @param note Note to set.
49 @param type Type of the note.
50 @param language Language used for the note.
51 @return Statement instance.
56 if language
is not None:
62 @param type If this argument is given, get note only if its type corresponds.
63 @param language If this argument is given, get note only if written in this language.
64 @return The filtered Statement attribute 'note'.
74 """! @brief Set language used for the note.
75 @param language Language used for the note.
76 @return Statement instance.
78 error_msg =
"Language value '%s' is not allowed" % language
84 """! @brief Get language used for the note.
85 @return Statement attribute 'language'.
90 """! @brief Set type of the note.
91 @param note_type Type of the note.
92 @return Statement instance.
94 error_msg =
"Note type value '%s' is not allowed" % note_type
101 """! @brief Get type of the note.
102 @return Statement attribute 'noteType'.
107 """! @brief Set usage note.
108 @param usage_note Usage note to set.
109 @param language Language used for the usage note.
110 @return Statement instance.
113 if language
is not None:
118 """! @brief Get usage note.
119 @param language If this argument is given, get usage note only if written in this language.
120 @return The filtered Statement attribute 'usageNote'.
128 """! @brief Set encyclopedic information.
129 @param encyclopedic_information Encyclopedic information to set.
130 @param language Language used for the encyclopedic information.
131 @return Statement instance.
134 if language
is not None:
139 """! @brief Get encyclopedic information.
140 @param language If this argument is given, get encyclopedic information only if written in this language.
141 @return The filtered Statement attribute 'encyclopedicInformation'.
149 """! @brief Set restriction.
150 @param restriction Restriction to set.
151 @param language Language used for the restriction.
152 @return Statement instance.
155 if language
is not None:
160 """! @brief Get restriction.
161 @param language If this argument is given, get restriction only if written in this language.
162 @return The filtered Statement attribute 'restriction'.
170 """Set source language (in English), e.g. "Chinese".
171 @param borrowed_word The source language to set.
172 @return Statement instance.
174 error_msg =
"Borrowed word value '%s' is not allowed" % borrowed_word
180 """Get source language (in English).
181 @return Statement attribute 'borrowedWord'.
187 @param written_form The loan word to set.
188 @return Statement instance.
190 error_msg =
"Written form value '%s' is not allowed" % written_form
197 @return Statement attribute 'writtenForm'.
203 @param etymolgy The etymology to set.
204 @return Statement instance.
206 error_msg =
"Etymology value '%s' is not allowed" % etymology
213 @return Statement attribute 'etymology'.
218 """Set etymology comment (in English).
219 @param etymolgy_comment The etymology comment to set.
220 @param term_source_language The language used for the comment.
221 @return Statement instance.
223 error_msg =
"Etymology comment value '%s' is not allowed" % etymology_comment
226 if term_source_language
is not None:
231 """Get etymology comment (in English).
232 @param term_source_language The language of the etymology comment to retrieve.
233 @return Statement attribute 'etymologyComment'.
239 """Set language used for the etymology comment.
240 @param term_source_language The etymology comment language to set.
241 @return Statement instance.
243 error_msg =
"Term source language value '%s' is not allowed" % term_source_language
249 """Get language used for the etymology comment.
250 @return Statement attribute 'termSourceLanguage'.
255 """Set etymology gloss.
256 @param etymolgy_gloss The etymology gloss to set.
257 @return Statement instance.
259 error_msg =
"Etymology gloss value '%s' is not allowed" % etymology_gloss
265 """Get etymology gloss.
266 @return Statement attribute 'etymologyGloss'.
271 """Set etymology source.
272 @param etymolgy_source The etymology source to set.
273 @return Statement instance.
275 error_msg =
"Etymology source value '%s' is not allowed" % etymology_source
281 """Get etymology source.
282 @return Statement attribute 'etymologySource'.
287 """Set scientific name.
288 @param scientific_name The scientific name to set.
289 @return Statement instance.
291 error_msg =
"Scientific name value '%s' is not allowed" % scientific_name
297 """Get scientific name.
298 @return Statement attribute 'scientificName'.
def get_termSourceLanguage
def check_attr_type
Check that attribute value is of specified type.
def check_attr_range
Check that attribute value is in specified range.
def get_language
Get language used for the note.
def get_restriction
Get restriction.
def set_termSourceLanguage
def get_encyclopedicInformation
Get encyclopedic information.
def get_noteType
Get type of the note.
"Statement is a class representating a narrative description that refines or complements Definition...
def set_noteType
Set type of the note.
def set_language
Set language used for the note.
text_representation
TextRepresentation instances are owned by Statement There is zero to many TextRepresentation instance...
def set_encyclopedicInformation
Set encyclopedic information.
def set_restriction
Set restriction.
def set_usageNote
Set usage note.
def get_usageNote
Get usage note.