#---------------------------------------------------------------
# ____                   _ _         ____  _
#|  _ \ ___  _   _  __ _| | |_ _   _/ ___|| |__   __ _ _ __ ___
#| |_) / _ \| | | |/ _` | | __| | | \___ \| '_ \ / _` | '__/ _ \
#|  _ < (_) | |_| | (_| | | |_| |_| |___) | | | | (_| | | |  __/
#|_| \_\___/ \__, |\__,_|_|\__|\__, |____/|_| |_|\__,_|_|  \___|
#            |___/             |___/
#
# Copyright (C) 2009 RoyaltyShare, Inc.   All Rights Reserved
# $Id$
#---------------------------------------------------------------
package BookPub::Catalog::Import::Process::Fetcher::Bloomsbury;
use strict;
use warnings;
use Data::Dumper;
use Net::FTP;

use lib '/app/tools/common/lib';
use lib '/app/tools/bookpub/lib';
use Common::RSApp;
use Common::Util;
use Common::Log;
use Common::Assert;
use Common::Process;
use Common::DB::Item::Language;
use BookPub::DB::Item::CatalogImport;
use BookPub::Config;

use BookPub::Catalog::Import::Process::Fetcher::FileHandler::CopyThenIgnore;
use BookPub::Catalog::Import::Process::Fetcher::Bloomsbury::FileHandler::ONIX;
use BookPub::Catalog::Import::Process::Fetcher::FileHandler::RSStandard;

use base 'BookPub::Catalog::Import::Process::Fetcher::Base';

# This will be the base class for the various 'Bloomsbury' clients, which appear
# to share a lot of features.

sub _getFileHandlerXML {
    my ( $self, $filename ) = @_;

    return BookPub::Catalog::Import::Process::Fetcher::Bloomsbury::FileHandler::ONIX->new(
        fetcher        => $self,
        remoteFile     => $filename,
        localDirectory => $self->_getBaseStagingPath(),
        localFileName  => $filename,
        logLevel       => $self->{_logLevel},
    );
}

###
1;    #
###

