Configuring the Reader ApplicationIn this chapter, there are instructions on the configuration of some mechanisms related to the reader application. Configuring the CAS ServiceThe dLibra system makes it possible to use a central login system created with the use of the CAS server and the LDAP service. CAS is available as another identity provider in file dlibra-webapp/WEB-INF/conf/user-providers.xml. The following fragment should be uncommented:
Next, the user should:
Next, the content of file dlibra-webapp/WEB-INF/conf/ldap.properties should be completed. The file contains parameters which make it possible to use the LDAP service. Configuring News ImportThe reader application makes it possible to publish various types of messages on the home page. Those news can be added with the use of the administration panel of the reader application or by means of the mechanism of RSS news import. A sample import process is discussed below. In order to import news from an RSS available online, the user should uncomment the “periodic-task” tag containing the configuration of the NewsImportTask in the periodic.xml file
The configuration of that task consists of the following parameters:
by default, that task is carried out once a day; whenever the reader application detects that a new news item has appeared in the RSS channel, it will import it within the framework of the nearest performance of that task. Adding BookplatesIn the reader application of the dLibra system, bookplates are represented as images with a link to the selected page (library, institution, etc.) which appear on the page with the description of a publication (publication, docmetadata). Bookplates are added on the basis of the values of particular attributes in metadata. For example, a bookplate may be displayed depending on the value of the “Permissions” attribute – for the “Library Institution X” value, an image which identifies that institution will be displayed, together with a link to the home page of that institution, “www.instytucjabibliotecznax.com”. A bookplate is added in the following manner:
The “attribute, “attribute-value”, and “exlibris” elements can be defined many times, so many bookplates can be added for every determined value of a metadata attribute, For example:
In that configuration, the “Biblioteka Uniwersytecka w Poznaniu” bookplate will appear for the “Permissions” attribute both when it has the “Biblioteka Uniwersytecka w Poznaniu” value and when it has the “BUP” value. Moreover, if the same “Permissions” attribute has the “Uniwersytet A. Mickiewicza i Politechnika Poznanska” value, two bookplates (images with links) will be displayed, for the Adam Mickiewicz University and for the Poznan University of Technology. The exlibris.xml configuration will only begin to apply after the servlet environment of the reader application (Apache Tomcat) has been restarted. Incorrect settings may cause exceptions and system log errors to appear. Configuring the JCR Backup SystemIn order to change the default JCR backup creation settings in the system, the user should edit the periodic.xml file in the /WEB-INF directory of the reader application. The entry concerning the appropriate periodic task is looks as follows:
Two parameters can be changed in the task: jcr.backup.dir and copies.amount. By means of the first parameter, the administrator indicates the directory in which backups are to be placed. Every single backup copy is an XML file named jcr-backup_[the date of the creation of the copy].xml, for example, jcr-backup_2010.12.25.08.00.00.xml. The second parameter determines the maximum number of backup copies. The periodic task is carried out periodically – by default, every 24 hours. Thus, when the maximum number of copy files has been created, each subsequent file overwrites the oldest file from the jcr.backup.dir directory. The copies.amount can have the following values:
A change of parameters in periodic tasks requires a restart of the container (for example, Apache Tomcat), of the reader application.
Restoring Data from JCR Backup Copies In order to recover data from a backup copy XML file, it should be placed in an appropriate directory. That directory is configured in the /WEB-INF/conf/jcr.properties file of the reader application, at parameter jcr.restore.dir. A backup copy is automatically restored at a restart of the container (for example, Apache Tomcat) of the reader application. Caution! When the data from a backup copy file have been recovered, the file is automatically removed. Configuring ThumbnailsThe “context-param” parameter from the /WEB-INF/web.xml file of the reader application is responsible for configuring the thumbnails displayed in the reader application. The file looks as follows:
The parameter values are entered between the <param-value></param-value> tags. The parameter consists of id_miniatury:zestaw_parametrów_miniatury pairs The parameter set consists of four parts which are separated with the semicolon (;) character, so various thumbnail profiles can be defined, for example: “recomended”, “col_home_recommended”, or “collection_description”, and we can choose a suitable size of the image. The URL below illustrates the schema of the access to a thumbnail:
where:
In the example presented above, the parameter set for the example thumbnail is: 200, 200,1.0, false, and image/png. The subsequent parts mean:
The first two values determine the dimensions of the output graphics file of the thumbnail for the reader application regardless of the dimensions of the input graphics file entered in the Editor Application. Thus, if the graphics file in the Editor Application has been entered in dimensions: width = 500 pixels, height = 200 pixels, then the image will be appropriately scaled in the reader application, to the dimensions configured in the “thumbnails.settings” parameter. That can be useful when the thumbnail files entered by editors are very detailed, and that degree of detail is not necessary when they are displayed in the reader application; moreover,when the dimensions are decreased, the memory volume needed for sending them is lowered, which may accelerate the speed of the data transfer. The next parameter is related to the last one, and it is only taken into account when the thumbnail has the “image/jpeg” format of the output graphics file. It makes it possible to further decrease the sent file, thanks to the lossy compression of the JPEG format. The optimal compression is set with the use of a floating-point number, in the (0,1) range, for example, 0.1, 0.25, or 0.3. The next parameter determines the way in which the input image is to be adjusted to the dimensions of the thumbnail entered in the “thumbnails.settings” parameter. When the flag is set to “true”, the original graphics file will be decreased proportionally and cropped to the area defined by the first two parameters. When the flag is set to “false”, the original graphics file will be adjusted to fit in the area defined by the “thumbnails.settings” thumbnail parameters. The last parameter determines the type of the output graphics file format of the thumbnail. The two most popular formats, JPEG and PNG, are supported. When the JPEG format is chosen, the parameter of the degree of compression (described above) is also significant. The formats are identified by MIME types. For PNG, it is “imagne/png” and for JPEG – “image/jpeg”. A change of thumbnail display parameters requires a restart of the container (for example, Apache Tomcat), of the reader application.
Configuring the “Recommended” ComponentThe basic configuration of the “Recommended” component is in the /WEB-INF/components.xml file of the reader application. Here is a sample configuration entry of the component:
The configuration has two basic parameters:
When it has its default values, the first parameter puts in the value of the recommendedld entity which is declared at the beginning of the document, in line:
The default value of the entity is “3”, and it points to the ID of the collection which is automatically created during installation. From that collection, the publications which are to be displayed in the component are randomly selected, and only those of the randomly selected publications are displayed to which a thumbnail is assigned. When the collection does not contain any publications which fulfill the abovementioned conditions, the component will not be displayed.
Both the value assigned to the entity and the parameter values can be changed so as to indicate collections chosen by the administrator. The next parameter, RecommendedCount, is responsible for the number of publications to be selected randomly and presented in the component. If the component does not find an appropriate number of publications with thumbnails in the collection, it will display those it has been able to find. Adding a Component to a Page The next step of the configuration of the component is adding it to a selected page. Pages are defined in the /WEB-INF/pages.xml configuration file of the reader application. In order to add the component to the home page, the user should find the declaration of the page (the <page> tag) named “main” in the pages.xml document. The following entry should be made in that declaration, between the <components></components> tags (the entry should be already in the file by default):
The configuration and changes in the components.xml and pages.xml files do not require a restart of the container of the reader application. Configuring the Self-Archiving Functionality (Only for Dedicated Implementations with the Self-Archiving Function Switched On)This section is about the configuration of the self-archiving mechanism, pubcreator.properties, in the reader application. The first configuration file is /WEB-INF/conf/pubcreator.properties; it contains the following parameters:
The class.name and main.files.suggesters parameters are not subject to changes. The max.file.size parameter allows administrators to introduce limits of the size of the content files of created publications. The file size is given in bytes. In this case, value “0” means that the size is not limited. Istotnym parametrem jest upload.temp.dir, w którym administrator ustala ścieżkę do katalogu plików tymczasowych. W katalogu tym przechowywane są pliki z treścią publikacji do momentu przesłania ich do serwera. Po zakończeniu procesu tworzenia publikacji, pliki te są automatycznie usuwane z katalogu. Jeśli użytkownik w ramach swojej sesji nie dokończy procesu tworzenia publikacji, wówczas pliki tymczasowe, przesłane przez niego do Aplikacji Czytelnika, usunie zadanie okresowe. Ustawienie tego parametru jest istotne do prawidłowego działania mechanizmu Self-Archiving. Reszta parametrów, tj. main.files.suggesters.use, main.files.suggesters oraz default.main.files.lookup.filter.regexp(x) służy do konfiguracji opcji podpowiadania pliku głównego treści. W obecnej wersji dLibry opracowany został mechanizm podpowiadania działający w oparciu o nazwę plików. Parametry default.main.files.lookup.filter.regexp(x), gdzie x stanowią kolejne liczby ze zbioru N={0,1,...n}, określają wyrażenia regularne rozpoznające potencjalne pliki główne treści publikacji. Konfiguracja formularza atrybutów - pubc-metadata.xml Plik /WEB-INF/conf/pubc-metadata.xml służy do konfiguracji formularza atrybutów, który pojawia się w 2-gim kroku kreatora publikacji. W pliku tym określa się m.in. liczbę, rodzaj oraz kolejność wyświetlania atrybutów metadanych. W podstawowej formie plik przedstawia się następująco:
Głównym elementem struktury XML jest pubc-metadata, który zawiera elementy attribute reprezentujące pola w formularzu. Każdy element attribute posiada własny zestaw elementów oraz atrybutów. Atrybuty elementu attribute :
Elementy podrzędne elementu attribute:
Atrybut nazwy name elementu attribute musi być unikalny dla każdego zdefiniowanego pola. Administrator może go wykorzystać w korelacji z atrybutem alias ustawionym na 'true', domyślnie bowiem nazwa dla pola jest pobierana bezpośrednio od nazwy atrybutu metadanych dLibra, wskazanego elementem rdf-name (patrz wyżej), w tym wypadku można jednakże ustawić własną nazwę dla pola w plikach etykiet komponentu PublicationUploadComponent. Etykieta taka rozpoczyna się od prefiksu "PublicationUploadComponent" a kończy nazwą określoną w atrybucie name, np. "PublicationUploadComponent.title". Atrybut required określa czy wypełnienie pola jest wymagane do zaakceptowania tworzonej publikacji.
Pierwszym istotnym elementem podrzędnym elementu attribute jest rdf-name, który łączy wskazane pole formularza z atrybutem w schemacie metadanych biblioteki cyfrowej. Wszystkie wpisywane w pole wartości są kojarzone z konkretnym atrybutem metadanych poprzez nazwę RDF atrybutu. Przykładowymi nazwami RDF są: Title, Cretor, Abstract itp.
Element podrzędny position określa pozycję pola na liście pól formularza. Dwa dodatkowe podrzędne elementy, tj. multiple oraz input-type nie są wymagane. Pierwszy określa czy do danego pola można dodać wiele wartości (domyślnie 'true'), drugi określa jakiego typu jest pole formularza. Można wybrać spośród trzech typów: TEXT (standardowe pole tekstowe), TEXTAREA (duże pole tekstowe) oraz DATE (pole wyboru daty), które wpisuje się w atrybucie name elementu. Domyślnie dla każdego pola wybierany jest element typu TEXT. Przykładowo:
Jeśli zdefiniowane pole jest typu DATE wówczas można między znacznikami <input-type ...></input-type> umieścić podrzędne elementy:
Przykład konfiguracji pola daty:
Ostatnią kwestią wartą zaznaczenia jest obsługa kontrolowanych atrybutów metadanych. Pola, które w nazwie RDF odwołują się do atrybutów kontrolowanych prezentują się jako listy rozwijalne, w których użytkownik może wybrać jedną z proponowanych pozycji. Atrybuty ustawia się jako kontrolowane w Aplikacji Administratora. Więcej na ten temat można znaleźć tutaj.
Konfiguracja regulaminu Przed przystąpieniem do dodawania publikacji każdy użytkownik jest zobowiązany do zaakceptowania regulaminu, którego treść można zmienić na potrzeby własnej biblioteki cyfrowej. Treść regulaminu znajduje się na stronie pomocy regulations i może ona zostać zmieniona w panelu administracyjnym Aplikacji Czytelnika.
Wprowadzenie zmiany w pliku components.xml nie powinno wymagać restartu kontenera Aplikacji Czytelnika. Inne etapy konfiguracji Do prawidłowego działania funkcjonalności Self-Archiving potrzebne są jeszcze ustawienia w serwerze dLibra. Konfiguracja mechanizmu dodawania tagów publicznych (tylko dla dedykowanych wdrożeń z włączoną funkcją tagów publicznych)Istnieje możliwość konfigurowania podstawowych parametrów akcji dodawania tagów publicznych. Aby to zrobić należy otworzyć plik /WEB-INF/actions.xml konfiguracji akcji. W pliku tym można odnaleźć wpis:
W procesie moderacji tagów publicznych są one przetrzymywane pewien okres czasu, w którym moderator może ustawić ich stan na "zaakceptowany" bądź "niezaakceptowany". Tylko zaakceptowane tagi publiczne są dodawane do atrybutu "Tagi" wybranej publikacji. Parametr accept.all.tags ustala czy przesyłana propozycja tagu publicznego ma być automatycznie ustawiana na stan "zaakceptowany", który może zostać ewentualnie zmieniony przed moderatora. Standardowo parametr accept.all.tags ustawiony jest na false co oznacza, iż dodawane tagi publiczne są domyślnie w stanie "niezaakceptowane". Dwa kolejne parametry określają minimalną (min.tag.length) oraz maksymalną (max.tag.length) liczbę znaków przeznaczonych na tag publiczny. W przypadku, gdy tag nie spełnia wyznaczonego limitu, nie zostanie on dodany do propozycji słów kluczowych. Ustawienie któregokolwiek z tych parametrów na wartość 0 spowoduje, iż nie będzie on brany pod uwagę przy sprawdzaniu liczby znaków tagu. Konfiguracja wyświetlania zabezpieczonych plików PDFOmawiana konfiguracja umożliwia precyzyjniejsze określenie zabezpieczenia w wyświetlanym przez Aplikację Czytelnika dokumencie PDF.
Podstawowymi parametrami są owner.pass oraz user.pass, które określają kolejno: hasło właściciela dokumentu PDF oraz hasło użytkownika dokumentu PDF, które będzie zobowiązany wprowadzić, jeśli dokument można w jakiś sposób modyfikować.
Wszystkie wymienione w liście parametry przyjmują wartości typu boolean (true|false).
Zmiana parametrów wymaga restartu kontenera Aplikacji Czytelnika (tj. Apache Tomcat). Konfiguracja kolekcji głównej dla Aplikacji CzytelnikaOd wersji 5.0 administratorzy mają możliwość wskazania dowolnej kolekcji, spośród istniejących w bibliotece cyfrowej, która będzie spełniała rolę kolekcji głównej. Opcja ta idzie w parze z możliwością podłączenia wielu Aplikacji Czytelnika pod pojedynczy Serwer dLibra. Aby skonfigurować dla danej Aplikacji Czytelnika jej kolekcję główną wystarczy otworzyć do edycji plik /WEB-INF/web.xml, w którym znajduje się następujący wpis (domyślnie w komentarzu XML):
Wpis należy "odkomentować" zaś w miejsce [id of collection] należy wrzucić numeryczne ID kolekcji (unikalne ID ustawiane w bazie danych kolekcji). Po wszystkim należy zrestartować środowisko serwletów (np. Tomcat). Zmiany w formularzu "Kontakt"Aby zmienić domyślne wartości kontaktowe w formularzu należy otworzyć do edycji pliki WEBAPP_en.xml (dla języka angielskiego) oraz WEBAPP_pl.xml (dla języka polskiego), z katalogu /WEB-INF/components/resources. W plikach tych można znaleźć wpisy w postaci:
Łatwo zauważyć, iż poszczególne wartości dla elementów XML odpowiadają wartościom z formularza. Zmiany w tych plikach nie wymagają ponownego uruchomienia kontenera serwletów. Inną rzeczą, o której warto pamiętać w kontekście formularza kontaktu, jest adres mail, na który wysyłane są wpisane przez użytkownika wiadomości. Adres ten można skonfigurować w pliku /WEB-INF/actions.xml, zmieniając wartość dla deklarowanej akcji SendMailAction:
Między znacznikami value można umieścić dowolną liczbę adresów mail oddzielonych średnikami lub przecinkami. Ustawienia obsługi znaków wodnych (tylko dla dedykowanych wdrożeń z włączoną funkcją tagów publicznych)Znaki wodne wyświetlane są dla zabezpieczonych prezentacji JPG (specjalny typ publikacji w dLibrze, który tworzy się poprzez wskazanie jako plik główny katalogu zawierającego pliki JPG). Odbywa się to za pomocą specjalnego appletu Java. Znak wodny to obrazek, który jest nakładany na wyświetlaną treść prezentacji z efektem przezroczystości. Zalecamy wykorzystać grafikę w formacie PNG, który pozwala zapisać obraz z przezroczystym tłem. Obrazek ten jest zawsze powiększany tak, aby zajmował maksymalną powierzchnię. Nie jest jednak rozciągany do proporcji głównego obrazu, tylko wyśrodkowany. Można jednak uzyskać efekt znaku wodnego mniejszego niż główny obraz, poprzez dodanie przezroczystego obramowania o wybranej szerokości w grafice znaku wodnego. Oprócz obrazka, w znaku wodnym może być automatycznie wstawiona nazwa zalogowanego użytkownika. Konfiguracja znaków wodnych znajduje się w pliku WEB-INF/web.xml, w sekcji poświęconej servletowi watermarkServlet. Można tam zdefiniować następujące parametry:
Udostępnianie Mapy Strony robotom indeksującymMapa Strony(Sitemap) jest protokołem umożliwiającym robotom indeksującym łatwiejsze zgromadzenie informacji o najważniejszych stronach w Aplikacji Czytelnika. Aplikacja Czytelnika w ramach zadania okresowego SitemapGeneratingTask generuje bezwzględne adresy url do nich i zapisuje je według poniższych założeń:
Aby zmienić domyślne ustawienia generowania mapy strony należy wyedytować plik periodic.xml znajdujący się w katalogu /WEB-INF Aplikacji Czytelnika. Wpis dotyczący odpowiedniego zadania okresowego przedstawia się następująco:
W zadaniu można ustawić wartości następujących parametrów:
Obsługa publikacji linkującychPublikacje linkujące pozwalają na umieszczenie w bibliotece cyfrowej informacji o obiekcie, który jest udostępniany przez jakiś inny serwis internetowy. W domyślnej konfiguracji, gdy użytkownik chce zobaczyć treść takiej publikacji, najpierw zobaczy planszę z informacją o zewnętrznej treści oraz docelowym linkiem, który musi wywołać. Jeśli nie chcemy, aby ta plansza była wyświetlana, tylko żeby użytkownik od razu został przekierowany na docelowy adres, należy dodać poniższą konfigurację w
|