Skip to content

Commit fc494ae

Browse files
committedDec 1, 2015
freeze for RC1
1 parent 85967ca commit fc494ae

File tree

3 files changed

+12
-6
lines changed

3 files changed

+12
-6
lines changed
 

‎codelists/Makefile

+3
Original file line numberDiff line numberDiff line change
@@ -30,3 +30,6 @@ load: waardelijsten-utf8.csv
3030
clean:
3131
rm -f validateCodelist.xsl imkl2015.rdf
3232

33+
deploy:
34+
cp imkl2015.rdf ../../imkl2015-review/3.\ waardelijsten
35+
cp imkl2015.rdf ../../imkl/waardelijst/1.0.0RC1

‎codelists/create.sql

+1
Original file line numberDiff line numberDiff line change
@@ -9,5 +9,6 @@ create table codelists
99
labelnl text,
1010
description text,
1111
listname text,
12+
reallistname text,
1213
url text
1314
);

‎codelists/sql2rdf.php

+8-6
Original file line numberDiff line numberDiff line change
@@ -12,29 +12,31 @@
1212
$dbconn = pg_connect("");
1313

1414
$prevscheme = "";
15-
$query = "select herkomst,source,attribute,value,labelnl,description,listname,url from codelists where attribute is not null order by listname";
15+
$query = "
16+
select herkomst,source,attribute,value,labelnl,description,reallistname,url
17+
from codelists where attribute is not null order by reallistname";
1618
$result = pg_query($query) or die('Query failed: ' . pg_last_error());
1719

1820

1921
while ($line = pg_fetch_array($result, null, PGSQL_ASSOC)) {
20-
if ($line["listname"] != $prevscheme)
22+
if ($line["reallistname"] != $prevscheme)
2123
{
2224
if ($prevscheme != "")
2325
{
2426
echo " </members>\n";
2527
echo "</Collection>\n";
2628
}
27-
$listname = substr($line["url"],0,strrpos($line["url"],"/"));
28-
$listlabel = substr($listname,1+ strrpos($listname,"/"));
29-
echo "<Collection rdf:about=\"" . $listname . "\">\n";
29+
$reallistname = substr($line["url"],0,strrpos($line["url"],"/"));
30+
$listlabel = substr($reallistname,1+ strrpos($reallistname,"/"));
31+
echo "<Collection rdf:about=\"" . $reallistname . "\">\n";
3032
//
3133
// For now we do not know a label for the Collection so we reuse tne
3234
// collectioname.
3335
//
3436
echo " <rdfs:label>" . $listlabel . "</rdfs:label>\n";
3537
echo "<members rdf:parseType=\"Collection\">\n";
3638

37-
$prevscheme = $line["listname"];
39+
$prevscheme = $line["reallistname"];
3840
}
3941

4042
echo " <Concept rdf:about=\"" . $line["url"] . "\">\n";

0 commit comments

Comments
 (0)
Please sign in to comment.