<%-- The contents of this file are subject to the license and copyright detailed in the LICENSE and NOTICE files at the root of the source tree and available online at http://www.dspace.org/license/ --%> <%-- - Renders a whole HTML page for displaying item metadata. Simply includes - the relevant item display component in a standard HTML page. - - Attributes: - display.all - Boolean - if true, display full metadata record - item - the Item to display - collections - Array of Collections this item appears in. This must be - passed in for two reasons: 1) item.getCollections() could - fail, and we're already committed to JSP display, and - 2) the item might be in the process of being submitted and - a mapping between the item and collection might not - appear yet. If this is omitted, the item display won't - display any collections. - admin_button - Boolean, show admin 'edit' button - submitter_button - Boolean, show submitter "new version" button --%> <%@page contentType="text/html;charset=UTF-8" %> <%@taglib uri="http://java.sun.com/jsp/jstl/fmt" prefix="fmt" %> <%@taglib uri="http://www.dspace.org/dspace-tags.tld" prefix="dspace" %> <%@page import="org.dspace.content.Collection" %> <%@page import="org.dspace.content.Item" %> <%@page import="org.dspace.core.ConfigurationManager" %> <%@page import="org.dspace.handle.HandleServiceImpl" %> <%@page import="org.dspace.license.CreativeCommonsServiceImpl" %> <%@page import="javax.servlet.jsp.jstl.fmt.LocaleSupport"%> <%@page import="org.dspace.versioning.Version"%> <%@page import="org.dspace.core.Context"%> <%@page import="org.dspace.app.webui.util.VersionUtil"%> <%@page import="org.dspace.app.webui.util.UIUtil"%> <%@page import="org.dspace.authorize.AuthorizeServiceImpl"%> <%@page import="java.util.List"%> <%@page import="org.dspace.core.Constants"%> <%@page import="org.dspace.eperson.EPerson"%> <%@page import="org.dspace.versioning.VersionHistory"%> <%@page import="org.dspace.plugin.PluginException"%> <%@page import="org.dspace.app.webui.servlet.MyDSpaceServlet"%> <%@page import="org.dspace.content.factory.ContentServiceFactory" %> <%@page import="org.dspace.content.MetadataValue" %> <%@page import="org.dspace.license.factory.LicenseServiceFactory" %> <%@page import="org.dspace.license.service.CreativeCommonsService" %> <%@page import="org.dspace.handle.factory.HandleServiceFactory" %> <%@page import="org.dspace.versioning.service.VersionHistoryService" %> <%@page import="org.dspace.versioning.factory.VersionServiceFactory" %> <% // Attributes Boolean displayAllBoolean = (Boolean) request.getAttribute("display.all"); boolean displayAll = (displayAllBoolean != null && displayAllBoolean.booleanValue()); Boolean suggest = (Boolean)request.getAttribute("suggest.enable"); boolean suggestLink = (suggest == null ? false : suggest.booleanValue()); Item item = (Item) request.getAttribute("item"); List collections = (List) request.getAttribute("collections"); Boolean admin_b = (Boolean)request.getAttribute("admin_button"); boolean admin_button = (admin_b == null ? false : admin_b.booleanValue()); Boolean submitter_b = (Boolean) request.getAttribute("submitter_button"); boolean submitter_button = (submitter_b == null ? false : submitter_b.booleanValue()); // get the workspace id if one has been passed Integer workspace_id = (Integer) request.getAttribute("workspace_id"); // get the handle if the item has one yet String handle = item.getHandle(); Context context = UIUtil.obtainContext(request); // get the doi if the item has one String doi = (String) request.getAttribute("doi"); // get the preferred identifier (as URL) String preferredIdentifier = (String) request.getAttribute("preferred_identifier"); // get the latestVersionIdentifier String latestVersionIdentifier = (String)request.getAttribute("versioning.latest_version_identifier"); // CC URL & RDF CreativeCommonsService creativeCommonsService = LicenseServiceFactory.getInstance().getCreativeCommonsService(); String cc_url = creativeCommonsService.getLicenseURL(context, item); String cc_rdf = creativeCommonsService.getLicenseRDF(context, item); // Full title needs to be put into a string to use as tag argument String title = ""; if (handle == null) { title = "Workspace Item"; } else { List titleValue = ContentServiceFactory.getInstance().getItemService().getMetadata(item, "dc", "title", null, Item.ANY); if (titleValue.size() != 0) { title = titleValue.get(0).getValue(); } else { title = "Item " + handle; } } Boolean versioningEnabledBool = (Boolean)request.getAttribute("versioning.enabled"); boolean versioningEnabled = (versioningEnabledBool!=null && versioningEnabledBool.booleanValue()); Boolean hasVersionButtonBool = (Boolean)request.getAttribute("versioning.hasversionbutton"); Boolean hasVersionHistoryBool = (Boolean)request.getAttribute("versioning.hasversionhistory"); boolean hasVersionButton = (hasVersionButtonBool!=null && hasVersionButtonBool.booleanValue()); boolean hasVersionHistory = (hasVersionHistoryBool!=null && hasVersionHistoryBool.booleanValue()); Boolean newversionavailableBool = (Boolean)request.getAttribute("versioning.newversionavailable"); boolean newVersionAvailable = (newversionavailableBool!=null && newversionavailableBool.booleanValue()); Boolean showVersionWorkflowAvailableBool = (Boolean)request.getAttribute("versioning.showversionwfavailable"); boolean showVersionWorkflowAvailable = (showVersionWorkflowAvailableBool!=null && showVersionWorkflowAvailableBool.booleanValue()); VersionHistoryService versionHistoryService = VersionServiceFactory.getInstance().getVersionHistoryService(); VersionHistory history = (VersionHistory)request.getAttribute("versioning.history"); List historyVersions = (List)request.getAttribute("versioning.historyversions"); %> <% if (handle != null) { %> <% if (newVersionAvailable) { %> <% } %> <% if (showVersionWorkflowAvailable) { %>
<% } %> <%-- Please use this identifier to cite or link to this item: <%= HandleManager.getCanonicalForm(handle) %>--%>
<%= preferredIdentifier %>
<% if (admin_button) // admin edit button { %>
<%----%> " />
" />
" />
" />
<% if(hasVersionButton) { %>
" />
<% } %> <% if(hasVersionHistory) { %>
" />
<% } %>
<% } %> <% // submitter create new version button if (submitter_button && hasVersionButton) { %>
" />
<% } } String displayStyle = (displayAll ? "full" : ""); %>
<% String locationLink = request.getContextPath() + "/handle/" + handle; if (displayAll) { %> <% if (workspace_id != null) { %>
" />
<% } else { %> <% } %> <% } else { %> <% if (workspace_id != null) { %>
" />
<% } else { %> <% } } if (workspace_id != null) { %>
"/>
<% } else { if (suggestLink) { %> <% } %> <%-- SFX Link --%> <% if (ConfigurationManager.getProperty("sfx.server.url") != null) { String sfximage = ConfigurationManager.getProperty("sfx.server.image_url"); if (sfximage == null) { sfximage = request.getContextPath() + "/image/sfx-link.gif"; } %> "/>" />SFX Query <% } } %>

<%-- Versioning table --%> <% if (versioningEnabled && hasVersionHistory) { boolean item_history_view_admin = ConfigurationManager .getBooleanProperty("versioning", "item.history.view.admin"); boolean item_history_include_submitter = ConfigurationManager .getBooleanProperty("versioning", "item.history.include.submitter", false); if(!item_history_view_admin || admin_button) { %>
<%-- Add Information about submitter only for admins or if item.history.include.submitter is true --%> <% if (item_history_include_submitter || admin_button) { %> <% } %> <% for(Version versRow : historyVersions) { EPerson versRowPerson = versRow.getEPerson(); String[] identifierPath = UIUtil.getItemIdentifier(UIUtil.obtainContext(request), versRow.getItem()); String url = identifierPath[0]; String identifier; if (ConfigurationManager.getBooleanProperty("webui.identifier.strip-prefixes", true)) { identifier = identifierPath[2]; } else { identifier = identifierPath[3]; } %> <% if(admin_button) { %> <% } else if(item_history_include_submitter) { %> <% }%> <% } %>
<%= versRow.getVersionNumber() %> <%= identifier %><%= item.getID()==versRow.getItem().getID()?"":""%><%=versRowPerson.getFullName() %> <%=versRowPerson.getFullName() %> <%= versRow.getVersionDate() %> <%= versRow.getSummary() %>
<% } } %>
<%-- Create Commons Link --%> <% if (cc_url != null) { %>

Creative Commons

<% } else { %>

<% } %>