Class: Ddr::Models::Base
- Inherits:
-
ActiveFedora::Base
- Object
- ActiveFedora::Base
- Ddr::Models::Base
- Includes:
- AccessControllable, Describable, EventLoggable, FileManagement, FixityCheckable, Governable, HasAdminMetadata, HasProperties, HasThumbnail, Indexing, Licensable, Hydra::Validations
- Defined in:
- lib/ddr/models/base.rb
Direct Known Subclasses
Constant Summary
Constants included from Auth::LegacyRoles
Auth::LegacyRoles::LEGACY_ROLES
Constants included from IndexFields
IndexFields::ACTIVE_FEDORA_MODEL, IndexFields::COLLECTION_URI, IndexFields::CONTENT_CONTROL_GROUP, IndexFields::CONTENT_SIZE, IndexFields::CONTENT_SIZE_HUMAN, IndexFields::DEFAULT_LICENSE_DESCRIPTION, IndexFields::DEFAULT_LICENSE_TITLE, IndexFields::DEFAULT_LICENSE_URL, IndexFields::FILE_GROUP, IndexFields::FILE_USE, IndexFields::HAS_MODEL, IndexFields::IDENTIFIER, IndexFields::INTERNAL_URI, IndexFields::IS_ATTACHED_TO, IndexFields::IS_EXTERNAL_TARGET_FOR, IndexFields::IS_GOVERNED_BY, IndexFields::IS_MEMBER_OF, IndexFields::IS_MEMBER_OF_COLLECTION, IndexFields::IS_PART_OF, IndexFields::LAST_FIXITY_CHECK_ON, IndexFields::LAST_FIXITY_CHECK_OUTCOME, IndexFields::LAST_VIRUS_CHECK_ON, IndexFields::LAST_VIRUS_CHECK_OUTCOME, IndexFields::LICENSE_DESCRIPTION, IndexFields::LICENSE_TITLE, IndexFields::LICENSE_URL, IndexFields::LOCAL_ID, IndexFields::MEDIA_MAJOR_TYPE, IndexFields::MEDIA_SUB_TYPE, IndexFields::MEDIA_TYPE, IndexFields::OBJECT_CREATE_DATE, IndexFields::OBJECT_MODIFIED_DATE, IndexFields::OBJECT_PROFILE, IndexFields::OBJECT_STATE, IndexFields::ORDER, IndexFields::PERMANENT_ID, IndexFields::PERMANENT_URL, IndexFields::TITLE, IndexFields::WORKFLOW_STATE
Constants included from FileManagement
FileManagement::EXTERNAL_FILE_PERMISSIONS
Instance Method Summary collapse
- #association_query(association) ⇒ Object
- #copy_admin_policy_or_permissions_from(other) ⇒ Object
-
#model_pid ⇒ Object
e.g., “Collection duke:1”.
Methods included from HasAdminMetadata
#assign_permanent_id!, #permanent_id_manager, #roles, #workflow
Methods included from Auth::LegacyRoles
#legacy_downloader_to_resource_roles, #principal_has_role?, #principals
Methods included from Indexing
#identifier_sort, #index_fields, #title_display, #to_solr
Methods included from IndexFields
Methods included from FileManagement
#add_external_datastream, #add_external_file, #add_file, #create_external_file_path!, #external_datastream_file_paths, #external_datastreams, #generate_external_file_path
Methods included from FixityCheckable
#datastreams_to_validate, #fixity_check, #fixity_checks
Methods included from EventLoggable
#events, #has_events?, #notify_event, #update_events
Methods included from HasThumbnail
#copy_thumbnail_from, #thumbnail_changed?
Methods included from Licensable
Methods included from AccessControllable
#copy_permissions_from, #set_initial_permissions
Methods included from Governable
#copy_admin_policy_from, #inherited_license, #inherited_permissions, #inherited_rights
Methods included from Describable
#desc_metadata_attributes, #desc_metadata_terms, #desc_metadata_values, #desc_metadata_vocabs, #has_desc_metadata?, #set_desc_metadata, #set_desc_metadata_values
Instance Method Details
#association_query(association) ⇒ Object
26 27 28 29 |
# File 'lib/ddr/models/base.rb', line 26 def association_query(association) # XXX Ideally we would include a clause to limit by AF model, but this should suffice ActiveFedora::SolrService.construct_query_for_rel(reflections[association].[:property] => internal_uri) end |
#copy_admin_policy_or_permissions_from(other) ⇒ Object
22 23 24 |
# File 'lib/ddr/models/base.rb', line 22 def (other) (other) unless copy_admin_policy_from(other) end |
#model_pid ⇒ Object
e.g., “Collection duke:1”
32 33 34 |
# File 'lib/ddr/models/base.rb', line 32 def model_pid [self.class.to_s, pid].join(" ") end |