Code: Version Build Status Coverage Status Code Climate

Docs: Apache 2.0 License Contribution Guidelines API Docs

Jump In: Slack Status

What is hydra-pcdm?

Samvera implementation of the Portland Common Data Model (PCDM)

Product Owner & Maintenance

hydra-pcdm is a Core Component of the Samvera community. The documentation for what this means can be found here.

Product Owner



The Samvera community is here to help. Please see our support guide.


Add these lines to your application's Gemfile:

  gem 'active-fedora', '~> 9.3'
  gem 'hydra-pcdm', '~> 0.9'

And then execute:

$ bundle install

Or install it yourself:

$ gem install hydra-pcdm

Access Controls

We are using Web ACL as implemented in hydra-access-controls.

Portland Common Data Model

Reference: Portland Common Data Model

Model Definition

PCDM Model Definition


Hydra::PCDM provides three core classes:


A Hydra::PCDM::File is a NonRDFSource (in LDP parlance) &emdash; a bitstream. You can use this to store content. A PCDM::File is contained by a PCDM::Object. A File may have some attached technical metadata, but no descriptive metadata. A Hydra::PCDM::Object may contain Files, may have descriptive metadata, and may declare other Objects as members (for complex object hierarchies). A Hydra::PCDM::Collection may contain other Collections or Objects but may not directly contain Files. A Collection may also have descriptive metadata.

Typically, usage involves extending the behavior provided by this gem. In your application you can write something like this:

class Book < ActiveFedora::Base
  include Hydra::PCDM::ObjectBehavior

class Collection < ActiveFedora::Base
  include Hydra::PCDM::CollectionBehavior

collection = Collection.create
book = Book.create

collection.members = [book]
# or: collection.members << book

file = book.files.build
file.content = "The quick brown fox jumped over the lazy dog."


This software has been developed by and is brought to you by the Samvera community. Learn more at the Samvera website.

Samvera Logo