<%@ page language="java" %> <%@ page pageEncoding="UTF-8"%> <%@ page contentType="text/html; charset=utf-8" %> <%@ page import="java.util.*" %> <%@ page import="java.sql.*" %> <%@ page import="pt.keep.metarepository.core.database.sql.OrderType"%> <%@ page import="pt.keep.metarepository.core.database.orm.interfaces.*"%> <%@ page import="pt.keep.metarepository.core.database.orm.entities.*" %> <%@ page import="pt.keep.metarepository.modules.webui.io.session.*" %> <%@ page import="pt.keep.metarepository.core.configuration.*" %> <%@ page import="pt.keep.metarepository.core.localization.*" %> <%@ page import="pt.keep.metarepository.core.util.data.*" %> <%@ page import="pt.keep.metarepository.core.util.*" %> <%@ page import="pt.keep.metarepository.core.solr.SolrClient" %> <%@ taglib uri="keep/tags/KeepTags.tld" prefix="KEEP" %> <% String lang = LocalizationFetcher.getLocaleString(request,response); %> <KEEP:lang lang='<%=lang %>' key="webui.general.rcaap.title" /> <% ArchiveInterface arqIface = new ArchiveInterface(getServletContext()); String archiveId = request.getParameter("id"); List archives = null, inactiveArchives=null; if(archiveId!=null && !archiveId.equals("")){ try{ Archive archive = arqIface.findArchiveByID(archiveId); if(archive.isActive()){ %> /images/repositories/<%=archive.getId() %>.jpg"/> /repositoryInfo.jsp?id=<%=archive.getId() %>"/> <% archives = new ArrayList(); archives.add(archive); } }catch(Throwable t){ archives = arqIface.findAllActive(); } }else{ archives = arqIface.findAllActive(); } inactiveArchives = arqIface.findAllInactive(); HashMap number = SolrClient.getInstance().getNumberOfDocumentsCountByArchive(true, inactiveArchives); int i; boolean isPt = lang.equals("pt"); arqIface.closeConnection(); %>

<% for (Archive arc : archives) { String urlToShare = StringUtils.urlEncodeFromUTF8(ConfigurationManager.getProperty("site.url", "http://www.rcaap.pt")+"/repositoryInfo.jsp?id="+arc.getId()); String titleToShare = StringUtils.urlEncodeFromUTF8(arc.getName()); titleToShare = titleToShare.replaceAll(":", "%3A"); titleToShare = titleToShare.replaceAll("/", "%2F"); titleToShare = titleToShare.replaceAll("#", "%23"); titleToShare = titleToShare.replaceAll("&", "%26"); %>

<% } %>