diff --git a/app/services/hyrax/simple_schema_loader.rb b/app/services/hyrax/simple_schema_loader.rb index 2d1768e443..b9d2a128b9 100644 --- a/app/services/hyrax/simple_schema_loader.rb +++ b/app/services/hyrax/simple_schema_loader.rb @@ -169,20 +169,20 @@ def metadata_files def predicate_pairs(ret_hsh, schema_name) schema_config(schema_name)['attributes'].each do |name, config| + predicate = RDF::URI(config['predicate']) if ret_hsh[name].blank? - ret_hsh[name.to_sym] = RDF::URI(config['predicate']) - else - multiple_predicate_message(name) + ret_hsh[name.to_sym] = predicate + elsif ret_hsh[name] != predicate + multiple_predicate_message(name, ret_hsh[name], predicate) end end end - def multiple_predicate_message(name) - message = "The attribute of #{name} has been assigned multiple times " \ - "within the metadata YAMLs. Please be aware that once the " \ - "attribute's predicate value is first assigned, any other value " \ - "will be ignored." - + def multiple_predicate_message(name, existing, incoming) + message = "The attribute of #{name} has been assigned a predicate multiple times " \ + "within the metadata YAMLs. Please be aware that once the attribute's " \ + "predicate value is first assigned, any other value will be ignored. " \ + "The existing value is #{existing} preventing the use of #{incoming}" Hyrax.logger.warn(message) end end diff --git a/config/metadata/hyrax_internal_metadata.yaml b/config/metadata/hyrax_internal_metadata.yaml index 0f41794265..f33b3f8c65 100644 --- a/config/metadata/hyrax_internal_metadata.yaml +++ b/config/metadata/hyrax_internal_metadata.yaml @@ -1,56 +1,57 @@ --- +# This internal metadata config is used to define predicates for hyrax internals only attributes: - admin_set_id: + access_to: + predicate: http://www.w3.org/ns/auth/acl#accessTo + admin_set_id: predicate: http://purl.org/dc/terms/isPartOf - id: - predicate: http://purl.org/dc/terms/id - internal_resource: - predicate: info:fedora/fedora-system:def/model#hasModel - representative_id: - predicate: http://www.ebu.ch/metadata/ontologies/ebucore/ebucore#hasRelatedMediaFragment - state: - predicate: http://fedora.info/definitions/1/0/access/ObjState#objState - thumbnail_id: - predicate: http://www.ebu.ch/metadata/ontologies/ebucore/ebucore#hasRelatedImage - created_at: - predicate: http://purl.org/dc/terms/created + agent: + predicate: http://www.w3.org/ns/auth/acl#agent byte_order: predicate: http://sweet.jpl.nasa.gov/2.2/reprDataFormat.owl#byteOrder color_space: predicate: http://www.w3.org/2003/12/exif/ns#colorSpace compression: predicate: http://vocabulary.samvera.org/ns#compressionScheme + created_at: + predicate: http://purl.org/dc/terms/created file_identifier: predicate: http://vocabulary.samvera.org/ns#fileIdentifier + file_ids: + predicate: http://pcdm.org/models#hasFile file_set_id: predicate: http://vocabulary.samvera.org/ns#fileSetId format_label: predicate: http://www.loc.gov/premis/rdf/v1#hasFormatName - height: + height: predicate: http://www.ebu.ch/metadata/ontologies/ebucore/ebucore#height + id: + predicate: http://purl.org/dc/terms/id + internal_resource: + predicate: info:fedora/fedora-system:def/model#hasModel mime_type: predicate: http://www.ebu.ch/metadata/ontologies/ebucore/ebucore#hasMimeType + mode: + predicate: http://www.w3.org/ns/auth/acl#mode original_filename: predicate: http://www.ebu.ch/metadata/ontologies/ebucore/ebucore#filename pcdm_use: predicate: http://vocabulary.samvera.org/ns#pcdmUse + permissions: + predicate: http://vocabulary.samvera.org/ns#permissions recorded_size: predicate: http://www.loc.gov/premis/rdf/v1#hasSize + representative_id: + predicate: http://www.ebu.ch/metadata/ontologies/ebucore/ebucore#hasRelatedMediaFragment + state: + predicate: http://fedora.info/definitions/1/0/access/ObjState#objState + thumbnail_id: + predicate: http://www.ebu.ch/metadata/ontologies/ebucore/ebucore#hasRelatedImage + updated_at: + predicate: http://vocabulary.samvera.org/ns#updatedAt valid: predicate: http://vocabulary.samvera.org/ns#valid well_formed: predicate: http://vocabulary.samvera.org/ns#wellFormed width: predicate: http://www.ebu.ch/metadata/ontologies/ebucore/ebucore#width - access_to: - predicate: http://www.w3.org/ns/auth/acl#accessTo - permissions: - predicate: http://vocabulary.samvera.org/ns#permissions - updated_at: - predicate: http://vocabulary.samvera.org/ns#updatedAt - agent: - predicate: http://www.w3.org/ns/auth/acl#agent - mode: - predicate: http://www.w3.org/ns/auth/acl#mode - file_ids: - predicate: http://pcdm.org/models#hasFile \ No newline at end of file