# encoding: utf-8
"""

"""
__author__ = 'Richard Smith'
__date__ = '05 Feb 2020'
__copyright__ = 'Copyright 2018 United Kingdom Research and Innovation'
__license__ = 'BSD - see LICENSE file in top-level package directory'
__contact__ = 'richard.d.smith@stfc.ac.uk'

from pydoc import locate


class HandlerFactory(object):

    HANDLER_MAP = {
        '.nc': 'cci_tagger.file_handlers.netcdf.NetcdfHandler'
    }

    @classmethod
    def get_handler(cls, extension):

        handler = cls.HANDLER_MAP.get(extension)

        if handler:
            return locate(handler)