<%-- 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/ --%> <%-- - Display list of bitstream formats - - Attributes: - - formats - the bitstream formats in the system (BitstreamFormat[]) --%> <%@ 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="javax.servlet.jsp.jstl.fmt.LocaleSupport" %> <%@ page import="org.dspace.content.BitstreamFormat" %> <%@ page import="org.dspace.core.Context"%> <%@ page import="org.dspace.app.webui.util.UIUtil"%> <%@ page import="java.util.List" %> <%@ page import="java.lang.StringBuilder" %> <%@ page import="org.dspace.content.service.BitstreamFormatService" %> <%@ page import="org.dspace.content.factory.ContentServiceFactory" %> <% BitstreamFormatService bitstreamFormatService = ContentServiceFactory.getInstance().getBitstreamFormatService(); List formats = (List) request.getAttribute("formats"); %>

<% Context context = UIUtil.obtainContext(request); %> <% String row = "even"; for (BitstreamFormat format : formats) { List extensions = format.getExtensions(); StringBuilder extValueBuilder = new StringBuilder(256); if (null != extensions) { for (String extension : extensions) { if (extValueBuilder.length() > 0) { extValueBuilder.append(", "); } extValueBuilder.append(extension); } } String extValue = extValueBuilder.toString(); %> <% row = (row.equals("odd") ? "even" : "odd"); } %>
/ / / / / /
<%= format.getID() %>
<% if (bitstreamFormatService.findUnknown(context).getID() == format.getID()) { %> <%= format.getShortDescription() %> <% } else { %> <% } %>
/>
<% if (bitstreamFormatService.findUnknown(context).getID() != format.getID()) { %> <% } %>