Unreleased Documentation

This documentation is unreleased and still in development. It may describe features which are not yet released in DSpace.
Looking for another version? See all documentation

This page describes an out-of-the-box Configurable Entities use case which is to represent research data similar to a "Current Research Information System" (CRIS) or "Research Information Management System" (RIMS).

Structure

The structure displays the types of entities, and the relations between them.

  • Each publication can link to projects, people and org units
  • Each person can link to projects, publications and org units
  • Each project can link to publications, people and org units
  • Each org units can link to projects, people and publications

Model storage

Storage in the database

The entity types represent the 4 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
  2 | Person
  3 | Project
  4 | OrgUnit

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       
----+-----------+------------+------------------------+------------------------
  1 |         1 |          2 | isAuthorOfPublication  | isPublicationOfAuthor
  2 |         1 |          3 | isProjectOfPublication | isPublicationOfProject
  3 |         1 |          4 | isOrgUnitOfPublication | isPublicationOfOrgUnit
  4 |         2 |          3 | isProjectOfPerson      | isPersonOfProject
  5 |         2 |          4 | isOrgUnitOfPerson      | isPersonOfOrgUnit
  6 |         3 |          4 | isOrgUnitOfProject     | isProjectOfOrgUnit

Data Model Design in XML

The XML file designed to create the rows in the database mentioned above

<relationships>
    <type>
        <leftType>Publication</leftType>
        <rightType>Person</rightType>
        <leftLabel>isAuthorOfPublication</leftLabel>
        <rightLabel>isPublicationOfAuthor</rightLabel>
        <leftCardinality>
            <min>0</min>
            <!--<max></max> not specified, unlimited-->
        </leftCardinality>
        <rightCardinality>
            <min>0</min>
            <!--<max></max> not specified, unlimited-->
        </rightCardinality>
    </type>
    <type>
        <leftType>Publication</leftType>
        <rightType>Project</rightType>
        <leftLabel>isProjectOfPublication</leftLabel>
        <rightLabel>isPublicationOfProject</rightLabel>
        <leftCardinality>
            <min>0</min>
        </leftCardinality>
        <rightCardinality>
            <min>0</min>
        </rightCardinality>
    </type>
    <type>
        <leftType>Publication</leftType>
        <rightType>OrgUnit</rightType>
        <leftLabel>isOrgUnitOfPublication</leftLabel>
        <rightLabel>isPublicationOfOrgUnit</rightLabel>
        <leftCardinality>
            <min>0</min>
        </leftCardinality>
        <rightCardinality>
            <min>0</min>
        </rightCardinality>
    </type>
    <type>
        <leftType>Person</leftType>
        <rightType>Project</rightType>
        <leftLabel>isProjectOfPerson</leftLabel>
        <rightLabel>isPersonOfProject</rightLabel>
        <leftCardinality>
            <min>0</min>
        </leftCardinality>
        <rightCardinality>
            <min>0</min>
        </rightCardinality>
    </type>
    <type>
        <leftType>Person</leftType>
        <rightType>OrgUnit</rightType>
        <leftLabel>isOrgUnitOfPerson</leftLabel>
        <rightLabel>isPersonOfOrgUnit</rightLabel>
        <leftCardinality>
            <min>0</min>
        </leftCardinality>
        <rightCardinality>
            <min>0</min>
        </rightCardinality>
    </type>
    <type>
        <leftType>Project</leftType>
        <rightType>OrgUnit</rightType>
        <leftLabel>isOrgUnitOfProject</leftLabel>
        <rightLabel>isProjectOfOrgUnit</rightLabel>
        <leftCardinality>
            <min>0</min>
        </leftCardinality>
        <rightCardinality>
            <min>0</min>
        </rightCardinality>
    </type>
</relationships>

Importing this file created the database tables

Relation Storage

Storage in the database

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 the item (a publication)

https://demo.dspace.org/entities/publication/e98b0f27-5c19-49a0-960d-eb6ad5287067

is related to the item (a person)

https://demo.dspace.org/entities/person/0ffbee3f-e7ea-42bc-92fe-2fbef1a52c0f

via the relation isAuthorOfPublication.

select id, left_id, type_id, right_id from relationship;

 id |               left_id           | type_id |               right_id         
----+---------------------------------+---------+--------------------------------
 52 | e98b0f27-5c19-960d-eb6ad5287067 |       1 | 0ffbee3f-e7ea-92fe-2fbef1a52c0f
 53 | e98b0f27-5c19-960d-eb6ad5287067 |       1 | 5a3f7c7a-d3df-b8a2-f00ede62c60a
 66 | 72635f7f-37b5-b4f2-5ff45d97a09b |       1 | 0ffbee3f-e7ea-92fe-2fbef1a52c0f
 67 | 674f695e-8001-8f9c-095c536a6bcb |       1 | 5a3f7c7a-d3df-b8a2-f00ede62c60a
 68 | a64719f8-ba7b-8eb6-f8feb0c000b7 |       1 | f2235aa6-6fe7-a690-598b72dd8e44
 69 | a64719f8-ba7b-8eb6-f8feb0c000b7 |       1 | 0ffbee3f-e7ea-92fe-2fbef1a52c0f
 70 | e98b0f27-5c19-960d-eb6ad5287067 |       2 | 0de99067-c898-a82c-9555f3311288
 71 | e7bd0d24-e83a-bc0c-8aaaeb19dc7d |       2 | 0de99067-c898-a82c-9555f3311288
 76 | 2f4ec582-109e-a94a-b7d7615a8c69 |       2 | 18e7924c-f15b-9fe3-3de370bccc97
 77 | 99c2e55c-6326-9f36-fcac333b0e8c |       2 | 18e7924c-f15b-9fe3-3de370bccc97
 78 | 96715576-3748-ad45-001646632963 |       2 | 18e7924c-f15b-9fe3-3de370bccc97
 79 | e98b0f27-5c19-960d-eb6ad5287067 |       3 | d30de96b-1e76-8ef9-ab426b6f9763
 80 | e98b0f27-5c19-960d-eb6ad5287067 |       3 | 506a7e54-8d7c-8636-d5f6411483de
 81 | e98b0f27-5c19-960d-eb6ad5287067 |       3 | c216201f-ed10-b0e0-5a065405bd3e
 82 | 96715576-3748-ad45-001646632963 |       3 | d30de96b-1e76-8ef9-ab426b6f9763
 95 | a64719f8-ba7b-8eb6-f8feb0c000b7 |       3 | c216201f-ed10-b0e0-5a065405bd3e
 96 | a64719f8-ba7b-8eb6-f8feb0c000b7 |       3 | d30de96b-1e76-8ef9-ab426b6f9763
 97 | 0de99067-c898-a82c-9555f3311288 |       6 | d30de96b-1e76-8ef9-ab426b6f9763

Virtual Metadata

For publications, it’s relevant to include the names of the related authors 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/e98b0f27-5c19-49a0-960d-eb6ad5287067 where dc.contributor.author is populated with the name of the related author. dc.contributor.other is also populated with the name of the Org Unit here

For a person, it’s relevant to include the names of the org units 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/f2235aa6-6fe7-4174-a690-598b72dd8e44 where person.contributor.other is populated with the name of the related Org Unit

Since this is virtual metadata, the metadata is not duplicated

The configuration of this virtual metadata can be found at https://github.com/DSpace/DSpace/blob/main/dspace/config/spring/api/virtual-metadata.xml

  • No labels