Skip to content

Instantly share code, notes, and snippets.

/**
* The contents of this file are subject to the license and copyright
* detailed in the LICENSE and NOTICE files at the root of the source
* tree and available online at
*
* http://www.dspace.org/license/
*/
package org.dspace.app.util;
import java.util.ArrayList;
@blancoj
blancoj / .config.yml
Created May 25, 2018 13:36
.config.yml
---
# The path to a single bag to process
#bag_path: "/tmp/directory/to/single/BAG_DIRECTORY"
# The path to a directory containing multiple bags to bulk process
#bags_directory: "/tmp/directory/to/many/bags"
# Processed items metadata backup and logging base path
cache_and_logging_path: "cache/processed_items"
@blancoj
blancoj / _default_work.example.yml
Created May 25, 2018 13:33
_default_work.example.yml
---
# REQUIRED
work_type: "generic_work"
# REQUIRED
# Array of data sub-directories to upload files (ie. data/ORIGINAL) and ignore_files array of regex's to ignore files
# - directory: ORIGINAL
# ignore_files:
# - virus*.*
# - MobyDick.pdf
class Sufia::CatalogSearchBuilder < Sufia::SearchBuilder
self.default_processor_chain += [
:add_access_controls_to_solr_params,
:add_advanced_parse_q_to_solr,
:show_works_or_works_that_contain_files,
:show_works_or_works_that_are_active
]
# show both works that match the query and works that contain files that match the query
def show_works_or_works_that_contain_files(solr_parameters)
In Dspace here is what can be setup as far as mediated deposit.
Depositors - People that can deposit. If no no further setup, the buck stops here. From here it goes into the archive.
Accept/Reject Step - The people responsible for this step are able to accept or reject incoming deposits. However,
they are not able to edit the deposit's metadata.
Accept/Reject/Edit Metadata Step - The people responsible for this step are able to edit the metadata of incoming deposits,
and then accept or reject them.
class Ability
include Hydra::Ability
include CurationConcerns::Ability
include Sufia::Ability
self.ability_logic += [:everyone_can_create_curation_concerns]
if current_user.admin?
can [:create, :show, :add_user, :remove_user, :index, :edit, :update, :destroy], Role
Failures:
1) curation_concerns/file_sets/_show_actions.html.erb schema.org descriptive metadata draws schema.org fields
Failure/Error: delegate :tag, :depositor, :date_created, to: :solr_document
ActionView::Template::Error:
undefined method `depositor' for #<Hash:0x007f77daed41e0>
# ./app/presenters/sufia/file_set_presenter.rb:3:in `depositor'
# ./app/presenters/sufia/file_set_presenter.rb:6:in `tweeter'
# ./app/views/curation_concerns/file_sets/show.html.erb:4:in `block in __quod_dev_dev_blancoj_hydra_test_sufia_core_app_views_curation_concerns_file_sets_show_html_erb__3160858662370247536_70076368268260'
require 'spec_helper'
describe 'curation_concerns/file_sets/_show_actions.html.erb', type: :view do
let(:depositor) do
stub_model(User,
user_key: 'bob',
twitter_handle: 'bot4lib')
end
require 'spec_helper'
describe 'curation_concerns/file_sets/_show_actions.html.erb', type: :view do
#let(:depositor) do
# stub_model(User,
# user_key: 'bob',
# twitter_handle: 'bot4lib')
# end
let(:content) { double('content', versions: [], mimeType: 'application/pdf') }
1) curation_concerns/file_sets/_show_actions.html.erb title heading shows links in the description
Failure/Error: let(:presenter) { Sufia::FileSetPresenter.new(file_set.to_solr, ability) }
RSolr::Error::Http:
RSolr::Error::Http - 404 Not Found
Error: <html><head><title>Apache Tomcat/7.0.28 - Error report</title><style><!--H1 {font-family:Tahoma,Arial,sans-serif;color:white;background-color:#525D76;font-size:22px;} H2 {font-family:Tahoma,Arial,sans-serif;color:white;background-color:#525D76;font-size:16px;} H3 {font-family:Tahoma,Arial,sans-serif;color:white;background-color:#525D76;font-size:14px;} BODY {font-family:Tahoma,Arial,sans-serif;color:black;background-color:white;} B {font-family:Tahoma,Arial,sans-serif;color:white;background-color:#525D76;} P {font-family:Tahoma,Arial,sans-serif;background:white;color:black;font-size:12px;}A {color : black;}A.name {color : black;}HR {color : #525D76;}--></style> </head><body><h1>HTTP Status 404 - /tomcat/quod-dev/solr-hydra/blancoj-