Perl Modules and Objects
- CGI (CGI query object manipulation and methods to create HTML)
- IPC::Open3 (allows forking off of process; used for forking XPat
so that the cgi can talk to XPat during its running)
Additional Perl modules
- DBI (database interface)
- Apache::Session (used to store data on the server between runs of
- XPat, XPatSearchSet, XPatResult, XPatResultSet
- encapsulates the cgis communication with a running XPat process
- searches can be individually created and results retrieved OR
- the queries can be packaged into XPatSearchSets and sent
as a whole to be run as queries against XPat one after another
- the results (an XPat set for each query is contained in an XPatResult
object) are then packaged into Middleware XPatResultSet which can
later be iterated through
- Bookbag / Portfolio / Personal Collection
- user can add individual items (bib records, images, books, etc.)
into this set of items.
- In TextClass, can run searches against this set.
- Since Apache::Session uses Perl tied hashes to access data, and
we prefered a more consistent OO approach and syntax, we wrapped the
Apache::Session object with our own object. Access to data is therefore
the usual Perl Object -> syntax
- QueryFactory, TerminologyMapper
- Maps are used to map certain terms to XPat regions (so, for example,
the word title may map to region TITLE within ....
- The QueryFactory takes the CGI object and the TermMapper and creates
a well-formed XPat query.
- These are older object modules that could use some rewriting.
- used in conjunction with HTML templates (html files with parts
that will be filled in with the running of the cgi)
- Processing Instructions in the form of <?INSTRUCTION [param=value
...]> can be inserted in HTML. When the cgi program parses the
HTML template, the PI will be replaced with some html packaged data
or image or...
- Classes (for now TextClass only, BibClass & ImageClass are
not OO yet)
- Each of the document classes has its own Perl class module that
encapsulates much of its information and behavior.
- This object encapsulates the page data in all the PB tags of a
page-image based SGML document.
- This object encapsulates a part of the data retrieved during a
- CollsInfo.pm, GroupsInfo.pm
- During the beginning of the running of a cgi, info about collections
and groups of collections are read into these objects so that it can
be easily accessed during the rest of the cgis run
- non Object-Oriented
- DbUtils: various subroutines to handle common DLXS related DBI
- DlpsUtils: miscellaneous utility subroutines; e.g., sorting
and uniqu-ifying a list, max, min, get list of authorized collections
from the environment, etc.
- DevUtils: routines used only in the development environment
- TextClassUtils: general routines in TextClass, filtering, building
some HTML, etc. (many of the subroutines here will be moved to TextClass
and turned into methods)
- Versioned LibVersion.pm