Module: ActiveFedora::WithMetadata

Extended by:
ActiveSupport::Autoload, ActiveSupport::Concern
Defined in:
lib/active_fedora/with_metadata/default_schema.rb,
lib/active_fedora/with_metadata.rb,
lib/active_fedora/with_metadata/metadata_node.rb,
lib/active_fedora/with_metadata/sweet_jpl_terms.rb,
lib/active_fedora/with_metadata/default_strategy.rb,
lib/active_fedora/with_metadata/default_metadata_class_factory.rb

Overview

This builds classes for metadata nodes (nodes that describe a binary)

Defined Under Namespace

Modules: ClassMethods Classes: DefaultMetadataClassFactory, DefaultSchema, DefaultStrategy, MetadataNode, SweetJPLTerms

Instance Method Summary collapse

Instance Method Details

#create_or_updateObject



21
22
23
24
25
26
# File 'lib/active_fedora/with_metadata.rb', line 21

def create_or_update(*)
  return unless super && !new_record?
  # TODOs captured as https://github.com/samvera/active_fedora/issues/1331
  . = described_by # TODO: only necessary if the URI was < > before
  .save # TODO: if changed?
end

#metadata_nodeObject



17
18
19
# File 'lib/active_fedora/with_metadata.rb', line 17

def 
  @metadata_node ||= self.class..new(self)
end