Import Mapping for pulling media files

Dear support,

literally since days, I work on an input mapping for zotero outputs.

Context:

What I am trying to do: I would like to use Zoteros to prepare and edit metadata and to attach media-files to the entries. Then, once i have prepared a collection of items i'd like to export the data and upload it to CA, creating object-entries and object-representations containing the linked media.

Now I stumble over several chalenges. There is an extensive list of splitters and options in the Documentation, however, the availlable template/example files for import-mappings reflect just a tiny fraction of them and I am lost, trying to figure out how to come to a working mapping from the descriptions provided.

So i come with several questions and apologise for that. I ordered them according to urgency.

1 - Most important for me: Media uploads

I see the information given on automatically pulling media from the upload folder, but i do not understand how to apply it correctly.

What I aim for:

I have for each object to be imported zero, one or several media files referenced in my source-spreadsheet-cell like this: "/home/user/Dokumente/zotero/storage/XCKSW8WL/Blanco und Peeren - 2013 - The spectralities reader ghosts and haunting in c.pdf"

and the files are availlable in Providence import Folder under: [import]/zotero/XCKSW8WL/Blanco und Peeren - 2013 - The spectralities reader ghosts and haunting in c.pdf

I would like to import them, and add them as an object representation to the object created in the same line, using as preferred label: "Blanco und Peeren - 2013 - The spectralities reader ghosts and haunting in c.pdf" and as idno: "XCKSW8WL"

You will find 4 lines of example data in the attached file.

I know my provided mapping is no good, i apologize! it is not that i did not try, but i went back to isolate and try simpler mappings with the media file directly in the import directory, but even that failed to attaching an object-representation to the imported object, so i decided to leave it at that and upload it as-is.

2 - Originally my first question was, how to use the entity splitter to retrieve the different parts of a name.

EDIT: To my surprise the entity splitter automatically splits names in the format "surname, forename" correctly. Still I would like to know how to manually define the splitting in case this would fail and to understand the principle for other use cases. One part of my confusion is, that usually I look up the codes for metadata elements and list-items over the providence UI, but as it seems, some fields do not appear there. from the UI-editor I can deduce that the name-container is called preferred_labels but i still fail to get accurat information about the code of the subfields (surname, forename, etc.). The other part of my confusion is about figuring out the syntax to do this kind of sub-splitting. When I try to deduce it from the example given in the docu for dimensions-splitting, I end up with something like:

{   "relationshipType": "creator",
   "entityType": "ind",
"delimiter":"; ",
"attributes":{"delimiter":",", "elements":["preferred_labels":"surname","preferred_labels":"forename"]}
}

which seems weird. So I guess what I do not understand is, how to represent the values in the json string in the case of "sub-splitting".

3 - create child-objects from notes.

Finally, I would like to create child objects from a "notes" field, in a way, that every <p>...</p> tag generates an object, putting its content into the description field and generating idno and title from the first 20 / 80 characters of this content. I dont expect you, to figure this one out for me in detail, but maybe you can tell me, if there is an option to automatically generate idnos from a random hash or by taking the first 20 characters (or so) of the imported text?

Thank you in advance for your patience!

Comments

  • Hi,

    1. You'd need to rewrite those paths to something that points to a location on the server within the CA import directory (typically the import/ directory within your installation root directory). Then you'd use an objectRepresentation splitter to import them.
    2. You can control how values are assigned to an entity's preferred label by explicitly mapping individual fields to surname, forename, etc. This assumes you have the pieces of the names separated in your data source. If the name you're importing is a single piece of text text the splitter will split it using a standard heuristic and place the elements into what it thinks are the appropriate fields. There are not exposed options to control this. You can use the entity splitter displaynameFormat option to control how the displayname value for entity is created from the split name elements, however. See https://manual.collectiveaccess.org/import/splitters.html?highlight=displaynameformat#displaynameformat for what the values for this option are.
    3. This is not currently supported.
  • Hi seth,

    thanks for your answer!

    regarding 1. I have no problem rewriting the paths to correct paths inside the import directory of our installation. What I have trouble with, is how to reference the paths in my mapping using the objectRepresentation splitter!

    could you write me an example for this? (ideally one, that works even if there are several media files referenced in one cell?)

  • So what do you need exactly? A mapping that imports objects along with media? Is there any representation-level metadata to apply alongside the media?

Sign In or Register to comment.