« January 2009 | Main | March 2009 »

February 27, 2009

Description of OAI properties

OAICat - An OAI-PMH v2 Repository Framework
OAICat - An OAI-PMH v2 Repository Framework A Project of OCLC Research

Description of Entries in oaicat.properties

  • OAIHandler.extraXmlns=[xmlns attributes] (Optional): This string gets inserted into the root element in ListRecords and GetRecord responses. It was added to make large-scale harvesting of DSpace METS records more efficient.
  • OAIHandler.serviceUnavailable=[true|false] (Optional): Forces the server to return a SC_SERVICE_UNAVAILABLE code to inform the user that it is currently being worked on.
  • OAIHandler.styleSheet=[path-to-xsl-stylesheet] (Optional): If present, a reference to this XSLT stylesheet will be included in the OAI responses.
  • OAIHandler.renderForOldBrowsers=[true|false] (Optional): If present and true, the XSLT stylesheet will be applied to the OAI response on the the server before sending back the response, if the client is an old browser. This is a good idea if you've defined OAIHandler.styleSheet because some old browsers don't do a very good job of rendering XSLT on the client side.
  • OAIHandler.forceRender=[true|false] (Optional): If present and true, the XSLT stylesheet will be applied to the OAI response on the the server before sending back the response. This is useful if you want to use OAICat as a web application framework, but want to disable OAI harvesting because the data is proprietary (e.g. The GSAFD Thesaurus).
  • OAIHandler.baseURL=[OAI baseURL] (Optional): Force OAI responses to include the specified baseURL instead of getting it from the HttpServletRequest. This may be necessary if your firewall/router/port-mapper is messing with the request in some way.
  • AbstractCatalog.oaiCatalogClassName=[package.classname] (Required): The fully qualified Java class name that implements ORG.oclc.oai.server.catalog.AbstractCatalog.
  • AbstractCatalog.recordFactoryClassName=[package.classname] (Required): The fully qualified Java class name that implements ORG.oclc.oai.server.catalog.RecordFactory.
  • AbstractCatalog.secondsToLive=[# of seconds] (Optional): The number of seconds a resumptionToken is retained for reuse. The default is -1, which means that resumptionTokens are stateless and can be resent anytime.
  • AbstractCatalog.harvestable=[true|false] (Optional): If present and false, the ListRecords and ListIdentifiers verbs will send back an error condition. This might be useful if you want to provide access to the other verbs but want to discourage general harvesting.
  • AbstractCatalog.granularity=[YYYY-MM-DD|YYYY-MM-DDThh:mm:ssZ] (Required): The supported level of datetime granularity for from/until parameters.
  • Identify.repositoryName=[text] (Required): Text to use as the Identify verb's repositoryName value.
  • Identify.adminEmail[mailto:abc@xyz.org] (Required): Text to use as the Identify verb's adminEmail value.
  • Identify.earliestDatestamp=[datetime stamp of earliest] (Required): Text to use as the Identify verb's earliestDatestamp value.
  • Identify.deletedRecord=[no|transient|persistent] (Required): Text to use as the Identify verb's deletedRecord value.
  • Identify.description.[0-9]*=[xml fragment] (Optional; Repeatable): XML fragments (<description>) to include in the Identify verb's response.
  • Crosswalks.[metadataPrefix]=[package.classname] (Required; Repeatable): Java class(es) that implement the ORG.oclc.oai.server.crosswalk.Crosswalk class.
  • ExtensionVerbs.[verb name]=[package.classname] (Optional; Repeatable): Java class(es) that extend the ORG.oclc.oai.server.verb.ServerVerb class. This allow you to easily create new verbs to perform application functions beyond the set of OAI verbs. These verbs can be accessed by adding "/extension" to the baseURL.
  • Other properties that support various combinations of classes mentioned above.
OAICat - An OAI-PMH v2 Repository Framework    
Jeff Young
Last modified: Fri Jul 29 10:03:16 Eastern Daylight Time 2005

February 25, 2009

Dspace Handles collections with problems


In UDC there are Dspace Handles that are collections(resource_type_id =3) but do not show up in the collections table.

Finding the problem in the media filter log

I was looking at the filter media log, dspace-ir_filter-media.log, and found many errors of the form:

Exception in thread "main" java.lang.IllegalArgumentException: Cannot resolve 4394 to a DSpace object This means that when the handle was put into the static method HandleManger.resolveObject, a null resulted.

A list (handle set 1) of these handles was obtained using the UNIX command line below:

grep 'Cannot.resolve' dspace-ir_filter-media.log | perl -p -i -e 's/^.*Cannot resolve (\d+).*$/\1/g' | sort | uniq | sort -g

Look at handles that produce error inside of Postgres

One can go to the handle table and get the resource_id for one of the handles on the list. Using this resource_id, no entry can be found in the collection table. I think these are collections that were deleted. They were removed from the collection table but not from the handle table.

sql to get collection handles

old sql command ... pulls handles that have null and valid values in the collection table

The handles that were input to filter-media came from the sql cmd below:

SELECT handle FROM handle WHERE resource_type_id=3;

The above command will grab both good collection handles and handles that have no entry in the collection table.
Handles using this command (good and bad collection handles combined: handle set 2).

new sql command only pulls handles that have valid values in the collection table

The command below will only pull handles that have valid collection_ids (i.e. exist in the collection table).

SELECT handle FROM collection, handle WHERE collection_id=resource_id AND resource_type_id=3 ORDER BY handle::text::integer;

Handles using improved command handle set 3 (only handles that exist in the collection table).

Quick sanity check

handle set 1 maps to null collections.
handle set 2 maps to all collections in the handle table both null and non-null.
handle set 3 maps to non-null collections

So we would expect:
1) There to be no overlap between handle set 1 and handle set 3.
2) The combined contents of handle set 1 and handle set 3 should be equal to the contents of handle set 2.
Both 1 and 2 are correct.

February 13, 2009

java code in dspace to get collections an item belongs to

From Item.java we find: TableRowIterator tri = DatabaseManager.queryTabl(ourContext,"collection", "SELECT collection.* FROM collection, collection2item WHERE " + "collection2item.collection_id=collection.collection_id AND " + "collection2item.item_id= ? ", itemRow.getIntColumn("item_id"));

February 11, 2009

Removing elements from display in dspace

There was a request to remove "Journal Volume", "Journal Issue" and " Journal Date" from the display.
To do this the elements below were removed from the webui.itemdisplay.default element in dspace.cfg.

agecon.relation.ispartofvolume-----Journal Volume

agecon.relation.ispartoftitle------Journal Issue

agecon.relation.ispartofname-------Journal Date

The names of these elements are in