Module opinion_data :: Class Copinion
[hide private]
[frames] | no frames]

Class Copinion

source code

This class encapsulates KAF/NAF opinion elements

Instance Methods [hide private]
 
__init__(self, node=None, type='NAF')
Constructor of the object
source code
 
__str__(self) source code
Cexpression
get_expression(self)
Returns the opinion expression
source code
Cholder
get_holder(self)
Returns the opinion holder
source code
string
get_id(self)
Returns the opinion identifier
source code
xml Element
get_node(self)
Returns the node of the element
source code
Ctarget
get_target(self)
Returns the opinion target
source code
 
set_comment(self, c)
Sets the comment for the element
source code
 
set_expression(self, exp)
Sets the opinion expression
source code
 
set_holder(self, hol)
Sets the opinion holder
source code
 
set_id(self, my_id)
Sets the opinion identifier
source code
 
set_target(self, tar)
Sets the opinion target
source code
Method Details [hide private]

__init__(self, node=None, type='NAF')
(Constructor)

source code 

Constructor of the object

Parameters:
  • node (xml Element or None (to create and empty one)) - this is the node of the element. If it is None it will create a new object
  • type (string) - the type of the object (KAF or NAF)

get_expression(self)

source code 

Returns the opinion expression

Returns: Cexpression
the opinion expression

get_holder(self)

source code 

Returns the opinion holder

Returns: Cholder
the opinion holder

get_id(self)

source code 

Returns the opinion identifier

Returns: string
the opinion identifier

get_node(self)

source code 

Returns the node of the element

Returns: xml Element
the node of the element

get_target(self)

source code 

Returns the opinion target

Returns: Ctarget
the opinion target

set_comment(self, c)

source code 

Sets the comment for the element

Parameters:
  • c (string) - comment for the element

set_expression(self, exp)

source code 

Sets the opinion expression

Parameters:

set_holder(self, hol)

source code 

Sets the opinion holder

Parameters:
  • hol (Cholder) - the opinion holder

set_id(self, my_id)

source code 

Sets the opinion identifier

Parameters:
  • my_id (string) - the opinion identifier

set_target(self, tar)

source code 

Sets the opinion target

Parameters:
  • tar (Ctarget) - the opinion target