Skip to content

Instantly share code, notes, and snippets.

@yulgit1
yulgit1 / gist:02ab681fcb154c93e12a
Created September 3, 2014 17:41
semantic handle creation using java Web Service client (using Netbeans wizard to create client methods)
/*
* To change this template, choose Tools | Templates
* and open the template in the editor.
*/
package edu.yale.library.fortunoff.handles;
import edu.yale.library.fortunoff.link.ResultMap;
//import javax.xml.rpc.Call;
@yulgit1
yulgit1 / gist:41ddafc5831cb4f125c6
Created September 3, 2014 17:47
semantic handle creation using java Web Service client (another example) (using Netbeans wizard to create client methods)
/*
* To change this template, choose Tools | Templates
* and open the template in the editor.
*/
package edu.yale.library.ilts.findingaids;
//import edu.yale.library.ilts.handles.linktest.HandleMap.Map.Entry;
//import edu.yale.library.ilts.handles.linktest.ResultMap;
import java.util.HashMap;
import java.util.Map;
@yulgit1
yulgit1 / gist:98489d23ca87d4b7f3bc
Last active August 29, 2015 14:07
YUL Access Control example
#current implementation as solr fields
#finegrained (view and download options for each datastream)
#using json nested literals for resolution
<str name="thumbnail_ss">Open Access</str>
<str name="jpg_ss">Yale Only</str>
<str name="jp2_ss">IP Restriction{130.132.111.227,128.36.*.*};NetID Restriction{handdan1}</str>
<str name="pdf_ss">Open Access</str>
<str name="ocr_ss">AD Group{mssasystems,libraryserveradmins}</str>
<str name="metadata_ss">Aeon Registration</str>
<str name="thumbnail_dl_ss">Open Access</str>
@yulgit1
yulgit1 / gist:145d6f0d681b236a97f0
Created November 13, 2014 16:41
riiif stack trace
[ 2014-11-13 10:58:13.0001 45921/7f7b72a65700 Pool2/Pool.h:726 ]: Analytics collection time...
[ 2014-11-13 10:58:13.0679 45921/7f7b72a65700 Pool2/Pool.h:830 ]: Analytics collection done; next analytics collection in 4.932 sec
[ 2014-11-13 10:58:13.5257 45921/7f7b715c0700 agents/HelperAgent/RequestHandler.h:1336 ]: [Client 20] New client accepted; new client count = 1
[ 2014-11-13 10:58:13.5259 45921/7f7b715c0700 Pool2/Group.h:775 ]: Session checked out from process (pid=46199, group=/usr/local/blacklight/diggit-hydra#default)
[ 2014-11-13 10:58:13.5260 45921/7f7b715c0700 agents/HelperAgent/RequestHandler.h:1959 ]: [Client 20] Session checked out: pid=46199, gupid=16809c2-FtkgTrFkZpq
[ 2014-11-13 10:58:13.5260 45921/7f7b715c0700 agents/HelperAgent/RequestHandler.h:2054 ]: [Client 20] Session initiated: fd=27
[ 2014-11-13 10:58:13.5430 45921/7f7b70919700 Pool2/Implementation.cpp:1274 ]: [App 45988 stderr] [ 2014-11-13 10:58:13.5428 46199/0x00000004c6b5c0(Worker 1) utils.rb:74 ]: *** Exception Errno::ENOENT in
require 'savon'
handle_wsdl = "http://linktest.odai.yale.edu/ypls-ws/PersistentLinking?wsdl"
handle_prefix = "10079.1/isps"
handle_group = "10079.1/ISPS"
handle_user = "10079.1/ISPS"
handle_credential = "*******"
handle_base = "http://isps.yale.edu/"
#handle_group = "10079.1/DIGCOLL"
@yulgit1
yulgit1 / gist:6b040e00ae67dae624b3
Created March 18, 2015 18:11
yfad solr document
<doc>
<str name="PID">beinecke:irving</str>
<arr name="dc.contributor">
<str>Irving, Washington, 1783-1859.</str>
</arr>
<arr name="dc.creator">
<str>Irving, Washington, 1783-1859.</str>
</arr>
<arr name="dc.date">
<str>1802-1966</str>
/**
* Copyright 2015 DuraSpace, Inc.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
Addded stored procedures:
Stored procedure name: lb_datehydraend
Input parameter: hpid
Replaces: update = @@client.execute(%Q/update dbo.hydra_publish set dateHydraEnd=GETDATE() where hpid=#{i["hpid"]}/)
Line : 299,309,332,351,370,497
Stored procedure name: lb_datehydraend_hydraid
Input parameter: hpid,hydraid
Replaces: str = %Q/update dbo.hydra_publish set hydraID='#{obj.pid}', dateHydraEnd=GETDATE() where hpid=#{i["hpid"]}
Line : 699
sysops-mbp:fcrepo4-vagrant ermadmix$ curl http://localhost:8080/fcrepo/rest/objects/cover/files/cover.jpg/fcr:metadata
@prefix dc: <http://purl.org/dc/elements/1.1/> .
@prefix nt: <http://www.jcp.org/jcr/nt/1.0> .
@prefix prov: <http://www.w3.org/ns/prov#> .
@prefix pcdm: <http://pcdm.org/models#> .
@prefix foaf: <http://xmlns.com/foaf/0.1/> .
@prefix test: <info:fedora/test/> .
@prefix fedoraconfig: <http://fedora.info/definitions/v4/config#> .
@prefix image: <http://www.modeshape.org/images/1.0> .
@prefix audit: <http://fedora.info/definitions/v4/audit#> .
@yulgit1
yulgit1 / gist:513cb490863c41fed5bf
Last active August 29, 2015 14:21
k2findit search conditionals
catalog controller:
search fields (in catalog controller):
"all_fields": default request handler, default_solr_params
"full_text": fulltext request handler (like default but including open and restricted fulltext in search), fq includes archivaldigitized
"full_text " :fulltext open request handler (like default but including open fulltext in search), fq including archivaldigitized
NOte: if full_text and not logged in then "full_text ", if logged in then "full_text"
filter query (fq) conditionals (in solr_helper):
if (global access and "all_fields") - remove restricted filter
if (global access and "fulltext") - remove restricted filter and add archivalDigitized