Skip to content

Instantly share code, notes, and snippets.

View cbeer's full-sized avatar

Chris Beer cbeer

View GitHub Profile
Index: src/main/java/fedora/server/access/FedoraAccessServlet.java
===================================================================
--- src/main/java/fedora/server/access/FedoraAccessServlet.java (revision 8470)
+++ src/main/java/fedora/server/access/FedoraAccessServlet.java (working copy)
@@ -660,6 +660,17 @@
sb.append(line);
}
+ String query = request.getQueryString();
+
Index: src/main/java/fedora/server/storage/DefaultDOManager.java
===================================================================
--- src/main/java/fedora/server/storage/DefaultDOManager.java (revision 8470)
+++ src/main/java/fedora/server/storage/DefaultDOManager.java (working copy)
@@ -77,6 +77,10 @@
import fedora.server.validation.DOValidatorImpl;
import fedora.server.validation.ValidationUtility;
+import java.util.concurrent.TimeUnit;
+import java.util.concurrent.locks.Lock;
package fedora.server.storage.lowlevel;
import java.io.File;
import java.util.Map;
import fedora.server.errors.LowlevelStorageException;
/**
* @author Chris Beer
*/
#!/usr/bin/env jython
# This is a Jython Servlet wrapper for FITS <http://code.google.com/p/fits/>
#
# INSTALL:
# Set the FITS_HOME variable to the location of the FITS package
#
# Some JARs may need to be moved into the endorsed folder (./common/endorsed)
# like jaxon, jdom, saxon, saxpath, and xerces.
#
RewriteEngine On
RewriteMap pairtree-map prg:/opt/local/apache2/map.pairtree.py
RewriteLock /opt/local/apache2/map.pairtree.py.lock
RewriteRule ^/pt/(.+?)/(.*)$ /pairtree/${pairtree-map:$1}/$2
RewriteEngine On
RewriteMap fedora-map prg:/wgbh/http/openvault/map.fedora.py
RewriteCond %{REQUEST_URI} Proxy #map just URIs with Proxy in them..
RewriteRule ^/fedora/get/([a-zA-Z0-9/:\-\.]+)$ ${fedora-map:$1} [QSA] # send along the query string.. hopefully the regex is about right.. ought to check it someday.
UPEI: http://islandlives.ca/
IslandLives contains community and church histories and it builds on the Robertson Library’s mission to preserve and share unique material relating to Prince Edward Island and demonstrates UPEI's ongoing commitment to making PEI's cultural and published heritage available to all.
Columbia: http://ccnmtl.columbia.edu/
Columbia Digital Library Architecture (pdf): http://lib.stanford.edu/files/pasig2009sf/pasig2009sf_columbia_rtc.pdf
Glasgow : http://www.spokenword.ac.uk/
Spoken Word Services is based at Glasgow Caledonian University. Our core aim is to enhance and transform educational experience through the integration of digitised spoken word audio and video into learning and teaching.
BBC in partnership with universities: http://www.bbc.co.uk/rd/projects/2009/10/semedia.shtml
# Edit this Gemfile to bundle your application's dependencies.
# This preamble is the current preamble for Rails 3 apps; edit as needed.
path "/path/to/rails", :glob => "{*/,}*.gemspec"
git "git://github.com/rails/rack.git"
gem "rails", "3.0.pre"
gem 'rspec', '1.3.0'
gem 'rspec-rails', '1.3.2'
gem 'webrat', '0.7.0'
@cbeer
cbeer / application_helper.rb
Created March 2, 2010 19:40
Solr highlighting for blacklight
require_dependency 'vendor/plugins/blacklight/app/helpers/application_helper.rb'
# Methods added to this helper will be available to all templates in the application.
module ApplicationHelper
#[...]
def field_with_highlighting document, field, sep='...'
#this is pretty ugly..
return @response['highlighting'][document.get(:id)][field].join(sep) unless @response['highlighting'][document.get(:id)].blank?
end
end
@cbeer
cbeer / blacklight_config.rb
Created March 8, 2010 20:24
monkey patch in MoreLikeThis for Blacklight
Blacklight.configure(:shared) do |config|
[...]
config[:mlt_fields] = ['people', 'place', 'date', 'topic']
[...]
end