Revision 2546
Added by sgarg over 19 years ago
lib/style/skins/nceas/index.html | ||
---|---|---|
36 | 36 |
src="@systemidserver@@style-skins-path@/nceas/nceas.js"></script> |
37 | 37 |
<script language="JavaScript" type="text/JavaScript" |
38 | 38 |
src="@systemidserver@@style-common-path@/branding.js"></script> |
39 |
<script language="Javascript"> |
|
40 |
function trim(stringToTrim) { |
|
41 |
return stringToTrim.replace(/^\s*/, '').replace(/\s*$/,''); |
|
42 |
} |
|
43 |
|
|
44 |
function checkSearch(submitFormObj) { |
|
45 |
var searchString = trim(submitFormObj.searchstring.value); |
|
46 |
var checkBox = document.getElementById("searchCheckBox"); |
|
47 |
|
|
48 |
if (searchString=="") { |
|
49 |
searchString="%"; |
|
50 |
} |
|
51 |
|
|
52 |
if(checkBox.checked == false && searchString!="%"){ |
|
53 |
submitFormObj.query.value = "<pathquery version=\"1.2\">"+ |
|
54 |
+"<querytitle>Web-Search</querytitle>" |
|
55 |
+"<returndoctype>eml://ecoinformatics.org/eml-2.0.1</returndoctype>" |
|
56 |
+"<returndoctype>eml://ecoinformatics.org/eml-2.0.0</returndoctype>" |
|
57 |
+"<returndoctype>-//ecoinformatics.org//eml-dataset-2.0.0beta6//EN</returndoctype>" |
|
58 |
+"<returndoctype>-//ecoinformatics.org//eml-dataset-2.0.0beta4//EN</returndoctype>" |
|
59 |
+"<returndoctype>-//NCEAS//resource//EN</returndoctype>" |
|
60 |
+"<returndoctype>-//NCEAS//eml-dataset//EN</returndoctype>" |
|
61 |
+"<returnfield>originator/individualName/surName</returnfield>" |
|
62 |
+"<returnfield>originator/individualName/givenName</returnfield>" |
|
63 |
+"<returnfield>creator/individualName/surName</returnfield>" |
|
64 |
+"<returnfield>creator/individualName/givenName</returnfield>" |
|
65 |
+"<returnfield>originator/organizationName</returnfield>" |
|
66 |
+"<returnfield>creator/organizationName</returnfield>" |
|
67 |
+"<returnfield>dataset/title</returnfield>" |
|
68 |
+"<returnfield>keyword</returnfield>" |
|
69 |
+"<querygroup operator=\"INTERSECT\">" |
|
70 |
+"<queryterm searchmode=\"contains\" casesensitive=\"false\">" |
|
71 |
+"<value>National Center for Ecological Analysis and Synthesis</value>" |
|
72 |
+"<pathexpr>organizationName</pathexpr>" |
|
73 |
+"</queryterm>" |
|
74 |
+"<querygroup operator=\"UNION\">" |
|
75 |
+"<queryterm searchmode=\"contains\" casesensitive=\"false\">" |
|
76 |
+"<value>" + searchString + "</value>" |
|
77 |
+"<pathexpr>surName</pathexpr>" |
|
78 |
+"</queryterm>" |
|
79 |
+"<queryterm searchmode=\"contains\" casesensitive=\"false\">" |
|
80 |
+"<value>" + searchString + "</value>" |
|
81 |
+"<pathexpr>givenName</pathexpr>" |
|
82 |
+"</queryterm>" |
|
83 |
+"<queryterm searchmode=\"contains\" casesensitive=\"false\">" |
|
84 |
+"<value>" + searchString + "</value>" |
|
85 |
+"<pathexpr>keyword</pathexpr>" |
|
86 |
+"</queryterm>" |
|
87 |
+"<queryterm searchmode=\"contains\" casesensitive=\"false\">" |
|
88 |
+"<value>" + searchString + "</value>" |
|
89 |
+"<pathexpr>para</pathexpr>" |
|
90 |
+"</queryterm>" |
|
91 |
+"<queryterm searchmode=\"contains\" casesensitive=\"false\">" |
|
92 |
+"<value>" + searchString + "</value>" |
|
93 |
+"<pathexpr>geographicDescription</pathexpr>" |
|
94 |
+"</queryterm>" |
|
95 |
+"<queryterm searchmode=\"contains\" casesensitive=\"false\">" |
|
96 |
+"<value>" + searchString + "</value>" |
|
97 |
+"<pathexpr>literalLayout</pathexpr>" |
|
98 |
+"</queryterm>" |
|
99 |
+"<queryterm searchmode=\"contains\" casesensitive=\"false\">" |
|
100 |
+"<value>" + searchString + "</value>" |
|
101 |
+"<pathexpr>abstract/para</pathexpr>" |
|
102 |
+"</queryterm>" |
|
103 |
+"</querygroup>" |
|
104 |
+"</querygroup>" |
|
105 |
+"</pathquery>"; |
|
106 |
} else { |
|
107 |
queryTermString = ""; |
|
108 |
if(searchString != "%"){ |
|
109 |
queryTermString = "<queryterm searchmode=\"contains\" casesensitive=\"false\">" |
|
110 |
+"<value>" + searchString + "</value>" |
|
111 |
+"<pathexpr>anyfield</pathexpr>" |
|
112 |
+"</queryterm>"; |
|
113 |
} |
|
114 |
submitFormObj.query.value = "<pathquery version=\"1.2\">"+ |
|
115 |
+"<querytitle>Web-Search</querytitle>" |
|
116 |
+"<returndoctype>eml://ecoinformatics.org/eml-2.0.1</returndoctype>" |
|
117 |
+"<returndoctype>eml://ecoinformatics.org/eml-2.0.0</returndoctype>" |
|
118 |
+"<returndoctype>-//ecoinformatics.org//eml-dataset-2.0.0beta6//EN</returndoctype>" |
|
119 |
+"<returndoctype>-//ecoinformatics.org//eml-dataset-2.0.0beta4//EN</returndoctype>" |
|
120 |
+"<returndoctype>-//NCEAS//resource//EN</returndoctype>" |
|
121 |
+"<returndoctype>-//NCEAS//eml-dataset//EN</returndoctype>" |
|
122 |
+"<returnfield>originator/individualName/surName</returnfield>" |
|
123 |
+"<returnfield>originator/individualName/givenName</returnfield>" |
|
124 |
+"<returnfield>creator/individualName/surName</returnfield>" |
|
125 |
+"<returnfield>creator/individualName/givenName</returnfield>" |
|
126 |
+"<returnfield>originator/organizationName</returnfield>" |
|
127 |
+"<returnfield>creator/organizationName</returnfield>" |
|
128 |
+"<returnfield>dataset/title</returnfield>" |
|
129 |
+"<returnfield>keyword</returnfield>" |
|
130 |
+"<querygroup operator=\"INTERSECT\">" |
|
131 |
+"<queryterm searchmode=\"contains\" casesensitive=\"false\">" |
|
132 |
+"<value>National Center for Ecological Analysis and Synthesis</value>" |
|
133 |
+"<pathexpr>organizationName</pathexpr>" |
|
134 |
+"</queryterm>" |
|
135 |
+ queryTermString |
|
136 |
+"</querygroup>" |
|
137 |
+"</pathquery>"; |
|
138 |
|
|
139 |
} |
|
140 |
return true; |
|
141 |
} |
|
142 |
|
|
143 |
function searchAll(){ |
|
144 |
var checkBox = document.getElementById("searchCheckBox"); |
|
145 |
if(checkBox.checked == true){ |
|
146 |
alert("You have selected to search all possible existing fields. This search will take longer."); |
|
147 |
} |
|
148 |
} |
|
149 |
</script> |
|
39 | 150 |
</head> |
40 | 151 |
<body> |
41 | 152 |
<script language="JavaScript"> |
... | ... | |
70 | 181 |
<p><b>Repository Tools</b></p> |
71 | 182 |
<p> |
72 | 183 |
<menu> |
184 |
<li><span class="searchbox"><a name="search"> Search for Data Sets</a></span><br /> |
|
185 |
<menu> |
|
186 |
<form method="POST" action="@servlet-path@" target="_top" onSubmit="return checkSearch(this)"> |
|
187 |
<input value="UNION" name="operator" type="hidden"> |
|
188 |
<input size="14" name="searchstring" type="text" value="" id="searchBox"> |
|
189 |
<input name="query" type="hidden"/> |
|
190 |
<input name="qformat" value="nceas" type="hidden"> |
|
191 |
<input name="enableediting" value="true" type="hidden"> |
|
192 |
<input type="hidden" name="action" value="squery"> |
|
193 |
<input value="Search" type="submit"> |
|
194 |
</form> |
|
195 |
<input type="CHECKBOX" name="searchAll" onClick="searchAll()" id="searchCheckBox" > |
|
196 |
<span class="regtext">Search All Fields</span> |
|
197 |
<br><br> |
|
198 |
This tool allows you to search the registry for data |
|
199 |
sets of interest. When you type text in the box and |
|
200 |
click on the "Search" button, the search will only |
|
201 |
be conducted within the title, author, abstract, |
|
202 |
and keyword fields. Checking the "Search All Fields" |
|
203 |
box will search on these and all other existing |
|
204 |
fields (this search will take more time). |
|
205 |
<br><br> |
|
206 |
You can use the '%' character as a wildcard in your |
|
207 |
searches (e.g., '%biodiversity%' would locate any |
|
208 |
phrase with the word biodiversity embedded within it). |
|
209 |
</menu> |
|
210 |
<br><br> |
|
211 |
</li> |
|
212 |
|
|
73 | 213 |
<li><a href="@servlet-path@?action=query&operator=INTERSECT&anyfield=%25&organizationName=National%20Center%20for%20Ecological%20Analysis%20and%20Synthesis&qformat=nceas&enableediting=true&returndoctype=eml://ecoinformatics.org/eml-2.0.0&returndoctype=eml://ecoinformatics.org/eml-2.0.1&returndoctype=-//ecoinformatics.org//eml-dataset-2.0.0beta6//EN&returndoctype=-//ecoinformatics.org//eml-dataset-2.0.0beta4//EN&returnfield=dataset/title&returnfield=keyword&returnfield=originator/individualName/surName&returnfield=creator/individualName/surName&returnfield=originator/organizationName&returnfield=creator/organizationName">Browse existing NCEAS data sets</a><br /> |
74 | 214 |
<menu> |
75 | 215 |
The repository search system is used to locate data sets of interest |
lib/style/skins/nceas/header.html | ||
---|---|---|
28 | 28 |
<title>NCEAS Data Repository</title> |
29 | 29 |
<link rel="stylesheet" type="text/css" |
30 | 30 |
href="@systemidserver@@style-skins-path@/nceas/nceas.css"></link> |
31 |
<script language="Javascript"> |
|
32 |
function trim(stringToTrim) { |
|
33 |
return stringToTrim.replace(/^\s*/, '').replace(/\s*$/,''); |
|
34 |
} |
|
35 |
|
|
36 |
function checkSearch(submitFormObj) { |
|
37 |
var searchString = trim(submitFormObj.searchstring.value); |
|
38 |
if (searchString=="") { |
|
39 |
searchString="%"; |
|
40 |
} |
|
41 |
|
|
42 |
submitFormObj.query.value = "<pathquery version=\"1.2\">"+ |
|
43 |
+"<querytitle>Web-Search</querytitle>" |
|
44 |
+"<returndoctype>eml://ecoinformatics.org/eml-2.0.1</returndoctype>" |
|
45 |
+"<returndoctype>eml://ecoinformatics.org/eml-2.0.0</returndoctype>" |
|
46 |
+"<returndoctype>-//ecoinformatics.org//eml-dataset-2.0.0beta6//EN</returndoctype>" |
|
47 |
+"<returndoctype>-//ecoinformatics.org//eml-dataset-2.0.0beta4//EN</returndoctype>" |
|
48 |
+"<returndoctype>-//NCEAS//resource//EN</returndoctype>" |
|
49 |
+"<returndoctype>-//NCEAS//eml-dataset//EN</returndoctype>" |
|
50 |
+"<returnfield>originator/individualName/surName</returnfield>" |
|
51 |
+"<returnfield>originator/individualName/givenName</returnfield>" |
|
52 |
+"<returnfield>creator/individualName/surName</returnfield>" |
|
53 |
+"<returnfield>creator/individualName/givenName</returnfield>" |
|
54 |
+"<returnfield>originator/organizationName</returnfield>" |
|
55 |
+"<returnfield>creator/organizationName</returnfield>" |
|
56 |
+"<returnfield>dataset/title</returnfield>" |
|
57 |
+"<returnfield>keyword</returnfield>" |
|
58 |
+"<querygroup operator=\"INTERSECT\">" |
|
59 |
+"<queryterm searchmode=\"contains\" casesensitive=\"false\">" |
|
60 |
+"<value>National Center for Ecological Analysis and Synthesis</value>" |
|
61 |
+"<pathexpr>organizationName</pathexpr>" |
|
62 |
+"</queryterm>" |
|
63 |
+"<querygroup operator=\"UNION\">" |
|
64 |
+"<queryterm searchmode=\"contains\" casesensitive=\"false\">" |
|
65 |
+"<value>" + searchString + "</value>" |
|
66 |
+"<pathexpr>surName</pathexpr>" |
|
67 |
+"</queryterm>" |
|
68 |
+"<queryterm searchmode=\"contains\" casesensitive=\"false\">" |
|
69 |
+"<value>" + searchString + "</value>" |
|
70 |
+"<pathexpr>givenName</pathexpr>" |
|
71 |
+"</queryterm>" |
|
72 |
+"<queryterm searchmode=\"contains\" casesensitive=\"false\">" |
|
73 |
+"<value>" + searchString + "</value>" |
|
74 |
+"<pathexpr>keyword</pathexpr>" |
|
75 |
+"</queryterm>" |
|
76 |
+"<queryterm searchmode=\"contains\" casesensitive=\"false\">" |
|
77 |
+"<value>" + searchString + "</value>" |
|
78 |
+"<pathexpr>para</pathexpr>" |
|
79 |
+"</queryterm>" |
|
80 |
+"<queryterm searchmode=\"contains\" casesensitive=\"false\">" |
|
81 |
+"<value>" + searchString + "</value>" |
|
82 |
+"<pathexpr>geographicDescription</pathexpr>" |
|
83 |
+"</queryterm>" |
|
84 |
+"<queryterm searchmode=\"contains\" casesensitive=\"false\">" |
|
85 |
+"<value>" + searchString + "</value>" |
|
86 |
+"<pathexpr>literalLayout</pathexpr>" |
|
87 |
+"</queryterm>" |
|
88 |
+"<queryterm searchmode=\"contains\" casesensitive=\"false\">" |
|
89 |
+"<value>" + searchString + "</value>" |
|
90 |
+"<pathexpr>abstract/para</pathexpr>" |
|
91 |
+"</queryterm>" |
|
92 |
+"</querygroup>" |
|
93 |
+"</querygroup>" |
|
94 |
+"</pathquery>"; |
|
95 |
return true; |
|
96 |
} |
|
97 |
</script> |
|
98 |
|
|
31 | 99 |
</head> |
32 | 100 |
|
33 | 101 |
<body> |
... | ... | |
59 | 127 |
<p class="searchbox"> |
60 | 128 |
Search for Data<br /> |
61 | 129 |
<form method="POST" action="@servlet-path@" target="_top"> |
62 |
<input value="INTERSECT" name="operator" type="hidden"> |
|
63 |
<input size="14" name="anyfield" type="text" value=""> |
|
64 |
<input name="organizationName" value="National Center for Ecological Analysis and Synthesis" type="hidden"> |
|
65 |
<input name="action" value="query" type="hidden"> |
|
66 |
<input name="qformat" value="nceas" type="hidden"> |
|
130 |
<input value="INTERSECT" name="operator" type="hidden"> |
|
131 |
<input size="14" name="searchstring" type="text" value=""> |
|
132 |
<input name="query" type="hidden"/> |
|
133 |
<input name="qformat" value="nrs" type="hidden"> |
|
67 | 134 |
<input name="enableediting" value="true" type="hidden"> |
68 |
<input name="operator" value="UNION" type="hidden"> |
|
69 |
<input name="returnfield" value="originator/individualName/surName" type="hidden"> |
|
70 |
<input name="returnfield" value="originator/individualName/givenName" type="hidden"> |
|
71 |
<input name="returnfield" value="creator/individualName/surName" type="hidden"> |
|
72 |
<input name="returnfield" value="creator/individualName/givenName" type="hidden"> |
|
73 |
<input name="returnfield" value="originator/organizationName" type="hidden"> |
|
74 |
<input name="returnfield" value="creator/organizationName" type="hidden"> |
|
75 |
<input name="returnfield" value="dataset/title" type="hidden"> |
|
76 |
<input name="returnfield" value="keyword" type="hidden"> |
|
77 |
<input name="returndoctype" value="eml://ecoinformatics.org/eml-2.0.0" type="hidden"> |
|
78 |
<input name="returndoctype" value="eml://ecoinformatics.org/eml-2.0.1" type="hidden"> |
|
79 |
<input name="returndoctype" value="-//ecoinformatics.org//eml-dataset-2.0.0beta6//EN" type="hidden"> |
|
80 |
<input name="returndoctype" value="-//ecoinformatics.org//eml-dataset-2.0.0beta4//EN" type="hidden"> |
|
81 |
<input name="returndoctype" value="-//NCEAS//resource//EN" type="hidden"> |
|
82 |
<input name="returndoctype" value="-//NCEAS//eml-dataset//EN" type="hidden"> |
|
135 |
<input type="hidden" name="action" value="squery"> |
|
83 | 136 |
<!-- <input value="Start Search" type="submit"> --> |
84 | 137 |
</form> |
85 | 138 |
</p> |
Also available in: Unified diff
Changes to the NCEAS index and header html code so that restricted search on name, title, abstract, keywords etc is done. action=squery is used for this instead of action=query.