Project

General

Profile

« Previous | Next » 

Revision 3742

add support for FGDC doctype display

View differences:

lib/style/skins/nceas/search.js
23 23
            +"<returndoctype>-//ecoinformatics.org//eml-dataset-2.0.0beta4//EN</returndoctype>"
24 24
            +"<returndoctype>-//NCEAS//resource//EN</returndoctype>"
25 25
            +"<returndoctype>-//NCEAS//eml-dataset//EN</returndoctype>"
26
            +"<returndoctype>metadata</returndoctype>"
26 27
            +"<returnfield>originator/individualName/surName</returnfield>"
27 28
            +"<returnfield>originator/individualName/givenName</returnfield>"
28 29
            +"<returnfield>creator/individualName/surName</returnfield>"
......
31 32
            +"<returnfield>creator/organizationName</returnfield>"
32 33
            +"<returnfield>dataset/title</returnfield>"
33 34
            +"<returnfield>keyword</returnfield>"
35
            //fgdc fields
36
            +"<returnfield>idinfo/citation/citeinfo/title</returnfield>"
37
            +"<returnfield>idinfo/citation/citeinfo/origin</returnfield>"
38
			+"<returnfield>idinfo/keywords/theme/themekey</returnfield>"
34 39
            +"<querygroup operator=\"INTERSECT\">"
35
                +"<queryterm searchmode=\"contains\" casesensitive=\"false\">"
36
                    +"<value>National Center for Ecological Analysis and Synthesis</value>"
37
                    +"<pathexpr>organizationName</pathexpr>"
38
                +"</queryterm>"
40
            	+"<querygroup operator=\"UNION\">"
41
	                +"<queryterm searchmode=\"contains\" casesensitive=\"false\">"
42
	                    +"<value>National Center for Ecological Analysis and Synthesis</value>"
43
	                    +"<pathexpr>organizationName</pathexpr>"
44
	                +"</queryterm>"
45
	                +"<queryterm searchmode=\"contains\" casesensitive=\"false\">"
46
	                    +"<value>%</value>"
47
	                    +"<pathexpr>placekey</pathexpr>"
48
	                +"</queryterm>"
49
                +"</querygroup>"
39 50
                +"<querygroup operator=\"UNION\">"
40 51
                    +"<queryterm searchmode=\"contains\" casesensitive=\"false\">"
41 52
                        +"<value>" + searchString + "</value>"
......
92 103
            +"<returndoctype>-//ecoinformatics.org//eml-dataset-2.0.0beta4//EN</returndoctype>"
93 104
            +"<returndoctype>-//NCEAS//resource//EN</returndoctype>"
94 105
            +"<returndoctype>-//NCEAS//eml-dataset//EN</returndoctype>"
106
            +"<returndoctype>metadata</returndoctype>"
95 107
            +"<returnfield>originator/individualName/surName</returnfield>"
96 108
            +"<returnfield>originator/individualName/givenName</returnfield>"
97 109
            +"<returnfield>creator/individualName/surName</returnfield>"
......
100 112
            +"<returnfield>creator/organizationName</returnfield>"
101 113
            +"<returnfield>dataset/title</returnfield>"
102 114
            +"<returnfield>keyword</returnfield>"
115
            //fgdc fields
116
            +"<returnfield>idinfo/citation/citeinfo/title</returnfield>"
117
            +"<returnfield>idinfo/citation/citeinfo/origin</returnfield>"
118
			+"<returnfield>idinfo/keywords/theme/themekey</returnfield>"
103 119
            +"<querygroup operator=\"INTERSECT\">"
104
                +"<queryterm searchmode=\"contains\" casesensitive=\"false\">"
105
                    +"<value>National Center for Ecological Analysis and Synthesis</value>"
106
                    +"<pathexpr>organizationName</pathexpr>"
107
                +"</queryterm>"
120
                +"<querygroup operator=\"UNION\">"
121
	                +"<queryterm searchmode=\"contains\" casesensitive=\"false\">"
122
	                    +"<value>National Center for Ecological Analysis and Synthesis</value>"
123
	                    +"<pathexpr>organizationName</pathexpr>"
124
	                +"</queryterm>"
125
	                +"<queryterm searchmode=\"contains\" casesensitive=\"false\">"
126
	                    +"<value>%</value>"
127
	                    +"<pathexpr>placekey</pathexpr>"
128
	                +"</queryterm>"
129
                +"</querygroup>"
108 130
                + queryTermString
109 131
            +"</querygroup>"
110 132
            +"</pathquery>";
......
113 135
    return true;
114 136
}
115 137

  
138
function browseAll(searchFormId) {
139
	var searchForm = document.getElementById(searchFormId);
140
	var searchString = searchForm.searchstring;
141
    var checkBox = document.getElementById("searchAll");
142
    searchString.value="";
143
    checkBox.checked = true;
144
    if (checkSearch(searchForm)) {
145
		searchForm.submit();
146
	}
147

  
148
}
149

  
116 150
function searchAll(){
117 151
    var checkBox = document.getElementById("searchCheckBox");
118 152
    if (checkBox.checked == true) {
lib/style/skins/nceas/index.jsp
79 79
  <tr class="sectbody"></tr>
80 80
 
81 81
  <tr >
82
    <td align="left"><form method="POST" action="<%=METACAT_URL%>" target="_top" onSubmit="return checkSearch(this)">
82
    <td align="left">
83
    <form method="POST" 
84
    	action="<%=METACAT_URL%>" target="_top"
85
    	id="searchForm" name="searchForm" 
86
    	onSubmit="return checkSearch(this)">
83 87
        <div class="searchresultsdividerPale">
84 88
        <p>
85 89
        <input value="UNION" name="operator" type="hidden">
......
106 110
      </div></td>
107 111
  </tr>
108 112
  <tr >
109
    <td class="borderbottom"><div align="center"><a href="<%=METACAT_URL%>?action=query&amp;operator=INTERSECT&amp;anyfield=%25&amp;organizationName=National%20Center%20for%20Ecological%20Analysis%20and%20Synthesis&amp;qformat=nceas&amp;enableediting=true&amp;returndoctype=eml://ecoinformatics.org/eml-2.0.0&amp;returndoctype=eml://ecoinformatics.org/eml-2.0.1&amp;returndoctype=-//ecoinformatics.org//eml-dataset-2.0.0beta6//EN&amp;returndoctype=-//ecoinformatics.org//eml-dataset-2.0.0beta4//EN&amp;returnfield=dataset/title&amp;returnfield=keyword&amp;returnfield=originator/individualName/surName&amp;returnfield=creator/individualName/surName&amp;returnfield=originator/organizationName&amp;returnfield=creator/organizationName">Browse existing NCEAS data sets</a>
113
    <td class="borderbottom"><div align="center">
114
    	<a href="javascript:browseAll('searchForm')">Browse existing NCEAS data sets</a>
110 115
<br/><br/>
111 116
<a href="<%=SERVER_URL_WITH_CONTEXT%>/style/skins/nceas/map.jsp"> View Interactive Map </a> </div>
112 117
</td></tr></table>
lib/style/skins/nceas/nceas.xml
6 6
  <doctype publicid="-//NCEAS//resultset//EN">
7 7
    <target publicid="-//W3C//HTML//EN">style/skins/nceas/nceas.xsl</target>
8 8
  </doctype>
9
  
10
  <!-- NBII/FGDC styles -->
11
  <doctype publicid="metadata">
12
  	<target publicid="-//W3C//HTML//EN">@systemidserver@@style-skins-path@/nceas/nceas.xsl</target>
13
    <!-- <target publicid="-//W3C//HTML//EN">style/common/fgdc/fgdc_1.xsl</target>-->
14
  </doctype>
9 15

  
10 16
<!--
11 17
    ARE THESE STILL NEEDED????????????
lib/style/skins/nceas/nceas.xsl
33 33
	            version="1.0">
34 34
    <xsl:import href="../../common/resultset-table.xsl"/>
35 35
    <xsl:import href="../../common/eml-2.0.1/emlroot.xsl"/>
36
    <xsl:import href="../../common/fgdc/fgdc-root.xsl"/>
36 37

  
37 38
	<xsl:output method="html" />
38 39
	<xsl:param name="sessid" />
......
61 62
                            <xsl:call-template name="resultstable"/>
62 63
                        </xsl:if>
63 64
                        
65
                        <xsl:if test="*[local-name()='metadata']">     	
66
                            <xsl:call-template name="metadata"/>
67
                        </xsl:if>
68
                        
64 69
						<xsl:call-template name="bodyfooter"/>
65 70
						
66 71
					</div><!-- id="content_wrapper"-->
lib/style/common/fgdc/fgdc-root.xsl
1
<?xml version="1.0" encoding="UTF-8"?>
2
<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
3
    <xsl:output indent="yes" method="html"/>
4
    <xsl:param name="docid"/>
5
    <xsl:param name="sessionid"/>
6
    <xsl:param name="qformat"/>
7
    <xsl:param name="publicRead"/>
8
    <xsl:param name="message"/>
9
    <xsl:param name="readonly">true</xsl:param>
10
    
11
    <xsl:template name="metadata">
12
            <body>
13
                <div class="centerContentBorder">
14
                    <div class="templatecontentareaclass">
15
                        <xsl:apply-templates select="metadata/idinfo"/>
16
                        <xsl:apply-templates
17
                            select="metadata/distinfo/resdesc[text()=$docid]/ancestor::distinfo"/>
18
                    </div>
19
                </div>
20
            </body>
21
    </xsl:template>
22
    
23
    <xsl:template match="idinfo">
24
        <table border="0" cellspacing="10">
25
            <tr>
26
                <td colspan="2" align="center">
27
                    <xsl:value-of select="$message"/>
28
                </td>
29
            </tr>
30
            <tr>
31
                <td colspan="2" align="center">
32
                    <h2>FGDC Identification Information</h2>
33
                </td>
34
            </tr>
35
            <xsl:apply-templates select="citation"/>
36
            <xsl:apply-templates select="descript"/>
37
            <xsl:apply-templates select="spdom"/>
38
            <xsl:apply-templates select="keywords"/>
39
        </table>
40
    </xsl:template>
41
    
42
    <xsl:template match="citation">
43
        <xsl:apply-templates select="citeinfo"/>
44
    </xsl:template>
45
    
46
    <xsl:template match="citeinfo">
47
        <tr>
48
            <td colspan="2" class="tablehead">Citation Information</td>
49
        </tr>
50
        
51
        <tr>
52
            <xsl:apply-templates select="title"/>
53
        </tr>
54
        <tr>
55
            <xsl:apply-templates select="origin"/>
56
        </tr>
57
        <tr>
58
            <xsl:apply-templates select="pubdate"/>
59
        </tr>
60
        <tr>
61
            <xsl:apply-templates select="edition"/>
62
        </tr>
63
        <tr>
64
            <xsl:apply-templates select="geoform"/>
65
        </tr>
66
        <tr>
67
            <xsl:apply-templates select="pubinfo"/>
68
        </tr>
69
        <tr>
70
            <xsl:apply-templates select="othercit"/>
71
        </tr>
72
    </xsl:template>
73
    
74
    <xsl:template match="descript">
75
        <tr>
76
            <td colspan="2" class="tablehead">
77
                Description
78
            </td>
79
        </tr>
80
        <tr>
81
            <xsl:apply-templates select="abstract"/>
82
        </tr>
83
        <tr>
84
            <xsl:apply-templates select="purpose"/>
85
        </tr>
86
    </xsl:template>
87
    
88
    <xsl:template match="spdom">
89
        <tr>
90
            <xsl:apply-templates select="bounding"/>
91
        </tr>
92
    </xsl:template>
93
    
94
    <xsl:template match="keywords">
95
        <tr>
96
            <xsl:apply-templates select="theme"/>
97
        </tr>
98
        <tr>
99
            <xsl:apply-templates select="place"/>
100
        </tr>
101
    </xsl:template>
102
    
103
    <xsl:template match="theme">
104
        <td class="highlight" valign="top">Theme Keywords</td>
105
        <td class="secondCol">
106
            <xsl:apply-templates select="themekey[position()!=last()]">
107
                <xsl:with-param name="lastPlace">f</xsl:with-param>
108
            </xsl:apply-templates>
109
            <xsl:apply-templates select="themekey[position()=last()]">
110
                <xsl:with-param name="lastPlace">t</xsl:with-param>
111
            </xsl:apply-templates>
112
        </td>
113
    </xsl:template>
114
    
115
    <xsl:template match="place">
116
        <td class="highlight" valign="top">Place Keywords</td>
117
        <td class="secondCol">
118
            <xsl:apply-templates select="placekey[position()!=last()]">
119
                <xsl:with-param name="lastPlace">f</xsl:with-param>
120
            </xsl:apply-templates>
121
            <xsl:apply-templates select="placekey[position()=last()]">
122
                <xsl:with-param name="lastPlace">t</xsl:with-param>
123
            </xsl:apply-templates>
124
        </td>
125
    </xsl:template>
126
    
127
    <xsl:template match="themekey">
128
        <xsl:param name="lastPlace"/>
129
        <xsl:value-of select="."/>
130
        <xsl:if test="$lastPlace = 'f'">, </xsl:if>
131
    </xsl:template>
132
    
133
    <xsl:template match="placekey">
134
        <xsl:param name="lastPlace"/>
135
        <xsl:value-of select="."/>
136
        <xsl:if test="$lastPlace = 'f'">, </xsl:if>
137
    </xsl:template>
138
    
139
    <xsl:template match="bounding">
140
        <td class="highlight" valign="top">Bounding Coordinates</td>
141
        <td class="secondCol">
142
            <table>
143
                <tr>
144
                    <td class="highlight" align="right">West</td>
145
                    <td class="secondCol">
146
                        <xsl:value-of select="westbc"/>
147
                    </td>
148
                    <td class="highlight" align="right">East</td>
149
                    <td class="secondCol">
150
                        <xsl:value-of select="eastbc"/>
151
                    </td>
152
                </tr>
153
                <tr>
154
                    <td class="highlight" align="right">North</td>
155
                    <td class="secondCol">
156
                        <xsl:value-of select="northbc"/>
157
                    </td>
158
                    <td class="highlight" align="right">South</td>
159
                    <td class="secondCol">
160
                        <xsl:value-of select="southbc"/>
161
                    </td>
162
                </tr>
163
            </table>
164
        </td>
165
    </xsl:template>
166
    
167
    <xsl:template match="abstract">
168
        <td class="highlight" valign="top">Abstract</td>
169
        <td class="secondCol">
170
            <xsl:value-of select="."/>
171
        </td>
172
    </xsl:template>
173
    
174
    <xsl:template match="purpose">
175
        <td class="highlight" valign="top">Purpose</td>
176
        <td class="secondCol">
177
            <xsl:value-of select="."/>
178
        </td>
179
    </xsl:template>
180
    
181
    <xsl:template match="title">
182
        <td class="highlight">Title</td>
183
        <td class="secondCol">
184
            <xsl:value-of select="."/>
185
        </td>
186
    </xsl:template>
187
    
188
    <xsl:template match="origin">
189
        <td class="highlight">Originator </td>
190
        <td class="secondCol">
191
            <xsl:value-of select="."/>
192
        </td>
193
    </xsl:template>
194
    
195
    <xsl:template match="pubdate">
196
        <td class="highlight">Publication Date</td>
197
        <td class="secondCol">
198
            <xsl:call-template name="long_date">
199
                <xsl:with-param name="date">
200
                    <xsl:value-of select="."/>
201
                </xsl:with-param>
202
            </xsl:call-template>
203
        </td>
204
    </xsl:template>
205
    
206
    <xsl:template match="edition">
207
        <td class="highlight">Edition</td>
208
        <td class="secondCol">
209
            <xsl:value-of select="."/>
210
        </td>
211
    </xsl:template>
212
    
213
    <xsl:template match="geoform">
214
        <td class="highlight" valign="top">Geospatial Data Presentation Form</td>
215
        <td class="secondCol">
216
            <xsl:value-of select="."/>
217
        </td>
218
    </xsl:template>
219
    
220
    <xsl:template match="othercit">
221
        <td class="highlight" valign="top">Other Citation Details</td>
222
        <td class="secondCol">
223
            <xsl:value-of select="."/>
224
        </td>
225
    </xsl:template>
226
    
227
    <xsl:template match="pubinfo">
228
        <td class="highlight" valign="top">Publication Information </td>
229
        <td class="secondCol">
230
            <table>
231
                <tr>
232
                    <xsl:apply-templates select="pubplace"/>
233
                </tr>
234
                <tr>
235
                    <xsl:apply-templates select="publish"/>
236
                </tr>
237
            </table>
238
        </td>
239
    </xsl:template>
240
    
241
    <xsl:template match="pubplace">
242
        <td class="highlight">Publication Place</td>
243
        <td class="secondCol">
244
            <xsl:value-of select="."/>
245
        </td>
246
    </xsl:template>
247
    
248
    <xsl:template match="publish">
249
        <td class="highlight">Publisher</td>
250
        <td class="secondCol">
251
            <xsl:value-of select="."/>
252
        </td>
253
    </xsl:template>
254
    
255
    <xsl:template match="distinfo">
256
        <table width="100%" border="0" cellspacing="10">
257
            <tr>
258
                <td colspan="5" align="center">
259
                    <h2>Data Package Information</h2>
260
                </td>
261
            </tr>
262
            <tr>
263
                <td class="tablehead">
264
                    File type
265
                </td>
266
                <td class="tablehead" colspan="2">
267
                    File name (Doc Id)
268
                </td>
269
                <xsl:if test="$readonly = 'false'">
270
                    <td align="left" colspan="2" class="tablehead">
271
                        Actions...
272
                    </td>
273
                </xsl:if>
274
            </tr>
275
            <tr>
276
                <xsl:apply-templates select="resdesc"/>
277
            </tr>
278
            <xsl:apply-templates select="stdorder/digform/digtopt/onlinopt/computer/networka"/>
279
        </table>
280
    </xsl:template>
281
    
282
    <xsl:template match="resdesc">
283
        <td class="highlight" align="left" valign="top">Metadata</td>
284
        <td class="secondCol" align="left" valign="top">
285
        	<xsl:value-of select="../custom"/> (<xsl:value-of select="."/>)
286
        	
287
        	<!-- update -->
288
		<xsl:if test="$readonly = 'false'">
289
			<br/>
290
			<br/>
291
			<form method="post" action="./style/common/ClientViewHelper.jspx"
292
                     enctype="multipart/form-data">
293
                   <input name="action" value="Update Metadata" type="hidden"/>
294
                   <input name="docid" type="hidden" value="{.}"/>
295
                   <input name="qformat" type="hidden" value="{$qformat}"/>
296
                   <input name="metadataDocId" type="hidden" value="{$docid}"/>
297
                   <input name="updateFile" type="file"/>
298
                   <input name="submit" value="Update" type="submit"/>
299
               </form>
300
		</xsl:if>
301
		
302
       </td>
303
       <!-- download -->
304
       <td class="secondCol" valign="bottom">
305
           <form method="get" action="./style/common/ClientViewHelper.jspx">
306
               <input name="action" value="Download" type="submit"/>
307
               <input name="docid" type="hidden" value="{.}"/>
308
               <input name="qformat" type="hidden" value="{$qformat}"/>
309
               <input name="metadataDocId" type="hidden" value="{$docid}"/>
310
           </form>
311
       </td>
312
       
313
       <xsl:if test="$readonly = 'false'">
314
       	<!-- delete -->
315
       	<td class="secondCol" valign="bottom">
316
           	<form method="get" action="./style/common/ClientViewHelper.jspx"
317
                     enctype="text/html">
318
                   <input name="action" value="Delete" type="submit"/>
319
                   <input name="docid" type="hidden" value="{.}"/>
320
                   <input name="qformat" type="hidden" value="{$qformat}"/>
321
                   <input name="metadataDocId" type="hidden" value="{$docid}"/>
322
               </form>
323
           </td>
324
           <!-- set access -->
325
       	<td class="secondCol" valign="bottom">
326
			<form method="get" action="./style/common/ClientViewHelper.jspx">
327
                   <input name="action" value="Set Access" type="submit"/>
328
                   <xsl:choose>
329
                       <xsl:when test="$publicRead = 'true'">
330
                           <input name="publicAccess" type="checkbox" checked=''/> Public read     
331
                       </xsl:when>
332
                       <xsl:otherwise>
333
                           <input name="publicAccess" type="checkbox"/> Public read                         
334
                       </xsl:otherwise>
335
                   </xsl:choose>
336
                   <input name="docid" type="hidden" value="{.}"/>
337
                   <input name="qformat" type="hidden" value="{$qformat}"/>
338
                   <input name="metadataDocId" type="hidden" value="{$docid}"/>
339
                   <input name="contentStandard" type="hidden" value="FGDC"/>
340
			</form>
341
		</td>
342
	</xsl:if>
343
   </xsl:template>
344
   
345
   <xsl:template match="networka">
346
       <tr>
347
           <xsl:apply-templates select="networkr"/>
348
       </tr>
349
   </xsl:template>
350
   
351
   <xsl:template match="networkr">
352
	<xsl:if test="not(./ancestor::digform/digtinfo/formcont = '')">
353
       <td class="highlight" align="left" valign="top">Data</td>
354
       <td class="secondCol" align="left" valign="top">
355
           <xsl:value-of select="./ancestor::digform/digtinfo/formcont"/> (<xsl:value-of select="."/>)
356
       	<!-- update -->
357
		<xsl:if test="$readonly = 'false'">
358
			<br/>
359
			<br/>
360
               <form method="post" action="./style/common/ClientViewHelper.jspx"
361
                     enctype="multipart/form-data">
362
                   <input name="action" value="Update Data" type="hidden"/>
363
                   <input name="docid" type="hidden" value="{.}"/>
364
                   <input name="qformat" type="hidden" value="{$qformat}"/>
365
                   <input name="metadataDocId" type="hidden" value="{$docid}"/>
366
                   <input name="updateFile" type="file"/>
367
                   <input name="submit" value="Update" type="submit"/>                    
368
               </form>
369
		</xsl:if>                        
370
       </td>
371
       <!-- download -->
372
       <td class="secondCol" valign="bottom">
373
           <form method="get" action="./style/common/ClientViewHelper.jspx" enctype="application/octet-stream">
374
               <input name="action" value="Download" type="submit"/>
375
               <input name="docid" type="hidden" value="{.}"/>
376
               <input name="qformat" type="hidden" value="{$qformat}"/>
377
               <input name="metadataDocId" type="hidden" value="{$docid}"/>
378
           </form>
379
       </td>
380
       <xsl:if test="$readonly = 'false'">
381
       	<!-- delete -->
382
       	<td class="secondCol" valign="bottom">
383
       		<form method="get" action="./style/common/ClientViewHelper.jspx"
384
                     enctype="text/html">
385
                   <input name="action" value="Delete" type="submit"/>
386
                   <input name="docid" type="hidden" value="{.}"/>
387
                   <input name="qformat" type="hidden" value="{$qformat}"/>
388
                   <input name="metadataDocId" type="hidden" value="{$docid}"/>
389
               </form>
390
       	</td>
391
       	<!-- set access -->
392
       	<td class="secondCol" valign="bottom"></td>
393
       	
394
		</xsl:if>
395
	</xsl:if>
396
   </xsl:template>
397
   
398
   <xsl:template name="long_date">
399
       <xsl:param name="date"/>
400
       <!-- Day -->
401
       <xsl:value-of select="number(substring($date, 7, 2))"/>
402
       <xsl:text> </xsl:text>
403
       <!-- Month -->
404
       <xsl:variable name="month" select="number(substring($date, 5, 2))"/>
405
       <xsl:choose>
406
           <xsl:when test="$month=1">January</xsl:when>
407
           <xsl:when test="$month=2">February</xsl:when>
408
           <xsl:when test="$month=3">March</xsl:when>
409
           <xsl:when test="$month=4">April</xsl:when>
410
           <xsl:when test="$month=5">May</xsl:when>
411
           <xsl:when test="$month=6">June</xsl:when>
412
           <xsl:when test="$month=7">July</xsl:when>
413
           <xsl:when test="$month=8">August</xsl:when>
414
           <xsl:when test="$month=9">September</xsl:when>
415
           <xsl:when test="$month=10">October</xsl:when>
416
           <xsl:when test="$month=11">November</xsl:when>
417
           <xsl:when test="$month=12">December</xsl:when>
418
           <xsl:otherwise>INVALID MONTH</xsl:otherwise>
419
       </xsl:choose>
420
       <xsl:text> </xsl:text>
421
       <!-- Year -->
422
        <xsl:value-of select="substring($date, 1, 4)"/>
423
    </xsl:template>
424
    
425
</xsl:stylesheet>
0 426

  

Also available in: Unified diff