NAH Scope2apeEAD export

From Archives Portal Europe Wiki
Jump to: navigation, search

This page contains a description of the ScopeArchiv apeEAD export the National Archives of Hungary has developed for its own purpose. For more information please contact the National Archives of Hungary:

Basic requirements/features

  • In ScopArchive user fields can be defined on user interface without developer assistance, the same should be done with the EAD export elements.
  • The export function uses the already existing data structures (tables, fields). Further elements cannot be exported automatically
  • Export can be launched from different part of the hierarchy, allowing partial export.
  • Export can set the vertical deepness by defining the ID of the lowest level. (e.g. fond, subseries, item etc.)

Matching Scope fields and EAD elements in the Scope Admin module

The procedure contains the structure of the EAD export, the user fields are inserted into this. You can insert elements by specific characters under the following xml tags:

  • <did> (character: *)
  • <physdesc> (character: P)
  • <odd> (character: +)
  • <c> (character: !)

You have to set this information field by field in the Data elements menu item within the Adminsitration module of the Scope Archiv. We aplied a separete excel for easier use, in which fields ’B’ is the name of the Scope field, ’K’ and ’L’ are the code fields to be typed to ScopeArchive.

Scope2apeEAD 01.png

Type the information into the EAD-code field in the following way:

  • the first character is the special/control character (* or + or P or !)
  • then the value comes to be inserted in the ead xml, here a % indicates where to put the data within the string, eg.
<note label="Unique identifier "><p>%</p></note>

For instance, if the Unique identifier of the given description unit is HU-MNL-1125, then the export contains the following:

<note label="Unique identifier "><p>HU-MNL-1125</p></note>

You can find the attribute encodinganalog="3.x.x" in many fields. Since there is place for the ISAD(G) code in the sA data elements, if the %I string can be found in the sample, the script will insert the encodinganalog attribute together with the value given at the ISAD(G) field.

Scope2apeEAD 02.png

<langmaterial %I>%</langmaterial>
For instance if the field value is: "Hungarian":
<langmaterial encodinganalog="3.4.3">Hungarian</langmaterial>

The size of the EAD-code field is limited, longer descriptions do not fit in. In such cases you can also type into the Code2 field, and with the %K2 sign you can indicate the final place of the text to be inserted.

Scope2apeEAD 03.png

From the fields of the example:

<physdesc %I>%K2</physdesc>
<dimensions type="Size:">%</dimensions>

the following line is exported:

<physdesc encodinganalog="3.4.4”> <dimensions type="Size:">……</dimensions></physdesc>

For the elements P and ! the order can also be set, you have to define the order in position 2. and 3. by a two-digit number.

Scope2apeEAD 04.png

Execution of the procedure

Select the level

There are different levels of archival records. First you must know what depth of the ScopeArchiv tree you would like to export. In the screenshot below is shown how to make an export on Fond level. In this case, the ID of Fond is 60:

Scope2apeEAD 05.jpg

Select the record

Then select the record in the tree that you would like to export by pressing F7. In the screenshot below is selected: National Archives of Hungarian (Magyar Nemzeti Levéltár) on the top level. After pressing F7, a popup window will show the details of the selected record. What you need, is the Record ID (Rekord azonosító). In this case: it is 49:

Scope2apeEAD 06.jpg

Create the export

To make an export two files are necessary:

SQL file

SET      PAGESIZE      0
SET      ECHO          OFF
set      trimspool     on
SET      TERMOUT       OFF
set      linesize      32767
set      long          32000

  delete from tbk_ead_export;
  pkk_export.ape_ead_export('Magyar Nemzeti Leveltar','1014 Budapest, Becsi kapu_ter 2-4.',687005);

column arch_txt format a32767
spool ead_export.xml;
select text from tbk_ead_export order by linenum;
spool off;

Batch file

@echo on
rem --------------------------------------------
rem Set the parameters before running
rem --------------------------------------------
rem schema_nm is the name of the database scheme.
rem schema_tns is the instant name of the database.
rem The program has to be started in the library, where 
rem the eag.sql script file can also be found.

set schema_nm=MNLPRD
set schema_pwd=archvsc
set schema_tns=PRD_SCOPEARCHIV
rem set schema_tns=ELKA

sqlplus -S "%schema_nm%/%schema_pwd%@%schema_tns%" @ape_ead_exp_MNL.sql


The batch file sets the parameters of reaching the Oracle, then it starts the sql script.

You can modify the parameters between the brackets to set what you would like to export. In this example is already set the Record: 49, and the depth: 60 (Fond) of the sql script. You must keep the program open till it finishes your xml export.