Skip to content
This repository has been archived by the owner on May 14, 2022. It is now read-only.

Commit

Permalink
Updating predicates for Ephemera properties
Browse files Browse the repository at this point in the history
  • Loading branch information
escowles committed Apr 21, 2017
1 parent 35ef380 commit b4fd938
Show file tree
Hide file tree
Showing 3 changed files with 14 additions and 14 deletions.
4 changes: 2 additions & 2 deletions app/models/ephemera_box.rb
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,8 @@ class EphemeraBox < ActiveFedora::Base
validates :title, presence: { message: 'Your work must have a title.' }
validates :box_number, :barcode, presence: true
validates :barcode, with: :barcode_valid?
property :barcode, predicate: ::RDF::URI("http://plum.com/predicates/barCode")
property :box_number, predicate: ::RDF::URI("http://plum.com/predicates/box_number")
property :barcode, predicate: ::RDF::Vocab::DC.identifier
property :box_number, predicate: ::RDF::RDFS.label

self.human_readable_type = 'Ephemera Box'
def box_number=(title)
Expand Down
1 change: 1 addition & 0 deletions app/models/vocab/pul_terms.rb
Original file line number Diff line number Diff line change
Expand Up @@ -8,4 +8,5 @@ class PULTerms < RDF::StrictVocabulary('http://library.princeton.edu/terms/')
term :pdf_type, label: "PDF Type".freeze, type: 'rdf:Property'.freeze
term :call_number, label: "Call Number".freeze, type: 'rdf:Property'.freeze
term :container, label: "Container".freeze, type: 'rdf:Property'.freeze
term :seriesTitle, label: 'Series Title'.freeze, type: 'rdf:Property'.freeze
end
23 changes: 11 additions & 12 deletions app/schemas/ephemera_schema.rb
Original file line number Diff line number Diff line change
@@ -1,22 +1,21 @@
class EphemeraSchema < ActiveTriples::Schema
# Administrative
property :barcode, predicate: ::RDF::URI("http://plum.com/predicates/barCode")
property :folder_number, predicate: ::RDF::URI("http://plum.com/predicates/folder_number")
property :genre, predicate: ::RDF::URI("http://plum.com/predicates/genre")
property :width, predicate: ::RDF::URI("http://plum.com/predicates/width_cm")
property :height, predicate: ::RDF::URI("http://plum.com/predicates/height_cm")
property :page_count, predicate: ::RDF::URI("http://plum.com/predicates/pages")
property :barcode, predicate: ::RDF::Vocab::DC.identifier
property :folder_number, predicate: ::RDF::RDFS.label
property :width, predicate: ::RDF::Vocab::SCHEMA.width
property :height, predicate: ::RDF::Vocab::SCHEMA.height
property :page_count, predicate: ::RDF::Vocab::NFO.pageCount

# Descriptive
# Language/Title from BasicMetadata
property :sort_title, predicate: ::RDF::URI("http://plum.com/predicates/sort_title")
property :alternative_title, predicate: ::RDF::URI("http://plum.com/predicates/alternative_title")
property :series, predicate: ::RDF::URI("http://plum.com/predicates/series")
property :sort_title, predicate: ::OpaqueMods.titleForSort
property :alternative_title, predicate: ::RDF::Vocab::DC.alternative
property :series, predicate: ::PULTerms.seriesTitle
# Creator/Contributor/Publisher from BasicMetadata
property :geographic_origin, predicate: ::RDF::URI("http://plum.com/predicates/geo_origin")
property :geographic_origin, predicate: ::RDF::Vocab::BF2.originPlace
# date_created from BasicMetadata
property :genre, predicate: ::RDF::URI("http://plum.com/predicates/genre")
property :genre, predicate: ::RDF::Vocab::DC.type
# Subject from BasicMetadata
property :geo_subject, predicate: ::RDF::URI("http://plum.com/predicates/geo_subject")
property :geo_subject, predicate: ::RDF::Vocab::DC.coverage
# Description from BasicMetadata
end

0 comments on commit b4fd938

Please sign in to comment.