Skip to content

Instantly share code, notes, and snippets.

View cbeer's full-sized avatar

Chris Beer cbeer

View GitHub Profile
class Plugin_Search_Parse_ContentOnly
{
static public function register() {
$objHook = Vault_Hook::getInstance();
$s = __CLASS__;
$o = new $s;
$objHook->register($o);
}
public function search_parse_assemble(&$search) {
$search->parts['fq'][] = 'fedora.contentModel:[* TO *]';
<?xml version="1.0" encoding="UTF-8"?>
<foxml:digitalObject VERSION="1.1" PID="djatoka:3001"
xmlns:foxml="info:fedora/fedora-system:def/foxml#"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="info:fedora/fedora-system:def/foxml# http://www.fedora.info/definitions/1/0/foxml1-1.xsd">
<foxml:objectProperties>
<foxml:property NAME="info:fedora/fedora-system:def/model#state" VALUE="Active"/>
<foxml:property NAME="info:fedora/fedora-system:def/model#label" VALUE="???"/>
<foxml:property NAME="info:fedora/fedora-system:def/model#createdDate" VALUE="2009-10-24T01:30:16.310Z"/>
<foxml:property NAME="info:fedora/fedora-system:def/view#lastModifiedDate" VALUE="2009-10-24T01:52:56.745Z"/>
[:wqueue_process, TypeError, #<TypeError: singleton can't be dumped>]
./lib/ruote/util/serializer.rb:57:in `dump'
./lib/ruote/util/serializer.rb:57
./lib/ruote/util/serializer.rb:94:in `call'
./lib/ruote/util/serializer.rb:94:in `encode'
./lib/ruote/storage/fs_storage.rb:78:in `[]='
./lib/ruote/storage/fs_storage.rb:77:in `open'
./lib/ruote/storage/fs_storage.rb:77:in `[]='
./lib/ruote/storage/base.rb:54:in `receive'
./lib/ruote/queue/workqueue.rb:100:in `send'
require 'dispatcher'
require 'oai'
require 'rsolr'
require 'rsolr-ext'
module OAI_DocumentPatch
def self.included(base)
base.extend(ClassMethods)
base.send(:include, InstanceMethods)
end
require 'dispatcher'
require 'odrl/lib/odrl'
module Rights_DocumentPatch
def self.included(base)
base.extend(ClassMethods)
base.send(:include, InstanceMethods)
end
module ClassMethods
<process-definition name="modifyObject">
<if>
<equals field-value="state" other-value="A"></equals>
<sequence>
<participant ref="notify_on_start"></participant>
<participant ref="parse_dam_dump"></participant>
<forget>
<participant ref="log"></participant>
</forget>
<concurrent-iterator on-field="assets" to-field="asset">
require 'rubygems'
$:.unshift('lib')
require 'ruote/engine'
require 'ruote/log/logger'
require 'ruote/log/fs_history'
require 'ruote/part/fs_participant'
require 'ruote/part/block_participant'
require 'ruote/part/smtp_participant'
$engine = Ruote::FsPersistedEngine.new(:definition_in_launchitem_allowed => true, :s_logger => $logger)
We couldn’t find that file to show.
@cbeer
cbeer / WSPIDGenerator.java
Created January 10, 2010 16:01
This is a Fedora PID generate that requests new PIDs from a webservice (like CDL's NOID)
/*
* This is a Fedora PID generate that requests new PIDs from a webservice (like CDL's NOID), e.g.:
* <module role="fedora.server.management.PIDGenerator" class="fedora.server.management.WSPIDGenerator">
* <comment>The web services pid generator.</comment>
* <param name="url" value="http://example.org/nd/noidu_{nsID}?mint+1"/>
* <param name="connectionTimeout" value="5000" />
* </module>
*/
package fedora.server.management;
private final Set<String> m_lockedPIDs;
[...]
/**
* Creates a new DefaultDOManager.
*/
public DefaultDOManager(Map<String, String> moduleParameters, Server server, String role)
throws ModuleInitializationException {
super(moduleParameters, server, role);