Download presentation
Presentation is loading. Please wait.
Published byMaurice Walker Modified over 9 years ago
1
Greenstone Internals How to Build a Digital Library Ian H. Witten and David Bainbridge
2
Macrolanguage and Collection Information Database In order to understand the structure of runtime systems you need to understand the following terminology In order to understand the structure of runtime systems you need to understand the following terminology Macrolanguage – how all web pages are expressed internally Macrolanguage – how all web pages are expressed internally Collection Information Database – records information produced during the build operation for use at runtime Collection Information Database – records information produced during the build operation for use at runtime
3
Processes Two processes: Two processes: Receptionists – responsible for user interface Receptionists – responsible for user interface Point of contact with the digital library Point of contact with the digital library Accepts user input, analyzes it, and dispatches request to an appropriate collection server(s) Accepts user input, analyzes it, and dispatches request to an appropriate collection server(s) Different users CAN share receptionists Different users CAN share receptionists Collection Servers – abstractly handle contents of collection Collection Servers – abstractly handle contents of collection Interact with data structures produced by building processes Interact with data structures produced by building processes Locate and request information and return it to receptionist for transmission to user Locate and request information and return it to receptionist for transmission to user Different collections can share a collection server Different collections can share a collection server Receptionists communicate with collection servers through a defined protocol Receptionists communicate with collection servers through a defined protocol
4
NULL Protocol Simplest, most common protocol Simplest, most common protocol 1 receptionist and 1 collection server run on the same computer 1 receptionist and 1 collection server run on the same computer All communication between the receptionist and collection server goes through the protocol All communication between the receptionist and collection server goes through the protocol
5
CORBA Protocol Implementation Common Object Request Broker Architecture Common Object Request Broker Architecture Unified object-oriented paradigm Unified object-oriented paradigm Allows processes on different computers to communicate over the Internet Allows processes on different computers to communicate over the Internet Processes can be implemented on different computer platforms and in different programming languages Processes can be implemented on different computer platforms and in different programming languages
6
Two software components necessary for runtime system Macro language creates all pages in the user interface macro – inline scripts that perform textual replacement on the macro name Collection information database communicates information about collections between building and delivery phases
7
Reasons for Using Macros Interface comes in many different languages Interface comes in many different languages All text fragments are stored as macro definitions All text fragments are stored as macro definitions If particular language is not present for a macro, the macro will be substituted with the English version by default If particular language is not present for a macro, the macro will be substituted with the English version by default
8
Information About Macros Macro files end with the extension “.dm” Macro files end with the extension “.dm” Macro names begin and end with an underscore Macro names begin and end with an underscore Macro content is defined using curly braces Macro content is defined using curly braces Content can be plain text, html, macro names, etc. Content can be plain text, html, macro names, etc. Macros can contain conditionals Macros 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 false z = text to use if x is false
9
Page Parameters Page parameters affect how every page in the interface is generated Page parameters affect how every page 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 name c – current collection name v – determines if expanded in graphical or text mode v – determines if expanded in graphical or text mode
10
Making Macros Work main.cfg – consists of macro files that the system should read main.cfg – consists of macro files that the system should read Home page can be changed by editing the main.cfg file Home page can be changed by editing the main.cfg file
11
Responding to User Requests Standard arguments used in URLs to exchange info with the library program Standard arguments used in URLs to exchange info with the library program Collection (c) Collection (c) Action (a) Action (a) Page (p) Page (p)
12
Retrieving Documents a=d retrieves a document a=d retrieves a document d specifies document number (and page) d specifies document number (and page) hl specifies highlight query terms hl specifies highlight query terms gt specifies page to display within a book gt specifies page to display within a book
13
Using Protocol Complete description of protocol needed for interaction between receptionist and collect server Complete description of protocol needed for interaction between receptionist and collect server Protocol Calls Include: Protocol Calls Include: Get_protocol_name() – returns name of protocol Get_protocol_name() – returns name of protocol Get_collection_list() – returns list of collections Get_collection_list() – returns list of collections Get_collection() – obtains general info about collections Get_collection() – obtains general info about collections Has_collection() – if you can communicate with collection return true Has_collection() – if you can communicate with collection return true Ping() – if a successful connection exists return true Ping() – if a successful connection exists return true Filter() – supports searching and browsing Filter() – supports searching and browsing Get_filterinfo() – gets list of filters for a collection Get_filterinfo() – gets list of filters for a collection Get_filteroptions() – gets all options of filter for a collection Get_filteroptions() – gets all options of filter for a collection Get_document() – gets documents Get_document() – gets documents
14
Actions Null protocol receptionists use actions derived from a single base action through virtual inheritance Null protocol receptionists use actions derived from a single base action through virtual inheritance Actions – base class Actions – base class Page – web page Page – web page Document – retrieve items form collection server Document – retrieve items form collection server Query - search Query - search Authen – authenticate user Authen – authenticate user Users – add/delete users and their permissions Users – add/delete users and their permissions Collector – generate pages Collector – generate pages Status – generate admin pages Status – generate admin pages Extlink – connects users to external site Extlink – connects users to external site Ping – verifies a collection is online Ping – verifies a collection is online Tip – provides a random tip for the user Tip – provides a random tip for the user
15
Site Configuration Configuration files Configuration files set variables that are used by library software / Web server at runtime set variables that are used by library software / Web server at runtime Lines in gsdlsite.cfg Lines in gsdlsite.cfg gsdlhome – path of Greenstone home directory gsdlhome – path of Greenstone home directory httpprefix – web address of Greenstone home directory httpprefix – web address of Greenstone home directory httpimage – web address of directory with images httpimage – web address of directory with images gwcgi – web address of library CGI script gwcgi – web address of library CGI script maxrequests – for Fast-CGI maxrequests – for Fast-CGI
Similar presentations
© 2024 SlidePlayer.com. Inc.
All rights reserved.