Patches item #2521493, was opened at 2009-01-19 22:59 Message generated for change (Comment added) made by kshepherd You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=319984&aid=2521493&group_id=19984
Please note that this message will contain a full copy of the comment thread, including the initial issue submission, for this request, not just the latest update. Category: None Group: None Status: Open Resolution: None Priority: 5 Private: No Submitted By: Kim Shepherd (kshepherd) Assigned to: Nobody/Anonymous (nobody) Summary: Add support for rendering DOI links in JSPUI (1.4, 1.5) Initial Comment: SUMMARY / PURPOSE Add support in JSPUI for identifiers stored in dc.identifier.doi to be rendered as links to http://dx.doi.org/<DOI>. Patches against 1.4.2 source release, 1.5.1 source release, and 1.5.x branch (revision 3371) are supplied. As well as applying these patches, changes will need to be made to dspace.cfg, and possibly Messages.properties, input-forms.xml and the metadata registry if DOI identifiers haven't been used at all up to this point. INTRODUCTION This patch is being uploaded as I have been asked by some members of the community to share the changes we've made to be able to nicely use/display DOI identifiers. If this is not the appropriate place for such patches, please remove or let me know. I am not sure if it should be included in DSpace or not -- if it was to be, the default Messages.properties, dublin-core-types.xml and dspace.cfg would need patching as well. I'm not supplying patches for those here as I didn't want to confuse or mislead anyone wanting to apply this patch to their existing DSpace instance. I am happy to supply patches against default (latest revision) copies of these other files if people think that this should be included in the 1.5 branch. INSTRUCTIONS / USAGE: Download the patch that is appropriate for your version of DSpace. The 1.5 SVN patch has been tested against DSpace 1.5.x branch, and is an svn diff. The 1.5 non-SVN patch has been tested against DSpace 1.5.1 source release, and is a standard diff. The 1.4.2 patch has been tested against DSpace 1.4.2 source release. The diffs all make changes to ItemTag.java, so if you have already made changes to this file, please review the patch and consider making the changes manually, or merging safely with SVN in the case of the SVN diff. As per usual, if you're not using SVN, back up your source code first! The patches should all be applied from the root of your DSpace source directory. Use subversion to patch if you are applying the SVN patch to your local branch, or "patch -p0 < filename.diff" if you are applying one of the patches made against the source releases. Again, this is from the root of the DSpace source directory (ie. the directory that was created when you unzipped/untarred your DSpace source release archive). If patch fails, complaining that it can't find a file to patch, you likely are trying to patch from the wrong directory or are using the wrong path level. I hope I've got the conventions right. If I haven't please let me know because I'd rather make sure my patches are standard and conform to DSpace convention before making them public. FURTHER CONFIGURATION / USAGE: DSpace's dublin core metadata registry does NOT have dc.identifier.doi defined, so this will need to be defined within DSpace, an appropriate label set in Messages.properties, and a relevant input form field defined in input-forms.xml (the easiest way to get started would be to just add DOI as another value in the Identifier dropdown menu). DSpace's configuration file will not do anything with DOI metadata until told to. You will need to edit the "webui.itemdisplay.default" parameter, so that it includes "dc.identifier.doi(doi)". Eg. webui.itemdisplay.default = dc.title, dc.contributor.*, \ dc.date.issued(date), dc.identifier.citation, dc.publisher, \ dc.relation.ispartofseries, dc.identifier.doi(doi), \ dc.relation.uri(link), dc.description.abstract, \ dc.subject, dc.type, dc.identifier.uri(link), \ dc.description.publisherstatement, dc.description, dc.identifier Your Messages.properties will need a line like: metadata.dc.identifier.doi = DOI After the patch and config changes have been applied, and DSpace has been restarted, you should be able to view DOI values as nice rendered links, like the one at http://hdl.handle.net/10289/439 ---------------------------------------------------------------------- >Comment By: Kim Shepherd (kshepherd) Date: 2009-01-22 22:54 Message: Thanks for your feedback Claudia -- I've made the changes you've suggested and added some extra documentation (please check to make sure the doc looks OK) It now checks a configuration property called "doi.url" (which should be a full URL without trailing slash, eg http://dx.doi.org , and uses http://dx.doi.org as a default if that property cannot be found. If it detects "http://", "https://", or "dx.doi.org" in the DOI value itself, it will simply render as per isLink() and leave the rest untouched. I had thought about also using doi.url as a match here, but it's probably not necessary... if someone has been entering DOIs as URLs then they're unlikely to be using doi.url in dspace.cfg. I've removed the old patches and uploaded a revised SVN diff against current 1_5_x branch for futher review before I create patches against the 1.5.1 release to share with others. ---------------------------------------------------------------------- Comment By: Claudia Juergen (cjuergen) Date: 2009-01-21 16:42 Message: Hi Kim, a useful patch. It should just intercept that some did not store the mere doi but the resolving url in the field dc.identifer.doi, e.g. http://dspace.mah.se:8080/dspace/handle/2043/620?mode=full And in the long run, it might be better to have the baseURL in dspace.cfg, resolving mechanisms might change. Claudia ---------------------------------------------------------------------- You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=319984&aid=2521493&group_id=19984 ------------------------------------------------------------------------------ This SF.net email is sponsored by: SourcForge Community SourceForge wants to tell your story. http://p.sf.net/sfu/sf-spreadtheword _______________________________________________ Dspace-devel mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/dspace-devel
