Terry Brady
Georgetown University Library
https://github.com/terrywbrady/info
- Released as a part of DSpace 6
- Intended for Repository Managers
- As DSpace 6 adoption increases, it is a good time to consider these tools
- Built on the legacy DSpace 6 REST API
+++
- Metadata-centric view of your repository
- Check for consistency
- Generate metadata update files to repair inconsistencies
- Answer questions
- Locate feature use cases
+++
- Georgetown created a PHP of these tools for DSpace 1.8
- Difficult to share
- Switched the code to use DSpace REST
- Contributed to DSpace 6
- Look at API landing page
+++
- No longer writing reports/queries
- Self-service reports for Digital Services team
- Self-service data exports
+++
- Tutorial Pages
- You can even perform this on demo.dspace.org
The test files referenced in this presentation are available on github.
See the tutorial for instructions.
+++
The examples in this demo are contrived to make it easy to follow.
Our repository has half a million items. We have used these tools to fix inconsistencies in thousands of item records.
- Login as Administrator
- Create a community for the tutorial
+++
This test will use the following file to create 14 items with unique metadata. metadataUpload.csv +++ +++
+++ Edit metadataUpload.csv, replace "your-coll-handle-goes-here" +++ +++ Bulk Import metadataUpload.csv +++ +++
+++
+++
+++ Open the REST Report Query Tool:
- /rest/static/reports/query.html +++
- Include dc.subject in the report output +++ +++
- Export the results and fix the metadata with a bulk update
- Change kitten; puppy
- to kitten||puppy
- Include dc.creator in the report output +++ +++
- Export the results and fix the metadata with a bulk update
- Step 1 - run query, count results
- Step 2 - assemble "page" of results
- Step 3 - apply filter to page of results
- Filter counts are scoped to 1 page
- Step 4 - add requested metadata
DSpace will provide a listing of all withdrawn or private items, but it is difficult to see these properties in the context of other query criteria. +++
+++ Query for items containing "TODO" in dc.description.abstract +++ +++ +++ In DSpace, edit the item "TODO: withdraw" and Withdraw it +++ +++ In DSpace, edit the item "TODO: make private" and Make it private +++ +++ Rerun the query tool, note that the withdrawn item does not appear
Items that a user cannot access will be filtered from the result set (unless you override this behavior in code) +++ Login to the REST interface to include withdrawn items in the report +++
- In a new tab, open /rest/static/reports/authenticate.html
- Sign in as an administrator +++ RE-run the TODO query +++ +++
Open the "Collection Filter" Report: /rest/static/reports/index.html +++ +++ Set Filters to View Counts of Private and Discoverable Items +++ +++ View Filter Counts +++ +++ +++ Add dc.description.abstract to Item Listing +++ +++ View Item Listing with dc.description.abstract +++
+++
Ingest Items with Zero, One, and Two Items and apply Bitstream Filters
The file itemsWithBitstreams.zip will be used to populate a collection used in this demonstration.
+++ In your test community, create a new Collection Named "Demo 3". Ingest the itemsWithBitstreams.zip. +++ +++
+++ Open the Collection Report +++ Set the Filter based on Original Bitstream Count
This report can be used to ensure consistent bitstream content within a collection. +++ +++ +++ Set the Filter based on Original Bitstream Type (Document or Image)
- This report can be used to ensure consistent bitstream content within a collection.
- If this filter is paired with the metadata query tool, it can be used to enforce required metadata for a specific bitstream type. +++ +++
+++
Upload a Zip file containing embargoed items into Collection "Demo 3".
The file itemsWithEmbargoBitstreams.zip will be used to populate a collection used in this demonstration.
The contents file for each item sets a read restriction for the group Administrator for each item.
+++ +++ Set a filter to query for items with a restricted original bitstream (not visible to anonymous group) +++ +++
Search Collection Demo 3 +++ +++ Add Bitstream Properties to the Result Set +++ +++ View Results +++
Adding Custom Queries to the Query Tool
The query tool can be easily expanded to view/enforce local metadata conventions. +++ +++ +++
See restQueryReport.js +++
this.initQueries = function() {
$("#predefselect")
.append($("<option value='gu2'>GU: Has sharestream audio</option>"))
+++
} else if (val == 'gu2') {
self.drawFilterQuery("dc.relation.uri","matches","^https://mediapilot.georgetown.edu.*$");
self.drawFilterQuery("dc.type","equals","Audio");
}
public class ItemFilterDefsGU implements ItemFilterList {
public static final String CAT_GU = "GEORGETOWN Filters";
private enum EnumItemFilterDefs implements ItemFilterTest {
stream_auth_image("Original Bitstream with Description: Auth Image", null, CAT_GU) {
public boolean testItem(Context context, Item item) {
return ItemFilterUtil.countBitstreamByDesc(BundleName.ORIGINAL, item, "Sharestream Auth Image") > 0;
}
},
+++
Using code from https://kryogenix.org/code/browser/sorttable/, you can make the tables in the report tools sortable. +++ +++ To enable this feature, add sorttable.js to your distribution and enable the following feature in restReport.js
//Override this method is sortable.js has been included
this.hasSorttable = function() {
return false;
}
+++
See https://github.com/terrywbrady/PlainTextCSV_GoogleAppsScript to enable a Google Apps Script service that will create a Google Sheet from CSV. +++ +++ +++
this.gsheet = function(rows) {
var form = $("<form/>");
$("#itemdiv").append(form);
form.hide();
form.attr("method","POST");
form.attr("action","https://script.google.com/a/macros/<<your-domain>>/s/<<your-app>>/exec");
var input = $("<textarea rows='10' cols='100'/>");
input.attr("name","data");
input.val(this.makeCsv(rows));
form.append(input);
input = $("<input type='submit'/>");
form.append(input);
form.submit();
}
Terry Brady
Georgetown University Library