This page describes an out-of-the-box Configurable Entities use case which is to represent a "Compound Journal" hierarchy. |
The structure displays the types of entities, and the relations between them.
Each Journal consists of multiple volumes, and each volume contains multiple issues.

The entity types represent the 3 blocks from the structure.
The labels displayed here will also be stored in the item metadata to easily identify the type of item.
select * from entity_type; id | label ----+--------------- 1 | Publication 5 | Journal 6 | JournalVolume 7 | JournalIssue |
The relationship types are the lines connecting the blocks from the structure. The cardinality columns have been omitted in this document to reduce the size of the table. The labels displayed here will also be used for e.g. the DSpace CSV import to build relations and for displaying the relations in REST.
select id, left_type, right_type, left_label, right_label from relationship_type; id | left_type | right_type | left_label | right_label ----+-----------+------------+-----------------------------+------------------------ 7 | 5 | 6 | isVolumeOfJournal | isJournalOfVolume 8 | 6 | 7 | isIssueOfJournalVolume | isJournalVolumeOfIssue 9 | 7 | 1 | isPublicationOfJournalIssue | isJournalIssueOfPublication |
The XML file designed to create the rows in the database mentioned above.
<?xml version="1.0" encoding="UTF-8"?> <relationships> <type> <leftType>Journal</leftType> <rightType>JournalVolume</rightType> <leftLabel>isVolumeOfJournal</leftLabel> <rightLabel>isJournalOfVolume</rightLabel> <leftCardinality> <min>0</min> <!--<max></max> not specified, unlimited--> </leftCardinality> <rightCardinality> <min>1</min> <!--each volume should have one journal--> <max>1</max> <!--each volume should have one journal--> </rightCardinality> </type> <type> <leftType>JournalVolume</leftType> <rightType>JournalIssue</rightType> <leftLabel>isIssueOfJournalVolume</leftLabel> <rightLabel>isJournalVolumeOfIssue</rightLabel> <leftCardinality> <min>0</min> </leftCardinality> <rightCardinality> <min>1</min> <!--each issue should have one volume—> <max>1</max> <!--each volume should have one journal--> </rightCardinality> </type> <type> <leftType>JournalIssue</leftType> <rightType>Publication</rightType> <leftLabel>isPublicationOfJournalIssue</leftLabel> <rightLabel>isJournalIssueOfPublication</rightLabel> <leftCardinality> <min>0</min> </leftCardinality> <rightCardinality> <min>0</min> <max>1</max> </rightCardinality> </type> </relationships> |
Importing this XML using the command:
[install_dir]/bin/dspace dsrun org.dspace.app.util.InitializeEntities -f [install_dir]/config/relationship-types.xml
creates the database tables.
The relations are the actual items which are connected, and contain a foreign key to both items, and to the relationship type. The place column has been omitted to reduce the size of the table. The item IDs have been reduced in size to reduce the size of the table.
The table below indicates in the first row that:
the item (a journal)
https://demo.dspace.org/entities/journal/d4af6c3e-53d0-4757-81eb-566f3b45d63a
is related to the item (a journal volume)
https://demo.dspace.org/entities/journalvolume/07c6249f-4bf7-494d-9ce3-6ffdb2aed538
via the relation isVolumeOfJournal.
The row ID 60 states the item (a journal volume)
https://demo.dspace.org/entities/journalvolume/07c6249f-4bf7-494d-9ce3-6ffdb2aed538
is related to the item (a journal issue)
https://demo.dspace.org/entities/journalissue/44c29473-5de2-48fa-b005-e5029aa1a50b
via the relation isIssueOfJournalVolume.
select id, left_id, type_id, right_id from relationship; id | left_id | type_id | right_id ----+---------------------------------+---------+-------------------------------- 56 | d4af6c3e-53d0-81eb-566f3b45d63a | 7 | 07c6249f-4bf7-9ce3-6ffdb2aed538 57 | d4af6c3e-53d0-81eb-566f3b45d63a | 7 | 66bb4e5d-b419-a648-f270a527f17c 58 | a23eae5a-7857-8e52-989436ad2955 | 7 | f9b89a11-b44e-a3b4-ab24a33553c7 59 | a23eae5a-7857-8e52-989436ad2955 | 7 | 343d3263-2733-9dc4-216a01b4a461 60 | 07c6249f-4bf7-9ce3-6ffdb2aed538 | 8 | 44c29473-5de2-b005-e5029aa1a50b 61 | 07c6249f-4bf7-9ce3-6ffdb2aed538 | 8 | c3076837-e5df-80bc-2661cd390a7b 62 | 66bb4e5d-b419-a648-f270a527f17c | 8 | a4a63ab5-8c0b-b5f7-5b5d9828cb69 63 | f9b89a11-b44e-a3b4-ab24a33553c7 | 8 | 77877343-3f75-9492-6ed7c98ed84e 64 | f9b89a11-b44e-a3b4-ab24a33553c7 | 8 | f4dcd8a6-4cc4-8bb9-a7e8202e05b0 65 | 343d3263-2733-9dc4-216a01b4a461 | 8 | b7003f66-80e9-99a2-3695e8150b80 66 | 343d3263-2733-9dc4-216a01b4a461 | 8 | db55298c-a21f-8793-a21f1194a226 141 | 44c29473-5de2-b005-e5029aa1a50b | 9 | e98b0f27-5c19-960d-eb6ad5287067 142 | c3076837-e5df-80bc-2661cd390a7b | 9 | 96715576-3748-ad45-001646632963 143 | a4a63ab5-8c0b-b5f7-5b5d9828cb69 | 9 | 047556d1-3d01-bc68-0cee7ad7ed4e |
For Journal Volumes, it’s relevant to include the ISSN and journal name of the parent journal in the metadata. A sample of this functionality can be seen at e.g. https://demo.dspace.org/server/#https://demo.dspace.org/server/api/core/items/66bb4e5d-b419-42b7-a648-f270a527f17c where journal.identifier.issn and journal.title is populated with the metadata of the parent journal
For Journal Issues, it’s relevant to include the volume number of the parent journal volume in the metadata. A sample of this functionality can be seen at e.g. https://demo.dspace.org/server/#https://demo.dspace.org/server/api/core/items/a4a63ab5-8c0b-4456-b5f7-5b5d9828cb69 where journalvolume.identifier.volume is populated with the metadata of the parent journal
Since this is virtual metadata, the metadata is not duplicated, but only displayed.
The configuration of this virtual metadata can be found at https://github.com/DSpace/DSpace/blob/main/dspace/config/spring/api/virtual-metadata.xml