Python LMF library
 All Classes Namespaces Files Functions Variables
Public Member Functions | Public Attributes | List of all members
pylmflib.pylmflib.core.definition.Definition Class Reference

"Definition is a class representing a narrative description of a sense. It is provided to help human users understand the meaning of a lexical entry. A Sense instance can have zero to many definitions. Each Definition instance may be associated with zero to many Text Representation instances in order to manage the text defintion in more than one language or script. In addition, the narrative description can be expressed in a different language or script than the one in the Lexical Entry instance." (LMF) More...

Public Member Functions

def __init__
 Constructor. More...
 
def __del__
 Destructor. More...
 
def set_language
 Set language used for definition and gloss. More...
 
def get_language
 Get language used for definition and gloss. More...
 
def set_definition
 Set definition. More...
 
def get_definition
 Get definition. More...
 
def set_gloss
 Set gloss. More...
 
def get_gloss
 Get gloss. More...
 
def create_statement
 Create a Statement instance. More...
 
def add_statement
 Add a Statement instance to this Definition instance. More...
 
def get_statements
 Get all Statement instances maintained by this Definition instance. More...
 
def get_first_statement
 Get the previously registered statement. More...
 
def set_note
 Set note, note type and language. More...
 
def find_notes
 Find notes. More...
 
def set_usage_note
 Set usage note and language. More...
 
def find_usage_notes
 Find usage notes. More...
 
def set_encyclopedic_information
 Set encyclopedic information and language. More...
 
def find_encyclopedic_informations
 Find encyclopedic informations. More...
 
def set_restriction
 Set restriction and language. More...
 
def find_restrictions
 Find restrictions. More...
 
def set_borrowed_word
 Set source language (in English). More...
 
def get_borrowed_word
 Get source language (in English). More...
 
def set_written_form
 Set loan word. More...
 
def get_written_form
 Get loan word. More...
 
def set_etymology
 Set etymology. More...
 
def get_etymology
 Get etymology. More...
 
def set_etymology_comment
 Set etymology comment and language. More...
 
def get_etymology_comment
 Get etymology comment. More...
 
def get_term_source_language
 Get language used for the etymology comment. More...
 
def set_etymology_gloss
 Set etymology gloss. More...
 
def get_etymology_gloss
 Get etymology gloss. More...
 
def set_etymology_source
 Set etymology source. More...
 
def get_etymology_source
 Get etymology source. More...
 
def set_scientific_name
 Set scientific name. More...
 
def get_scientific_name
 Get scientific name. More...
 

Public Attributes

 language
 
 definition
 
 gloss
 
 literally
 
 text_representation
 TextRepresentation instances are owned by Definition There is zero to many TextRepresentation instances per Definition. More...
 
 statement
 Statement instances are owned by Definition There is zero to many Statement instances per Definition. More...
 

Detailed Description

"Definition is a class representing a narrative description of a sense. It is provided to help human users understand the meaning of a lexical entry. A Sense instance can have zero to many definitions. Each Definition instance may be associated with zero to many Text Representation instances in order to manage the text defintion in more than one language or script. In addition, the narrative description can be expressed in a different language or script than the one in the Lexical Entry instance." (LMF)

Definition at line 9 of file definition.py.

Constructor & Destructor Documentation

def pylmflib.pylmflib.core.definition.Definition.__init__ (   self)

Constructor.

Definition instances are owned by Sense.

Returns
A Definition instance.

Definition at line 12 of file definition.py.

def pylmflib.pylmflib.core.definition.Definition.__del__ (   self)

Destructor.

Release TextRepresentation and Statement instances.

Definition at line 28 of file definition.py.

Member Function Documentation

def pylmflib.pylmflib.core.definition.Definition.add_statement (   self,
  statement 
)

Add a Statement instance to this Definition instance.

Parameters
statemementThe Statement instance to add to the Definition instance.
Returns
Definition instance.

Definition at line 104 of file definition.py.

def pylmflib.pylmflib.core.definition.Definition.create_statement (   self)

Create a Statement instance.

Returns
Statement instance.

Definition at line 98 of file definition.py.

def pylmflib.pylmflib.core.definition.Definition.find_encyclopedic_informations (   self,
  language 
)

Find encyclopedic informations.

This attribute is owned by Statement.

Parameters
languageThe language to consider to retrieve the encyclopedic information.
Returns
A Python list of found Statement attributes 'encyclopedicInformation'.

Definition at line 242 of file definition.py.

def pylmflib.pylmflib.core.definition.Definition.find_notes (   self,
  type,
  language = None 
)

Find notes.

This attribute is owned by Statement.

Parameters
typeThe type to consider to retrieve the note.
languageIf this argument is given, find note only if written in this language.
Returns
A Python list of found Statement attributes 'note'.

Definition at line 161 of file definition.py.

def pylmflib.pylmflib.core.definition.Definition.find_restrictions (   self,
  language 
)

Find restrictions.

This attribute is owned by Statement.

Parameters
languageThe language to consider to retrieve the restriction.
Returns
A Python list of found Statement attributes 'restriction'.

Definition at line 282 of file definition.py.

def pylmflib.pylmflib.core.definition.Definition.find_usage_notes (   self,
  language 
)

Find usage notes.

This attribute is owned by Statement.

Parameters
languageThe language to consider to retrieve the usage note.
Returns
A Python list of found Statement attributes 'usageNote'.

Definition at line 202 of file definition.py.

def pylmflib.pylmflib.core.definition.Definition.get_borrowed_word (   self)

Get source language (in English).

This attribute is owned by the first Statement.

Returns
Statement attribute 'borrowedWord'.

Definition at line 309 of file definition.py.

def pylmflib.pylmflib.core.definition.Definition.get_definition (   self,
  language = None 
)

Get definition.

Parameters
languageIf this argument is given, get definition only if written in this language.
Returns
The filtered Definition attribute 'definition'.

Definition at line 67 of file definition.py.

def pylmflib.pylmflib.core.definition.Definition.get_etymology (   self)

Get etymology.

This attribute is owned by the first Statement.

Returns
Statement attribute 'etymology'.

Definition at line 361 of file definition.py.

def pylmflib.pylmflib.core.definition.Definition.get_etymology_comment (   self,
  term_source_language = None 
)

Get etymology comment.

This attribute is owned by the first Statement.

Parameters
term_source_languageThe language of the etymology comment to retrieve.
Returns
Statement attribute 'etymologyComment'.

Definition at line 388 of file definition.py.

def pylmflib.pylmflib.core.definition.Definition.get_etymology_gloss (   self)

Get etymology gloss.

This attribute is owned by the first Statement.

Returns
Statement attribute 'etymologyGloss'.

Definition at line 426 of file definition.py.

def pylmflib.pylmflib.core.definition.Definition.get_etymology_source (   self)

Get etymology source.

This attribute is owned by the first Statement.

Returns
Statement attribute 'etymologySource'.

Definition at line 452 of file definition.py.

def pylmflib.pylmflib.core.definition.Definition.get_first_statement (   self)

Get the previously registered statement.

Returns
The last element of Definition attribute 'statement'.

Definition at line 118 of file definition.py.

def pylmflib.pylmflib.core.definition.Definition.get_gloss (   self,
  language = None 
)

Get gloss.

Parameters
languageIf this argument is given, get gloss only if written in this language.
Returns
The filtered Definition attribute 'gloss'.

Definition at line 88 of file definition.py.

def pylmflib.pylmflib.core.definition.Definition.get_language (   self)

Get language used for definition and gloss.

Returns
Definition attribute 'language'.

Definition at line 50 of file definition.py.

def pylmflib.pylmflib.core.definition.Definition.get_scientific_name (   self)

Get scientific name.

This attribute is owned by the first Statement.

Returns
Statement attribute 'scientificName'.

Definition at line 478 of file definition.py.

def pylmflib.pylmflib.core.definition.Definition.get_statements (   self)

Get all Statement instances maintained by this Definition instance.

Returns
A Python list of Statement instances.

Definition at line 112 of file definition.py.

def pylmflib.pylmflib.core.definition.Definition.get_term_source_language (   self)

Get language used for the etymology comment.

This attribute is owned by the first Statement.

Returns
Statement attribute 'termSourceLanguage'.

Definition at line 400 of file definition.py.

def pylmflib.pylmflib.core.definition.Definition.get_written_form (   self)

Get loan word.

This attribute is owned by the first Statement.

Returns
Statement attribute 'writtenForm'.

Definition at line 335 of file definition.py.

def pylmflib.pylmflib.core.definition.Definition.set_borrowed_word (   self,
  borrowed_word 
)

Set source language (in English).

Attribute 'borrowedWord' is owned by the first Statement.

Parameters
borrowed_wordSource language.
Returns
Definition instance.

Definition at line 294 of file definition.py.

def pylmflib.pylmflib.core.definition.Definition.set_definition (   self,
  definition,
  language = None 
)

Set definition.

Parameters
definitionDefinition.
languageLanguage used for the definition.
Returns
Definition instance.

Definition at line 56 of file definition.py.

def pylmflib.pylmflib.core.definition.Definition.set_encyclopedic_information (   self,
  encyclopedic_information,
  language = None 
)

Set encyclopedic information and language.

These attributes are owned by Statement.

Parameters
encyclopedic_informationEncyclopedic information to set.
languageLanguage used for the encyclopedic information.
Returns
Definition instance.

Definition at line 214 of file definition.py.

def pylmflib.pylmflib.core.definition.Definition.set_etymology (   self,
  etymology 
)

Set etymology.

Attribute 'etymology' is owned by the first Statement.

Parameters
etymologyEtymology.
Returns
Definition instance.

Definition at line 346 of file definition.py.

def pylmflib.pylmflib.core.definition.Definition.set_etymology_comment (   self,
  etymology_comment,
  term_source_language = None 
)

Set etymology comment and language.

Attributes 'etymologyComment' and 'termSourceLanguage' are owned by the first Statement.

Parameters
etymology_commentEtymology comment.
term_source_languageLanguage of the comment.
Returns
Definition instance.

Definition at line 372 of file definition.py.

def pylmflib.pylmflib.core.definition.Definition.set_etymology_gloss (   self,
  etymology_gloss 
)

Set etymology gloss.

Attribute 'etymologyGloss' is owned by the first Statement.

Parameters
etymology_glossEtymology gloss.
Returns
Definition instance.

Definition at line 411 of file definition.py.

def pylmflib.pylmflib.core.definition.Definition.set_etymology_source (   self,
  etymology_source 
)

Set etymology source.

Attribute 'etymologySource' is owned by the first Statement.

Parameters
etymology_sourceEtymology source.
Returns
Definition instance.

Definition at line 437 of file definition.py.

def pylmflib.pylmflib.core.definition.Definition.set_gloss (   self,
  gloss,
  language = None 
)

Set gloss.

Parameters
glossGloss.
languageLanguage used for the gloss.
Returns
Definition instance.

Definition at line 77 of file definition.py.

def pylmflib.pylmflib.core.definition.Definition.set_language (   self,
  language 
)

Set language used for definition and gloss.

Parameters
languageLanguage used for definition and gloss.
Returns
Definition instance.

Definition at line 39 of file definition.py.

def pylmflib.pylmflib.core.definition.Definition.set_note (   self,
  note,
  type = None,
  language = None 
)

Set note, note type and language.

These attributes are owned by Statement.

Parameters
noteNote to set.
typeType of the note.
languageLanguage used for the note.
Returns
Definition instance.

Definition at line 125 of file definition.py.

def pylmflib.pylmflib.core.definition.Definition.set_restriction (   self,
  restriction,
  language = None 
)

Set restriction and language.

These attributes are owned by Statement.

Parameters
restrictionRestriction to set.
languageLanguage used for the restriction.
Returns
Definition instance.

Definition at line 254 of file definition.py.

def pylmflib.pylmflib.core.definition.Definition.set_scientific_name (   self,
  scientific_name 
)

Set scientific name.

Attribute 'scientficName' is owned by the first Statement.

Parameters
scientific_nameScientific name.
Returns
Definition instance.

Definition at line 463 of file definition.py.

def pylmflib.pylmflib.core.definition.Definition.set_usage_note (   self,
  usage_note,
  language = None 
)

Set usage note and language.

These attributes are owned by Statement.

Parameters
usage_noteUsage note to set.
languageLanguage used for the usage note.
Returns
Definition instance.

Definition at line 174 of file definition.py.

def pylmflib.pylmflib.core.definition.Definition.set_written_form (   self,
  written_form 
)

Set loan word.

Attribute 'writtenForm' is owned by the first Statement.

Parameters
written_formLoan word.
Returns
Definition instance.

Definition at line 320 of file definition.py.

Member Data Documentation

pylmflib.pylmflib.core.definition.Definition.definition

Definition at line 18 of file definition.py.

pylmflib.pylmflib.core.definition.Definition.gloss

Definition at line 19 of file definition.py.

pylmflib.pylmflib.core.definition.Definition.language

Definition at line 17 of file definition.py.

pylmflib.pylmflib.core.definition.Definition.literally

Definition at line 20 of file definition.py.

pylmflib.pylmflib.core.definition.Definition.statement

Statement instances are owned by Definition There is zero to many Statement instances per Definition.

Definition at line 26 of file definition.py.

pylmflib.pylmflib.core.definition.Definition.text_representation

TextRepresentation instances are owned by Definition There is zero to many TextRepresentation instances per Definition.

Definition at line 23 of file definition.py.


The documentation for this class was generated from the following file: