Findaidclass.cfg

From DLXS Documentation

Revision as of 17:24, 16 August 2007 by Tburtonw (Talk | contribs)
(diff) ←Older revision | Current revision (diff) | Newer revision→ (diff)
Jump to: navigation, search

package FCGlobals;

  1. Copyright 2003, The Regents of The University of Michigan, All Rights Reserved
  2. Permission is hereby granted, free of charge, to any person obtaining
  3. a copy of this software and associated documentation files (the
  4. "Software"), to deal in the Software without restriction, including
  5. without limitation the rights to use, copy, modify, merge, publish,
  6. distribute, sublicense, and/or sell copies of the Software, and to
  7. permit persons to whom the Software is furnished to do so, subject
  8. to the following conditions:
  9. The above copyright notice and this permission notice shall be
  10. included in all copies or substantial portions of the Software.
  1. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
  2. EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
  3. MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
  4. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
  5. CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
  6. TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
  7. SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.

BEGIN { require 'LibGlobals.cfg'; }


  1. **********************************************************************
  2. required definitions for findaid-idx
  1. > OPEN CONFIG BLOCK =================================================
  2. > print "\n\nConfiguring findaidclass.cfg\n\n";
  3. > CLOSE CONFIG BLOCK ================================================
  1. unbuffered output

$| = 1;

  1. **********************************************************************
  2. DAO filtering
  3. **********************************************************************
  4. > OPEN CONFIG BLOCK =================================================

$gEnableDaoResolution = 1;

  1. > $gEnableDaoResolution = query_option( q{Enable filtering of DAOs. . },
  2. > $gEnableDaoResolution, qw( 1 0 ) );
  3. > CLOSE CONFIG BLOCK ================================================

$gNameResolver = ;

$gIdResolverHost = $LibGlobals::gIdResolver;

  1. Needed for object factory attributes

$gClassName = 'findaid'; $gClassSubPath = '/f/findaid'; $gClassModulePath = 'cgi/f/findaid';


  1. Class level PIFiller modules (used when needed in cross collection
  2. mode (see lib/DLXSApp::CreatePiFiller)

$gAppXsltPiFillerModule = 'FindaidAppXsltPIFiller';


  1. **********************************************************************
  2. D a t a b a s e C o n f i g u r a t i o n
  3. **********************************************************************
  1. DEBUGGING

$gUseDevMySQLServer = 0;

$MySQL_server = $gUseDevMySQLServer ? $LibGlobals::MySQL_devserver : $LibGlobals::MySQL_prodserver; $MySQL_datasourcename = qq{DBI:mysql:$LibGlobals::MySQL_dbname:$FCGlobals::MySQL_server:};

%gDBCollTables = ('Collection' => {'Select' => ['*'],

                                      'Class'  => "$FCGlobals::gClassName"},
                 'FindaidClass'   => {'Select' => ['*'],
                                      'Class'  => "$FCGlobals::gClassName"},
                );

%gDBGroupTables = ('GroupData' => {'Select' => ['*'],

                                      'Class'  => "$FCGlobals::gClassName"},
                  'GroupColl'     => {'Select' => ['groupid', 'collids'],
                                      'Class'  => "$FCGlobals::gClassName"},
                  'FindaidClassGroup'=> {'Select' => ['*'],
                                      'Class'  => "$FCGlobals::gClassName"},
                 );

@gDBBrowseItemTables = (

                       'ItemColl',
                       'ItemBrowse',
                       'ItemBrowseCounts',
                      );


%gDatabaseConfig = (

'CSV' =>  {
           'datasourcename' => $LibGlobals::CSV_datasourcename,
           'user'           => ,
           'password'       => ,
           'dbcolltables'   => \%gDBCollTables,
           'dbgrouptables'  => \%gDBGroupTables,
          },
'MySQL'=> {
           'datasourcename' => $FCGlobals::MySQL_datasourcename,
           'user'           => $LibGlobals::MySQL_username,
           'password'       => $LibGlobals::MySQL_password,
           'dbcolltables'   => \%gDBCollTables,
           'dbgrouptables'  => \%gDBGroupTables,
      'dbcharset'      => $LibGlobals::MySQL_charset,
          },

);


  1. **********************************************************************
  2. location of html template files (web DocRoot space)
  3. **********************************************************************

$gTermMapperFilePath = '/misc/f/findaid/maps'; $gClassHtmlDir = $ENV{'DLXSROOT'} . '/web/f/findaid/'; # actual doc root directory $gClassHtmlDocRoot = '/f/findaid/'; # server doc root alias

  1. Fallback directories

$gGroupHtmlDir = $ENV{'DLXSROOT'} . '/web/'; $gCollHtmlDir = $ENV{'DLXSROOT'} . '/web/';

$gScriptDir = '/cgi/f/findaid/'; # server cgi script root alias


  1. **********************************************************************
  2. Results display slicing and sorting
  3. **********************************************************************

$gGlobalSortThreshold = 1000; $gDefaultSliceSize = 25; $gBrowseSliceSize = 0; # no slicing $gDefaultStart = 1; $gPageGroupSize = 10;


  1. **********************************************************************
  2. Package is a place where one might keep routines that are very
  3. specific to a local implementation. Then follow one or more routines
  4. in that package that might be needed.
  5. **********************************************************************

$gAllSelectedLabel = 'results.allselectedcolls';

  1. **********************************************************************
  2. CGI locations (actual server cgi root and URL for it
  3. **********************************************************************

$gHTTPPrefix = 'http://' . &DlpsUtils::Find_HTTP_HostName; $gClassCgiRoot = '/cgi/f/findaid/findaid-idx'; $gClassCgi = $gHTTPPrefix . $gClassCgiRoot; $gHelpLink = '/f/findaid/help';

  1. Title (text or graphic) to display for Cross-Collection mode

$gCrossCollectionTitle = 'graphic:umdlfindaid-smbanner.gif'; $gHomePageName = 'home'; $gHomePortalPageName = 'home';

  1. **********************************************************************
  2. Hash of section heads that XPAT should search for. A reference to
  3. this hash is added as member data keyed by 'tocheads' to the
  4. FindaidClass object at initialization time. Comment out those that
  5. are missing in your finding aids.
  6. **********************************************************************

%gSectHeadsHash = (

                  'bioghist-t'      =>  {
                                         'collection' => qq{Biography},
                                         'recordgrp' => qq{History},
                                        },
                  'controlaccess-t' => qq{Subject Terms},
                  'frontmatter-t'   => qq{Title Page},
                  'arrangement-t'   => qq{Arrangement},
                  'scopecontent-t'  => qq{Collection Scope and Content Note},
                  'summaryinfo-t'   => qq{Summary Information},
                  'contentslist-t'  => qq{Contents List},
                  'admininfo-t'     => qq{Access and Use},
                  'add-t'           => qq{Additional Descriptive Data},
                 );


  1. **********************************************************************
  2. File extensions allowable in entity names (for filtering)
  3. **********************************************************************

@gEntityExtensionsToCheck = (

                           '.gif',
                           '.jpeg',
                           '.jpg',
                           '.tif',
                           '.tiff',
                           '.mov',
                           '.GIF',
                           '.JPEG',
                           '.JPG',
                           '.TIF',
                           '.TIFF',
                           '.MOV',
                          );
  1. **********************************************************************
  2. Name of XML template files for each type of "page" and results
  3. **********************************************************************

%gXmlFiles = (

             'home'                     => { 'default' => 'home.xml' },
             # pages with search forms
             'simple'                   => { 'default' => 'search.xml' },
             'boolean'                  => { 'default' => 'search.xml' },
             
             # to text XML/XSLT Plan B and Item table based dynamic browsing
             'browse'                   => { 'default' => 'browse.xml' },
             # result views
             'reslist'                  => { 'default'    => 'reslist.xml',
                                             'detail'     => 'reslist.xml',
                                             'standard'   => 'text.xml',
                                             'text'       => 'text.xml', },
             'bbaglist'                 => { 'default' => 'bookbag.xml' },
             'bbagemail'                => { 'default' => 'bookbag.xml' },
             'bbagcount'                => { 'default' => 'bbagcount.xml' },
             'simplebbag'               => { 'default' => 'bookbag.xml' },
             'booleanbbag'              => { 'default' => 'bookbag.xml' },
             'viewtextnote'             => { 'default' => 'viewtextnote.xml' },
             'history'                  => { 'default' => 'searchhistory.xml' },
             'text'                     => { 'default' => 'text.xml' },         
            );


$gEmailBookbagXsl = 'bbagemailoutput.xsl'; $gDownloadBookbagXsl = 'bbagdownloadoutput.xsl';

  1. Hash defines the labels that correspond to the sort fields specified
  2. in the 'sortflds' collmgr field

@gSortFieldsOrder =

   (
    'occur',
    'author',
    'title',
    'datea',
    'dated',
    'freq',
   );

%gSortFields =

   (
    'occur'  => 'not sorted',
    'author' => 'creator',
    'title'  => 'title',
    'datea'  => 'date ascending',
    'dated'  => 'date descending',
    'freq'   => 'frequency',
   );

$gOverSortThresholdMsg_XML = qq{sort.overthreshold};

@gBooleanOperators = ('AND', 'OR', 'NOT',); @gProximityOperators = ('NEAR', 'NOT NEAR', 'FOLLOWED BY', 'NOT FOLLOWED BY');


  1. **********************************************************************
  2. standard errors
  3. **********************************************************************

%gERRORS = (

           'PAGE_NOT_FOUND'    => qq{Cannot find html template page: },
           'NO_COLLS'          => qq{No collections available: },
           'NO_Q1'             => qq{You must enter a search term when submitting a search: },
           'NO_CITE1'          => qq{You must enter a search term when submitting a search: },
           'NO_SESSION'        => qq{Problem starting session: },
           'XPAT_START_ERROR'  => qq{XPat search engine failed start up: },
           'XPAT_SEARCH_ERROR' => qq{XPat search engine returned an error, call for help: },
           'NO_ID'             => qq{Target view requires id parameter: },
           'NO_IDNO'           => qq{idno parameter required: },
           'NO_DIDNO'          => qq{didno parameter required: },
           'BAD_FIELD_TYPE'    => qq{Invalid field type from colldb: },
           'NOTE_FILTER'       => qq{Error during notes filtering: },
           'BAD_PI'            => qq{Error during PI processing: },
          );


  1. server web root for transient, cached html pages and pageviewer image caching

$gCacheDir = $ENV{'DLXSROOT'} . '/web/cache/'; $gCacheDocRoot = '/cache/'; $gCacheHtmlDir = $ENV{'DLXSROOT'} . '/web/cache/';


    1. ***** General configuration

$adminLink = $LibGlobals::gGeneralEmailLink; $adminText = $LibGlobals::gGeneralEmailText;

    1. end global variables


  1. ---------------------------------------------------------------------

1;

Personal tools