metadata_parser

This module’s scope covers the operations related to metadata.

tuna.io.metadata_parser.get_metadata(file_name=None)[source]

This method’s goal is to conveniently return the metadata, given a file name.

Parameters:

  • file_name : string

    Containing a valid file name (and optionally, an absolute or relative path).

Returns:

  • parser.get_metadata ( ) : dictionary

    Contains the metadata obtained from reading file_name.

class tuna.io.metadata_parser.metadata_parser(file_name=None)[source]

Responsible for translating metadata from ADHOC’s ADT to Tuna’s internal representation.

Its constructor signature is:

Parameters:

  • file_name : string : defaults to None

    Full or relative path and file name for an ADT file.

get_metadata()[source]

This method’s goal is to access the parsed metadata.

Returns:

  • self.__results : dictionary

    Contains the metadata obtained from reading the input file.

run()[source]

This method’s goal is to verify file format and attempts to parse the metadata accordingly.