NAH Scope2apeEAD export

From Archives Portal Europe Wiki
Revision as of 16:13, 24 April 2017 by Admin (Talk | contribs) (Execution of the procedure)

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: info@mnl.gov.hu.

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>
</pre/>
For instance if the field value is: "Hungarian":
<pre>
<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 we must know what depth of the ScopeArchiv tree we would like to export. In the screenshot below: I would like to make an export on Fond level. In this case, the ID of Fond is 60:



You have to start the batch file that contains the following:

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

set NLS_LANG=HUNGARIAN_HUNGARY.AL32UTF8
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

pause

The batch file sets the parameters of reaching the Oracle, then it starts the sql script containing the following (note: information between round brackets might need changing):

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

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

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

In this file beside the name and address of the archives you have to specify the sA identifier of the unit from which it is exported.

The last parameter of the stored procedure shows the highest number of the exported record units according to the given levels and the predetermined order of the levels.