Samvera and the Portland Common Data Model (PCDM)

FAQ

What does PCDM bring to the table for Samvera adopters?

PCDM provides a consistent baseline for modeling data: specifically files,Ā works (objects), and collections. The intent is to make it easier to shareĀ code between Samvera applications that may have very different content types, asĀ long as PCDM is used as the data model foundation.

Is there a plan to have a reference implementation of a Samvera application implementing PCDM?

Sufia will be the best example of what a newly installed Samvera applicationĀ that implements PCDM will look like. Note that the Sufia code in Github is notĀ a working Samvera application itself, but more of an applicationĀ generator. So you will have to follow the installation instructions on Sufia'sĀ homepage to get a working Samvera application to use as a referenceĀ implementation.

If you are looking for a reference implementation as code that you can browseĀ in Github (or elsewhere), there is nothing like that to date. Any suchĀ implementation is likely to come from a partner organization who has adoptedĀ a version of Samvera that uses PCDM. Use the Getting Started in the Samvera CommunityĀ to stay up to date on the progress of partner organizations.

How would I refactor my existing Samvera models to use PCDM?

This answer is likely to be different for nearly every Samvera application.Ā Since there were hardly any guidelines for modeling data in Samvera applicationsĀ prior to PCDM, each institution's implementation varies from the next, oftenĀ in incompatible ways. (Note that this is the very problem PCDM trying toĀ solve).

If you currently have a Sufia implementation, and wish to upgrade to a version using PCDM, the Sufia team does plan to have an upgrade guide.

If you wish to adapt an existing Samvera application that is not Sufia, then a basic outline of the refactoring process may look something like this:

  1. Identify the behaviors of your exsiting models, and match them to behaviors offered by PCDM classes and modules. This will involve becoming familiar with how PCDM components are organized, and how they fit together.
  2. Replace your existing model behaviors with those offered by PCDM. This will generally involve removing your own code, and including (or extending) the PCDM module (or class) that is appropriate to fulfill the behavior.
  3. For features that depend on your model behaviors, make any necessary adjustments to ensure those features still work using PCDM.

Note that without good test coverage already in place for your app, a successful refactor could prove to be extremely challenging.

Will it be possible to keep my existing Samvera application up to date without implementing PCDM?

Yes. PCDM will not be required by the core Samvera gems, and you can continue to maintain a Samvera application without implementing PCDM.

However, there is currently a lot of energy going into the PCDM-based stack,Ā and at this time, it appears that new features that involve interacting withĀ the data model layer will be written assuming a PCDM foundation. If you chooseĀ to implement (or maintain) a Samvera application with a non-PCDM-based data modelĀ layer, it may be very difficult to incorporate new features that come out ofĀ community efforts.


Is there a tutorial for PCDM or Hydra Works?

There is Dive into Hydra-Works tutorial which takes you through the basics of building models with Hydra-Works which is an extension of PCDM. Ā There is also the Dive into Curation Concerns tutorial that walks through adding a field to a stock Curation Concerns app.

PCDM Implementation

PCDM is implemented in Samvera as a new stack of gems:

  • ActiveFedora: still the foundation of the Samvera stack
  • Hydra::PCDM: adds basic PCDM models usable in any Ruby application
  • Hydra::Works: adds a toolkit of repository functionality, such as performing file characterization and generating derivatives
  • CurationConcerns: a Rails engine that provides a basic working application
  • Sufia 7: now built on top of CurationConcerns, provides social features,Ā self-deposit and proxy-deposit workflows

Resources

NOTE:Ā The documents linked to below are working documents, subject to change at any time.

CurationEngine & CurationConcerns: Breaking up Sufia, Worthwhile, Hydra::Works, etc.Ā ā€“ An outline of the process ofĀ implementing PCDM in Samvera, and breaking up existing functionality across new gems.

Code Shredding: Sufia and Hydra-Works Ā ā€“Ā A spreadsheet that describes where existing code will be refactored to, and which modules it will be mixed in to (i.e. with Ruby'sĀ include and extend).

Sufia - Worthwhile Alignment FactorsĀ ā€“ Spreadsheet that lists features from Sufia and Worthwhile, with suggestions and discussion on where the functionality should be implemented in the new Samvera gems.

Hydra::Works PCDM DiagramĀ ā€“Ā Boxes and arrows showing how PCDM defines relationships between models in Hydra::Works.

Hydra::PCDM Files in the RDF graphĀ ā€“ Boxes and arrows showing how files are modeled with PCDM, including which RDF types and properties are used.

CurationConcerns in Worthwhile and in Hydra::CurationConcernsĀ - Slides explaining how CurationConcerns work in Worthwhile, and how we might like them to work in Hydra::CurationConcerns.

SufiaĀ ā€“ Where to find the latest activity re: Sufia sprints

Hydra Works (github repo)Ā ā€“ Code for the hydra-works gem.

Hydra PCDM (github repo)Ā ā€“ Code for the hydra-pcdm gem.

Technical Metadata Application ProfileĀ ā€“ AĀ draft baseline application profile for technical metadata properties attached to binary objects in a repository.

File Use Vocabulary File Use VocabularyĀ ā€“ AĀ list of subclasses of pcdm:File that describe the role a pcdm:File plays within a pcdm:Object.

hydra-pesketti_v2.svgĀ ā€“ Figure which depicts the dependency relationships of the Hydra PCDM family of gems.Ā