Module header_data :: Class CHeader
[hide private]
[frames] | no frames]

Class CHeader

source code

This class encapsulates the header

Instance Methods [hide private]
 
__init__(self, node=None, type='NAF')
Constructor of the object
source code
 
add_linguistic_processor(self, layer, my_lp)
Adds a linguistic processor to a certain layer
source code
 
add_linguistic_processors(self, linpro)
Adds a linguistic processors element
source code
String
get_dct(self)
Returns the document creation time defined in the header
source code
CfileDesc
get_fileDesc(self)
Returns the fileDesc object or None if there is no such element
source code
xml Element
get_node(self)
Returns the node of the element
source code
String
get_publicId(self)
Returns the public Id defined in the header
source code
 
remove_lp(self, layer)
Removes the linguistic processors for a given layer
source code
 
set_fileDesc(self, fileDesc)
Sets the fileDesc object
source code
 
set_publicId(self, publicId)
Sets the publicId object
source code
 
to_kaf(self)
Converts the header element to KAF
source code
 
to_naf(self)
Converts the header element to NAF
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_linguistic_processor(self, layer, my_lp)

source code 

Adds a linguistic processor to a certain layer

Parameters:
  • layer (string) - the name of the layer
  • my_lp (Clp) - the linguistic processor

add_linguistic_processors(self, linpro)

source code 

Adds a linguistic processors element

Parameters:
  • linpro (ClinguisticProcessors) - linguistic processors element

get_dct(self)

source code 

Returns the document creation time defined in the header

Returns: String
the document creation time defined in fileDesc of header

get_fileDesc(self)

source code 

Returns the fileDesc object or None if there is no such element

Returns: CfileDesc
the fileDesc object

get_node(self)

source code 

Returns the node of the element

Returns: xml Element
the node of the element

get_publicId(self)

source code 

Returns the public Id defined in the header

Returns: String
the publicId defined in public of header

remove_lp(self, layer)

source code 

Removes the linguistic processors for a given layer

Parameters:
  • layer (string) - the name of the layer

set_fileDesc(self, fileDesc)

source code 

Sets the fileDesc object

Parameters:

set_publicId(self, publicId)

source code 

Sets the publicId object

Parameters:
  • publicId (CpublicId) - a publicId object