Class: Component

Overview

A Component is a part of an Item; the principal content-bearing repository resource.

Examples: Page of a book, track of a recording, etc.

Constant Summary collapse

STRUCTURALLY_RELEVANT_DATASTREAMS =
[ Ddr::Datastreams::CAPTION, Ddr::Datastreams::CONTENT,
Ddr::Datastreams::INTERMEDIATE_FILE, Ddr::Datastreams::MULTIRES_IMAGE,
Ddr::Datastreams::STREAMABLE_MEDIA, Ddr::Datastreams::THUMBNAIL ]

Constants inherited from Ddr::Models::Base

Ddr::Models::Base::DEACCESSION, Ddr::Models::Base::DELETE, Ddr::Models::Base::INGEST, Ddr::Models::Base::UPDATE

Constants included from Ddr::Index::Fields

Ddr::Index::Fields::ACCESS_ROLE, Ddr::Index::Fields::ACTIVE_FEDORA_MODEL, Ddr::Index::Fields::ADMIN_SET, Ddr::Index::Fields::ADMIN_SET_FACET, Ddr::Index::Fields::ADMIN_SET_TITLE, Ddr::Index::Fields::AFFILIATION, Ddr::Index::Fields::AFFILIATION_FACET, Ddr::Index::Fields::ALEPH_ID, Ddr::Index::Fields::ALL_TEXT, Ddr::Index::Fields::ARRANGER_FACET, Ddr::Index::Fields::ASPACE_ID, Ddr::Index::Fields::ATTACHED_FILES_HAVING_CONTENT, Ddr::Index::Fields::BOX_NUMBER_FACET, Ddr::Index::Fields::CATEGORY_FACET, Ddr::Index::Fields::COLLECTION_FACET, Ddr::Index::Fields::COLLECTION_TITLE, Ddr::Index::Fields::COLLECTION_URI, Ddr::Index::Fields::COMPANY_FACET, Ddr::Index::Fields::COMPOSER_FACET, Ddr::Index::Fields::CONTENT_CONTROL_GROUP, Ddr::Index::Fields::CONTENT_CREATE_DATE, Ddr::Index::Fields::CONTENT_SIZE, Ddr::Index::Fields::CONTENT_SIZE_HUMAN, Ddr::Index::Fields::CONTRIBUTOR_FACET, Ddr::Index::Fields::CREATOR_FACET, Ddr::Index::Fields::DATE_FACET, Ddr::Index::Fields::DATE_SORT, Ddr::Index::Fields::DC_IS_PART_OF, Ddr::Index::Fields::DEPOSITOR, Ddr::Index::Fields::DISPLAY_FORMAT, Ddr::Index::Fields::DOI, Ddr::Index::Fields::EAD_ID, Ddr::Index::Fields::ENGRAVER_FACET, Ddr::Index::Fields::EXTRACTED_TEXT, Ddr::Index::Fields::FOLDER_FACET, Ddr::Index::Fields::FORMAT_FACET, Ddr::Index::Fields::GENRE_FACET, Ddr::Index::Fields::HAS_MODEL, Ddr::Index::Fields::ID, Ddr::Index::Fields::IDENTIFIER_ALL, Ddr::Index::Fields::ILLUSTRATED_FACET, Ddr::Index::Fields::ILLUSTRATOR_FACET, Ddr::Index::Fields::INGESTED_BY, Ddr::Index::Fields::INGESTION_DATE, Ddr::Index::Fields::INSTRUMENTATION_FACET, Ddr::Index::Fields::INTERNAL_URI, Ddr::Index::Fields::INTERVIEWER_NAME_FACET, Ddr::Index::Fields::IS_ATTACHED_TO, Ddr::Index::Fields::IS_EXTERNAL_TARGET_FOR, Ddr::Index::Fields::IS_FORMAT_OF, Ddr::Index::Fields::IS_GOVERNED_BY, Ddr::Index::Fields::IS_LOCKED, Ddr::Index::Fields::IS_MEMBER_OF, Ddr::Index::Fields::IS_MEMBER_OF_COLLECTION, Ddr::Index::Fields::IS_PART_OF, Ddr::Index::Fields::LANGUAGE_FACET, Ddr::Index::Fields::LANGUAGE_NAME, Ddr::Index::Fields::LAST_FIXITY_CHECK_ON, Ddr::Index::Fields::LAST_FIXITY_CHECK_OUTCOME, Ddr::Index::Fields::LAST_VIRUS_CHECK_ON, Ddr::Index::Fields::LAST_VIRUS_CHECK_OUTCOME, Ddr::Index::Fields::LICENSE, Ddr::Index::Fields::LITHOGRAPHER_FACET, Ddr::Index::Fields::LOCAL_ID, Ddr::Index::Fields::LYRICIST_FACET, Ddr::Index::Fields::MEDIA_MAJOR_TYPE, Ddr::Index::Fields::MEDIA_SUB_TYPE, Ddr::Index::Fields::MEDIA_TYPE, Ddr::Index::Fields::MEDIUM_FACET, Ddr::Index::Fields::MULTIRES_IMAGE_FILE_PATH, Ddr::Index::Fields::NESTED_PATH, Ddr::Index::Fields::NESTED_PATH_TEXT, Ddr::Index::Fields::OBJECT_CREATE_DATE, Ddr::Index::Fields::OBJECT_MODIFIED_DATE, Ddr::Index::Fields::OBJECT_PROFILE, Ddr::Index::Fields::OBJECT_STATE, Ddr::Index::Fields::PERFORMER_FACET, Ddr::Index::Fields::PERMANENT_ID, Ddr::Index::Fields::PERMANENT_URL, Ddr::Index::Fields::PLACEMENT_COMPANY_FACET, Ddr::Index::Fields::POLICY_ROLE, Ddr::Index::Fields::PRODUCER_FACET, Ddr::Index::Fields::PRODUCT_FACET, Ddr::Index::Fields::PUBLICATION_FACET, Ddr::Index::Fields::PUBLISHER_FACET, Ddr::Index::Fields::RESEARCH_HELP_CONTACT, Ddr::Index::Fields::RESOURCE_ROLE, Ddr::Index::Fields::RIGHTS_NOTE, Ddr::Index::Fields::ROLL_NUMBER_FACET, Ddr::Index::Fields::SERIES_FACET, Ddr::Index::Fields::SETTING_FACET, Ddr::Index::Fields::SPATIAL_FACET, Ddr::Index::Fields::STREAMABLE_MEDIA_TYPE, Ddr::Index::Fields::STRUCTURE, Ddr::Index::Fields::STRUCTURE_SOURCE, Ddr::Index::Fields::SUBJECT_FACET, Ddr::Index::Fields::SUBSERIES_FACET, Ddr::Index::Fields::TECHMD_COLOR_SPACE, Ddr::Index::Fields::TECHMD_CREATING_APPLICATION, Ddr::Index::Fields::TECHMD_CREATION_TIME, Ddr::Index::Fields::TECHMD_FILE_SIZE, Ddr::Index::Fields::TECHMD_FITS_DATETIME, Ddr::Index::Fields::TECHMD_FITS_VERSION, Ddr::Index::Fields::TECHMD_FORMAT_LABEL, Ddr::Index::Fields::TECHMD_FORMAT_VERSION, Ddr::Index::Fields::TECHMD_ICC_PROFILE_NAME, Ddr::Index::Fields::TECHMD_ICC_PROFILE_VERSION, Ddr::Index::Fields::TECHMD_IMAGE_HEIGHT, Ddr::Index::Fields::TECHMD_IMAGE_WIDTH, Ddr::Index::Fields::TECHMD_MD5, Ddr::Index::Fields::TECHMD_MEDIA_TYPE, Ddr::Index::Fields::TECHMD_MODIFICATION_TIME, Ddr::Index::Fields::TECHMD_PRONOM_IDENTIFIER, Ddr::Index::Fields::TECHMD_VALID, Ddr::Index::Fields::TECHMD_WELL_FORMED, Ddr::Index::Fields::TEMPORAL_FACET, Ddr::Index::Fields::TITLE, Ddr::Index::Fields::TONE_FACET, Ddr::Index::Fields::TYPE_FACET, Ddr::Index::Fields::VOLUME_FACET, Ddr::Index::Fields::WORKFLOW_STATE, Ddr::Index::Fields::YEAR_FACET

Instance Method Summary collapse

Methods included from Ddr::Models::Streamable

#streamable_media_extension, #streamable_media_path, #streamable_media_type

Methods included from Ddr::Models::HasStructMetadata

#multires_image_file_paths, #structure

Methods included from Ddr::Models::HasMultiresImage

#multires_image_file_path

Methods included from Ddr::Models::HasIntermediateFile

#intermediate_extension, #intermediate_path, #intermediate_type

Methods included from Ddr::Models::HasContent

#content_changed?, #content_human_size, #content_major_type, #content_size, #content_sub_type, #content_type, #content_type=, #derivatives, #has_extracted_text?, #image?, #last_virus_check, #last_virus_check_on, #last_virus_check_outcome, #pdf?, #techmd, #upload, #upload!, #virus_checks, #with_content_file

Methods included from Ddr::Models::Captionable

#caption_extension, #caption_path, #caption_type

Methods inherited from Ddr::Models::Base

#adapt_to_cmodel, #association_query, #copy_admin_policy_or_permissions_from, #copy_admin_policy_or_roles_from, #datastream_history, #datastreams_changed, #datastreams_having_content, #deaccession, #has_extracted_text?, #model_pid, #new_datastreams_having_content, #parent_id, #rights_statement, #save

Methods included from Ddr::Models::HasAdminMetadata

#copy_resource_roles_from, #effective_permissions, #finding_aid, #grant_roles_to_creator, #inherited_roles, #lock, #lock!, #locked?, #research_help, #roles, #unlock, #unlock!, #workflow

Methods included from Ddr::Models::Indexing

#admin_set_facet, #admin_set_title, #all_identifiers, #associated_collection, #collection_facet, #collection_title, const_missing, #date_sort, #index_fields, #language_name, #title_display, #to_solr, #year_facet

Methods included from Ddr::Index::Fields

const_missing, descmd, get, techmd

Methods included from Ddr::Models::FileManagement

#add_external_datastream, #add_external_file, #add_file, #add_file_datastream, #external_datastream_file_paths, #external_datastreams

Methods included from Ddr::Models::FixityCheckable

#fixity_check, #fixity_checks, #last_fixity_check, #last_fixity_check_on, #last_fixity_check_outcome

Methods included from Ddr::Models::EventLoggable

#events, #has_events?, #notify_event, #update_events

Methods included from Ddr::Models::HasThumbnail

#copy_thumbnail_from, #thumbnail_changed?

Methods included from Ddr::Models::Governable

#copy_admin_policy_from, #inherited_permissions, #inherited_rights

Methods included from Ddr::Models::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

#collectionObject



25
26
27
# File 'app/models/component.rb', line 25

def collection
  self.parent.parent rescue nil
end

#collection_uriObject



29
30
31
# File 'app/models/component.rb', line 29

def collection_uri
  self.collection.internal_uri rescue nil
end

#default_structureObject



37
38
39
# File 'app/models/component.rb', line 37

def default_structure
  build_default_structure
end

#publishable?Boolean

Returns:

  • (Boolean)


33
34
35
# File 'app/models/component.rb', line 33

def publishable?
  parent.present? && parent.published?
end