Skip to content

Commit

Permalink
getMetadata Ontology library changed
Browse files Browse the repository at this point in the history
  • Loading branch information
nczirjak-acdh committed Apr 14, 2020
1 parent 469ed5a commit 0851e1f
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion src/Model/ArcheApiModel.php
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,12 @@ private function getData(): array {
private function getOntology(): array {
$dbconnStr = yaml_parse_file(drupal_get_path('module', 'acdh_repo_gui').'/config/config.yaml')['dbConnStr']['guest'];
$conn = new \PDO($dbconnStr);
$ontology = new \acdhOeaw\arche\Ontology($conn, $this->properties->baseUrl.'%');
$cfg = (object) [
'skipNamespace' => $this->properties->baseUrl.'%', // don't forget the '%' at the end!
'order' => 'https://vocabs.acdh.oeaw.ac.at/schema#ordering',
'recommended' => 'https://vocabs.acdh.oeaw.ac.at/schema#recommendedClass',
];
$ontology = new \acdhOeaw\arche\Ontology($conn, $cfg);
return (array)$ontology->getClass($this->properties->type);
}
}

0 comments on commit 0851e1f

Please sign in to comment.