Skip to content

Instantly share code, notes, and snippets.

View scherztc's full-sized avatar

Thomas Scherz scherztc

View GitHub Profile
@scherztc
scherztc / RDF_Multi_Page_Text
Last active August 29, 2015 14:13
RDF for Multi_Page_Text
<?xml version="1.0" encoding="UTF-8"?>
<!-- Attempt to describe a multi-page text at https://github.com/projecthydra-labs/hydra-works/issues/9 assuming that there mulitple items in multiple international organization strategies. Assuming that each object may only have 1 parent. -->
<rdf:RDF xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:scholar="http://scholar.uc.edu#"
xmlns:rdfs="http://www.w3.org/2000/01/rdf-schema#" xmlns:ore="http://www.openarchives.org/ore/terms/"
xmlns:hydra="http://projecthydra.org/ns/works#" xmlns:iana="http://www.iana.org/assignments/relation/">
<!-- scholar: doesn't really exist as it's being used here - it's some type of descriptive metadata that contains work titles and start and end times; may be MODS but may be some other type of metadata -->
@scherztc
scherztc / RDF_Archival_Artifact
Last active August 29, 2015 14:13
RDF_Archival_Artifact
<?xml version="1.0" encoding="UTF-8"?>
<!-- Attempt to describe an Archival Organizational model at https://github.com/projecthydra-labs/hydra-works/blob/master/use-cases/princeton_book_use_case.md with the following assumptions Assumptions:
1. An ArchItem, ArchContainer, ArchSeries, ArchBox, ArchFolder, and ArchPart may only be a member of one work. If membership is a 1: n relationship then we may need to use Hydra:Collections too.
2. An ArchContainer, ArchSeries, ArchBox, ArchFolder, and ArchPart may have many members of works.
3. Accruals are possible.
4. Duplicates Exist.
@scherztc
scherztc / RDF_Archival_Simple
Last active August 29, 2015 14:13
RDF_Archival_Simple
<?xml version="1.0" encoding="UTF-8"?>
<!-- Attempt to describe an Archival Organizational model at https://github.com/projecthydra-labs/hydra-works/blob/master/use-cases/princeton_book_use_case.md with the following assumptions Assumptions:
1. An ArchItem, ArchContainer, ArchSeries, ArchBox, ArchFolder, and ArchPart may only be a member of one work. If membership is a 1: n relationship then we may need to use Hydra:Collections too.
2. An ArchContainer, ArchSeries, ArchBox, ArchFolder, and ArchPart may have many members of works.
3. Accruals are possible.
4. Duplicates Exist.
@scherztc
scherztc / gist:fb145d76dc3958b8e9f7
Created February 26, 2015 19:59
RDF_Multi_Track_Audio
<?xml version="1.0" encoding="UTF-8"?>
<!-- Attempt to describe track list at http://server1.variations2.indiana.edu/variations/cgi-bin/access.pl?id=BFJ6801 assuming that there mulitple files for each track of this recording: http://purl.dlib.indiana.edu/iudl/media/avalon:3333. -->
<rdf:RDF xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:avalon="http://purl.dlib.indiana.edu#"
xmlns:rdfs="http://www.w3.org/2000/01/rdf-schema#" xmlns:ore="http://www.openarchives.org/ore/terms/"
xmlns:hydra="http://projecthydra.org/ns/works#" xmlns:iana="http://www.iana.org/assignments/relation/">
<!-- avalon: doesn't really exist as it's being used here - it's some type of descriptive metadata that contains work titles and start and end times; may be MODS but may be some other type of metadata -->
<!-- Not sure rdf:Description is needed here if hydra: is managing same level of description and relationship. -->
<!-- <rdf:Description about="http://purl.dlib.indiana.edu/iudl/media/avalon:3333">
Prefix Verb URI Pattern Controller#Action
root GET / page_requests#view_presentation
clear_bookmarks DELETE /bookmarks/clear(.:format) bookmarks#clear
bookmarks GET /bookmarks(.:format) bookmarks#index
POST /bookmarks(.:format) bookmarks#create
new_bookmark GET /bookmarks/new(.:format) bookmarks#new
edit_bookmark GET /bookmarks/:id/edit(.:format) bookmarks#edit
bookmark GET /bookmarks/:id(.:format) bookmarks#show
1) CreateDerivativesJob thumbnail generation with an image (.jp2) file generates a thumbnail on job run
Failure/Error: subject.run
MiniMagick::Invalid:
MiniMagick::Invalid
rspec ./spec/jobs/create_derivatives_job_spec.rb:61 # CreateDerivativesJob thumbnail generation with an image (.jp2) file generates a thumbnail on job run
require 'spec_helper'
def render_error
@email_notifier = ExceptionNotifier.registered_exception_notifier(:email)
begin
raise ActiveRecord::RecordNotFound
rescue => e
@exception = e
end
end
tbf = ActiveFedora::SolrService.query("-desc_metadata__subject_sim:['Foo'], :rows=>999)
tbf.each do |r|
doc = SolrDocument.new(r)
c = ActiveFedora::Base.find(doc.id, :cast => true)
c.creator = 'DPC'
c.save
end
module BrowseEverything
module Driver
class Kaltura < Base
require 'kaltura'
def icon
'kaltura'
end
def validate_config
require "rails"
require "browse_everything/version"
require "browse_everything/engine"
require "browse_everything/retriever"
module BrowseEverything
class InitializationError < RuntimeError; end
autoload :Browser, 'browse_everything/browser'
autoload :FileEntry, 'browse_everything/file_entry'