chapter seven delivery how greenstone works how to build a digital library ian h. witten and david...
TRANSCRIPT
Chapter SevenChapter Seven
DeliveryDeliveryHow Greenstone WorksHow Greenstone Works
How to Build a Digital LibraryHow to Build a Digital LibraryIan H. Witten and David BainbridgeIan H. Witten and David Bainbridge
PurposePurpose
Discusses technical details of Discusses technical details of how digital library systems how digital library systems workwork
Macrolanguage and Macrolanguage and Collection Information Collection Information
DatabaseDatabase In order to understand the structure In order to understand the structure
of runtime systems you need to of runtime systems you need to understand the following understand the following terminologyterminology MacrolanguageMacrolanguage – how all web pages are – how all web pages are
expressed internallyexpressed internally Collection Information DatabaseCollection Information Database – –
records information produced during records information produced during the build operation for use at runtimethe build operation for use at runtime
ProcessesProcesses
Two processes:Two processes:• ReceptionistsReceptionists – responsible for user interface – responsible for user interface
Point of contact with the digital libraryPoint of contact with the digital library Accepts user input, analyzes it, and dispatches request Accepts user input, analyzes it, and dispatches request
to an appropriate collection server(s)to an appropriate collection server(s) Different users CAN share receptionistsDifferent users CAN share receptionists
• Collection ServersCollection Servers – abstractly handle contents – abstractly handle contents of collectionof collection
Interact with data structures produced by building Interact with data structures produced by building processesprocesses
Locate and request information and return it to Locate and request information and return it to receptionist for transmission to userreceptionist for transmission to user
Different collections can share a collection serverDifferent collections can share a collection server
Processes and ProtocolsProcesses and Protocols
Receptionists communicate with Receptionists communicate with collection servers through a defined collection servers through a defined protocolprotocol See Figure 7.1, p. 356See Figure 7.1, p. 356
NULL ProtocolNULL Protocol
Simplest, most common protocolSimplest, most common protocol 1 receptionist and 1 collection 1 receptionist and 1 collection
server run on the same computerserver run on the same computer All communication between the All communication between the
receptionist and collection server receptionist and collection server goes through the protocolgoes through the protocol
CORBA Protocol CORBA Protocol ImplementationImplementation
Common Object Request Broker Common Object Request Broker ArchitectureArchitecture
Unified object-oriented paradigmUnified object-oriented paradigm Allows processes on different Allows processes on different
computers to communicate over the computers to communicate over the InternetInternet
Processes can be implemented on Processes can be implemented on different computer platforms and in different computer platforms and in different programming languagesdifferent programming languages
Two software Two software components necessary components necessary
for runtime systemfor runtime system• Macro language Macro language
• creates all pages in the user interfacecreates all pages in the user interface• macromacro – inline scripts that perform textual – inline scripts that perform textual
replacement on the macro namereplacement on the macro name
• Collection information database Collection information database • communicates information about communicates information about
collections between building and collections between building and delivery phasesdelivery phases
Reasons for Using Reasons for Using MacrosMacros
• Interface comes in many different Interface comes in many different languageslanguages
• All text fragments are stored as All text fragments are stored as macro definitionsmacro definitions
• If particular language is not present If particular language is not present for a macro, the macro will be for a macro, the macro will be substituted with the English version substituted with the English version by defaultby default
Information About Information About MacrosMacros
Macro files end with the extension “.dm”Macro files end with the extension “.dm” Macro names begin and end with an Macro names begin and end with an
underscoreunderscore Macro content is defined using curly bracesMacro content is defined using curly braces Content can be plain text, html, macro names, Content can be plain text, html, macro names,
etc.etc. Macros can contain conditionalsMacros can contain conditionals
_if_(x,y,z)_if_(x,y,z) x = condition (e.g. ne for not equal)x = condition (e.g. ne for not equal) y = text to use if x is true y = text to use if x is true z = text to use if x is falsez = text to use if x is false
Page ParametersPage Parameters
Page parameters affect how every Page parameters affect how every page in the interface is generatedpage in the interface is generated
3 Types of Page Parameters:3 Types of Page Parameters:• l – interface language parameter l – interface language parameter • c – current collection namec – current collection name• v – determines if expanded in graphical or v – determines if expanded in graphical or
text modetext mode
Making Macros WorkMaking Macros Work
main.cfg – consists of macro files main.cfg – consists of macro files that the system should readthat the system should read
Home page can be changed by Home page can be changed by editing the main.cfg fileediting the main.cfg file
Responding to User Responding to User RequestsRequests
Standard arguments used in URLs to Standard arguments used in URLs to exchange info with the library exchange info with the library programprogram Collection (c) Collection (c) Action (a) Action (a) Page (p) Page (p)
Retrieving DocumentsRetrieving Documents
a=d retrieves a documenta=d retrieves a document d specifies document number (and d specifies document number (and
page)page) hl specifies highlight query termshl specifies highlight query terms gt specifies page to display within a gt specifies page to display within a
bookbook
Using ProtocolUsing Protocol Complete description of protocol needed for Complete description of protocol needed for
interaction between receptionist and collect interaction between receptionist and collect serverserver
Protocol Calls Include:Protocol Calls Include: Get_protocol_name() – returns name of protocolGet_protocol_name() – returns name of protocol Get_collection_list() – returns list of collectionsGet_collection_list() – returns list of collections Get_collection() – obtains general info about collectionsGet_collection() – obtains general info about collections Has_collection() – if you can communicate with collection Has_collection() – if you can communicate with collection
return truereturn true Ping() – if a successful connection exists return truePing() – if a successful connection exists return true Filter() – supports searching and browsingFilter() – supports searching and browsing Get_filterinfo() – gets list of filters for a collectionGet_filterinfo() – gets list of filters for a collection Get_filteroptions() – gets all options of filter for a collectionGet_filteroptions() – gets all options of filter for a collection Get_document() – gets documentsGet_document() – gets documents
ActionsActions Null protocol receptionists use actions derived Null protocol receptionists use actions derived
from a single base action through virtual from a single base action through virtual inheritanceinheritance Actions – base classActions – base class Page – web pagePage – web page Document – retrieve items form collection serverDocument – retrieve items form collection server Query - searchQuery - search Authen – authenticate userAuthen – authenticate user Users – add/delete users and their permissionsUsers – add/delete users and their permissions Collector – generate pagesCollector – generate pages Status – generate admin pagesStatus – generate admin pages Extlink – connects users to external siteExtlink – connects users to external site Ping – verifies a collection is onlinePing – verifies a collection is online Tip – provides a random tip for the userTip – provides a random tip for the user
Site ConfigurationSite Configuration
Configuration files Configuration files set variables that are used by library set variables that are used by library
software / Web server at runtimesoftware / Web server at runtime Lines in gsdlsite.cfgLines in gsdlsite.cfg
gsdlhome – path of Greenstone home directorygsdlhome – path of Greenstone home directory httpprefix – web address of Greenstone home httpprefix – web address of Greenstone home
directorydirectory httpimage – web address of directory with imageshttpimage – web address of directory with images gwcgi – web address of library CGI scriptgwcgi – web address of library CGI script maxrequests – for Fast-CGImaxrequests – for Fast-CGI