Skip to content

Commit

Permalink
Merge pull request #715 from OregonDigital/feature/moreterms2model
Browse files Browse the repository at this point in the history
Feature/moreterms2model
  • Loading branch information
jechols committed Dec 29, 2014
2 parents a548d87 + 8e1b680 commit 1165aab
Show file tree
Hide file tree
Showing 3 changed files with 35 additions and 21 deletions.
47 changes: 28 additions & 19 deletions app/models/datastream/oregon_rdf.rb
Original file line number Diff line number Diff line change
Expand Up @@ -85,7 +85,7 @@ def self.resource_class
property :abstract, :predicate => RDF::DC.abstract do |index|
index.as :searchable, :displayable
end
property :inscription, :predicate => RDF::URI('http://www.loc.gov/standards/vracore/vocab/inscription') do |index|
property :inscription, :predicate => OregonDigital::Vocabularies::VRA.inscription do |index|
index.as :searchable, :displayable
end
property :view, :predicate => OregonDigital::Vocabularies::OREGONDIGITAL['cco/viewDescription'] do |index|
Expand All @@ -100,7 +100,13 @@ def self.resource_class
property :compassDirection, :predicate => OregonDigital::Vocabularies::OREGONDIGITAL.compassDirection do |index|
index.as :displayable
end
property :conditionOfSource, :predicate => OregonDigital::Vocabularies::OREGONDIGITAL.sourceCondition do |index|
property :objectOrientation, :predicate => OregonDigital::Vocabularies::OREGONDIGITAL.objectOrientation do |index|
index.as :displayable
end
property :photographOrientation, :predicate => OregonDigital::Vocabularies::OREGONDIGITAL.photographOrientation do |index|
index.as :displayable
end
property :conditionOfSource, :predicate => OregonDigital::Vocabularies::OREGONDIGITAL.sourceCondition do |index|
index.as :searchable, :displayable
end
property :instrumentation, :predicate => OregonDigital::Vocabularies::SHEETMUSIC.instrumentation do |index|
Expand Down Expand Up @@ -158,10 +164,10 @@ def self.resource_class
property :subject, :predicate => RDF::DC11.subject do |index|
index.as :searchable, :facetable, :displayable
end
property :stateEdition, :predicate => RDF::URI('http://www.loc.gov/standards/vracore/vocab/stateEdition') do |index|
property :stateEdition, :predicate => OregonDigital::Vocabularies::VRA.stateEdition do |index|
index.as :searchable, :displayable
end
property :stylePeriod, :predicate => RDF::URI('http://www.loc.gov/standards/vracore/vocab/stylePeriod'), :class_name => OregonDigital::ControlledVocabularies::StylePeriod do |index|
property :stylePeriod, :predicate => OregonDigital::Vocabularies::VRA.hasStylePeriod, :class_name => OregonDigital::ControlledVocabularies::StylePeriod do |index|
index.as :searchable, :facetable, :displayable
end
property :workType, :predicate => RDF.type, :class_name => OregonDigital::ControlledVocabularies::WorkType do |index|
Expand All @@ -185,8 +191,17 @@ def self.resource_class


# Geographics
property :geobox, :predicate => RDF::URI('https://schema.org/box') do |index|
index.as :searchable, :displayable
end
property :latitude, :predicate => RDF::URI('http://www.w3.org/2003/12/exif/ns#gpsLatitude') do |index|
index.as :searchable, :displayable
end
property :longitude, :predicate => RDF::URI('http://www.w3.org/2003/12/exif/ns#gpsLongitude') do |index|
index.as :searchable, :displayable
end
property :location, :predicate => RDF::DC.spatial, :class_name => OregonDigital::ControlledVocabularies::Geographic do |index|
index.as :searchable, :facetable, :displayable
index.as :searchable, :facetable, :displayable
end
property :streetAddress, :predicate => RDF::URI('http://www.loc.gov/standards/mads/rdf/v1.html#streetAddress') do |index|
index.as :searchable, :displayable
Expand All @@ -202,13 +217,13 @@ def self.resource_class
property :date, :predicate => RDF::DC.date do |index|
index.as :searchable, :facetable, :displayable
end
property :earliestDate, :predicate => RDF::URI('http://www.loc.gov/standards/vracore/vocab/earliestDate') do |index|
property :earliestDate, :predicate => OregonDigital::Vocabularies::VRA.earliestDate do |index|
index.as :searchable, :displayable
end
property :issued, :predicate => RDF::DC.issued do |index|
index.as :searchable, :displayable
end
property :latestDate, :predicate => RDF::URI('http://www.loc.gov/standards/vracore/vocab/latestDate') do |index|
property :latestDate, :predicate => OregonDigital::Vocabularies::VRA.latestDate do |index|
index.as :searchable, :displayable
end
property :viewDate, :predicate => OregonDigital::Vocabularies::OREGONDIGITAL['cco/viewDate'] do |index|
Expand Down Expand Up @@ -311,16 +326,16 @@ def self.resource_class
property :extent, :predicate => RDF::DC.extent do |index|
index.as :searchable, :displayable
end
property :measurements, :predicate => RDF::URI('http://www.loc.gov/standards/vracrore/vocab/measurements') do |index|
property :measurements, :predicate => OregonDigital::Vocabularies::VRA.measurements do |index|
index.as :displayable
end
property :materials, :predicate => RDF::URI('http://www.loc.gov/standards/vracore/vocab/materials') do |index|
property :material, :predicate => OregonDigital::Vocabularies::VRA.material do |index|
index.as :searchable, :displayable
end
property :support, :predicate => RDF::URI('http://www.loc.gov/standards/vracore/vocab/support') do |index|
property :support, :predicate => OregonDigital::Vocabularies::VRA.support do |index|
index.as :searchable, :displayable
end
property :technique, :predicate => RDF::URI('http://www.loc.gov/standards/vracore/vocab/technique') do |index|
property :technique, :predicate => OregonDigital::Vocabularies::VRA.hasTechnique do |index|
index.as :searchable, :displayable
end

Expand Down Expand Up @@ -442,16 +457,10 @@ def self.resource_class
end

# VRA
property :culturalContext, :predicate => RDF::URI('http://www.loc.gov/standards/vracore/vocab/culturalContext') do |index|
property :culturalContext, :predicate => OregonDigital::Vocabularies::VRA.culturalContext do |index|
index.as :displayable
end
property :medium, :predicate => RDF::URI('http://www.loc.gov/standards/vracore/vocab/medium') do |index|
index.as :searchable, :displayable
end
property :culture, :predicate => RDF::URI('http://www.loc.gov/standards/vracore/vocab/culture'), :class_name => OregonDigital::ControlledVocabularies::Culture do |index|
index.as :searchable, :displayable
end
property :idCurrentRepository, :predicate => RDF::URI('http://www.loc.gov/standards/vracore/vocab/idCurrentRepository') do |index|
property :idCurrentRepository, :predicate => OregonDigital::Vocabularies::VRA.idCurrentRepository do |index|
index.as :searchable, :displayable
end

Expand Down
3 changes: 1 addition & 2 deletions config/initializers/ingest_form_map.rb
Original file line number Diff line number Diff line change
Expand Up @@ -89,7 +89,6 @@
subject: "descMetadata.subject",
stateEdition: "descMetadata.stateEdition",
stylePeriod: "descMetadata.stylePeriod",
culture: "descMetadata.culture",
militaryBranch: "descMetadata.militaryBranch",
sportsTeam: "descMetadata.sportsTeam",
ethnographicTerm: "descMetadata.ethnographicTerm",
Expand Down Expand Up @@ -180,7 +179,7 @@
physicalExtent: "descMetadata.physicalExtent",
measurements: "descMetadata.measurements",
imageOrientation: "descMetadata.imageOrientation",
materials: "descMetadata.materials",
material: "descMetadata.material",
support: "descMetadata.support",
technique: "descMetadata.technique",
},
Expand Down
6 changes: 6 additions & 0 deletions lib/oregon_digital/vocabularies/vra.rb
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
require 'rdf'
module OregonDigital::Vocabularies
class VRA < ::RDF::Vocabulary("http://opaquenamespace.org/ns/vra/")
end
end

0 comments on commit 1165aab

Please sign in to comment.