Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
15 changed files
with
216 additions
and
259 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
|
||
## Mapping RDF to JSKOS | ||
|
||
To facilitate writing wrappers from RDF to JSKOS, a mapping can be written in | ||
form of a YAML file. See `GNDService`/`GNDMapping.yaml` and | ||
`GeonamesService`/`GeonamesMapping` for examples that make use of `RDFTrait`. | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
info: | ||
@echo "Usage: make install|test|run" | ||
|
||
install: | ||
composer install | ||
|
||
test: | ||
composer debug-test | ||
|
||
run: | ||
php -S localhost:8080 -t src | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,7 @@ | ||
<?php | ||
|
||
include realpath(__DIR__) . '/lib/BARTOCService.php'; | ||
$service = 'BARTOCService'; | ||
|
||
\JSKOS\Server::runService(new BARTOCService()); | ||
include realpath(__DIR__) . "/lib/$service.php"; | ||
\JSKOS\Server::runService(new $service()); | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,30 +1,7 @@ | ||
<?php | ||
|
||
/** | ||
* Implements a basic JSKOS concepts endpoint for GND. | ||
* | ||
* This wrapper converts GND RDF/XML to JSKOS. | ||
* | ||
* @package JSKOS | ||
*/ | ||
$service = 'GNDService'; | ||
|
||
include realpath(__DIR__) . '/lib/GNDService.php'; | ||
|
||
\JSKOS\Server::runService(new GNDService()); | ||
|
||
/* | ||
$concept = new Concept(["uri" => "$uri"]); | ||
foreach (getResources($xml, 'foaf:page') as $page) { | ||
$concept->subjectOf = [ "uri" => $page ]; | ||
} | ||
foreach (getResources($xml, 'gndo:broaderTermGeneral') as $uri) { | ||
$concept->broader[] = [ "uri" => $uri ]; | ||
} | ||
foreach (getLiterals($xml, 'gndo:preferredNameForTheSubjectHeading') as $label) { | ||
$concept->prefLabel["de"] = $label; | ||
} | ||
*/ | ||
include realpath(__DIR__) . "/lib/$service.php"; | ||
\JSKOS\Server::runService(new $service()); | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,12 +1,7 @@ | ||
<?php | ||
|
||
/** | ||
* Implements a basic JSKOS concepts endpoint for Geonames. | ||
* | ||
* @package JSKOS | ||
*/ | ||
$service = 'GeonamesService'; | ||
|
||
include realpath(__DIR__) . '/lib/GeonamesService.php'; | ||
|
||
\JSKOS\Server::runService(new GeonamesService()); | ||
include realpath(__DIR__) . "/lib/$service.php"; | ||
\JSKOS\Server::runService(new $service()); | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,7 @@ | ||
<?php | ||
|
||
include realpath(__DIR__) . '/lib/OpenSKOSService.php'; | ||
$service = 'OpenSKOSService'; | ||
|
||
\JSKOS\Server::runService(new OpenSKOSService()); | ||
include realpath(__DIR__) . "/lib/$service.php"; | ||
\JSKOS\Server::runService(new $service()); | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,7 @@ | ||
<?php | ||
|
||
include realpath(__DIR__) . '/lib/WikidataService.php'; | ||
$service = 'WikidataService'; | ||
|
||
\JSKOS\Server::runService(new WikidataService()); | ||
include realpath(__DIR__) . "/lib/$service.php"; | ||
\JSKOS\Server::runService(new $service()); | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.