-
Notifications
You must be signed in to change notification settings - Fork 124
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
7e06f18
commit 382c6d9
Showing
11 changed files
with
207 additions
and
13 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,162 @@ | ||
--- | ||
m3_version: 1.0.beta2 | ||
profile: | ||
date_modified: '2024-06-01' | ||
responsibility: https://samvera.org | ||
responsibility_statement: Hyrax Initial Profile | ||
type: | ||
version: 1 | ||
classes: | ||
GenericWorkResource: | ||
display_label: Generic Work | ||
Monograph: | ||
display_label: Monograph | ||
AdminSet: | ||
diplay_label: AdminSet | ||
AdminSetResource: | ||
diplay_label: AdministrativeSet | ||
Collection: | ||
display_label: Collection | ||
CollectionResource: | ||
display_label: PcdmCollection | ||
Hyrax::FileSet: | ||
display_label: FileSet | ||
contexts: | ||
flexible_context: | ||
display_label: Flexible Metadata Example | ||
mappings: | ||
blacklight: | ||
name: Additional Blacklight Solr Mappings | ||
metatags: | ||
name: Metatags | ||
mods_oai_pmh: | ||
name: MODS OAI PMH | ||
qualified_dc_pmh: | ||
name: Qualified DC OAI PMH | ||
simple_dc_pmh: | ||
name: Simple DC OAI PMH | ||
properties: | ||
title: | ||
available_on: | ||
class: | ||
- AdminSetResource | ||
- AdminSet | ||
- Hyrax::FileSet | ||
- CollectionResource | ||
- GenericWorkResource | ||
- Monograph | ||
cardinality: | ||
minimum: 0 | ||
multi_value: true | ||
controlled_values: | ||
format: http://www.w3.org/2001/XMLSchema#string | ||
sources: | ||
- 'null' | ||
definition: | ||
default: Enter a standardized title for display. If only one | ||
title is needed, transcribe the title from the source | ||
itself. | ||
display_label: | ||
default: Title | ||
index_documentation: displayable, searchable | ||
indexing: | ||
- 'title_sim' | ||
- 'title_tesim' | ||
form: | ||
required: true | ||
primary: true | ||
multi_value: true | ||
mappings: | ||
metatags: twitter:title, og:title | ||
mods_oai_pmh: mods:titleInfo/mods:title | ||
qualified_dc_pmh: dcterms:title | ||
simple_dc_pmh: dc:title | ||
property_uri: http://purl.org/dc/terms/title | ||
range: http://www.w3.org/2001/XMLSchema#string | ||
requirement: required | ||
sample_values: | ||
- Pencil drawn portrait study of woman | ||
date_modified: | ||
available_on: | ||
class: | ||
- AdminSetResource | ||
- AdminSet | ||
- Hyrax::FileSet | ||
- CollectionResource | ||
- GenericWorkResource | ||
- Monograph | ||
cardinality: | ||
minimum: 0 | ||
maximum: 1 | ||
multi_value: false | ||
display_label: | ||
default: Date Modified | ||
property_uri: http://purl.org/dc/terms/modified | ||
range: http://www.w3.org/2001/XMLSchema#dateTime | ||
sample_values: | ||
- "2024-06-06 21:06:51 +0000" | ||
date_uploaded: | ||
available_on: | ||
class: | ||
- AdminSetResource | ||
- AdminSet | ||
- Hyrax::FileSet | ||
- CollectionResource | ||
- GenericWorkResource | ||
- Monograph | ||
cardinality: | ||
minimum: 0 | ||
maximum: 1 | ||
multi_value: false | ||
display_label: | ||
default: Date Uploaded | ||
property_uri: http://purl.org/dc/terms/dateSubmitted | ||
range: http://www.w3.org/2001/XMLSchema#dateTime | ||
sample_values: | ||
- "2024-06-06 21:06:51 +0000" | ||
depositor: | ||
available_on: | ||
class: | ||
- AdminSetResource | ||
- AdminSet | ||
- Hyrax::FileSet | ||
- CollectionResource | ||
- GenericWorkResource | ||
- Monograph | ||
cardinality: | ||
minimum: 0 | ||
maximum: 1 | ||
multi_value: false | ||
controlled_values: | ||
format: http://www.w3.org/2001/XMLSchema#string | ||
sources: | ||
- 'null' | ||
display_label: | ||
default: Depositor | ||
index_documentation: searchable | ||
indexing: | ||
- 'depositor_tesim' | ||
property_uri: http://id.loc.gov/vocabulary/relators/dpt | ||
range: http://www.w3.org/2001/XMLSchema#string | ||
sample_values: | ||
- Julie Allinson | ||
creator: | ||
available_on: | ||
class: | ||
- Hyrax::FileSet | ||
cardinality: | ||
minimum: 1 | ||
multi_value: true | ||
controlled_values: | ||
format: http://www.w3.org/2001/XMLSchema#string | ||
sources: | ||
- 'null' | ||
display_label: | ||
default: Creator | ||
index_documentation: searchable | ||
indexing: | ||
- 'creator_tesim' | ||
property_uri: http://purl.org/dc/elements/1.1/creator | ||
range: http://www.w3.org/2001/XMLSchema#string | ||
sample_values: | ||
- Julie Allinson |
1 change: 0 additions & 1 deletion
1
.dassie/db/migrate/20240606205215_create_hyrax_flexible_schemas.rb
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
28 changes: 28 additions & 0 deletions
28
app/utils/hyrax/required_data_seeders/flexible_profile_seeder.rb
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,28 @@ | ||
# frozen_string_literal: true | ||
|
||
module Hyrax | ||
module RequiredDataSeeders | ||
# This class was created for use in rake tasks and db/seeds.rb. It generates | ||
# collections that are required for all Hyrax applications. | ||
# | ||
# Seeders of required data are non-destructive. If the data already exists, | ||
# it will not be replaced. | ||
class FlexibleProfileSeeder | ||
class << self | ||
attr_accessor :logger | ||
|
||
def generate_seeds(logger: Logger.new(STDOUT)) | ||
@logger = logger | ||
|
||
logger.info("Adding required collections...") | ||
|
||
flexible_schema = Hyrax::FlexibleSchema.first_or_create do |f| | ||
f.profile = YAML.safe_load_file(Rails.root.join('config', 'metadata', 'm3_profile.yaml')) | ||
end | ||
|
||
logger.info " #{flexible_schema.title} -- FOUND OR CREATED" | ||
end | ||
end | ||
end | ||
end | ||
end |
1 change: 0 additions & 1 deletion
1
...generators/hyrax/templates/db/migrate/20240606205215_create_hyrax_flexible_schemas.rb.erb
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters