Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

The Editor Application of the dLibra system makes it possible to import object metadata from a CSV file. For that purpose, a new file with the CSV filename extension must be created with the use of, for example, the MS Excel program.

If the object metadata are to be imported for a greater number of languages (for example, Polish, English, or the universal language), the file should have the following structure:

Image Added

The first column in the file contains the RDF names of particular metadata fields (the RDF names can be checked in the Editor and Administrator Application in the dLibra system). The subsequent columns contain the values assigned to the fields in the languages for which the metadata are being imported. For example, the second column contains values in Polish, the third column – in English, and the fourth – in the universal language.

One file may contain several object descriptions, separated by at least one empty row. In the example, there are three independent descriptions. In the first one, values are given for the following fields: “Title” (with the “Title” RDF name; two values have been entered: one, “Tytul Polski”, in Polish and one, “English Title”, in English), “Creator” (with the “Creator” RDF name; two values, “Jan Kowalski” and “Janusz Nowak”, have been entered for the universal language, in two rows, each labeled with the “Creator” RDF name), “Type” (with the “Type” RDF name; two values have been entered: one, “Artykul”, in Polish and one, “Article”, in English).

If only metadata in Polish are imported, the file can have the following structure (without the need of introducing column names for particular languages because values for only one language are entered; the information about particular objects should also be separated with empty rows here):

Image Added

After a new file has been created, it should be saved with any name on the local drive, as an appropriate file type, by selecting the “CVS (comma-separated)(*.csv)” type from the expandable list of the “Save as type” option. In the image below, the MS Excel screen for saving a file is shown.

Image Added

A file prepared in the MS Excel program will be saved with the use of ANSI encoding, while the Editor Application uses UTF-8 encoding by default. Therefore, in order to load the metadata from files saved with the use of the MS Excel program, the configuration in the Editor Application should be changed. The configuration options are described in the documentation of the Editor and Administrator Application, in the section on the configuration of the application. As regards the mechanism for importing metadata from CSV files, the following configuration (line) should be entered in the generalConfig.properties file

Aplikacja redaktora systemu dLibra umożliwia importowanie metadanych obiektu z pliku CSV. W tym celu należy utworzyć nowy plik z rozszerzeniem CSV, np. za pośrednictwem programu MS Excel. 

Jeśli metadane obiektu mają być importowane dla większej liczby języków (np. polskiego, angielskiego, czy uniwersalnego), plik powinien mieć strukturę taką jak zaprezentowano na poniższym rysunku:

Image Removed

W pliku pierwsza kolumna zawiera nazwy RDF poszczególnych pól metadanych (nazwy RDF można zobaczyć w Aplikacji Redaktora i Administratora systemu dLibra). W kolejnych kolumnach znajdują się wartości przypisane do pól w odpowiednim języku. Na przykładzie druga kolumna zawiera wartości w języku polskim, trzecia w języku angielskim, a czwarta w języku uniwersalnym. 

W jednym pliku może znajdować się kilka opisów obiektów, przy czym każdy opis obiektu powinien być oddzielony co najmniej jednym pustym wierszem. W przykładzie pokazano trzy niezależne opisy. Pierwszy opis zawiera wypełnione wartości dla pól: Tytuł (nazwa RDF "Title", wprowadzone dwie wartości - jedna w języku polskim "Tytuł Polski" i jedna w angielskim "English Title"), Twórca (nazwa RDF "Creator", wprowadzone dwie wartości dla języka uniwersalnego "Jan Kowalski" i "Janusz Nowak" - dwa wiersze oznaczone nazwą RDF "Creator"), Typ (nazwa RDF "Type", wprowadzone wartości - jedna w języku polskim "Artykuł" i jedna w angielskim "Article").

Jeśli importowane będą jedynie metadane w języku polskim, plik może mieć poniższą strukturę (bez konieczności wprowadzania nazw kolumn dla poszczególnych języków, ponieważ jest tylko jeden wypełniany język). Tu również należy rozdzielić informacje o poszczególnych obiektach pustym wierszem:

Image Removed

Po utworzeniu nowego pliku, należy zapisać go pod dowolną nazwą na dysku lokalnym komputera, wybierając odpowiedni typ pliku - Zapisz jako typ: CVS (rozdzielany przecinkami)(*.csv). Ekran poniżej przedstawia okno zapisywania pliku dla programu MS Excel.

Image Removed

...

:

metadata.csv.encoding = Windows-1250

...

If it is not done, CSV files will be imported with UTF-8

...

encoding (the default encoding used in the Editor and Administrator Application).

In order to load a configuration file modified in that way, select the “Program” option from the menu of the Editor Application and click the “Configuration” option.

Image Added

In the new window, click the “Change configuration file” button and indicate the location of the new generalConfig.properties file.

Image Added

Once the changes have been confirmed, the imported data which contain Polish diacritics will be displayed correctly.

Metadata from a CSV file can be imported from the level of the bibliographic description editor (see the screen below) which appears, for example, in the new digital object creator (in step two) or in the planned object creator (in step one).


Image Added

In order to import a description from the level of the bibliographic description editor, click the “Import...” button in the editor. There will appear a window for importing metadata (see the screen below). In that window, indicate the location of the created CSV file and click the “Import” button.

Image Added

If the CSV file contains more than one object description, the application will ask the user to indicate the description from which the data are to be imported (see the screen below).

Image Added

Once the correct record has been indicated and the selection has been confirmed, the object metadata will be filled in

Aby wczytać tak zmodyfikowany plik konfiguracyjny, z menu aplikacji redaktora należy wybrać opcję "Program", a następnie "Konfiguracja".

Image Removed

W nowym oknie należy kliknąć przycisk „Zmień plik konfiguracyjny” i wskazać lokalizację nowego pliku generalConfig.properties.

Image Removed

Po zatwierdzeniu zmian, zaimportowane dane zawierające polskie znaki diakrytyczne, będą widoczne w poprawny sposób.

Import metadanych z pliku CSV możliwy jest z poziomu edytora opisu bibliograficznego (ekran poniżej), który pojawia się, np. w kreatorze nowego obiektu cyfrowego (krok drugi) lub kreatorze planowanego obiektu (krok pierwszy).

Image Removed

Aby zaimportować opis z poziomu edytora opisu bibliograficznego, należy wybrać znajdujący się na nim przycisk "Importuj...". W efekcie pojawi się okno importowania metadanych (ekran poniżej). W oknie tym należy wskazać lokalizację utworzonego pliku CSV oraz kliknąć przycisk „Importuj”.

Image Removed

Jeżeli plik CSV zawiera więcej niż jeden opis obiektu to aplikacja poprosi o wskazanie opisu, którego dane mają zostać zaimportowane (ekran poniżej).

Image Removed

Po wskazaniu poprawnego rekordu i zatwierdzeniu wyboru metadane obiektu zostaną uzupełnione.