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

Class CfileDesc

source code


This class encapsulates the file description element in the header

Example of usage:

######################################################
obj = KafNafParser('examples/entity_example.naf')

header = obj.get_header()

my_file_desc = header.get_fileDesc()
if my_file_desc is None:
    #Create a new one
    my_file_desc =  CfileDesc()
    header.set_fileDesc(my_file_desc)
    
#Modify the attributes
my_file_desc.set_title('my new title')

#Dump the object to a new file (or the changes will not be changed)
obj.dump()
######################################################  

Instance Methods [hide private]
 
__init__(self, node=None)
Constructor of the object
source code
string
get_author(self)
Returne the author
source code
string
get_creationtime(self)
Returns the creation time
source code
string
get_filename(self)
Returns the filename
source code
string
get_filetype(self)
Returns the filetype
source code
string
get_location(self)
Returns the location
source code
string
get_magazine(self)
Returns the magazine
source code
 
get_node(self) source code
string
get_pages(self, p)
Returns the pages
source code
string
get_publisher(self)
Returns the publisher
source code
string
get_section(self)
Returns the section
source code
string
get_title(self)
Returns the title
source code
 
set_author(self, a)
Sets the author
source code
 
set_creationtime(self, t)
Sets the creation time
source code
 
set_filename(self, f)
Sets the filename
source code
 
set_filetype(self, f)
Sets the filetype
source code
 
set_location(self, l)
Sets the location
source code
 
set_magazine(self, m)
Sets the magazine
source code
 
set_pages(self, p)
Sets the pages
source code
 
set_publisher(self, p)
Sets the publisher
source code
 
set_section(self, s)
Sets the section
source code
 
set_title(self, t)
Sets the title
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

get_author(self)

source code 

Returne the author

Returns: string
title

get_creationtime(self)

source code 

Returns the creation time

Returns: string
creation time

get_filename(self)

source code 

Returns the filename

Returns: string
title

get_filetype(self)

source code 

Returns the filetype

Returns: string
title

get_location(self)

source code 

Returns the location

Returns: string
title

get_magazine(self)

source code 

Returns the magazine

Returns: string
title

get_pages(self, p)

source code 

Returns the pages

Returns: string
title

get_publisher(self)

source code 

Returns the publisher

Returns: string
title

get_section(self)

source code 

Returns the section

Returns: string
title

get_title(self)

source code 

Returns the title

Returns: string
title

set_author(self, a)

source code 

Sets the author

Parameters:
  • a (string) - title

set_creationtime(self, t)

source code 

Sets the creation time

Parameters:
  • t (string) - creation time

set_filename(self, f)

source code 

Sets the filename

Parameters:
  • f (string) - title

set_filetype(self, f)

source code 

Sets the filetype

Parameters:
  • f (string) - title

set_location(self, l)

source code 

Sets the location

Parameters:
  • l (string) - title

set_magazine(self, m)

source code 

Sets the magazine

Parameters:
  • m (string) - title

set_pages(self, p)

source code 

Sets the pages

Parameters:
  • p (string) - title

set_publisher(self, p)

source code 

Sets the publisher

Parameters:
  • p (string) - title

set_section(self, s)

source code 

Sets the section

Parameters:
  • s (string) - title

set_title(self, t)

source code 

Sets the title

Parameters:
  • t (string) - title