Project

General

Profile

« Previous | Next » 

Revision 7939

web/vegpath/index.php: Renamed ref to ns to emphasize that the resources in this field are namespaces for the paths

View differences:

web/vegpath/index.php
16 16

  
17 17
$h_level = 5;
18 18
$path = parse_mixed_path($_SERVER["QUERY_STRING"]);
19
$ref = strtolower($path->head);
19
$ns = strtolower($path->head);
20 20

  
21
function add_ref($name, $path_pat, $url_func)
21
function add_ns($name, $path_pat, $url_func)
22 22
{
23
	global $alias, $h_level, $path, $ref;
23
	global $alias, $h_level, $path, $ns;
24 24
	if (is_string($url_func)) $url_func = by_prefix($url_func);
25 25
	
26 26
	print("<h".$h_level.' id="'.$name.'">'.$alias.'<big><a href="http://'.$alias
27 27
		.$name.'">'.$name."</a></big><i>".$path_pat."</i></h".$h_level.">\n");
28
	if ($ref === strtolower($name)) # found match, so redirect
28
	if ($ns === strtolower($name)) # found match, so redirect
29 29
	{
30 30
		header("Location: ".strip_url($url_func($path->tail)));
31 31
		ob_end_flush();
......
138 138
print("<h3>Exchange schemas</h3>");
139 139
{
140 140
	print("<blockquote>\n");
141
	add_ref("VegCore", ".term", "https://projects.nceas.ucsb.edu/nceas/projects/bien/wiki/VegCore#");
142
	add_ref("DwC", ".term", "http://rs.tdwg.org/dwc/terms/#");
141
	add_ns("VegCore", ".term", "https://projects.nceas.ucsb.edu/nceas/projects/bien/wiki/VegCore#");
142
	add_ns("DwC", ".term", "http://rs.tdwg.org/dwc/terms/#");
143 143
	{
144 144
		print("<blockquote>\n"); $h_level++;
145
		add_ref("DwC-history", ".term", "http://rs.tdwg.org/dwc/terms/history/#");
145
		add_ns("DwC-history", ".term", "http://rs.tdwg.org/dwc/terms/history/#");
146 146
		print("</blockquote>\n"); $h_level--;
147 147
	}
148
	add_ref("TCS", "/XPath", "http://www.tdwg.org/standards/117/download/#/v101.xsd#");
149
	add_ref("VegX", "/XPath", "http://wiki.tdwg.org/twiki/pub/Vegetation/WebHome/VegX_Schema_1.5.3_proposed.zip#/veg.xsd#");
148
	add_ns("TCS", "/XPath", "http://www.tdwg.org/standards/117/download/#/v101.xsd#");
149
	add_ns("VegX", "/XPath", "http://wiki.tdwg.org/twiki/pub/Vegetation/WebHome/VegX_Schema_1.5.3_proposed.zip#/veg.xsd#");
150 150
	print("</blockquote>\n");
151 151
}
152 152
print("<h3>Aggregators</h3>");
153 153
{
154 154
	print("<blockquote>\n");
155
	add_ref("VegBank", ".table.column", custom_separator("http://vegbank.org/vegbank/views/dba_tabledescription_detail.jsp?view=detail&entity=dba_tabledescription&where=where_tablename&wparam=",
155
	add_ns("VegBank", ".table.column", custom_separator("http://vegbank.org/vegbank/views/dba_tabledescription_detail.jsp?view=detail&entity=dba_tabledescription&where=where_tablename&wparam=",
156 156
		"#", "http://vegbank.org/get/index/dba_tabledescription"));
157
	add_ref("SALVIAS", ".table.column", "http://salvias.net/Documents/salvias_data_dictionary.html#");
157
	add_ns("SALVIAS", ".table.column", "http://salvias.net/Documents/salvias_data_dictionary.html#");
158 158
	{
159 159
		print("<blockquote>\n"); $h_level++;
160
		add_ref("SALVIAS-db", ".table.column", nimoy_db("salvias_plots"));
161
		add_ref("SALVIAS-users", ".table.column", nimoy_db("salvias_users"));
160
		add_ns("SALVIAS-db", ".table.column", nimoy_db("salvias_plots"));
161
		add_ns("SALVIAS-users", ".table.column", nimoy_db("salvias_users"));
162 162
		print("</blockquote>\n"); $h_level--;
163 163
	}
164
	add_ref("BIEN2", "", $nimoy."?target=server_databases.php");
164
	add_ns("BIEN2", "", $nimoy."?target=server_databases.php");
165 165
	{
166 166
		print("<blockquote>\n"); $h_level++;
167
		add_ref("BIEN2-web", ".table.column", nimoy_db("bien_web"));
168
		add_ref("BIEN2-core", ".table.column", nimoy_db("bien2"));
169
		add_ref("BIEN2-geoscrub", ".table.column", nimoy_db("geoscrub"));
170
		add_ref("BIEN2-staging", ".table.column", nimoy_db("bien2_staging"));
167
		add_ns("BIEN2-web", ".table.column", nimoy_db("bien_web"));
168
		add_ns("BIEN2-core", ".table.column", nimoy_db("bien2"));
169
		add_ns("BIEN2-geoscrub", ".table.column", nimoy_db("geoscrub"));
170
		add_ns("BIEN2-staging", ".table.column", nimoy_db("bien2_staging"));
171 171
		print("</blockquote>\n"); $h_level--;
172 172
	}
173
	add_ref("VegBIEN", ".table.column", phpPgAdmin("http://vegbiendev.nceas.ucsb.edu/phppgadmin/redirect.php?server=localhost%3A5432%3Aallow&database=vegbien&schema=public"));
173
	add_ns("VegBIEN", ".table.column", phpPgAdmin("http://vegbiendev.nceas.ucsb.edu/phppgadmin/redirect.php?server=localhost%3A5432%3Aallow&database=vegbien&schema=public"));
174 174
	print("</blockquote>\n");
175 175
}
176 176
print("<h3>Primary databases</h3>");
177 177
{
178 178
	print("<blockquote>\n");
179
	add_ref("TNRS", ".term", fragment_override("http://tnrs.iplantcollaborative.org/instructions.html", "download_results"));
180
	add_ref("CTFS", "", $CTFS);
179
	add_ns("TNRS", ".term", fragment_override("http://tnrs.iplantcollaborative.org/instructions.html", "download_results"));
180
	add_ns("CTFS", "", $CTFS);
181 181
	{
182 182
		print("<blockquote>\n"); $h_level++;
183
		add_ref("CTFS-schema", ".table.column", "https://projects.nceas.ucsb.edu/nceas/projects/bien/repository/raw/inputs/CTFS/_archive/DBv5.txt#");
184
		add_ref("CTFS-tables", ".table", fragment_override($Redmine."/wiki/CTFS", "Tables"));
185
		add_ref("CTFS-terms", ".term", $Redmine_svn."/inputs/CTFS/_src/ctfs-comments_worksheet.xls#");
183
		add_ns("CTFS-schema", ".table.column", "https://projects.nceas.ucsb.edu/nceas/projects/bien/repository/raw/inputs/CTFS/_archive/DBv5.txt#");
184
		add_ns("CTFS-tables", ".table", fragment_override($Redmine."/wiki/CTFS", "Tables"));
185
		add_ns("CTFS-terms", ".term", $Redmine_svn."/inputs/CTFS/_src/ctfs-comments_worksheet.xls#");
186 186
		print("</blockquote>\n"); $h_level--;
187 187
	}
188
	add_ref("IH-db", ".term", $IH_db);
188
	add_ns("IH-db", ".term", $IH_db);
189 189
	print("</blockquote>\n");
190 190
}
191 191
print("<h3>People</h3>");
192 192
{
193 193
	print("<blockquote>\n");
194
	add_ref("Brad-Boyle", "", $CTFS);
194
	add_ns("Brad-Boyle", "", $CTFS);
195 195
	{
196 196
		print("<blockquote>\n"); $h_level++;
197 197
		$Brad_Boyle_VegCore = $Redmine_svn."/schemas/VegCore/Brad_Boyle";
198
		add_ref("Brad-Boyle-data-provenance", ".term", $Brad_Boyle_VegCore."/BIEN%20database%20entities%20related%20to%20data%20provenance%20and%20ownership.docx#");
199
		add_ref("Brad-Boyle-DwC-IDs-2013-2-7", ".term", $Brad_Boyle_VegCore."/vegbien_identifiers.xlsx#");
200
		add_ref("Brad-Boyle-DwC-IDs-2013-1-31", ".term", $Brad_Boyle_VegCore."/vegbien_identifier_examples.xlsx#");
198
		add_ns("Brad-Boyle-data-provenance", ".term", $Brad_Boyle_VegCore."/BIEN%20database%20entities%20related%20to%20data%20provenance%20and%20ownership.docx#");
199
		add_ns("Brad-Boyle-DwC-IDs-2013-2-7", ".term", $Brad_Boyle_VegCore."/vegbien_identifiers.xlsx#");
200
		add_ns("Brad-Boyle-DwC-IDs-2013-1-31", ".term", $Brad_Boyle_VegCore."/vegbien_identifier_examples.xlsx#");
201 201
		print("</blockquote>\n"); $h_level--;
202 202
	}
203 203
	print("</blockquote>\n");
......
211 211
print("<h3>Institutions</h3>");
212 212
{
213 213
	print("<blockquote>\n");
214
	add_ref("IH", ".herbarium_code", by_prefix("http://sweetgum.nybg.org/ih/herbarium_list.php?QueryName=DetailedQuery&Restriction=NamPartyType+%3D+%27IH+Herbarium%27&col_NamOrganisationAcronym=",
214
	add_ns("IH", ".herbarium_code", by_prefix("http://sweetgum.nybg.org/ih/herbarium_list.php?QueryName=DetailedQuery&Restriction=NamPartyType+%3D+%27IH+Herbarium%27&col_NamOrganisationAcronym=",
215 215
		"http://sweetgum.nybg.org/ih/"));
216 216
	print("</blockquote>\n");
217 217
}

Also available in: Unified diff