#
# BNCweb: A user-friendly interface to the British National Corpus - Version 4.3
# Copyright (C) 2005-10 Hoffmann/Evert/Lehmann
#
# Updates and information available at http://www.bncweb.info
#
# This file is part of BNCweb.
# 
# BNCweb is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation; either version 3 of the License, or
# (at your option) any later version.
# 
# BNCweb is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
# GNU General Public License for more details.
# 
# You should have received a copy of the GNU General Public License
# along with this program.  If not, see <http://www.gnu.org/licenses/>.

#
# based on BNCweb Version 2.0:
# © 1996/2004 Lehmann/Hoffmann/Schneider
#

#Module Declarations
package bncConfigXML;
require Exporter;
@ISA = qw(Exporter);
@EXPORT = qw($bwCGIalias $bwHTMLalias $bwServer $bwWebServer $bwCorpusPath $bwMYSQLhost $bwMysqlUser $bwMysqlPwd $bwMYSQLusertable 
			$bwMYSQLcategorizetable $bwMYSQLtable $null $bwMysqlPort $bwConcurrentProcesses 
			$bwSuperuser $bwTempPath $bwSavePath $bwCopyright $bwDefaultCollocation $bwDefaultDist $bwDefaultSort
			$bwHeaderLength $bwJavaScript $bwMySQLTempPath $bwFileSize $bwMaxMySQLSize $bwCorpus $bwCorpusText $bwCorpusSpeaker $bwMYSQLfrequency $bwMaxFreqlistMySQL $bwMysqlAuth $bwThinValue);

###########################################################################
#                                                                         #
# SECTION 1: THIS WILL REQUIRE CHANGES FOR THE INSTALLATION OF  BNCweb.   #
#                                                                         #
###########################################################################
# GENERAL SETTINGS
#
# alias for the cgi-bin directory that contains all BNCweb files with the suffix .pl
$bwCGIalias = 'bncweb-cgi';
# alias for the html directory that contains all BNCweb files with the suffix .html and .gif
$bwHTMLalias = 'bncweb';
# server where BNCweb scripts run (without "http://") - MySQL will only accept connections from this host
$bwServer = 'localhost';
#
# server address to compile URL (including "http://" or "https://")
$bwWebServer = "http://localhost";
#
# temp path - this needs to be an existing directory whose permissions are set to be readable and writable by the Web server AND the MySQL server
# You may need to give the full path here...
$bwTempPath = '/usr/local/share/bncweb';
# Separate save path currently not yet implemented
#$bwSavePath = '/share/CQP-save';
#
$bwMySQLTempPath = $bwTempPath; # MySQL and BNCweb are running on same server
#
# name of CQP corpus (you do not need to set $bwCorpusText and $bwCorpusSpeaker manually)
$bwCorpus = "BNCWEB";
# name of CQP text frequency table (defaults to name generated by MakeFreqTables.perl)
$bwCorpusText = "${bwCorpus}_FREQ_TEXT";
# name of CQP speaker frequency table
$bwCorpusSpeaker = "${bwCorpus}_BNCWEB_FREQ_SPKR";

# #####################################################
# MySQL settings
#
# address of the machine running MySQL. 
# set to 'localhost' if BNCweb is installed on a stand-alone computer
$bwMYSQLhost = 'localhost';
#
# name of the fatabase that contains most MySQL tables included in the distribution
$bwMYSQLtable = 'bncData';
#
# name of the database that contains all temporary MySQL tables
#
$bwMYSQLusertable = 'bncUserData';
#
# name of the database that contains categorized query results
#
$bwMYSQLcategorizetable = 'bncUserCategorize';
#
# name of the database that contains frequency tables
#
$bwMYSQLfrequency = 'freq_tables';
#
# the port on which MySQL runs
$bwMysqlPort = '3306';
# the name of MySQL user
$bwMysqlUser = 'bncweb';
# the MySQL user password
$bwMysqlPwd = 'CBbYm2VSE7';
#
# Set to "1" if you use mod_auth_mysql for authentification - or if you have different types of users that are controlled via MySQL.
$bwMysqlAuth = 0;
# Maximum number of hits to be displayed for non-licensed users.
$bwThinValue = 5000;
#
#
#############################
#                           #
# SECTION 2: OTHER SETTINGS #
#                           #
#############################
#
# Administrator name(s)
#
# username(s) of the superuser(s)
# superusers can see the query history of all users; they can also see and delete all subcorpora
# separate individual users by a vertical slash (without any whitespaces)
$bwSuperuser = 'severt|sebhoff';
#
################################
# Restrictions relating to MySQL-based features
#
# Setting upper limits is useful when BNCweb is run on a server with many users.
# Limits for individual users can be set in BNCweb via the admin features ($bwSuperuser users only!)
#
# maximum number of query hits for the Sort feature
# default:
$bwDefaultSort = 250000;
#
# maximum number of query hits for the Collocation feature (this is the most disk-space intensive feature)
# default:
$bwDefaultCollocation = 250000;
#
# maximum number of query hits for the Distribution and Subcorpus features
# default:
$bwDefaultDist = 1000000;
#
# maximum number of concurrent collocation and sort processes
$bwConcurrentProcesses = 5;
#
#
###############################
#Cache settings
#
# Total size (in bytes) of temp files (for CQP only!) before cached queries are deleted
# Default is 3 GB
$bwFileSize = 3e9;

# Total size (in rows) of MySQL temp files before cached tables are deleted
# Default is 3000000000 - one row takes up slightly more than 1 byte. The default would therefore take up somewhat more than 3GB of data. 
$bwMaxMySQLSize = 3e9;
#
# Total size (in bytes) of MySQL frequency lists files before cached tables are deleted
# Default is 3000000000
$bwMaxFreqlistMySQL = 3e9;
#
#


1;
