Module srl_data :: Class Crole
[hide private]
[frames] | no frames]

Class Crole

source code

This class encapsulates a single role in the layer

Instance Methods [hide private]
 
__init__(self, node=None)
Constructor of the object
source code
 
add_external_reference(self, ext_ref)
Adds an external reference to the role
source code
CexternalReference
get_external_references(self)
Returns the external references of the element
source code
string
get_id(self)
Returns the identifier of the element
source code
xml Element
get_node(self)
Returns the node of the element
source code
string
get_sem_role(self)
Returns the semRole attribute of the element
source code
Cspan
get_span(self)
Returns the span of the role
source code
 
remove_external_references(self)
Removes any external reference from the role
source code
 
set_id(self, i)
Sets the identifier of the role
source code
 
set_sem_role(self, sRole)
Sets the semantic role
source code
 
set_span(self, this_span)
Sets the span for the role
source code
Method Details [hide private]

__init__(self, node=None)
(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

add_external_reference(self, ext_ref)

source code 

Adds an external reference to the role

Parameters:

get_external_references(self)

source code 

Returns the external references of the element

Returns: CexternalReference
the external references (iterator)

get_id(self)

source code 

Returns the identifier of the element

Returns: string
the identifier of the element

get_node(self)

source code 

Returns the node of the element

Returns: xml Element
the node of the element

get_sem_role(self)

source code 

Returns the semRole attribute of the element

Returns: string
the semRole of the element

get_span(self)

source code 

Returns the span of the role

Returns: Cspan
the span object of the element

set_id(self, i)

source code 

Sets the identifier of the role

Parameters:
  • i (string) - the identififier of the role

set_sem_role(self, sRole)

source code 

Sets the semantic role

Parameters:
  • sRole (string) - the semantic role

set_span(self, this_span)

source code 

Sets the span for the role

Parameters:
  • this_span (Cspan) - the span object