Module: Hydra::Works::FileSetBehavior
- Extended by:
- ActiveSupport::Concern
- Included in:
- FileSet
- Defined in:
- lib/hydra/works/models/concerns/file_set_behavior.rb
Overview
This module provides all of the Behaviors of a Hydra::Works::GenericFile
behavior:
1) Hydra::Works::FileSet can contain (pcdm:hasFile) Hydra::PCDM::File (inherits from Hydra::PCDM::Object)
2) Hydra::Works::FileSet can contain (pcdm:hasRelatedFile) Hydra::PCDM::File (inherits from Hydra::PCDM::Object)
3) Hydra::Works::FileSet can aggregate (pcdm:hasMember) Hydra::Works::FileSet
4) Hydra::Works::FileSet can NOT aggregate anything other than Hydra::Works::FileSets
5) Hydra::Works::FileSet can have descriptive metadata
6) Hydra::Works::FileSet can have access metadata
Instance Method Summary collapse
-
#collection? ⇒ Boolean
Whether this instance is a Hydra::Works Collection.
-
#file_set? ⇒ Boolean
Whether this instance is a Hydra::Works::FileSet.
- #in_works ⇒ Object
-
#work? ⇒ Boolean
Whether this instance is a Hydra::Works Generic Work.
Instance Method Details
#collection? ⇒ Boolean
Returns whether this instance is a Hydra::Works Collection.
32 33 34 |
# File 'lib/hydra/works/models/concerns/file_set_behavior.rb', line 32 def collection? false end |
#file_set? ⇒ Boolean
Returns whether this instance is a Hydra::Works::FileSet.
42 43 44 |
# File 'lib/hydra/works/models/concerns/file_set_behavior.rb', line 42 def file_set? true end |
#in_works ⇒ Object
46 47 48 |
# File 'lib/hydra/works/models/concerns/file_set_behavior.rb', line 46 def in_works ordered_by.select { |parent| parent.class.included_modules.include?(Hydra::Works::WorkBehavior) }.to_a end |
#work? ⇒ Boolean
Returns whether this instance is a Hydra::Works Generic Work.
37 38 39 |
# File 'lib/hydra/works/models/concerns/file_set_behavior.rb', line 37 def work? false end |