Project

General

Profile

1 6635 leinfelder
<%@ page language="java" %>
2
<%@ page import="java.util.Set,java.util.Map,java.util.Vector,edu.ucsb.nceas.utilities.PropertiesMetaData" %>
3
<%@ page import="edu.ucsb.nceas.utilities.MetaDataGroup,edu.ucsb.nceas.utilities.MetaDataProperty" %>
4
<%
5
/**
6
 *  '$RCSfile$'
7
 *    Copyright: 2008 Regents of the University of California and the
8
 *               National Center for Ecological Analysis and Synthesis
9
 *  For Details: http://www.nceas.ucsb.edu/
10
 *
11
 *   '$Author$'
12
 *     '$Date$'
13
 * '$Revision$'
14
 *
15
 * This program is free software; you can redistribute it and/or modify
16
 * it under the terms of the GNU General Public License as published by
17
 * the Free Software Foundation; either version 2 of the License, or
18
 * (at your option) any later version.
19
 *
20
 * This program is distributed in the hope that it will be useful,
21
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
22
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
23
 * GNU General Public License for more details.
24
 *
25
 * You should have received a copy of the GNU General Public License
26
 * along with this program; if not, write to the Free Software
27
 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
28
 */
29
%>
30
31
<html>
32
<head>
33
34
<title>DataONE Configuration</title>
35
<link rel="stylesheet" type="text/css"
36
        href="<%= request.getContextPath() %>/admin/admin.css"></link>
37
<script language="JavaScript" type="text/JavaScript" src="<%= request.getContextPath() %>/admin/admin.js"></script>
38
39
</head>
40
<body>
41
<%@ include file="./header-section.jsp"%>
42
43
<img src="<%= request.getContextPath() %>/metacat-logo.png" width="100px" align="right"/>
44
<h2>DataONE Configuration</h2>
45
46 6987 jones
<p>
47
    DataONE configuration is optional; choose 'Skip' below to proceed to the next configuration section,
48
    unless you want to join the DataONE federation.
49
</p>
50 6635 leinfelder
<p>
51 6987 jones
	<a href="http://www.dataone.org" target="_D1">DataONE</a> is a federation of data repositories (called Member Nodes)
52
    that work together to create a seamless, interoperable network to store, preserve, discover, and publish scientific data.
53
	Becoming a DataONE Member Node is a means of distributing data and metadata using a common set of standards, making it
54
	easy to build software systems that can interact with any of the federated repository nodes.  Metacat can be used
55
	to join the DataONE federation by configuring Metacat to act as a Member Node and applying with DataONE to become a
56
	Member Node.  Once a node's application is approved and Metacat is configured, metadata will be synchronized in the
57
	network for easy discovery, and replicas of data and metadata can be housed on other Member Nodes for
58
	archival safe-keeping. In addition, a Metacat Member Node can optionally provide space to store replicas of data from
59
	other Member Nodes that wish to preserve their data in the federation.
60 6861 leinfelder
<p/>
61 6987 jones
<p> To configure Metacat as a Member Node, you must first obtain a Member Node X.509 certificate that will
62
    be used to authenticate this node, and you must have a registered and verified account with DataONE that can
63
    be used as the point of contact for the candidate Member Node.  Once you have this information, fill out
64
    the form below with the proper configuration information, and then click 'Register', which will send the
65
    registration data to DataONE. A unique Member Node ID will be assigned and should only be used for this
66
    node and never shared or altered.
67 6861 leinfelder
<p/>
68 6635 leinfelder
<br clear="right"/>
69
70
<%@ include file="page-message-section.jsp"%>
71
72
<form method="POST" name="configuration_form" action="<%= request.getContextPath() %>/admin"
73
                                        onsubmit="return submitForm(this);">
74
75 6994 leinfelder
	<h3>Member Node Services</h3>
76
	Enable or disable DataONE Member Node Services for this deployment
77
78
	<hr class="config-line">
79
	<div class="form-row">
80 7424 leinfelder
		<img class="question-mark" src="style/images/help.png"
81 6994 leinfelder
			onClick="helpWindow('<%= request.getContextPath() %>','docs/dataone.html#configuring-metacat-as-a-member-node')"/>
82
		<div class="textinput-label"><label for="dataone.mn.services.enabled" title="Enable DataONE Member Node Services">Enable DataONE Services</label></div>
83
84
		<%
85
86
		boolean enableServices = false;
87
		String enableServicesString = (String) request.getAttribute("dataone.mn.services.enabled");
88
		if (enableServicesString != null) {
89
			enableServices = Boolean.parseBoolean(enableServicesString);
90
		}
91
92
		if (enableServices) {
93
		%>
94
		<input type="checkbox"
95
				class="textinput"
96
				id="dataone.mn.services.enabled"
97 7130 leinfelder
				name="dataone.mn.services.enabled"
98 6994 leinfelder
				value="true"
99
				checked="checked"/>
100
		<% } else {%>
101
		<input type="checkbox"
102
				class="textinput"
103
				id="dataone.mn.services.enabled"
104
				name="dataone.mn.services.enabled"
105
				value="true"/>
106
		<% } %>
107
108
	</div>
109
110 6635 leinfelder
	<h3>Member Node Configuration</h3>
111 6987 jones
	General information identifiying this node, its owner, and contents.  You will need
112
	   a certificate to identify the node, and a DataONE account to act as a node contact.
113
114 6635 leinfelder
	<hr class="config-line">
115
116
	<div class="form-row">
117 7424 leinfelder
		<img class="question-mark" src="style/images/help.png"
118 6989 jones
			onClick="helpWindow('<%= request.getContextPath() %>','docs/dataone.html#configuring-metacat-as-a-member-node')"/>
119 6635 leinfelder
		<div class="textinput-label">
120 6987 jones
			<label for="dataone.nodeName" title="A short, human-readable name for this node">Node Name</label>
121 6635 leinfelder
		</div>
122
		<input class="textinput"
123
			id="dataone.nodeName"
124
			name="dataone.nodeName"
125
			value="<%= request.getAttribute("dataone.nodeName") %>"/>
126
	</div>
127
	<div class="form-row">
128 7424 leinfelder
		<img class="question-mark" src="style/images/help.png"
129 6989 jones
			onClick="helpWindow('<%= request.getContextPath() %>','docs/dataone.html#configuring-metacat-as-a-member-node')"/>
130 6635 leinfelder
		<div class="textinput-label">
131 6987 jones
			<label for="dataone.nodeDescription" title="A brief description of the node and its holdings">Node Description</label>
132 6635 leinfelder
		</div>
133
		<input class="textinput"
134
			id="dataone.nodeDescription"
135
			name="dataone.nodeDescription"
136
			value="<%= request.getAttribute("dataone.nodeDescription") %>"/>
137
	</div>
138
	<div class="form-row">
139 7424 leinfelder
		<img class="question-mark" src="style/images/help.png"
140 6989 jones
			onClick="helpWindow('<%= request.getContextPath() %>','docs/dataone.html#configuring-metacat-as-a-member-node')"/>
141 6635 leinfelder
		<div class="textinput-label">
142 7030 cjones
			<label for="dataone.nodeId" title="The DataONE-assigned unique identifier for this node">Node Identifier</label>
143 6635 leinfelder
		</div>
144 7002 leinfelder
		<input class="textinput"
145 7030 cjones
			id="dataone.nodeId"
146
			name="dataone.nodeId"
147
			value="<%= request.getAttribute("dataone.nodeId") %>"/>
148 6635 leinfelder
	</div>
149
	<div class="form-row">
150 7424 leinfelder
		<img class="question-mark" src="style/images/help.png"
151 6989 jones
			onClick="helpWindow('<%= request.getContextPath() %>','docs/dataone.html#configuring-metacat-as-a-member-node')"/>
152 6635 leinfelder
		<div class="textinput-label">
153 6987 jones
			<label for="dataone.subject" title="The account in Distinguished Name (DN) format that represents this node in all service interactions">Node Subject</label>
154 6635 leinfelder
		</div>
155
		<input class="textinput"
156
			id="dataone.subject"
157
			name="dataone.subject"
158
			value="<%= request.getAttribute("dataone.subject") %>"/>
159
	</div>
160
	<div class="form-row">
161 7424 leinfelder
		<img class="question-mark" src="style/images/help.png"
162 6989 jones
			onClick="helpWindow('<%= request.getContextPath() %>','docs/dataone.html#configuring-metacat-as-a-member-node')"/>
163 6635 leinfelder
		<div class="textinput-label">
164 6987 jones
			<label for="dataone.contactSubject" title="A verified account in DN format to be used as the primary node contact for this node">Contact Subject</label>
165 6985 jones
		</div>
166
		<input class="textinput"
167
			id="dataone.contactSubject"
168
			name="dataone.contactSubject"
169
			value="<%= request.getAttribute("dataone.contactSubject") %>"/>
170
	</div>
171
	<div class="form-row">
172 7424 leinfelder
		<img class="question-mark" src="style/images/help.png"
173 6989 jones
			onClick="helpWindow('<%= request.getContextPath() %>','docs/dataone.html#configuring-metacat-as-a-member-node')"/>
174 6985 jones
		<div class="textinput-label">
175 6987 jones
			<label for="D1Client.certificate.file" title="The absolute path to the X.509 certificate used to authenticate this node">Node Certificate Path</label>
176 6635 leinfelder
		</div>
177
		<input class="textinput"
178
			id="D1Client.certificate.file"
179
			name="D1Client.certificate.file"
180
			value="<%= request.getAttribute("D1Client.certificate.file") %>"/>
181
	</div>
182
	<div class="form-row">
183 7424 leinfelder
		<img class="question-mark" src="style/images/help.png"
184 6989 jones
			onClick="helpWindow('<%= request.getContextPath() %>','docs/dataone.html#configuring-metacat-as-a-member-node')"/>
185 6994 leinfelder
		<div class="textinput-label"><label for="dataone.nodeSynchronize" title="Enable DataONE metadata synchronization">Enable Metadata Synchronization</label></div>
186 6635 leinfelder
187
		<%
188 6864 leinfelder
189
		boolean synchronize = false;
190
		String nodeSynchronize = (String) request.getAttribute("dataone.nodeSynchronize");
191
		if (nodeSynchronize != null) {
192
			synchronize = Boolean.parseBoolean(nodeSynchronize);
193
		}
194
195 6635 leinfelder
		if (synchronize) {
196
		%>
197
		<input type="checkbox"
198
				class="textinput"
199
				id="dataone.nodeSynchronize"
200
				name="dataone.nodeSynchronize"
201
				value="true"
202
				checked="checked"/>
203
		<% } else {%>
204
		<input type="checkbox"
205
				class="textinput"
206
				id="dataone.nodeSynchronize"
207
				name="dataone.nodeSynchronize"
208
				value="true"/>
209
		<% } %>
210
211
	</div>
212 6987 jones
    <p>&nbsp;</p>
213
214 6690 leinfelder
	<h3>Synchronization Schedule</h3>
215 6987 jones
	The schedule on which metadata should be synchronized with DataONE, expressed as a crontab entry.
216 6690 leinfelder
	<hr class="config-line">
217
	<div class="form-row">
218 7424 leinfelder
		<img class="question-mark" src="style/images/help.png"
219 6989 jones
			onClick="helpWindow('<%= request.getContextPath() %>','docs/dataone.html#configuring-metacat-as-a-member-node')"/>
220 6690 leinfelder
		<div class="textinput-label">
221
			<label for="dataone.nodeSynchronization.schedule.year" title="Year">Year</label>
222
		</div>
223
		<input class="textinput"
224
			id="dataone.nodeSynchronization.schedule.year"
225
			name="dataone.nodeSynchronization.schedule.year"
226
			value="<%= request.getAttribute("dataone.nodeSynchronization.schedule.year") %>"/>
227
	</div>
228
	<div class="form-row">
229 7424 leinfelder
		<img class="question-mark" src="style/images/help.png"
230 6989 jones
			onClick="helpWindow('<%= request.getContextPath() %>','docs/dataone.html#configuring-metacat-as-a-member-node')"/>
231 6690 leinfelder
		<div class="textinput-label">
232
			<label for="dataone.nodeSynchronization.schedule.mon" title="Month">Month</label>
233
		</div>
234
		<input class="textinput"
235
			id="dataone.nodeSynchronization.schedule.mon"
236
			name="dataone.nodeSynchronization.schedule.mon"
237
			value="<%= request.getAttribute("dataone.nodeSynchronization.schedule.mon") %>"/>
238
	</div>
239
	<div class="form-row">
240 7424 leinfelder
		<img class="question-mark" src="style/images/help.png"
241 6989 jones
			onClick="helpWindow('<%= request.getContextPath() %>','docs/dataone.html#configuring-metacat-as-a-member-node')"/>
242 6690 leinfelder
		<div class="textinput-label">
243
			<label for="dataone.nodeSynchronization.schedule.mday" title="Day of Month">Day of Month</label>
244
		</div>
245
		<input class="textinput"
246
			id="dataone.nodeSynchronization.schedule.mday"
247
			name="dataone.nodeSynchronization.schedule.mday"
248
			value="<%= request.getAttribute("dataone.nodeSynchronization.schedule.mday") %>"/>
249
	</div>
250
	<div class="form-row">
251 7424 leinfelder
		<img class="question-mark" src="style/images/help.png"
252 6989 jones
			onClick="helpWindow('<%= request.getContextPath() %>','docs/dataone.html#configuring-metacat-as-a-member-node')"/>
253 6690 leinfelder
		<div class="textinput-label">
254
			<label for="dataone.nodeSynchronization.schedule.wday" title="Day of Week">Day of Week</label>
255
		</div>
256
		<input class="textinput"
257
			id="dataone.nodeSynchronization.schedule.wday"
258
			name="dataone.nodeSynchronization.schedule.wday"
259
			value="<%= request.getAttribute("dataone.nodeSynchronization.schedule.wday") %>"/>
260
	</div>
261
	<div class="form-row">
262 7424 leinfelder
		<img class="question-mark" src="style/images/help.png"
263 6989 jones
			onClick="helpWindow('<%= request.getContextPath() %>','docs/dataone.html#configuring-metacat-as-a-member-node')"/>
264 6690 leinfelder
		<div class="textinput-label">
265
			<label for="dataone.nodeSynchronization.schedule.hour" title="Hours">Hours</label>
266
		</div>
267
		<input class="textinput"
268
			id="dataone.nodeSynchronization.schedule.hour"
269
			name="dataone.nodeSynchronization.schedule.hour"
270
			value="<%= request.getAttribute("dataone.nodeSynchronization.schedule.hour") %>"/>
271
	</div>
272
	<div class="form-row">
273 7424 leinfelder
		<img class="question-mark" src="style/images/help.png"
274 6989 jones
			onClick="helpWindow('<%= request.getContextPath() %>','docs/dataone.html#configuring-metacat-as-a-member-node')"/>
275 6690 leinfelder
		<div class="textinput-label">
276
			<label for="dataone.nodeSynchronization.schedule.min" title="Minutes">Minutes</label>
277
		</div>
278
		<input class="textinput"
279
			id="dataone.nodeSynchronization.schedule.min"
280
			name="dataone.nodeSynchronization.schedule.min"
281
			value="<%= request.getAttribute("dataone.nodeSynchronization.schedule.min") %>"/>
282
	</div>
283
	<div class="form-row">
284 7424 leinfelder
		<img class="question-mark" src="style/images/help.png"
285 6989 jones
			onClick="helpWindow('<%= request.getContextPath() %>','docs/dataone.html#configuring-metacat-as-a-member-node')"/>
286 6690 leinfelder
		<div class="textinput-label">
287
			<label for="dataone.nodeSynchronization.schedule.sec" title="Seconds">Seconds</label>
288
		</div>
289
		<input class="textinput"
290
			id="dataone.nodeSynchronization.schedule.sec"
291
			name="dataone.nodeSynchronization.schedule.sec"
292
			value="<%= request.getAttribute("dataone.nodeSynchronization.schedule.sec") %>"/>
293
	</div>
294
295 6987 jones
	<h3>Replication</h3>
296
	Configuration for replication, including whether this node can be used to house replicas of
297
	objects from other nodes, as well as default replication policies for the objects originating
298
	on this Member Node.
299
	<hr class="config-line">
300
	<div class="form-row">
301 7424 leinfelder
		<img class="question-mark" src="style/images/help.png"
302 6989 jones
			onClick="helpWindow('<%= request.getContextPath() %>','docs/dataone.html#configuring-metacat-as-a-member-node')"/>
303 6987 jones
		<div class="textinput-label"><label for="dataone.nodeReplicate" title="Store replicas from other Member Nodes">Accept and Store Replicas</label></div>
304
305
		<%
306
		boolean replicate = false;
307
		String nodeReplicate = (String) request.getAttribute("dataone.nodeReplicate");
308
		if (nodeReplicate != null) {
309
			replicate = Boolean.parseBoolean(nodeReplicate);
310
		}
311
		if (replicate) {
312
		%>
313
		<input type="checkbox"
314
				class="textinput"
315
				id="dataone.nodeReplicate"
316
				name="dataone.nodeReplicate"
317
				value="true"
318
				checked="checked"/>
319
		<% } else {%>
320
		<input type="checkbox"
321
				class="textinput"
322
				id="dataone.nodeReplicate"
323
				name="dataone.nodeReplicate"
324
				value="true"/>
325
		<% } %>
326
	</div>
327
328
	<hr class="config-line">
329
330
 	<div class="form-row">
331 7424 leinfelder
		<img class="question-mark" src="style/images/help.png"
332 6989 jones
			onClick="helpWindow('<%= request.getContextPath() %>','docs/dataone.html#configuring-metacat-as-a-member-node')"/>
333 6987 jones
		<div class="textinput-label">
334
			<label for="dataone.replicationpolicy.default.numreplicas" title="Default Number of Replicas to be created for local objects">Default Number of Replicas</label>
335
		</div>
336
		<input class="textinput"
337
			id="dataone.replicationpolicy.default.numreplicas"
338
			name="dataone.replicationpolicy.default.numreplicas"
339
			value="<%= request.getAttribute("dataone.replicationpolicy.default.numreplicas") %>"/>
340
	</div>
341
  	<div class="form-row">
342 7424 leinfelder
		<img class="question-mark" src="style/images/help.png"
343 6989 jones
			onClick="helpWindow('<%= request.getContextPath() %>','docs/dataone.html#configuring-metacat-as-a-member-node')"/>
344 6987 jones
		<div class="textinput-label">
345
			<label for="dataone.replicationpolicy.default.preferredNodeList" title="A comma-separated list of preferred nodes to house replicas">Default Preferred Nodes</label>
346
		</div>
347
		<input class="textinput"
348
			id="dataone.replicationpolicy.default.preferredNodeList"
349
			name="dataone.replicationpolicy.default.preferredNodeList"
350
			value="<%= request.getAttribute("dataone.replicationpolicy.default.preferredNodeList") %>"/>
351
	</div>
352
   	<div class="form-row">
353 7424 leinfelder
		<img class="question-mark" src="style/images/help.png"
354 6989 jones
			onClick="helpWindow('<%= request.getContextPath() %>','docs/dataone.html#configuring-metacat-as-a-member-node')"/>
355 6987 jones
		<div class="textinput-label">
356
			<label for="dataone.replicationpolicy.default.blockedNodeList" title="A comma-separated list of blocked nodes never to house replicas">Default Blocked Nodes</label>
357
		</div>
358
		<input class="textinput"
359
			id="dataone.replicationpolicy.default.blockedNodeList"
360
			name="dataone.replicationpolicy.default.blockedNodeList"
361
			value="<%= request.getAttribute("dataone.replicationpolicy.default.blockedNodeList") %>"/>
362
	</div>
363
364 6635 leinfelder
	<input type="hidden" name="configureType" value="dataone"/>
365
	<input type="hidden" name="processForm" value="true"/>
366 6992 leinfelder
367
	<%
368
		// do we know if it is an update or a new registration?
369
		boolean isUpdate = false;
370
		String isUpdateString = (String) request.getAttribute("dataone.isUpdate");
371
		if (isUpdateString != null) {
372
			isUpdate = Boolean.parseBoolean(isUpdateString);
373
		}
374 6994 leinfelder
		// do we know if it is pending approval?
375
		boolean isSubmitted = false;
376
		String isSubmittedString = (String) request.getAttribute("dataone.mn.registration.submitted");
377
		if (isSubmittedString != null) {
378
			isSubmitted = Boolean.parseBoolean(isSubmittedString);
379
		}
380 6992 leinfelder
	%>
381
	<%if (isUpdate) { %>
382
		<input class=button type="submit" value="Update"/>
383 6994 leinfelder
	<%} else if (isSubmitted) { %>
384
		<input class=button type="submit" value="Update" disabled="disabled"/>
385 6992 leinfelder
	<%} else { %>
386
		<input class=button type="submit" value="Register"/>
387
	<%} %>
388 6994 leinfelder
	<%
389
		// if have we already configured this section, then we cannot skip it
390
		boolean previouslyConfigured = false;
391
		String previouslyConfiguredString = (String) request.getAttribute("configutil.dataoneConfigured");
392
		if (previouslyConfiguredString != null) {
393
			previouslyConfigured = Boolean.parseBoolean(previouslyConfiguredString);
394
		}
395
	%>
396
	<%if (!previouslyConfigured) { %>
397
		<input class=button type="button" value="Skip" onClick="forward('./admin?configureType=dataone&bypass=true&processForm=true')">
398
	<%} %>
399 6635 leinfelder
	<input class=button type="button" value="Cancel" onClick="forward('./admin')">
400
401
</form>
402
403
<%@ include file="./footer-section.jsp"%>
404
405
</body>
406
</html>