Hi Jacob

I think this is very cool

I figured out how to run a little program via

bundle exec jruby counts.rb

but I can’t get an interactive thing going

> jirb -I lib
or
>  bundle exec jirb

leads to a complaint about  cannot convert instance of class 
org.jruby.RubyObject to class org.dspace.core.Context

do you have any hints ?
I’d love to be able to do a bit of interactive work with this

Monika


jruby-1.7.15 :001 > require 'counts'
INFO: Loading provided config file: 
/Users/monikam/Installations/pri_devl/config/dspace.cfg
INFO: Using dspace provided log configuration (log.init.config)
INFO: Loading: /Users/monikam/Installations/pri_devl/config/log4j.properties
TypeError: cannot convert instance of class org.jruby.RubyObject to class 
org.dspace.core.Context
from /Users/monikam/Documents/GDSpace/jruby/counts.rb:9:in `(root)'
from org/jruby/RubyKernel.java:1065:in `require'
from 
/Users/monikam/.rvm/rubies/jruby-1.7.15/lib/ruby/shared/rubygems/core_ext/kernel_require.rb:1:in
 `(root)'
from 
/Users/monikam/.rvm/rubies/jruby-1.7.15/lib/ruby/shared/rubygems/core_ext/kernel_require.rb:55:in
 `require'
from org/jruby/RubyKernel.java:1101:in `eval'
from (irb):1:in `evaluate'
from org/jruby/RubyKernel.java:1501:in `loop'
from org/jruby/RubyKernel.java:1264:in `catch'
from org/jruby/RubyKernel.java:1264:in `catch'
from /Users/monikam/.rvm/rubies/jruby-1.7.15/bin/jirb:13:in `(root)'


________________
Monika Mevenkamp
phone: 609-258-4161
693 Alexander Road, Princeton University, Princeton, NJ 08544


On Jan 21, 2015, at 12:27 PM, Brown, Jacob 
<[email protected]<mailto:[email protected]>> wrote:

Hi Layale,

I don’t think there are really any built-in batch processes for working with 
bitstream permissions.

I’ve mentioned this before, and I don’t want to spam the list with it too much, 
but I’m working on a tool that helps set up a scripting environment for DSpace 
using the JRuby programming language. This tool allows one to access the DSpace 
core API and perform actions within a DSpace system.

The tool is available here: https://github.com/kardeiz/dscriptor

I’ve added an example script for your situation here (note that this file would 
require some modification, and I am not exactly sure what you mean by 
“[changing] according to the publication 
date”):https://github.com/kardeiz/dscriptor/blob/master/examples/change_policies_conditionally.rb.

The documentation is still somewhat sparse, and using the tool does require 
some programming knowledge, but if you are familiar with Java or Ruby (or a 
similar scripting language), I encourage you to take a look.

Please note that this tool has the potential to cause unwanted changes to your 
system, so please be careful. If you choose to use it, I encourage you to run 
the script on a test environment first and backup your database before running 
in production.

Jacob Brown
Digital Services Librarian
[email protected]<mailto:[email protected]>
817-257-5339



From: Layale Bassil [mailto:[email protected]]
Sent: Wednesday, January 21, 2015 9:41 AM
To: [email protected]<mailto:[email protected]>
Subject: [Dspace-tech] Authorization of DSpace items...
Importance: High

Hello All,

As far as I know, authorizations in DSpace are usually set for a community, or 
collection, or even at the item level.  If we setup the authorization for a 
collection, then we load data, all items inherit that setup before loading, and 
we cannot globally change the authorization for those items.

Currently, on the DSpace instance I am working on (version 4.2), all item 
bitstreams are not accessible by users; however, I need to change the 
authorization of those bitstreams to be (Anonymous) according to the 
publication date.

How can this be done? Is there any add-on that can help me changing the access 
authorization of an item bitstream? Or any script to do so on a set of items 
instead of going at each item?

Your help is very much appreciated.
Regards.

------------------------------------------------------------------------------
New Year. New Location. New Benefits. New Data Center in Ashburn, VA.
GigeNET is offering a free month of service with a new server in Ashburn.
Choose from 2 high performing configs, both with 100TB of bandwidth.
Higher redundancy.Lower latency.Increased capacity.Completely compliant.
http://p.sf.net/sfu/gigenet_______________________________________________
DSpace-tech mailing list
[email protected]<mailto:[email protected]>
https://lists.sourceforge.net/lists/listinfo/dspace-tech
List Etiquette: https://wiki.duraspace.org/display/DSPACE/Mailing+List+Etiquette

------------------------------------------------------------------------------
New Year. New Location. New Benefits. New Data Center in Ashburn, VA.
GigeNET is offering a free month of service with a new server in Ashburn.
Choose from 2 high performing configs, both with 100TB of bandwidth.
Higher redundancy.Lower latency.Increased capacity.Completely compliant.
http://p.sf.net/sfu/gigenet
_______________________________________________
DSpace-tech mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/dspace-tech
List Etiquette: https://wiki.duraspace.org/display/DSPACE/Mailing+List+Etiquette

Reply via email to