<%-- 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/ --%> <%-- - Formats JSP - - Note that this is a "stand-alone" JSP that is invoked directly, and not - via a Servlet. - This page involves no user interaction, but needs to be a JSP so that it - can retrieve the bitstream formats from the database. - --%> <%@ 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="java.sql.SQLException" %> <%@ page import="javax.servlet.jsp.jstl.fmt.LocaleSupport" %> <%@ page import="org.apache.log4j.Logger" %> <%@ page import="org.dspace.app.webui.util.JSPManager" %> <%@ page import="org.dspace.app.webui.util.UIUtil" %> <%@ page import="org.dspace.content.BitstreamFormat" %> <%@ page import="org.dspace.core.Context" %> <%@ page import="org.dspace.core.LogManager" %> <%@ page import="java.util.List" %> <%@ page import="org.dspace.content.factory.ContentServiceFactory" %> <% Context context = null; List formats = null; try { // Obtain a context so that the location bar can display log in status context = UIUtil.obtainContext(request); // Get the Bitstream formats formats = ContentServiceFactory.getInstance().getBitstreamFormatService().findAll(context); } catch (SQLException se) { // Database error occurred. Logger log = Logger.getLogger("org.dspace.jsp"); log.warn(LogManager.getHeader(context, "database_error", se.toString()), se); // Also email an alert UIUtil.sendAlert(request, se); JSPManager.showInternalError(request, response); } finally { // we need to close the database connection and free the resources if(context != null && context.isValid()) { context.abort(); } } %> <fmt:message key="jsp.help.formats.title"/> <%--

DSpace Supported Formats

--%>

">

<%--
Format Support Policy
--%>
<%--
Format Support Levels
--%>
<%--
What To Do If Your Format Isn't Listed
--%>

 

<%-- --%> <%-- --%>
FORMAT SUPPORT POLICYtop
<%--

(Your Format Support Policy Here)

--%>

 

<%-- --%> <%-- --%>
FORMAT SUPPORT LEVELStop
<%-- --%> <%-- --%> <%-- --%> <%-- --%> <% for (int i = 0; i < formats.size(); i++) { if ( formats.get(i).isInternal() ) continue; List extensions = formats.get(i).getExtensions(); String extValue = ""; for (int j = 0 ; j < extensions.size(); j++) { if (j > 0) { extValue = extValue + ", "; } extValue = extValue + extensions.get(j); } %> <% } %>
NameExtensionsMIME TypeSupport Level
<%= formats.get(i).getShortDescription() %> <%= extValue %> <%= formats.get(i).getMIMEType() %> <% if(formats.get(i).getSupportLevel() == 2) { %><% } else if(formats.get(i).getSupportLevel() == 1) { %><% } else { %><% } %>

 

<%-- --%> <%-- --%>
WHAT TO DO IF YOUR FORMAT ISN'T LISTEDtop

<%-- Please contact your DSpace Administrator if you have questions about a particular format. --%>