Summary of ALLPURPOSE Objects and Variables

Listed below are the objects and variables available for use in the "allpurpose" subroutine of the Image Class ICLocalUtils.pm Perl Module. The output is from the Perl Debugger and shows the structure and definition of the variables. Descriptions of each variable have been added (in bold).

The data samples shown below may vary in structure and content.

Important: Objects should only be accessed with proper object oriented methods. Accessing an objects hash directly my result in future incompatabilities. The object hashes are shown here only to show the nature of the data that is accessible through a method. To find out what methods are available, you may need to study the objects method.


DB<3> x $caller
Type:scalar.
$caller holds the name of the subroutine that called allpurpose.
Availability: All ServePageHandlers
0  'EntryServePageHandler'


  DB<4> x $cgi
Type:object.
$cgi is a CGI object, which holds all of the CGI parameters.
Availability: All ServePageHandlers
Code Examples:
my $cc = $cgi->param('cc'); # put 'cc' param in a scalar
my @c = $cgi->param('c'); # put all 'c' params in an array
my $tempCgi = new CGI ($cgi); # make a copy of the object to work with 
$tempCgi->param('xc', 0); # set value of 'xc' param to zero

0  CGI=HASH(0x95b840)
   '.fieldnames' => HASH(0x97bfa4)
        empty hash
   '.parameters' => ARRAY(0x97bfec)
      0  'q1'
      1  'rgn1'
      2  'op2'
      3  'rgn2'
      4  'xc'
      5  'med'
      6  'g'
      7  'c'
      8  'lasttype'
      9  'view'
      10  'lastview'
      11  'subview'
      12  'cc'
      13  'entryid'
      14  'viewid'
      15  'start'
      16  'resnum'
      17  'corig'
      18  'sid'
   'c' => ARRAY(0xad563c)
      0  'bhl'
   'cc' => ARRAY(0x9e1220)
      0  'bhl'
   'corig' => ARRAY(0x9e8cbc)
      0  'bhl'
   'entryid' => ARRAY(0x9e1298)
      0  'x-bl000104'
   'g' => ARRAY(0x9e1208)
      0  'all'
   'lasttype' => ARRAY(0x9e1280)
      0  'boolean'
   'lastview' => ARRAY(0x9e12b0)
      0  'thumbnail'
   'med' => ARRAY(0x9cdfb0)
      0  1
   'op2' => ARRAY(0x9b3c80)
      0  'And'
   'q1' => ARRAY(0x9e11fc)
      0  'winter'
   'resnum' => ARRAY(0x9e13d0)
      0  2
   'rgn1' => ARRAY(0x9b3c8c)
      0  'All Categories'
   'rgn2' => ARRAY(0x9b3d64)
      0  'All Categories'
   'sid' => ARRAY(0x9e7dac)
      0  '3d58f43d3dfd4e9828b39ad8b1a9145c'
   'start' => ARRAY(0x9e12a4)
      0  1
   'subview' => ARRAY(0x9636c0)
      0  'detail'
   'view' => ARRAY(0x9b3cc8)
      0  'entry'
   'viewid' => ARRAY(0x9e13b8)
      0  1
   'xc' => ARRAY(0x9b3f44)
      0  1

  DB<5> x $cio
Type:object.
$cio is a CollsInfo object, which holds the colldb (collection database) 
info for requested colls the user is authorized to use. 
Availability: All ServePageHandlers
Code Examples:
# get 'resultsviews' value from object for collection specified by $collid
my @views = $cio->GetCollKeyInfo( $collid, 'resultsviews'); 

0  CollsInfo=HASH(0x9e7a68)
   'authcollcount' => 2
   'authkey' => 'apisbhlfrarchmusartummu'
   'authtextscount' => 0
   'colls' => HASH(0x9e128c)
      'bhl' => HASH(0xaa0fd4)
         'banner' => 'text:Bentley Historical Library'
         'briefcollname' => 'UM Bentley'
         'collname' => 'Bentley Historical Library University of Michigan'
         'dd' => 'image.dd'
         'dddir' => '/b/bhl'
         'dfltentryflds' => 'bhl.it|bhl.da|bhl.tis|bhl.cr|bhl.ca|bhl.no|bhl.su|bhl.g|bhl.ct|bhl.cc|bhl.lo|bhl.fn|bhl.ne'
         'dfltresentryflds' => 'bhl.it|bhl.da|bhl.tis|bhl.cr|bhl.ca|bhl.no'
         'dfltresflds' => 'bhl.fn|bhl.it|bhl.ca'
         'dfltsrchflds' => 'bhl.it|bhl.da|bhl.tis|bhl.cr|bhl.ca|bhl.no|bhl.su|bhl.g|bhl.ct|bhl.cc|bhl.lo|bhl.fn|bhl.ne'
         'entrydivs' => 'full image|description|other views'
         'entrydivsdefault' => 'full image'
         'host' => 'fizzie.umdl.umich.edu'
         'map' => 'default'
         'mediaonly' => 'on hidden'
         'numqs' => 3
         'port' => 619
         'relviewmenu' => 'off'
         'relviewmenuinstruct' => 'default'
         'relviewmenuprefx' => 'default'
         'relviewmenuvals' => 'default'
         'requested' => 1
         'resfldtrim' => 50
         'resultsviews' => 'thumbnail|thumbfull|reslist'
         'resultsviewsdefault' => 'thumbnail'
         'webdir' => 'b/bhl'
         'xpatexec' => '/l/local/xpat/bin/xpat'
      'musart' => HASH(0xad3c8c)
         'banner' => 'text:University of Michigan Museum of Art'
         'briefcollname' => 'UM Museum of Art'
         'collname' => 'University of Michigan Museum of Art'
         'dd' => 'image.dd'
         'dddir' => '/m/musart'
         'dfltentryflds' => 'musart.an|musart.asn|musart.ti|musart.da|musart.per|musart.med|musart.ty|musart.dim|musart.cl|musart.co|musart.rc|musart.n|musart.key|musart.ins|musart.ri'
         'dfltresentryflds' => 'musart.an|musart.asn|musart.ti|musart.da|musart.per|musart.med|musart.ty|musart.dim|musart.cl|musart.co|musart.rc|musart.n|musart.key|musart.ins|musart.ri'
         'dfltresflds' => 'musart.ti|musart.ar'
         'dfltsrchflds' => 'musart.an|musart.asn|musart.ti|musart.da|musart.per|musart.med|musart.ty|musart.dim|musart.cl|musart.co|musart.rc|musart.n|musart.key|musart.ins|musart.ri'
         'entrydivs' => 'full image|description|other views'
         'entrydivsdefault' => 'full image'
         'host' => 'fizzie.umdl.umich.edu'
         'map' => 'default'
         'mediaonly' => 'off'
         'numqs' => 2
         'port' => 619
         'relviewmenu' => 'off'
         'relviewmenuinstruct' => 'default'
         'relviewmenuprefx' => 'item'
         'relviewmenuvals' => 'viewid'
         'requested' => 0
         'resfldtrim' => 30
         'resultsviews' => 'thumbnail|thumbfull|reslist'
         'resultsviewsdefault' => 'thumbfull'
         'webdir' => 'm/musart'
         'xpatexec' => '/l/local/xpat/bin/xpat'
   'reqcollcount' => 1
   'reqtextscount' => 0

  DB<6> x $dso
Type:object.
$dso is a DlpsSession object holding all data stored in the session, 
including the collsinfo object. ItemIDS are also in the $dso if it is a "results" type of view.
Availability: EntryServePageHandler, ResultsServePageHandler, 
BbnameServePageHandler, BbopenServePageHandler, BbdelServePageHandler
Code Examples:

# get the 'authed' value from the session object, which indicates
# whether or not the user was logged in on the previous transaction.
my $a = $dso->GetPersistentSessionItemByKey( 'authed' )

# get $gio (global info object) from session object and then get the
# list of colls for the requested collection "group" (groups database)
my ($gio, $group); 
ASSERT( $gio = $dso->GetPersistentSessionItemByKey( 'gio' ) ); 
ASSERT( $group = $gio->GetRequestedGroup() ); 
my @colls = $gio->GetGroupKeyInfo( $group, 'collids' ); 

# add something to the session database. in this case, the collection
# information object. if you want to add anything to the session object
# for storage in the session database, this is how you do it.
$dso->SetPersistentSessionItemByKey( 'cio', $cio );

0  DlpsSession=HASH(0x9e79cc)
   'id' => '3d58f43d3dfd4e9828b39ad8b1a9145c'
   'persistentdata' => HASH(0x59e214)
      '_session_id' => '3d58f43d3dfd4e9828b39ad8b1a9145c'
      'authed' => 'no'
      'cio' => CollsInfo=HASH(0x9e7a68)
         'authcollcount' => 2
         'authkey' => 'apisbhlfrarchmusartummu'
         'authtextscount' => 0
         'colls' => HASH(0x9e128c)
            'bhl' => HASH(0xaa0fd4)
               'banner' => 'text:Bentley Historical Library'
               'briefcollname' => 'UM Bentley'
               'collname' => 'Bentley Historical Library University of Michigan'
               'dd' => 'image.dd'
               'dddir' => '/b/bhl'
               'dfltentryflds' => 'bhl.it|bhl.da|bhl.tis|bhl.cr|bhl.ca|bhl.no|bhl.su|bhl.g|bhl.ct|bhl.cc|bhl.lo|bhl.fn|bhl.ne'
               'dfltresentryflds' => 'bhl.it|bhl.da|bhl.tis|bhl.cr|bhl.ca|bhl.no'
               'dfltresflds' => 'bhl.fn|bhl.it|bhl.ca'
               'dfltsrchflds' => 'bhl.it|bhl.da|bhl.tis|bhl.cr|bhl.ca|bhl.no|bhl.su|bhl.g|bhl.ct|bhl.cc|bhl.lo|bhl.fn|bhl.ne'
               'entrydivs' => 'full image|description|other views'
               'entrydivsdefault' => 'full image'
               'host' => 'fizzie.umdl.umich.edu'
               'map' => 'default'
               'mediaonly' => 'on hidden'
               'numqs' => 3
               'port' => 619
               'relviewmenu' => 'off'
               'relviewmenuinstruct' => 'default'
               'relviewmenuprefx' => 'default'
               'relviewmenuvals' => 'default'
               'requested' => 1
               'resfldtrim' => 50
               'resultsviews' => 'thumbnail|thumbfull|reslist'
               'resultsviewsdefault' => 'thumbnail'
               'webdir' => 'b/bhl'
               'xpatexec' => '/l/local/xpat/bin/xpat'
            'musart' => HASH(0xad3c8c)
               'banner' => 'text:University of Michigan Museum of Art'
               'briefcollname' => 'UM Museum of Art'
               'collname' => 'University of Michigan Museum of Art'
               'dd' => 'image.dd'
               'dddir' => '/m/musart'
               'dfltentryflds' => 'musart.an|musart.asn|musart.ti|musart.da|musart.per|musart.med|musart.ty|musart.dim|musart.cl|musart.co|musart.rc|musart.n|musart.key|musart.ins|musart.ri'
               'dfltresentryflds' => 'musart.an|musart.asn|musart.ti|musart.da|musart.per|musart.med|musart.ty|musart.dim|musart.cl|musart.co|musart.rc|musart.n|musart.key|musart.ins|musart.ri'
               'dfltresflds' => 'musart.ti|musart.ar'
               'dfltsrchflds' => 'musart.an|musart.asn|musart.ti|musart.da|musart.per|musart.med|musart.ty|musart.dim|musart.cl|musart.co|musart.rc|musart.n|musart.key|musart.ins|musart.ri'
               'entrydivs' => 'full image|description|other views'
               'entrydivsdefault' => 'full image'
               'host' => 'fizzie.umdl.umich.edu'
               'map' => 'default'
               'mediaonly' => 'off'
               'numqs' => 2
               'port' => 619
               'relviewmenu' => 'off'
               'relviewmenuinstruct' => 'default'
               'relviewmenuprefx' => 'item'
               'relviewmenuvals' => 'viewid'
               'requested' => 0
               'resfldtrim' => 30
               'resultsviews' => 'thumbnail|thumbfull|reslist'
               'resultsviewsdefault' => 'thumbfull'
               'webdir' => 'm/musart'
               'xpatexec' => '/l/local/xpat/bin/xpat'
         'reqcollcount' => 1
         'reqtextscount' => 0
      'gio' => GroupsInfo=HASH(0x9e79d8)
         'authkey' => 'bhlmusart'
         'groups' => HASH(0xac9b58)
            'all' => HASH(0xa1ed34)
               'collids' => 'bhl|musart'
               'groupname' => 'All Image Collections'
               'primarytitle' => 'text:All Image Collections'
               'webdir' => 'i/image/all'
         'groupscount' => 1
         'requestedgroup' => 'all'

  DB<7> x $fieldsRef
Type:reference to a hash.
$fieldsRef is a hash with collection specific field abbreviations as keys 
and field values for values. In other words, it holds the single record, 
in the form of a hash, that has been retrieved from XPat.
Availability: EntryServePageHandler
0  HASH(0x8f5148)
   '' => 'Bentley Historical Library'
   'BHL.CC' => 'Cooley, Mortimer E.  (Mortimer Elwyn), 1855-1944'
   'BHL.CT' => 'Mortimer E. Cooley papers, 1873-1944'
   'BHL.DA' => '1882  (ca.)'
   'BHL.FN' => 'bl000104'
   'BHL.ID' => 780
   'BHL.IT' => 'First Engineering Building at University of Michigan'
   'BHL.LO' => 'Box 66.  Folder 16: MU School of Engineering Early Buildings'
   'BHL.NE' => 'na4955'
   'BHL.NO' => 'Original is restored copy photo of stereograph in same folder.  On verso of stereograph: Engineering Shops; 1882; Spring; Built in Winter 1881-82; First Class; 2nd semester. '
   'BHL.RE' => 'Bentley Historical Library'
   'BHL.RI' => 'This image may be protected by copyright law. Contact the Bentley Historical Library for permission to reproduce, display or transmit this image.'
   'BHL.SS' => '4x5 b&w copy negative'
   'BHL.SU' => 'University of Michigan--Buildings; East Engineering Building (University of Michigan); Wheelchairs; Handicapped persons--Michigan--Ann Arbor'
   'BHL.TIS' => 'verso'
   'ISTRUCT.FACE' => 'FRONT'
   'ISTRUCT.ISENTRYID' => 'S-BHL-X-BL000104-1'
   'ISTRUCT.M' => 'bl000104'
   'ISTRUCT.MS' => 'P'
   'ISTRUCT.MT' => 'IMAGE'
   'ISTRUCT.STID' => 0
   'ISTRUCT.STTY' => 'SUMM'
   'ISTRUCT.X' => 1
   'ISTRUCT.Y' => 1
   'caption' => 'First Engineering Building at University of Michigan'

  DB<8> x $metaHashRef
Type:reference to a hash.
$metaHashRef is a hash of collection specific field abbreviations and their 
cross collection (meta) field mappings.
Availability: EntryServePageHandler
0  HASH(0x8f516c)
   '' => 'DC.PU'
   'BHL.CC' => 'DC.SO'
   'BHL.CT' => 'DC.SO'
   'BHL.DA' => 'DC.DA'
   'BHL.FN' => 'DLXS.MA DC.ID'
   'BHL.IT' => 'DC.TI DLXS.MA'
   'BHL.LO' => 'IC.MISC'
   'BHL.NE' => 'DC.DE'
   'BHL.NO' => 'DC.DE'
   'BHL.RE' => 'DC.SO'
   'BHL.RI' => 'DC.RI'
   'BHL.SS' => 'IC.MISC'
   'BHL.SU' => 'DC.SU'
   'BHL.TIS' => 'DC.DE'

  DB<9> x $adminHashRef
Type:reference to a hash.
$adminHashRef is a hash of admin fields and the collection specific fields 
that are mapped to them.
Availability: EntryServePageHandler
0  HASH(0x8f5190)
   'IC.ID IC.FN IC.SORTID' => 'BHL.FN'
   'IC.SORTDA' => 'BHL.DA'
   'IC.VI IC.SORTTI' => 'BHL.IT'

  DB<10> x $itemIDsRef
Type:hmmm.
Availability: None? (shouldn't have been included?)
0  undef

  DB<11> x $bbo
Type:object.
$bbo is a BookBag (Portfolio) Object holding the IDs for the items in the 
BookBag/Portfolio and counts for the number of colls and items represented.
Availability: ResultsServePageHandler, EntryServePageHandler (in both cases,
available only if displaying BookBag/Portfolio)
Code Examples:
my $totalItems = $bbo->GetTotalItems(); # get total number of items in bookbag
# See also the BookBag modules in /DLXSROOT/lib

0  BookBag=HASH(0xa19d10)
   'colls' => HASH(0xa1c0a0)
      'bhl' => HASH(0xa1c07c)
         'items' => HASH(0xa1c058)
            'S-BHL-X-BL000099-1' => BookBagItem=HASH(0xa1c6cc)
               'collid' => 'bhl'
               'idno' => 'S-BHL-X-BL000099-1'
            'S-BHL-X-BL000104-1' => BookBagItem=HASH(0xa1c034)
               'collid' => 'bhl'
               'idno' => 'S-BHL-X-BL000104-1'
            'S-BHL-X-BL001705-1' => BookBagItem=HASH(0xa1c780)
               'collid' => 'bhl'
               'idno' => 'S-BHL-X-BL001705-1'
         'totalitems' => 3
   'totalcolls' => 1
   'totalitems' => 3


  DB<12> x $bbaginfohashref
Type:hash.
$bbaginfohashref is information from the BookBagDb about the BookBag/
Portfolio. Excluded is the list of items held in the Portfolio, which are 
held in the BookBag object instead ($bbo).
Availability: ResultsServePageHandler, EntryServePageHandler (in both cases,
available only if displaying BookBag/Portfolio)
0  HASH(0x4b299c)
   'bbagname' => 'A few campus shots'
   'class' => 'image'
   'id' => 36
   'itemcount' => 3
   'modified' => 20010729163421
   'shared' => 1
   'temp' => 0
   'username' => 'jweise'

  DB<13> x $dbhbbagRef
Type:reference to scalar.
$dbhbbagRef is a reference to the handle for the BooBag/Portfolio database.
Needed when using /DLXSROOT/lib/DbUtils.pm. 
Availability: BbnameServePageHandler, BbopenServePageHandler, BbdelServePageHandler
0  undef

  DB<14> x $sortedResultsArrRef
Type:reference to an array.
$sortedResultsArrRef is an array of results, still tagged.
Availability: ResultsServePageHandler
0  ARRAY(0x9051c0)
   0  'Literature, Science and the Arts buildingBentley Historical LibraryBentley Historical Librarybl000099University of Michigan. College of Literature, Science and the Arts; University of Michigan--Buildings; Winter--Michigan--Ann Arbor; Snow--Michigan--Ann ArborLiterature, Science and the Arts buildingOn verso: Administration Building, later LS&A, 1948.  Return to University of Michigan News Services, Ann Arbor, MichiganUniversity of Michigan photographs vertical file705na4857Supplied4x5 b&w copy negativeumich-bhl-92147This image may be protected by copyright law. Contact the Bentley Historical Library for permission to reproduce, display or transmit this image.UBImusD13.  Folder: Campus Buildings.  Literature, Science and the Arts Building.  no. 2271948  (ca.)'
   1  'First Engineering Building at University of MichiganBentley Historical LibraryBentley Historical Librarybl000104University of Michigan--Buildings; East Engineering Building (University of Michigan); Wheelchairs; Handicapped persons--Michigan--Ann ArborFirst Engineering Building at University of MichiganOriginal is restored copy photo of stereograph in same folder.  On verso of stereograph: Engineering Shops; 1882; Spring; Built in Winter 1881-82; First Class; 2nd semester. Mortimer E. Cooley papers, 1873-1944780na4955verso4x5 b&w copy negativeThis image may be protected by copyright law. Contact the Bentley Historical Library for permission to reproduce, display or transmit this image.Cooley, Mortimer E.  (Mortimer Elwyn), 1855-1944Box 66.  Folder 16: MU School of Engineering Early Buildings1882  (ca.)'
   2  'Two women on horsebackBentley Historical LibraryBentley Historical Librarybl000191Horseback riding--Michigan--Ann Arbor; Winter--Michigan--Ann Arbor; Women--Michigan--Ann ArborTwo women on horsebackOn verso:  Riding-6Women\'s Athletic Association (University of Michigan) records, 1905-1962564na9402supplied4x5 b&w copy negativeThis image may be protected by copyright law. Contact the Bentley Historical Library for permission to reproduce, display or transmit this image.University of Michigan. Women\'s Athletic AssociationBox 6.  Photographs1925/1935  (ca.)'

  DB<15> x $piParamHashRef
Type:reference to a hash.
$piParamHashRef is a reference to a hash of the attribute names and values 
passed by the ALLPURPOSE processing instruction.
 e.g., .
Availability: EntryServePageHandler, ResultsServePageHandler
0  HASH(0x4929f0)
   'test' => 123