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