Skip to content

Commit

Permalink
Create SKOS triples from the PHP map
Browse files Browse the repository at this point in the history
  • Loading branch information
egonw committed Apr 11, 2012
1 parent ab67392 commit 74e7844
Showing 1 changed file with 20 additions and 0 deletions.
20 changes: 20 additions & 0 deletions targetOntology2.php
@@ -0,0 +1,20 @@
<?php header('Content-type: application/rdf+xml'); ?>

<?php

include 'vars.php';
include 'namespaces.php';
include 'functions.php';
include 'to.php';

# classifications
foreach ($array as $desc => $array2) {
$higher = $array2["higher"];
$uri = $array2["uri"];
echo triple($uri, $RDF . "type", $SKOS . "Concept");
echo triple($uri, $RDFS . "subClassOf", $higher);
echo triple($higher, $SKOS . "narrower", $uri);
echo data_triple($uri, $SKOS . "prefLabel", $desc);
}

?>

0 comments on commit 74e7844

Please sign in to comment.