Versions Compared

Key

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

...

Primary is used to specify the primary bitstream.

relationships file

Note
Introduced in 7.1.  Currently the 'relationships' file is only supported on import ('add' mode) of an SAF package.

The optional relationships file enumerates the relationships of this Entity to other Entities (either already in the system, or also specified in your SAF import batch).  This allows entities to be linked to new or existing entities during import. Entities can be linked to other entitiess entities in this import set by referring to their import subfolder name. Because relationships can only be created for Entities, it can only be used when importing Configurable Entities.

Each line in the file contains a relationship type key and an item identifier in the following format:

Code Block
relation.<relation_key> <handle|uuid|folderName:import_item_folder|schema.element[.qualifier]:value>

The input_item_folder should refer the folder name of another item in this import batch. Example:

Code Block
relation.isAuthorOfPublication 5dace143-1238-4b4f-affb-ed559f9254bb
relation.isAuthorOfPublication 123456789/1123
relation.isOrgUnitOfPublication folderName:item_001
relation.isProjectOfPublication project.identifier.id:123
relation.isProjectOfPublication project.identifier.name:A Name with Spaces

...

Info
titleDon't forget Entities require a "dspace.entity.type" metadata field

Remember, if you are creating new Entities via an SAF package, those Entities MUST specify a "dspace.entity.type" metadata field.  Because this metadata field is in the "dspace" schema, it MUST be specified in a "metadata_dspace.xml", similar to:

Code Block
titlemetadata_dspace.xml
<dublin_core schema="dspace">
  <dcvalue element="entity" qualifier="type">Publication</dcvalue>
</dublin_core>



Note
titleRelationships to existing Entities can also be created via metadata_relation.xml

If you already know the UUID of an existing Entity that you want to relate to, you can also create/update the "metadata_relation.xml" file to add/update the relationship, similar to:

Code Block
titlemetadata_relation.xml
<dublin_core schema="relation">
  <dcvalue element="isAuthorOfPublication">5dace143-1238-4b4f-affb-ed559f9254bb</dcvalue>
</dublin_core>

The "relationships" file is primarily for creating relationships between Entities in the same import batch. Of course, you can also choose to use the "relationships" file to create new relationships to existing Entities instead of creating/updating the "metadata_relation.xml" file.  The main advantage of the "metadata_relation.xml" file is that it is used both on export and import, while the "relationships" file is only used on import at this time.


Configuring metadata_[prefix].xml for a Different Schema

...