/**
     * Initialize current logged file
     * @param string $file filename (without date prefix)
     * @param string $publisher Publisher folder path
     * @param integer $publisherId Publisher folder id
     * @param string $fileMd5
     */
    public static function initFile($file, $publisher, $publisherId, $fileMd5)
    {
        XMLImportDB::beginQuery();

        $fileSplit                          = explode('_', $file);
        self::$file                         = $file;
        self::$publisher                    = $publisher;
        self::$datas['file_md5']            = $fileMd5;
        self::$datas['xml_file']            = $fileSplit[1] . '_' . $fileSplit[2];
        self::$datas['publisher_folder_id'] = $publisherId;
        self::$datas['status_xml_mdd']      = 5;
        self::$datas['origin']              = self::$origin;
        self::$datas['status_mdd_ez']       = -1;
        self::$datas['date']                = time();
        self::$datas['warning_messages']    = array();
        self::$datas['error_messages']      = array();

        self::calculateVersionAndRetries();

        self::writeDatas();

        XMLImportDB::commitQuery();

        self::$datas['status_xml_mdd'] = 1;
        self::$datas['status_mdd_ez']  = 0;
    }
    /**
     * @param array $fieldArray
     * @throws XMLImportDBException
     */
    public static function updateMdd( $fieldArray )
    {
        if ( empty( $fieldArray ) )
            throw new XMLImportDBException( "Empty field array : no data extracted from XML file" );

        XMLImportMonitor::log( 'Update database', 'info' );

        //Begin transaction
        XMLImportDB::beginQuery();

        //Save Article
        $articleConditions = self::saveDB( 'article', $fieldArray );

        self::buildArticleRelatedContent( $articleConditions, $fieldArray );

        self::buildArticleTaxonomy( $articleConditions, $fieldArray );

        self::buildTranslationsRequest( $articleConditions, $fieldArray );

        XMLImportMonitor::setMonitorData( 'article_id', $articleConditions['id'] );

        //Commit transaction
        XMLImportDB::commitQuery();
    }