Versions Compared

Key

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

...

You can also design your own model from scratch (see "Designing your own model" section below).  So, feel free to start by modifying relationship-types.xml, or creating your own model based on the relationship-types.dtd.

A simple XML configuration file is used to determine the relations. This configuration is read into the database (making modeling the data from the UI possible in future versions as well). A sample of how to define a relationship between Publication and Person is shown below:

Code Block
<!-- This relationship defines both the Publication and Person Entities, along with how they are related together. -->
<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>
</relationships>

2. Import entity model into the database

...

  • Similar to the default relationship-types.xml, configure a relationship type per connection between 2 entity typestwo Entity Types
  • Include the 2 entity type two Entity Type names which are being connected.
  • Determine a clear an unambiguous name for the relation in both directions
  • Optionally: determine the cardinality (min/max occurrences) for the relationships
  • Optionally: determine default behavior for copying metadata if the relationship is deleted

...

  • Configure the discovery facets, filters, sort options, …
    • The facets for a Person can be job title, organization, project, …
    • The filters for a Person can be person.familyName, person.givenName, …

Additional Technical Details

The original Entities design document is available in Google Docs at: https://docs.google.com/document/d/1wEmHirFzrY3qgGtRr2YBQwGOvH1IuTVGmxDIdnqvwxM/editWe are working on pulling that information into this Wiki space as a final home, but currently some technical details exist only in that document  While this content has been copied into the DSpace wiki, the file remains available as needed.

A talk on Configurable Entities was also presented at DSpace 7 at OR2021

...