Skip to content

Commit

Permalink
Specify skosmos:defaultEndpoint as a resource, not literal. Fixes Nat…
Browse files Browse the repository at this point in the history
  • Loading branch information
osma committed Aug 28, 2018
1 parent 9d61b82 commit b9b9702
Show file tree
Hide file tree
Showing 4 changed files with 9 additions and 4 deletions.
2 changes: 1 addition & 1 deletion config.ttl.dist
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@
:config a skosmos:Configuration ;
# SPARQL endpoint
# a local Fuseki server is usually on localhost:3030
#skosmos:sparqlEndpoint "http://localhost:3030/ds/sparql" ;
#skosmos:sparqlEndpoint <http://localhost:3030/ds/sparql> ;
# use the dev.finto.fi endpoint where the example vocabularies reside
skosmos:sparqlEndpoint <http://api.dev.finto.fi/sparql> ;
# sparql-query extension, or "Generic" for plain SPARQL 1.1
Expand Down
2 changes: 1 addition & 1 deletion migrate-config.php
Original file line number Diff line number Diff line change
Expand Up @@ -98,7 +98,7 @@ function parse_vocabularies_file($vocabulariesFile)
:config a skosmos:Configuration ;
# SPARQL endpoint
# a local Fuseki server is usually on localhost:3030
skosmos:sparqlEndpoint "$endpoint" ;
skosmos:sparqlEndpoint <$endpoint> ;
# sparql-query extension, or "Generic" for plain SPARQL 1.1
# set to "JenaText" instead if you use Fuseki with jena-text index
skosmos:sparqlDialect "$dialect" ;
Expand Down
7 changes: 6 additions & 1 deletion model/GlobalConfig.php
Original file line number Diff line number Diff line change
Expand Up @@ -164,7 +164,12 @@ public function getSparqlTimeout()
*/
public function getDefaultEndpoint()
{
return $this->getLiteral('skosmos:sparqlEndpoint', 'http://localhost:3030/ds/sparql');
$endpoint = $this->resource->get('skosmos:sparqlEndpoint');
if ($endpoint) {
return $endpoint->getUri();
} else {
return 'http://localhost:3030/ds/sparql';
}
}

/**
Expand Down
2 changes: 1 addition & 1 deletion tests/testconfig.ttl
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@
:config a skosmos:Configuration ;
# SPARQL endpoint
# a local Fuseki server is usually on localhost:3030
skosmos:sparqlEndpoint "http://localhost:13030/ds/sparql" ;
skosmos:sparqlEndpoint <http://localhost:13030/ds/sparql> ;
# sparql-query extension, or "Generic" for plain SPARQL 1.1
# set to "JenaText" instead if you use Fuseki with jena-text index
skosmos:sparqlDialect "Generic" ;
Expand Down

0 comments on commit b9b9702

Please sign in to comment.