Skip to content

Usage Examples

Ronan McHugh edited this page Mar 13, 2015 · 2 revisions

This page shows how to use rdf-vocab in your own projects. Feel free to expand this guide or ask on the IssueTracker if your use case isn't covered here.

Using with Hydra/ActiveFedora

You can use rdf-vocab to gain access to a number of RDF vocabularies for use in defining your ActiveFedora models. For example, if you want to define a Person object using MADS RDF properties:

class Person < ActiveFedora::Base
  property :family_name, predicate: ::RDF::Vocab::MADS.FamilyName, multiple: false
  property :personal_name, predicate: ::RDF::Vocab::MADS.PersonalName, multiple: false
end
Clone this wiki locally