Skip to content

Commit

Permalink
Add property for rights_statement
Browse files Browse the repository at this point in the history
  • Loading branch information
jcoyne committed Sep 1, 2016
1 parent 249198d commit b000806
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 0 deletions.
8 changes: 8 additions & 0 deletions app/models/concerns/curation_concerns/basic_metadata.rb
Expand Up @@ -28,9 +28,17 @@ module BasicMetadata
property :keyword, predicate: ::RDF::Vocab::DC11.relation do |index|
index.as :stored_searchable, :facetable
end

# Used for a license
property :rights, predicate: ::RDF::Vocab::DC.rights do |index|
index.as :stored_searchable
end

# This is for the rights statement
property :rights_statement, predicate: ::RDF::Vocab::EDM.rights do |index|
index.as :stored_searchable
end

property :publisher, predicate: ::RDF::Vocab::DC11.publisher do |index|
index.as :stored_searchable, :facetable
end
Expand Down
2 changes: 2 additions & 0 deletions spec/indexers/file_set_indexer_spec.rb
Expand Up @@ -18,6 +18,7 @@
subject: ['Theology'],
language: ['Arabic'],
rights: ['Wide open, buddy.'],
rights_statement: ['No Known Copyright'],
resource_type: ['Book'],
identifier: ['urn:isbn:1234567890'],
based_near: ['Medina, Saudi Arabia'],
Expand Down Expand Up @@ -64,6 +65,7 @@
expect(subject[Solrizer.solr_name('date_uploaded', :stored_sortable, type: :date)]).to eq '2011-01-01T00:00:00Z'
expect(subject[Solrizer.solr_name('date_modified', :stored_sortable, type: :date)]).to eq '2012-01-01T00:00:00Z'
expect(subject[Solrizer.solr_name('rights')]).to eq ['Wide open, buddy.']
expect(subject[Solrizer.solr_name('rights_statement')]).to eq ['No Known Copyright']
expect(subject[Solrizer.solr_name('related_url')]).to eq ['http://example.org/TheWork/']
expect(subject[Solrizer.solr_name('contributor')]).to eq ['Mohammad']
expect(subject[Solrizer.solr_name('creator')]).to eq ['Allah']
Expand Down

0 comments on commit b000806

Please sign in to comment.