module Hydra::PCDM

Constants

VERSION

Public Class Methods

collection?(collection) click to toggle source

model validations

# File lib/hydra/pcdm.rb, line 45
def self.collection?(collection)
  return false unless collection.respond_to? :type
  Array(collection.type).include? Vocab::PCDMTerms.Collection
end
file?(file) click to toggle source
# File lib/hydra/pcdm.rb, line 55
def self.file?(file)
  return false unless file.respond_to? :metadata_node
  Array(file.metadata_node.type).include? Vocab::PCDMTerms.File
end
object?(object) click to toggle source
# File lib/hydra/pcdm.rb, line 50
def self.object?(object)
  return false unless object.respond_to? :type
  Array(object.type).include? Vocab::PCDMTerms.Object
end