Skip to content

Commit

Permalink
Update Usage data for the metadata field guide
Browse files Browse the repository at this point in the history
Adds usage information and examples that were previously missing. Also
identifies additional system fields.

Moves the usage config file to a zizia subfolder in the config directory.
  • Loading branch information
mark-dce committed Oct 15, 2019
1 parent 22f5ffc commit cc2c49f
Show file tree
Hide file tree
Showing 4 changed files with 43 additions and 35 deletions.
31 changes: 0 additions & 31 deletions app/config/usage.yml

This file was deleted.

39 changes: 39 additions & 0 deletions app/config/zizia/usage.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
---
# Metadata usage hints
# attribute: usage

arkivo_checksum: "-- system field - not directly editable --"
based_near: "A place name related to the work, such as its site of publication, or the city, state, or country the work contents are about. This field is a URI. The URIs should be GeoNames identifiers. You can look these up at GeoNames (http://www.geonames.org/). Example: http://www.geonames.org/4500546/"
bibliographic_citation: "Used to store the preferred bibliographic citation."
contributor: "A person or group you want to recognize for playing a role in the creation of the work, but not the primary role. Example: Smith, Mary"
create_date: "-- system field - not directly editable --"
creator: "The person or group responsible for the work. Usually this is the author, artist, or other person or people responsible for creating the content. Example: Leffler, Warren K., photographer."
date_created: "The date the work was created. Typically entered using ISO 8601 format; however, and local convention can be supported. Example: 1964-08-21 (also '1964', 'Aug. 22 '64', '19th C.' or '8/22/1964') NOTE: the system treats this field as a string and does not attempt to interpret the value entered."
date_modified: "-- system field - not directly editable --"
date_uploaded: "-- system field - not directly editable --"
depositor: "-- system field - not directly editable --"
description: "Free-text notes about the work, such as abstracts of a paper or citation information for a journal article. Example: Photograph shows half-length portrait of Hamer seated at a table."
has_model: "-- system field - not directly editable --"
head: "-- system field - not directly editable --"
identifier: "A unique handle identifying the work. An example would be a DOI for a journal article, or an ISBN or OCLC number for a book. Example: LC-U9-12470B-17"
import_url: "-- system field - not directly editable --"
keywords: "Words or phrases you select to describe what the work is about. Example: New Orleans or Music "
label: "-- system field - not directly editable --"
language: "The language of the source content being described. Example: English"
license: "Licensing and distribution information governing access to the work. This field is a URI. You can choose rights statements from this vocabulary (https://github.com/curationexperts/tenejo/blob/master/config/authorities/licenses.yml). Example: http://creativecommons.org/licenses/by/3.0/us/"
modified_date: "-- system field - not directly editable --"
on_behalf_of: "-- system field - not directly editable --"
owner: "-- system field - not directly editable --"
proxy_depositor: "-- system field - not directly editable --"
publisher: "The person or group making the work available. Generally this is the institution. Example: Library of Congress"
related_url: "A link to a website or other specific content (audio, video, PDF document) related to the work such as the URL of a research project from which the work was derived. Example: https://www.loc.gov/free-to-use/african-american-women-changemakers/"
relative_path: "-- system field - not directly editable --"
resource_type: "Pre-defined categories to describe the type of content. You must choose from one of the types listed here (https://github.com/curationexperts/tenejo/blob/master/config/authorities/resource_types.yml) Examples: Image, Article, or Dataset"
rights_statement: "This field is a URI. You can choose rights statements from this vocabulary (https://github.com/curationexperts/tenejo/blob/master/config/authorities/rights_statements.yml). Example: http://rightsstatements.org/vocab/UND/1.0/"
source: "A related resource from which the described resource is derived. Example: Library of Congress Online Catalog (976,247)"
state: "-- system field - not directly editable --"
subject: "Headings or index terms describing what the work is about. These should conform to an existing vocabulary, like LCSH. Example: Hamer, Fannie Lou--Public appearances--New Jersey--Atlantic City."
tail: "-- system field - not directly editable --"
title: "A name to aid in identifying a work. Example: [Fannie Lou Hamer, Mississippi Freedom Democratic Party delegate, at the Democratic National Convention, Atlantic City, New Jersey, August 1964] / [WKL]."
visibility: "The desired visiblity setting for the work and it's files. You can use 'open', 'registered', or 'restricted'. Example: 'open'"
files: "The file(s) you want to attach to your work. Must match the filenames you have uploaded to the server. Example: 01267_150px.jpg. You can attach multiple files to a work by providing multiple filenames separated by the separator configured for your application."
6 changes: 3 additions & 3 deletions app/lib/zizia/metadata_usage.rb
Original file line number Diff line number Diff line change
Expand Up @@ -11,12 +11,12 @@ def usage
private

def default_location
File.join(File.dirname(__FILE__), '../../config/usage.yml')
File.join(File.dirname(__FILE__), '../../config/zizia/usage.yml')
end

def config
return default_location unless File.exist?(Rails.root.join("config", "usage.yml"))
Rails.root.join("config", "usage.yml")
return default_location unless File.exist?(Rails.root.join("config", "zizia", "usage.yml"))
Rails.root.join("config", "zizia", "usage.yml")
end
end
end
2 changes: 1 addition & 1 deletion spec/controllers/metadata_details_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@
get :profile
profile_table = CSV.parse(response.body, headers: :first_row)
title_definition = profile_table.find { |r| r.field('attribute') == 'title' }
expect(title_definition.field('usage')).to include 'name of the resource being described' # match text extracted from ./config/zizia/usage.yml
expect(title_definition.field('usage')).to include 'name to aid in identifying a work' # match text extracted from ./config/emory/usage.yml
end

it 'includes `files`' do
Expand Down

0 comments on commit cc2c49f

Please sign in to comment.