<%@ page import="java.io.File" import="java.util.List" import="java.util.ArrayList" import="java.util.Iterator" import="java.util.Map" import="java.util.Hashtable" import="org.apache.oodt.cas.curation.policymgr.CurationPolicyManager" import="org.apache.oodt.cas.curation.util.HTMLEncode" %> <%@page import="org.apache.oodt.cas.metadata.util.PathUtils"%> <%@page import="org.apache.oodt.cas.curation.servlet.CuratorConfMetKeys"%> <%@page import="org.apache.oodt.cas.filemgr.structs.ProductType"%>

Dataset Metadata For: <%=session.getAttribute("dsCollection") %> / <%=session.getAttribute("ds") %>

Defined metadata key/value pairs in <%=session.getAttribute("dsCollection") %> : <%=session.getAttribute("ds") %>
<% String policyName = (String)session.getAttribute("dsCollection"); String productTypeName = (String)session.getAttribute("ds"); String stagingAreaPath = PathUtils.replaceEnvVariables(getServletContext().getInitParameter(CuratorConfMetKeys.STAGING_AREA_PATH)); String policyDirPath = PathUtils.replaceEnvVariables(getServletContext().getInitParameter(CuratorConfMetKeys.POLICY_UPLOAD_PATH)); CurationPolicyManager cpm = new CurationPolicyManager(policyDirPath, stagingAreaPath); Map types = cpm.getProductTypes(policyName); ProductType type = types.get(productTypeName); String tableClose = "
KeyValue
"; if (type.getTypeMetadata() != null && type.getTypeMetadata().getHashtable().keySet().size() > 0) { int even_row = 1; for (Object k : type.getTypeMetadata().getHashtable().keySet()) { String key = (String)k; String value = type.getTypeMetadata().getMetadata(key); /* * PubMedID field requires special * handling because of HTML hyperlink * content. */ if (key.equals("PubMedID")) value = HTMLEncode.encode(value); String keyField = "\t\t\t\t" + key + ""; String valueField = "\t\t\t\t"; out.print("\t\t\t"); else out.println("even\">"); out.println(keyField); out.println(valueField); out.println("\t\t\t"); even_row = 1 - even_row; } } else { out.println(""); out.println("No metadata values defined."); out.println(""); } out.println(tableClose); // hide the Save Changes button if no metadata is found if (type.getTypeMetadata() != null && type.getTypeMetadata().getHashtable().keySet().size() > 0) { out.println(""); out.println(""); out.println(""); out.println(""); out.println("
"); } out.println("
"); %>