Module entity_data :: Class Centity
[hide private]
[frames] | no frames]

Class Centity

source code

This class encapsulates the entity element in KAF/NAF

Instance Methods [hide private]
 
__init__(self, node=None, type='NAF')
Constructor of the object
source code
 
add_external_reference(self, ext_ref)
Adds an external reference to the entity
source code
 
add_reference(self, ref)
Adds a reference to the layer
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
Creferences
get_references(self)
Returns the references of the entity
source code
string
get_source(self)
Returns the source of the entity
source code
string
get_type(self)
Returns the type of the entity
source code
 
set_comment(self, c)
Sets the comment for the element
source code
 
set_id(self, i)
Sets the identifier for the entity
source code
 
set_source(self, t) source code
 
set_type(self, t) 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)

add_external_reference(self, ext_ref)

source code 

Adds an external reference to the entity

Parameters:

add_reference(self, ref)

source code 

Adds a reference to the layer

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 entity

get_node(self)

source code 

Returns the node of the element

Returns: xml Element
the node of the element

get_references(self)

source code 

Returns the references of the entity

Returns: Creferences
list of references (iterator)

get_source(self)

source code 

Returns the source of the entity

Returns: string
the source of the entity

get_type(self)

source code 

Returns the type of the entity

Returns: string
the type of the entity

set_comment(self, c)

source code 

Sets the comment for the element

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

set_id(self, i)

source code 

Sets the identifier for the entity

Parameters:
  • i (string) - entity identifier