All Versions
- DSpace 7.x (Current Release)
- DSpace 8.x (Unreleased)
- DSpace 6.x (EOL)
- DSpace 5.x (EOL)
- More Versions...
...
A talk on Configurable Entities was also presented at DSpace 7 at OR2021
DSpace entities fully support versioning. For the most part, this works like any other item. For example, when creating a new version of an item, a new item is created and all metadata values of the preceding item are copied over to the new item. Special care was taken to version relationships between entities.
To understand how versioning between entities with relationships works, let's walk through the following example:
Consider Volume 1.1 (left side) and Issue 1.1 (right side). Both are archived and both are the first version. Note that on the arrow, representing the relation between the volume and the issue, two booleans and two numbers are indicated.
(v)
is true if and only if volume 1.1 is the latest version that is relevant to issue 1 (even though it may be possible that volume 1.2, the second version of volume 1, exists). This means that on the item page of issue 1.1, a link to the item page of volume 1.1 should be displayed. It also means that searching for (the uuid of) issue 1.1 should yield volume 1.1.(i)
is true if and only if issue 1.1 is the latest version that is relevant to volume 1.1 (even though it may be possible that issue 1.1, the second version of issue 1, exists). This means that on the item page of volume 1.1, a link to the item page of issue 1.1 should be displayed. It also means that searching for (the uuid of) volume 1.1 should yield issue 1.1.(v)
indicates the place at which the virtual metadata representing this relationship (if any) will appear on volume 1.1. E.g. using the out-of-the-box configuration in virtual-metadata.xml
, metadata field publicationissue.issueNumber
of issue 1.1 would appear as metadata field publicationissue.issueNumber
on volume 1.1 on place 0 (i.e. as the first metadata value).(i)
indicates the place at which the virtual metadata representing this relationship (if any) will appear on issue 1.1. E.g. using the out-of-the-box configuration in virtual-metadata.xml
, metadata field publicationvolume.volumeNumber
of volume 1.1 would appear as metadata field publicationvolume.volumeNumber
on issue 1.1 on place 0 (i.e. as the first metadata value).With the groundwork out of the way, let's see what happens when we create a new version of volume 1.1. The new version is not yet archived, because it still has to be edited in the submission UI.
At this moment, when viewing the item page of issue 1.1, the user should only see volume 1.1 (as volume 1.2 is not yet archived). When viewing the item page of volume 1.1, nothing has changed: only a link to issue 1.1 will appear. When viewing the item page of volume 1.2 (e.g. as an admin), a link to issue 1.1 will appear as well.
As soon as volume 1.2 is deposited (archived), the "latest status" of both volume 1.1 and volume 1.2 are updated. When viewing the item page of issue 1.1, volume 1.2 should be visible. When viewing the item pages of the volumes, nothing has changed.
Let's create another version of the volume (not archived):
And after archiving volume 1.3:
What happens if we create a new version of issue 1.1?
Only the relationship with volume 1.3 is copied. For issue 1.1, no relationship was displayed with volume 1.1 and 1.2. (The relationships still exist in the database, but are not visible in the UI.). For volume 1.1, a relationship to issue 1.1 remains present, but it should not be updated to issue 1.2. For issue 1.2, these relationships are longer relevant, so they are not copied.
On the item pages of volume 1.1, volume 1.2 and volume 1.3, you should see issue 1.1 (as 1.2 is not archived yet)
Because issue 1.2 is not yet archived, all volumes are still pointing to issue 1.1. Let's archive it:
Now on the item pages of volume 1.1 and volume 1.2, you should see issue 1.1; it's the latest issue at the time that those volumes were superseded by volume 1.3. On the item page of volume 1.3, you'll see issue 1.3. On the item page of issue 1.1 you'll still see volume 1.3 as well.
If you have a closer look at items with relationships, you'll notice two categories of metadata fields that are controlled by DSpace:
relation.*
fields, for example relation.isIssueOfJournalVolume
on volume itemsrelation.*.latestForDiscovery
fields, for example relation.isIssueOfJournalVolume.latestForDiscovery
on volume itemsMetadata fields of the first category (relation.*
) contain all uuids of related items that the current item can see. I.e. a relationship has to exist between the current item and the other item, and the other item needs to have "latest status" for that specific relationship.
As an example take the following state of the previous section:
Item issue 1.1 will contain metadata field relation.isJournalVolumeOfIssue
with as value the uuid of volume 1.3. Volume 1.1 and 1.2 are not included because they don't have "latest status" on the relevant relationships.
Metadata fields of the second category (relation.*.latestForDiscovery
) contain all uuids of the items for which the current item is visible. I.e. a relationship has to exist between the current item and the other item, and the current item needs to have "latest status" for that specific relationship. These fields are particularly important for indexing and search, because they allow to us to surface all the items that a particular item is referring to.
Continuing on the example above, issue 1.1 will have metadata field relation.isJournalVolumeOfIssue.latestForDiscovery
containing the uuids of volume 1.1 and 1.2.
With issue 1.1 containing volume 1.1 and 1.2 in relation.isJournalVolumeOfIssue.latestForDiscovery
, a search on the volume 1.1 page for all issues containing volume 1.1 will display issue 1.1 thanks to this setup.
DSpace contains a bunch of example entity types that support versioning out of the box. What follows is an overview of the requirements to make entity versioning work.
config/registries/relationship-formats.xml
. E.g. relation.isAuthorOfPublication
, relation.isAuthorOfPublication.latestForDiscovery
, relation.isPublicationOfAuthor
and relation.isPublicationOfAuthor.latestForDiscovery
latestVersion:true
in discovery.xml
. This will be the default search, which ensures older versions are not shownlatestVersion:true
. This should be used for item pages displaying the related items to the current item using the discovery search.<entity-type>
and discovery config <entity-type>Relationships
for that purpose.Note that versioning support is enabled by default, but can be turned off by setting versioning.enabled = false
in versioning.cfg
or local.cfg
. For more details on item versioning, see: https://wiki.lyrasis.org/display/DSDOC7x/Item+Level+Versioning.