Skip to content

PCDM Modeling

Thomas Johnson edited this page May 8, 2017 · 30 revisions

PCDM Modeling

Setup

Ensure the following runs green:

git checkout day1/pcdm/start
bundle
bundle exec rspec

New Requirement: Cover Subjects

The product owner has prioritized the following story from the backlog:

As a researcher, I need to find sheet music works for a project investigating their cover images. I want to be able to facet materials by the subjects depicted on their cover.

In the next sprint, we write a feature test and come up with a demo implementation that we think minimally addresses the requirements.

git checkout day1/pcdm/step1-feature_test
bundle exec rspec

Group Exercise: Make the feature test pass

Pre-written tests for this exercise are in day1/pcdm/step1-tests

What We Learn About Covers

This new feature is a huge success but introducing it, far from satisfying the user base, has made the collections usable to a new community of researchers interested in sheet music covers. A range of new use cases has emerged.

To start, covers need:

  1. Creator
  2. Description
  3. Subject

The collection maintainers are also starting to anticipate the need for higher quality scans of cover pages. They would like us to support covers as first class works. We realize this puts us firmly in modeling space.

PCDM Model

What is a Work?

MusicalWork.ancestors

A few notable ancestors:

  • Hyrax::BasicMetadata
  • Hyrax::WorkBehavior
  • Hyrax::Works::Metadata
  • Hydra::PCDM::PcdmBehavior
  • Hydra::PCDM::ObjectBehavior
  • Hydra::Works::WorkBehavior
bundle exec rake hydra:server
bundle exec rails c
obj = Hydra::PCDM::Object.create
col = Hydra::PCDM::Collection.create
Clone this wiki locally