Comment #7 on issue 643 by [email protected]: add <physloc> support to EAD
import
http://code.google.com/p/qubit-toolkit/issues/detail?id=643
As we are using multi-level descriptions, we needed a way to import this
data for every record. After attempting the solution described in comment
#5 without success, our programmer devised the following workaround, which
unfortunately, required that we move our <physloc> data inside of our
<container> tags for import.
We separated these two sets of data using a special sequence of characters
(that is, a sequence that must not appear in any of the two fields ever);
in our case the special sequence was '---' (eg - <container>Box
4---<physloc>Archive Repository 4/4</physloc></container>).
Then following import, our programmer used a sql instruction to move/modify
the data to the proper field for location data, the MySQL table
physical_object_i18n in the ICA-Atom database. He chose to use Microsoft
Access as a front end to create the sql script, linking the database using
the official MySQL ODBC driver. (He said he chose Access for its
simplicity. He noted that the script can be created directly using the
native MySQL connection and its sql syntax.)
The resulting sql script is this:
----------------------------------------------------------
UPDATE physical_object_i18n SET physical_object_i18n.name =
Left([name],InStr(1,[name],"---")-1), physical_object_i18n.location =
Right([name],Len([name])-(InStr(1,[name],"---")+2));
----------------------------------------------------------
Note that the various substring functions and syntax used are
Access-specific.
Basically it does just two things:
- Replaces the 'name' field with what comes before the '---' sequence in
its value
- Moves to the 'location' field what comes after the '---' sequence in
the 'name' field value
The end result is that our location data displays in the appropriate place
in the container record, as well as immediately following the text of the
container text under "Physical Storage" on the archival description record
(but not on the container record). Interestingly, this text is still hidden
to the public but not to authenticated users, so we do lose some control
over access to this data.
--
You received this message because you are subscribed to the Google Groups "Qubit
Toolkit Issues" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to
[email protected].
For more options, visit this group at
http://groups.google.com/group/qubit-issues?hl=en.