<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>Sam Moffatt @ Pasamio.com &#187; eprints</title>
	<atom:link href="http://pasamio.com/category/eprints/feed/" rel="self" type="application/rss+xml" />
	<link>http://pasamio.com</link>
	<description>Sam Moffatt's Tech Blog: Writings on Technology</description>
	<lastBuildDate>Sat, 17 Mar 2012 03:24:00 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.3.2</generator>
		<item>
		<title>Month in review: January</title>
		<link>http://pasamio.com/2011/02/01/month-in-review-january/</link>
		<comments>http://pasamio.com/2011/02/01/month-in-review-january/#comments</comments>
		<pubDate>Tue, 01 Feb 2011 07:25:26 +0000</pubDate>
		<dc:creator>pasamio</dc:creator>
				<category><![CDATA[accesscontrol]]></category>
		<category><![CDATA[authentication]]></category>
		<category><![CDATA[eprints]]></category>
		<category><![CDATA[integration]]></category>
		<category><![CDATA[joomla]]></category>
		<category><![CDATA[ldap]]></category>
		<category><![CDATA[microsoft]]></category>
		<category><![CDATA[university]]></category>
		<category><![CDATA[vufind]]></category>
		<category><![CDATA[web]]></category>
		<category><![CDATA[work]]></category>

		<guid isPermaLink="false">http://pasamio.com/?p=778</guid>
		<description><![CDATA[January for me was an interesting and varied month. Here is a quick look back at what I got up to in the month. Joomla! integration for the Access All Databases Access All Databases is a USQ system that really screams to be embedded in a CCK style app. It is a set of custom [...]]]></description>
			<content:encoded><![CDATA[<p>January for me was an interesting and varied month. Here is a quick look back at what I got up to in the month.<br />
<span id="more-778"></span><br />
<strong>Joomla! integration for the Access All Databases</strong><br />
<a href="http://pasamio.com/wp-content/uploads/2011/01/aad-joomla-research.png"><img src="http://pasamio.com/wp-content/uploads/2011/01/aad-joomla-research-150x150.png" alt="" title="Access All Databases in Joomla!" width="150" height="150" class="alignleft size-thumbnail wp-image-795" align="left" valign="top" /></a><a href="http://resguide.usq.edu.au">Access All Databases</a> is a USQ system that really screams to be embedded in a CCK style app. It is a set of custom fields, some search and a bit of link tracking. Beyond versioning and approval of edits there is no significant functionality beyond CRUD in this application. At the moment it is a hand built system written in PHP and badly needing redevelopment into a more modular nature. The approach I&#8217;ve taken is to experiment with using Joomla! and Flexicontent to rebuild the application from scratch. So far I&#8217;m doing well and I&#8217;ve managed to recreate the basic look and feel of the site. I&#8217;ve got one custom menu module to integrate Flexicontent&#8217;s nested categories to emulate the behaviour of another primitive CMS USQ uses called &#8220;<a href="http://libtute.usq.edu.au">Finding Information Tutorial</a>.&#8221; I&#8217;ve done a custom module override for the menu as well to get it using the current USQ look and feel by default. The great thing is that there is a mobile friendly version very easily with standard Joomla! tools. I don&#8217;t think I&#8217;ll get more time to play with this soon however it is already a good start.</p>
<p><strong>VuFind UConnect SSO</strong><br />
<a href="http://pasamio.com/wp-content/uploads/2011/01/vufind-geany.png"><img src="http://pasamio.com/wp-content/uploads/2011/01/vufind-geany-150x150.png" alt="" title="VuFind UConnect SSO in Geany" width="150" height="150" class="alignleft size-thumbnail wp-image-796" align="left" valign="top" /></a>VuFind is the library catalogue system and UConnect is USQ&#8217;s custom SSO system that was developed. I&#8217;ve gone through and built an integration between the two which looks like the following:<br />
<a href="http://pasamio.com/wp-content/uploads/2011/01/vufind-sso.png"><img src="http://pasamio.com/wp-content/uploads/2011/01/vufind-sso-300x207.png" alt="" title="VuFind with UConnect SSO" width="300" height="207" class="alignnone size-medium wp-image-794" valign="none" /></a><br />
I talk a bit more about <a href="http://pasamio.com/?p=762">VuFind, SSO and authentication</a> in an earlier blog post.</p>
<p><strong>Book Finder</strong><br />
This is primarily the work of Ken MacAlpine who is working on mobile technologies at USQ. Ken developed an SVG powered map of the top floor of the library to aide in the location of books. He put together a database of roughly where the catalogue numbers stop and start for each shelf on each side. It has been integrated into the catalogue and shows up as a &#8220;Show on Map&#8221; link for Toowoomba Main Collection items.<br />
<a href="http://pasamio.com/wp-content/uploads/2011/01/bookfinder-1.png"><img src="http://pasamio.com/wp-content/uploads/2011/01/bookfinder-1-300x207.png" alt="" title="USQ Book Finder in Library catalogue" width="300" height="207" class="alignnone size-medium wp-image-793" /></a><br />
 At some point in the future we will work to expand it to all campuses and collections. When it is clicked it appears in a new window like this:<br />
<a href="http://pasamio.com/wp-content/uploads/2011/01/bookfinder-2.png"><img src="http://pasamio.com/wp-content/uploads/2011/01/bookfinder-2-192x300.png" alt="" title="USQ BookFinder display" width="192" height="300" class="alignnone size-medium wp-image-792" /></a><br />
It is aimed to be the same size as an iPhone display so that it fits neatly there. It also works in all browsers that support SVG. Fallback support is provided for IE since it doesn&#8217;t support SVG yet.</p>
<p><strong>ePrints, RPCS and data conversion!</strong><br />
<a href="http://pasamio.com/wp-content/uploads/2011/01/rpcs-webmatrix.png"><img src="http://pasamio.com/wp-content/uploads/2011/01/rpcs-webmatrix-150x150.png" alt="" title="RPCS modifications in Web Matrix" width="150" height="150" class="alignleft size-thumbnail wp-image-788"  align="left" valign="top" /></a>As an interesting exercise I also spent some time converting data from an internal reporting system, RPCS, into our open access repository &#8211; ePrints. This was a fun project which required connecting to RPCS&#8217; MSSQL database and outputting an XML file for ePrints to eat. To do this I figured I&#8217;d pull out <a href="http://www.microsoft.com/web/">Web Matrix</a>, Microsoft&#8217;s cut down editor for web developers. It feels on par with Geany though it has a built in web server, request tracking and a database explorer. It also integrates with the Web Platform Installer product which means I can easily install other applications. I used Web Matrix to kick start the Joomla! install for the Access All Databases research project as well.</p>
<p><a href="http://pasamio.com/wp-content/uploads/2011/01/eprints-eclipse.png"><img src="http://pasamio.com/wp-content/uploads/2011/01/eprints-eclipse-150x150.png" alt="" title="ePrints Author ID XML file in Eclipse" width="150" height="150" class="alignright size-thumbnail wp-image-791"  align="right" valign="top" /></a>The RPCS data is loaded into our ePrints system along side the <a href="http://pasamio.com/2009/08/28/eprints-author-id/">Author ID</a> project that existed there. We&#8217;re also pulling across the data from their system which is going to result in duplicate authors until we merge them down to uniques however doing so in an automated manner isn&#8217;t easily possible. There is a whole heap of work to get things together but all in all we&#8217;re doing well.</p>
<p><strong>EQUELLA Moodle module</strong><br />
<a href="http://pasamio.com/wp-content/uploads/2011/01/moodle-equella-1.png"><img src="http://pasamio.com/wp-content/uploads/2011/01/moodle-equella-1-150x150.png" alt="" title="Screenshot of EQUELLA Moodle module 1" width="150" height="150" class="alignleft size-thumbnail wp-image-790" align="left" valign="top" /></a>Last but not least I&#8217;ve been playing with the EQUELLA Moodle module. It adds an extra option to the Moodle resource drop down and enables access to select items from the EQUELLA repository software. </p>
<p><a href="http://pasamio.com/wp-content/uploads/2011/01/moodle-equella-2.png"><img src="http://pasamio.com/wp-content/uploads/2011/01/moodle-equella-2-150x150.png" alt="" title="Screenshot of EQUELLA Moodle module 2" width="150" height="150" class="alignright size-thumbnail wp-image-789"  align="right" valign="top" /></a>I&#8217;ve used Web Matrix here to deploy out a quick Moodle site utilising the same Web Platform Installer technology and managed to get up and running quickly with everything. The deployment of the module to our main Moodle environment would enable lecturers to directly select course readings to embed in relevant modules on their Moodle course pages &#8211; exciting!</p>
]]></content:encoded>
			<wfw:commentRss>http://pasamio.com/2011/02/01/month-in-review-january/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Adding a new dataset to ePrints 3.2</title>
		<link>http://pasamio.com/2010/12/04/adding-a-new-dataset-to-eprints-3-2/</link>
		<comments>http://pasamio.com/2010/12/04/adding-a-new-dataset-to-eprints-3-2/#comments</comments>
		<pubDate>Sat, 04 Dec 2010 12:20:12 +0000</pubDate>
		<dc:creator>pasamio</dc:creator>
				<category><![CDATA[eprints]]></category>

		<guid isPermaLink="false">http://pasamio.com/?p=747</guid>
		<description><![CDATA[For the last week or so I have been digging around ePrints 3.2 and been trying to work out how to add a dataset. I&#8217;d done this previously with the author ID project however ePrints 3.2 advertises that is has user defined datasets. It has to be said that adding a new dataset is easier [...]]]></description>
			<content:encoded><![CDATA[<p>For the last week or so I have been digging around ePrints 3.2 and been trying to work out how to add a dataset. I&#8217;d done this previously with the author ID project however ePrints 3.2 advertises that is has <a href="http://wiki.eprints.org/w/New_Features_in_EPrints_3.2#User_Defined_Datasets">user defined datasets</a>. It has to be said that adding a new dataset is easier said than documented &#8211; not to mention done. But I figured I&#8217;d document how I managed to get it to work.<br />
<span id="more-747"></span><br />
To begin with I&#8217;m using a clean ePrints 3.2 install with a new repository. I&#8217;ve not done much configuration to it because I&#8217;m basically looking at how to add a dataset. I&#8217;ve installed this on a Debian 5.0 box and installed ePrints via the Debian package. It has to be the easiest way of doing things IMHO so I definitely recommend it. Debian is my preferred distribution so there is an allegiance there.</p>
<p>Once you&#8217;ve got ePrints set up with a new repository, check out the /archives/repositoryname/cfg/cfg.d directory and look for a &#8220;datasets.pl&#8221; file. This is the first step in the process and documents two samples: one using a set of fields and a second with a class that you can derive from. In practice neither example works properly which is a bit disappointing. Fortunately the second solution with the class works with one minor modification: you need to implement the &#8220;get_dataset_id&#8221; function for it to work properly. This is relatively trivial to complete and you&#8217;re off on your way. A copy of the datasets.pl is included in a ZIP package linked at the end of this blog post.</p>
<p>Once we&#8217;ve got our datasets we&#8217;re going to need to update the repository structure to add them to the database. ePrints makes this relatively trivial with the following command:</p>
<div class="codecolorer-container text default" style="overflow:auto;white-space:nowrap;border:1px solid #9F9F9F;width:435px;"><div class="text codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap">/path/to/eprints3/bin/epadmin update_database_structure repositoryname</div></div>
<p>That will automatically connect to the relevant database, create tables and add fields where necessary. Very funky.</p>
<p>The next stop on the list is to create a workflow for it. If you&#8217;re not familiar with how ePrints workflows behave then check out the ePrints wiki on the <a href="http://wiki.eprints.org/w/Workflow_Format">Workflow Format</a> for more details. The basics are that it describes how fields should work on a screen and some limited scripting capability. To begin with we need to head to our /archives/repositoryname/cfg/workflows directory and create a new one. My dataset was called &#8220;service&#8221; so I created a new &#8220;service&#8221; directory. Because I&#8217;m lazy, I copied the user/default.xml file into service/default.xml and edited it to meet my needs. Mostly deleted the items and added the fields that I cared about. Again, if in doubt check out the documentation on workflows.</p>
<p>Now ePrints also has citation support and you guessed it we need to provide a citation. The <a href="http://wiki.eprints.org/w/Citation_Format">Citation Format</a> is documented in the wiki as well though a bit simpler than the citation format. To create this we jump to /archives/repositoryname/cfg/citations, create a new directory for the dataset (&#8220;service&#8221; again) and then because I&#8217;m lazy copy the user/default.xml file to service/default.xml and customise to what you need. The format is again pretty simple so follow your nose from what is on offer and again if in doubt check out the wiki.</p>
<p>At this point if you restart your ePrints instance to ensure the configuration is fully reloaded you need to grant your users some roles before you can see the dataset. If you jump into your favourite user and administer their account you will need to add some roles. There are a few different actions that appear to make sense:</p>
<ul>
<li>view &#8211; required to see the dataset</li>
<li>create &#8211; add a new item to the dataset</li>
<li>edit &#8211; edit existing items in the dataset</li>
<li>destroy &#8211; remove an item from the dataset</li>
<li>details &#8211; display a details screen for an item in the dataset</li>
</ul>
<p>Each of these can be turned into a role by adding &#8220;+datasetname/action&#8221; into the roles box in the administrate user screen. In my particular case I did &#8220;+service/view&#8221;, &#8220;+service/create&#8221;, etc for those roles. Once you give yourself all of these roles you will be able to see under the &#8220;Manage Records&#8221; option (to the right of &#8220;Manage deposits&#8221;).</p>
<p>At this point you&#8217;re looking at it and it looks ugly because the strings aren&#8217;t translated properly. ePrints makes this easy, just click on the &#8220;Edit page phrases&#8221; button. It&#8217;ll list the phrases displayed on the screen and give you the option to add new phrases for the ones you&#8217;re missing whilst highlighting it. Fill in the blanks as you go and once you&#8217;ve added phrases for everything you&#8217;re ready to deploy out your data set!</p>
<p>So whilst we&#8217;re done and we can edit it, we probably want to grant it to our users to have a look at these as well. Adding these roles individually to our users isn&#8217;t fun, however if we edit the /archives/repositoryname/cfg/cfg.d/user_roles.pl file and add the roles to the existing user role we gain what we need. In addition to the existing roles we added previously (e.g. service/view), a generic user account will need the &#8220;datasets&#8221; role to be able to see the datasets tab. This makes the user_roles.pl section for user relatively simple:</p>
<div class="codecolorer-container text default" style="overflow:auto;white-space:nowrap;border:1px solid #9F9F9F;width:435px;"><div class="text codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap">$c-&gt;{user_roles}-&gt;{user} = [qw{<br />
&nbsp; &nbsp; &nbsp; &nbsp; general<br />
&nbsp; &nbsp; &nbsp; &nbsp; edit-own-record<br />
&nbsp; &nbsp; &nbsp; &nbsp; saved-searches<br />
&nbsp; &nbsp; &nbsp; &nbsp; set-password<br />
&nbsp; &nbsp; &nbsp; &nbsp; deposit<br />
&nbsp; &nbsp; &nbsp; &nbsp; change-email<br />
&nbsp; &nbsp; &nbsp; &nbsp; +service/add<br />
&nbsp; &nbsp; &nbsp; &nbsp; +service/edit<br />
&nbsp; &nbsp; &nbsp; &nbsp; +service/view<br />
&nbsp; &nbsp; &nbsp; &nbsp; +datasets<br />
}],</div></div>
<p>Pretty easy. At this point our users can now add, edit and view records in the service dataset. Mission accomplished? The next step is to clean up everything, add a brief citation file in addition to the default citation and for me work out how to have per user items so that users can only edit their own items. But I think that is enough for today. Hopefully I&#8217;ll be able to work out how to limit items to just their own users but I might need to build my own screens. I&#8217;ve done this before with USQ&#8217;s Author ID project so I know how to do it, I&#8217;d just rather not.</p>
]]></content:encoded>
			<wfw:commentRss>http://pasamio.com/2010/12/04/adding-a-new-dataset-to-eprints-3-2/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>How-To: Setting up depositor reassignment in ePrints</title>
		<link>http://pasamio.com/2009/09/24/how-to-setting-up-depositor-reassignment-in-eprints/</link>
		<comments>http://pasamio.com/2009/09/24/how-to-setting-up-depositor-reassignment-in-eprints/#comments</comments>
		<pubDate>Thu, 24 Sep 2009 05:48:02 +0000</pubDate>
		<dc:creator>pasamio</dc:creator>
				<category><![CDATA[eprints]]></category>
		<category><![CDATA[today]]></category>

		<guid isPermaLink="false">http://pasamio.com/?p=570</guid>
		<description><![CDATA[ePrints is one of those projects that I seem to spend a lot of time doing minor tweaks to and changes to help the Library do their job effectively. This shifts from major projects like Author ID to mundane tasks like refreshing their templates and style to match the marketing departments wishes. One of the [...]]]></description>
			<content:encoded><![CDATA[<p>ePrints is one of those projects that I seem to spend a lot of time doing minor tweaks to and changes to help the Library do their job effectively. This shifts from major projects like Author ID to mundane tasks like refreshing their templates and style to match the marketing departments wishes. One of the things I&#8217;ve done recently is setting up ePrints to be able to reassign the depositor field.<br />
<span id="more-570"></span><br />
In ePrints when an eprint is deposited it is marked against the user who deposited it. This user has the ability to do tasks with the paper until it is submitted for review and it eventually works its way into the repository. When it is in the repository this is the name that is assigned to the document.</p>
<p>Here at USQ we have cases where we have departmental staff in faculties or research centres that deposit papers on the behalf of academics. These might be secretararies or research assistants who handle the initial entry of data into the system, attaching the paper and the other tasks that are required. At the end of this process the library wanted to change the depositor from this user and reassign it to the primary author of the paper. So they needed a way to reassign the depositor. They didn&#8217;t want this to occur immediately and wanted to have some control over the reassignment. Initially I built it with a user picker for the depositor to select the new user however the Library requested a generic text field instead that the depositor could use to type the details of the person to which they wished the depositor reassigned.</p>
<p>So the first step in all of this drama is to add a few fields. We ended up with three fields: the first was a field for the depositors to enter the name of the user who the item should be reassigned to, the second was an ItemRef field which linked to the user table to have a representation of the user and the last was a checkbox which controlled if the user of the item is reassigned. The first field is visible to any one in the repository who has an account whilst the last two are visible only to repository staff (e.g. editors or administrators).<br />
So to do this, we need to navigate to /opt/eprints3/archives/[archivename]/cfg/cfg.d/eprints_fields.pl and add the following:</p>
<div class="codecolorer-container text default" style="overflow:auto;white-space:nowrap;border:1px solid #9F9F9F;width:435px;"><div class="text codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap">{<br />
'name' =&amp;gt; 'new_depositor_name',<br />
'type' =&amp;gt; 'text'<br />
},<br />
{<br />
'name' =&amp;gt; 'new_depositor_assignment',<br />
'type' =&amp;gt; 'itemref',<br />
'datasetid' =&amp;gt; 'user'<br />
},<br />
{<br />
'name' =&amp;gt; 'new_depositor_update',<br />
'input_style' =&amp;gt; 'checkbox',<br />
'type' =&amp;gt; 'boolean'<br />
}</div></div>
<p>Once we&#8217;ve done this, you need to run &#8220;/opt/eprints3/bin/epadmin update_database_structure [archivename]&#8221; to add the new fields to the database.</p>
<p>The next task we need to do is add this to the eprint workflow so that the fields turn up on the screen. This can be achieve by going to &#8220;/opt/eprints3/archives/[archivename]/cfg/workflows/eprint/default.xml&#8221; and adding it into one of the stages. I picked the &#8220;Notes&#8221; stage or tab to put it in, eventually it looked like this:</p>
<div class="codecolorer-container text default" style="overflow:auto;white-space:nowrap;border:1px solid #9F9F9F;width:435px;"><div class="text codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap">&amp;lt;stage name=&quot;notes&quot;&amp;gt;<br />
&amp;lt;component&amp;gt;&amp;lt;field ref=&quot;new_depositor_name&quot;/&amp;gt;&amp;lt;/component&amp;gt;<br />
&amp;lt;epc:if test=&quot;$STAFF_ONLY = 'TRUE'&quot;&amp;gt;<br />
&amp;lt;component&amp;gt;&amp;lt;field ref=&quot;new_depositor_assignment&quot;/&amp;gt;&amp;lt;/component&amp;gt;<br />
&amp;lt;component&amp;gt;&amp;lt;field ref=&quot;new_depositor_update&quot;/&amp;gt;&amp;lt;/component&amp;gt;<br />
&amp;lt;/epc:if&amp;gt;<br />
&amp;lt;/stage&amp;gt;</div></div>
<p>If you don&#8217;t have a &#8220;notes&#8221; stage already, you will need to add a new one to the flow at the top, if you&#8217;re using a standard ePrints configuration, it will look similar to this:</p>
<div class="codecolorer-container text default" style="overflow:auto;white-space:nowrap;border:1px solid #9F9F9F;width:435px;"><div class="text codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap">&amp;lt;flow&amp;gt;<br />
&amp;lt;stage ref=&quot;type&quot;/&amp;gt;<br />
&amp;lt;stage ref=&quot;files&quot;/&amp;gt;<br />
&amp;lt;stage ref=&quot;core&quot;/&amp;gt;<br />
&amp;lt;stage ref=&quot;subjects&quot;/&amp;gt;<br />
&amp;lt;stage ref=&quot;notes&quot;/&amp;gt;<br />
&amp;lt;/flow&amp;gt;</div></div>
<p>Pretty easy! The next step is to add some translations in &#8220;/opt/eprints3/archives/[archivename]/cfg/lang/en/phrases/eprint_fields.xml&#8221;. Add these lines before the final &lt;/epp:phrases&gt; line:</p>
<div class="codecolorer-container text default" style="overflow:auto;white-space:nowrap;border:1px solid #9F9F9F;width:435px;"><div class="text codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap">&amp;lt;phrase id=&quot;eprint_fieldname_new_depositor_name&quot;&amp;gt;Reassign Depositor&amp;lt;/phrase&amp;gt;<br />
&amp;lt;phrase id=&quot;eprint_fieldhelp_new_depositor_name&quot;&amp;gt;Enter the details of the depositor to which this ePrint should be assigned. Only people submitting on the behalf of other users should select this option to change the depositor. All reassignments are approved by repository staff.&amp;lt;/phrase&amp;gt;<br />
&amp;lt;phrase id=&quot;eprint_fieldname_new_depositor_assignment&quot;&amp;gt;New Depositor&amp;lt;/phrase&amp;gt;<br />
&amp;lt;phrase id=&quot;eprint_fieldhelp_new_depositor_assignment&quot;&amp;gt;Select the new depositor for this ePrint to reassign them as the depositor. There is no issue if this is set to 0.&amp;lt;/phrase&amp;gt;<br />
&amp;lt;phrase id=&quot;eprint_fieldname_new_depositor_update&quot;&amp;gt;Approve Depositor Reassignment&amp;lt;/phrase&amp;gt;<br />
&amp;lt;phrase id=&quot;eprint_fieldhelp_new_depositor_update&quot;&amp;gt;Ticking this box will trigger the reassignment of this item's depositor to the value specified in the new depositor field.&amp;lt;/phrase&amp;gt;</div></div>
<p>So there is are two phrases for each field, the name and the help text that goes with it. Most of it is pretty self explanatory. The final step in this trip is to alter &#8220;/opt/eprints3/archives/usqep3/cfg/cfg.d/eprint_fields_automatic.pl&#8221; to set it so that it will change the depositor of the item once the tick box is checked.</p>
<div class="codecolorer-container text default" style="overflow:auto;white-space:nowrap;border:1px solid #9F9F9F;width:435px;"><div class="text codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap">$c-&amp;gt;{set_eprint_automatic_fields} = sub<br />
{<br />
my( $eprint ) = @_;</div></div>
<p># Depositor Reassignment<br />
if( $eprint-&gt;get_value( &#8220;new_depositor_update&#8221; ) eq &#8220;TRUE&#8221; &amp;&amp; $eprint-&gt;get_value( &#8220;new_depositor_assignment&#8221; ) != 0 )<br />
{<br />
$eprint-&gt;set_value( &#8220;userid&#8221;, $eprint-&gt;get_value( &#8220;new_depositor_assignment&#8221; ) );<br />
$eprint-&gt;set_value( &#8220;new_depositor_assignment&#8221;, &#8220;&#8221; );<br />
$eprint-&gt;set_value( &#8220;new_depositor_name&#8221;, &#8220;&#8221; );<br />
$eprint-&gt;set_value( &#8220;new_depositor_update&#8221;, &#8220;FALSE&#8221; );<br />
}<br />
# End Depositor Reassignment<br />
my $type = $eprint-&gt;get_value( &#8220;type&#8221; );<br />
if( $type eq &#8220;monograph&#8221; || $type eq &#8220;thesis&#8221; )<br />
{<br />
These nine lines surrounded by Depositor Reassignment is inserted where it is and at this point we&#8217;re done. We&#8217;ll need to restart the server before we get too far just to ensure that everything takes properly and then we can test it all out.</p>
<p>The workflow at this point is that a user of the system marks down the person they wish to reassign as the depositor. We have an overnight report which runs to email one of our repository editors to notify them of items that are being requested to be transferred. They then view these items and enter the user ID of the user in question into the new depositor field (they can use lookup to validate it) and at this point they need to check the box to actually update the assignment. In ticking the box the the depositor is set to the value of the new depositor field, the reassignment field is blanked, the new depositor field is blanked and the check is cleared.</p>
<p>The most unfriendly aspect of this is finding the user in question. To do so you need to traverse the user search, find the user and then grab their user ID and put it in the field. This is a bit much. We also wanted to have the option to send an ameila but the editors need to be able to customise the email before it is sent and wanted control.</p>
<p>Fortunately the solution to the first problem was to utilise the Itemref custom InputForm Component that I created for the Author ID project. The second was to create a new one that primitively created a &#8220;mailto&#8221; link with a lot of the details pre-populated. For the latter I might have been able to do it within the workflow language but I felt it was easier to build in Perl.<br />
Before we begin, we&#8217;re going to need a few files:</p>
<ul>
<li>The &#8220;<a href="http://pasamio.com/wp-content/uploads/2009/09/Itemref.pm">Itemref.pm</a>&#8221; file needs to be put in the &#8220;/opt/eprints3/perl_lib/EPrints/Plugin/InputForm/Component&#8221; directory.</li>
<li>The &#8220;<a href="http://pasamio.com/wp-content/uploads/2009/09/USQ_DepositorEmail.pm">USQ_DepositorEmail.pm</a>&#8221; file needs to be put in the &#8220;/opt/eprints3/perl_lib/EPrints/Plugin/InputForm&#8221; directory.</li>
<li>The &#8220;<a href="http://pasamio.com/wp-content/uploads/2009/09/user">user</a>&#8221; file needs to be put in the &#8220;/opt/eprints3/cgi/users/popup/user&#8221; directory. The &#8220;popup&#8221; directory might not exist in your installation and will probably have to be added first.</li>
</ul>
<p>Once you&#8217;ve got these files in place we&#8217;re ready to do some more modifications. In the &#8220;/opt/eprints3/archives/[archivename]/cfg/workflows/eprint/default.xml&#8221; file where we had the following:</p>
<div class="codecolorer-container text default" style="overflow:auto;white-space:nowrap;border:1px solid #9F9F9F;width:435px;"><div class="text codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap">&amp;lt;component&amp;gt;&amp;lt;field ref=&quot;new_depositor_assignment&quot;/&amp;gt;&amp;lt;/component&amp;gt;</div></div>
<p>We&#8217;re going to change that to the following:</p>
<div class="codecolorer-container text default" style="overflow:auto;white-space:nowrap;border:1px solid #9F9F9F;width:435px;"><div class="text codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap">&amp;lt;component type=&quot;Field::Itemref&quot;&amp;gt;&amp;lt;field ref=&quot;new_depositor_assignment&quot; external_lookup_url=&quot;{$config{perl_url}}/users/popup/user&quot; external_lookup_params=&quot;userid=&quot;/&amp;gt;&amp;lt;/component&amp;gt;</div></div>
<p>This then tells the system to add a new &#8220;Find Entry&#8221; button which will popup with the user search window. The user search is limited to repository users so anyone who isn&#8217;t authorised will receive a login request form. It also tells ePrints to use the new Itemref InputForm Component to handle this field as well, which is what puts the Find Entry button and handles the other logic.<br />
To add the email option, we add a single line after the above mentioned on to load it up:</p>
<div class="codecolorer-container text default" style="overflow:auto;white-space:nowrap;border:1px solid #9F9F9F;width:435px;"><div class="text codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap">&amp;lt;component type=&quot;USQ_DepositorEmail&quot; /&amp;gt;</div></div>
<p>Pretty simple changes here so far &#8211; this then puts some text with a link up if we need it. The last change we need to make is to include this into our language files. There are a few strings, we&#8217;ll just put them into the &#8220;/opt/eprints3/archives/[archivename]/cfg/lang/en/phrases/eprint_fields.xml&#8221; file we used previously:</p>
<div class="codecolorer-container text default" style="overflow:auto;white-space:nowrap;border:1px solid #9F9F9F;width:435px;"><div class="text codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap">&amp;lt;epp:phrase id=&quot;Plugin/InputForm/Component/USQ_DepositorEmail:mail_depositors&quot;&amp;gt;Click here to populate a new email message to the depositors&amp;lt;/phrase&amp;gt;<br />
&amp;lt;epp:phrase id=&quot;Plugin/InputForm/Component/USQ_DepositorEmail:email_message_subject&quot;&amp;gt;EPrints Depositor Reassignment&amp;lt;/phrase&amp;gt;<br />
&amp;lt;epp:phrase id=&quot;Plugin/InputForm/Component/USQ_DepositorEmail:email_message_body&quot;&amp;gt;Hi &amp;lt;pin name=&quot;new_depositor&quot; /&amp;gt;,<br />
An item has been deposited on your behalf by &amp;lt;pin name=&quot;current_depositor&quot; /&amp;gt;.<br />
You can view this item here: &amp;lt;pin name=&quot;eprint_url&quot; /&amp;gt;&amp;lt;/phrase&amp;gt;<br />
&amp;lt;epp:phrase id=&quot;Plugin/InputForm/Component/USQ_DepositorEmail:new_depositor_id_unset&quot;&amp;gt;New depositor ID is unset. Setting the depositor ID will activate this item.&amp;lt;/phrase&amp;gt;<br />
&amp;lt;epp:phrase id=&quot;lib/metafield/itemref:find_entry&quot;&amp;gt;Find entry&amp;lt;/phrase&amp;gt;</div></div>
<p>All pretty simple, again these lines should be inserted before the &lt;/epp:phrases&gt; line in the file. Once you&#8217;ve done this, restart the server again to pick up all of the changes and you should see a user picker interface and a little bit of text you can click to make a quick email message. You can customise the email message by altering the language strings to change what you want to display.</p>
]]></content:encoded>
			<wfw:commentRss>http://pasamio.com/2009/09/24/how-to-setting-up-depositor-reassignment-in-eprints/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>ePrints Author ID</title>
		<link>http://pasamio.com/2009/08/28/eprints-author-id/</link>
		<comments>http://pasamio.com/2009/08/28/eprints-author-id/#comments</comments>
		<pubDate>Fri, 28 Aug 2009 10:47:03 +0000</pubDate>
		<dc:creator>pasamio</dc:creator>
				<category><![CDATA[eprints]]></category>
		<category><![CDATA[opensource]]></category>
		<category><![CDATA[programming]]></category>
		<category><![CDATA[university]]></category>
		<category><![CDATA[web]]></category>

		<guid isPermaLink="false">http://pasamio.com/?p=560</guid>
		<description><![CDATA[One of the things I&#8217;ve been working on over the last month is the ability to create distinct and unique author identifiers for ePrints. ePrint&#8217;s is a really awesome Perl based repository that the University uses to handle its research papers but whilst it is great at handling ePrints, documents, users and a whole host [...]]]></description>
			<content:encoded><![CDATA[<p>One of the things I&#8217;ve been working on over the last month is the ability to create distinct and unique author identifiers for ePrints. ePrint&#8217;s is a really awesome Perl based repository that the University uses to handle its research papers but whilst it is great at handling ePrints, documents, users and a whole host of other things it really falls over when you try to treat authors as individuals.</p>
<p><span id="more-560"></span>Currently ePrints lists authors by using the creator field of an ePrint. This is usually entered as the cited name of the author. If you have a small number of authors with different names this works reasonably well as the system can differentiate between people without much issues. The problem comes in when people are cited differently or have very similar names but are distinct people. Then it becomes bad.</p>
<p>One way of solving the problem is really quite ugly: you go through and change the cited author to make it look &#8220;neater&#8221;. In fact one of our library staff decided that they would do that greatly damaging the value of the data stored with in the system, tainting it horribly and creating more work for themselves. The cynic in me wonders that they&#8217;re just creating more work for themselves later to go back through and fix it all up. So there is a solution, non technical and pretty ordinary.</p>
<p>So our solution was to turn authors into a first class data set within ePrints. They&#8217;re not some unidentifiable free text field with no great purpose (there was a creator ID field but email address was suggested to be used for it) but in fact they are now their own entity which is cool.</p>
<p>We&#8217;ve done some different stuff with the author ID project at USQ that I&#8217;d like to share:</p>
<div>
<dl id="attachment_564" style="text-align: center; background-color: #f3f3f3; padding-top: 4px; -webkit-border-top-right-radius: 3px 3px; -webkit-border-top-left-radius: 3px 3px; -webkit-border-bottom-left-radius: 3px 3px; -webkit-border-bottom-right-radius: 3px 3px; width: 264px; margin: 10px; border: 1px solid #dddddd;">
<dt><a href="http://pasamio.com/wp-content/uploads/2009/08/authorid-authoredit.png"><img style="padding: 0px; margin: 0px; border: 0px none initial;" title="Author ID - Author Editing Screen" src="http://pasamio.com/wp-content/uploads/2009/08/authorid-authoredit-254x300.png" alt="This screen depicts the edit view for an author." width="254" height="300" /></a></dt>
<dd style="font-size: 11px; line-height: 17px; padding-top: 0px; padding-right: 4px; padding-bottom: 5px; padding-left: 4px; margin: 0px;">This screen depicts the edit view for an author.</dd>
<div><span style="font-size: small;"><span style="line-height: 17px;"><br />
</span></span></div>
</dl>
</div>
<p>So an author has a name, they can be linked back to a user ID, they have an email address (both primary email address which should be used for contact and alternate addresses for aiding search), a biography and external identifiers. A cool feature of the primary email address is that when it is updated it automatically gets copied to the alternate email address list,  so you can easily update an email address and still retain the old one (you can still remove them from the alternate email address easily). The external identifiers section provides the ability to list useful identifiers for the author that mean something outside of ePrints. This could be stuff like a staff or student number that you record against the author to help with recognising your users. This is also a new field type developed called &#8216;Name-Value&#8217; to represent name value pairs of data and provide an editing interface.</p>
<p>But the problem with authors is that they don&#8217;t stay the same: they&#8217;re dynamic. So they might move around an organisation, shift faculties, join a research centre or even leave the organisation. Recording this in the author record is more than possible but it starts to get messy &#8211; we start talking about &#8216;versions&#8217; of the author but versions imply the wrong concept. A researcher might be working on papers in two different faculties, each paying for his time and each deserving of recognition. In our case we also need to use that information for reporting so that we can properly allocate funds based on research outcomes as well &#8211; for us it is important to know who paid for the research.</p>
<p>So to solve this problem I created a system called &#8220;author instances&#8221;. Author instances provide a subrecord of the authors that permits instances of specific data to be created and associated with the author. Then when an author creates a paper a link is created to this instance and not directly to the author. This allows the author record to contain information that is relatively static and data that might periodically change (such as department or even which institution someone is at) is then located in the author instance. As this isn&#8217;t &#8216;versioning&#8217; per se it also works well for when a researcher is concurrently producing papers for different parts of the institution (or even for bodies external to the institution).</p>
<div id="attachment_565" class="wp-caption alignnone" style="width: 310px"><a href="http://pasamio.com/wp-content/uploads/2009/08/authorid-authorinstance_edit.png"><img class="size-medium wp-image-565" title="Author ID - Editing an Author Instance" src="http://pasamio.com/wp-content/uploads/2009/08/authorid-authorinstance_edit-300x168.png" alt="This screen depicts the edit view for an author instance." width="300" height="168" /></a><p class="wp-caption-text">This screen depicts the edit view for an author instance.</p></div>
<p>The author instance is very light by default, it only contains the author that it is linked to, its display name and a preferred flag. The preferred flag is mutually exclusive within author instances &#8211; if one instance for an author sets the flag then it is cleared for all other authors. In the screen shot you will notice an untranslated field called &#8220;deptid&#8221;. This is another new metafield that has been developed called &#8220;Externalitemref&#8221; which is similar to the built in ItemRef field however it works on tables managed outside of ePrints. ExternalItemRef takes the params of a table name, a key field and a name field to operate in a similar manner to the ItemRef and link data back in.</p>
<p>The observant will notice that both the ExternalItemRef and the built-in ItemRef field also have a find entry button. This button has also been added to the ePrint item editing screen as well and triggers a popup window which allows easy searching for the particular item (user, author, author instance) that you are interested in.</p>
<div id="attachment_566" class="wp-caption alignnone" style="width: 310px"><a href="http://pasamio.com/wp-content/uploads/2009/08/authorid-eprint_edit_w-popup.png"><img class="size-medium wp-image-566" title="Author ID - ePrints Edit View with Instance selector popup" src="http://pasamio.com/wp-content/uploads/2009/08/authorid-eprint_edit_w-popup-300x104.png" alt="The standard ePrints creator fields have a &quot;Find Entry&quot; button as well." width="300" height="104" /></a><p class="wp-caption-text">The standard ePrints creator fields have a &quot;Find Entry&quot; button as well.</p></div>
<p>So as we can see there is now a &#8220;Find Entry&#8221; button that pops up with a new window allowing us to select an author instance for this author easily and not have to worry that we&#8217;re going to mistype their email address or similar.</p>
<p>This is just a quick introduction into some of the changes that the Author ID system which USQ has developed provides. Ideally we&#8217;d love to feed this back to the ePrints core so that everyone can use this, or a similar system, in a great way. If you want to read more you can check out the &#8220;<a title="Author ID Notes" href="http://sammoffatt.com.au/kb-downloads/doc/3/raw">Author ID Notes</a>&#8221; document on my <a title="Sam Moffatt Consulting Knowledge Base Downloads" href="http://sammoffatt.com.au/kb-downloads">knowledge base download site</a>.</p>
]]></content:encoded>
			<wfw:commentRss>http://pasamio.com/2009/08/28/eprints-author-id/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>

