<%@ page language="java" %> <%@ page import="java.util.Set,java.util.Map,java.util.Vector,edu.ucsb.nceas.utilities.PropertiesMetaData" %> <%@ page import="edu.ucsb.nceas.utilities.MetaDataGroup,edu.ucsb.nceas.utilities.MetaDataProperty" %> <% /** * '$RCSfile$' * Copyright: 2008 Regents of the University of California and the * National Center for Ecological Analysis and Synthesis * For Details: http://www.nceas.ucsb.edu/ * * '$Author: walker $' * '$Date: 2013-09-18 22:37:06 +0000 (Wed, 18 Sep 2013) $' * '$Revision: 8240 $' * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */ %> Metacat Properties Configuration <%@ include file="./head-section.jsp"%> <%@ include file="./header-section.jsp"%>

Metacat Properties Configuration

Enter Metacat System properties here. All Fields must be filled in before saving.


<%@ include file="page-message-section.jsp"%>
<% // metadata holds all group and properties metadata PropertiesMetaData metadata = (PropertiesMetaData)request.getAttribute("metadata"); if (metadata != null) { // each group describes a section of properties Map groupMap = metadata.getGroups(); Set groupIdSet = groupMap.keySet(); for (Integer groupId : groupIdSet) { // for this group, display the header (group name) MetaDataGroup metaDataGroup = (MetaDataGroup)groupMap.get(groupId); if (groupId == 0) { // get all the properties in this group Map propertyMap = metadata.getPropertiesInGroup(metaDataGroup.getIndex()); Set propertyIndexes = propertyMap.keySet(); // iterate through each property and display appropriately for (Integer propertyIndex : propertyIndexes) { MetaDataProperty metaDataProperty = propertyMap.get(propertyIndex); String fieldType = metaDataProperty.getFieldType(); if (fieldType.equals("hidden")) { %> <% } } } else { %>

<%= metaDataGroup.getName() %>

<% // get all the properties in this group Map propertyMap = metadata.getPropertiesInGroup(metaDataGroup.getIndex()); Set propertyIndexes = propertyMap.keySet(); // iterate through each property and display appropriately for (Integer propertyIndex : propertyIndexes) { MetaDataProperty metaDataProperty = propertyMap.get(propertyIndex); String fieldType = metaDataProperty.getFieldType(); if (fieldType.equals("select")) { %>
<% } else if (fieldType.equals("password")) { %>
<% } else if (fieldType.equals("hidden")) { %> <% } else { %>
<% } if (metaDataProperty.getDescription() != null && metaDataProperty.getDescription().trim().length() > 0 ) { %>
[<%= metaDataProperty.getDescription() %>]
<% } } } } } %>
<%@ include file="./footer-section.jsp"%>