diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml
new file mode 100644
index 000000000..41432ea2a
--- /dev/null
+++ b/.github/workflows/ci.yml
@@ -0,0 +1,58 @@
+name: CI
+
+on: [push]
+
+jobs:
+ build-test:
+ runs-on: ubuntu-latest
+ strategy:
+ matrix:
+ php_version: [7.2, 7.3, 7.4]
+ fail-fast: false
+
+ steps:
+ - name: Check out repository code
+ uses: actions/checkout@v2
+
+ - name: Cache Fuseki installation
+ uses: actions/cache@v2
+ with:
+ path: tests/apache-jena-fuseki-*
+ key: fuseki-${{ hashFiles('tests/init_fuseki.sh') }}
+
+ - name: Start up Fuseki
+ run: cd tests; sh ./init_fuseki.sh
+
+ - name: Cache Composer dependencies
+ uses: actions/cache@v2
+ with:
+ path: |
+ /tmp/composer-cache
+ vendor
+ key: ${{ runner.os }}-php${{ matrix.php_version}}-${{ hashFiles('**/composer.json') }}
+ restore-keys: |
+ ${{ runner.os }}-php${{ matrix.php_version}}-
+
+ - name: Install Composer dependencies
+ uses: php-actions/composer@v5
+ with:
+ php_version: ${{ matrix.php_version }}
+ php_extensions: gettext intl xsl pcov
+
+ - name: Run PHPUnit tests
+ uses: osma/phpunit@v2-network-host-debug
+ with:
+ version: 8.5
+ php_version: ${{ matrix.php_version }}
+ php_extensions: gettext intl xsl pcov
+ memory_limit: 512M
+
+ - name: Publish code coverage to Code Climate
+ uses: paambaati/codeclimate-action@v2.7.5
+ env:
+ CC_TEST_REPORTER_ID: fb98170a5c7ea9cc2bbab19ff26268335e6a11a4f8267ca935e5e8ff4624886c
+ with:
+ prefix: /app
+
+ - name: Publish code coverage to Codecov
+ uses: codecov/codecov-action@v1
diff --git a/.travis.yml b/.travis.yml
deleted file mode 100644
index 9a9b50b64..000000000
--- a/.travis.yml
+++ /dev/null
@@ -1,38 +0,0 @@
-sudo: required
-dist: trusty
-language: php
-php:
- - 7.2
- - 7.3
- - 7.4
-install:
- - phpenv config-rm xdebug.ini
- - composer install
-cache:
- directories:
- - $HOME/.composer
- - vendor
-before_script:
- - curl -L https://codeclimate.com/downloads/test-reporter/test-reporter-latest-linux-amd64 > ./cc-test-reporter
- - chmod +x ./cc-test-reporter
- - ./cc-test-reporter before-build
- - cd tests
- - export LANGUAGE=fr
- - sh ./init_fuseki.sh
- - cd ..
-script:
- - phpdbg -qrr vendor/bin/phpunit
-after_script:
- - ./cc-test-reporter after-build --exit-code $TRAVIS_TEST_RESULT
- - bash <(curl -s https://codecov.io/bash)
- - pkill -f 'java -Xmx1200M -jar'
-env:
- global:
- - CC_TEST_REPORTER_ID=fb98170a5c7ea9cc2bbab19ff26268335e6a11a4f8267ca935e5e8ff4624886c
- matrix:
- - FUSEKI_VERSION=3.14.0
-matrix:
- exclude:
- allow_failures:
-notifications:
- slack: kansalliskirjasto:9mOKu3Vws1CIddF5jqWgXbli
diff --git a/composer.json b/composer.json
index 2354c2830..3f8c88d85 100644
--- a/composer.json
+++ b/composer.json
@@ -87,5 +87,8 @@
},
"autoload": {
"classmap": ["controller/", "model/", "model/sparql/"]
+ },
+ "scripts": {
+ "test": "vendor/bin/phpunit"
}
}
diff --git a/model/GlobalConfig.php b/model/GlobalConfig.php
index fedaa39dc..7a1719262 100644
--- a/model/GlobalConfig.php
+++ b/model/GlobalConfig.php
@@ -189,6 +189,8 @@ public function getDefaultEndpoint()
$endpoint = $this->resource->get('skosmos:sparqlEndpoint');
if ($endpoint) {
return $endpoint->getUri();
+ } elseif (getenv('SKOSMOS_SPARQL_ENDPOINT')) {
+ return getenv('SKOSMOS_SPARQL_ENDPOINT');
} else {
return 'http://localhost:3030/ds/sparql';
}
diff --git a/model/Vocabulary.php b/model/Vocabulary.php
index 2aaf4de7a..ade6023f6 100644
--- a/model/Vocabulary.php
+++ b/model/Vocabulary.php
@@ -31,7 +31,14 @@ public function getConfig()
*/
public function getEndpoint()
{
- return $this->resource->get('void:sparqlEndpoint')->getUri();
+ $endpoint = $this->resource->get('void:sparqlEndpoint');
+ if ($endpoint) {
+ return $endpoint->getUri();
+ } elseif (getenv('SKOSMOS_SPARQL_ENDPOINT')) {
+ return getenv('SKOSMOS_SPARQL_ENDPOINT');
+ } else {
+ return 'http://localhost:3030/ds/sparql';
+ }
}
/**
diff --git a/tests/GenericSparqlTest.php b/tests/GenericSparqlTest.php
index f5497d7ff..b391b160a 100644
--- a/tests/GenericSparqlTest.php
+++ b/tests/GenericSparqlTest.php
@@ -17,14 +17,15 @@ protected function setUp() : void
$this->vocab = $this->model->getVocabulary('test');
$this->graph = $this->vocab->getGraph();
$this->params = $this->getMockBuilder('ConceptSearchParameters')->disableOriginalConstructor()->getMock();
- $this->sparql = new GenericSparql('http://localhost:13030/skosmos-test/sparql', $this->graph, $this->model);
+ $this->endpoint = getenv('SKOSMOS_SPARQL_ENDPOINT');
+ $this->sparql = new GenericSparql($this->endpoint, $this->graph, $this->model);
}
/**
* @covers GenericSparql::__construct
*/
public function testConstructor() {
- $gs = new GenericSparql('http://localhost:13030/skosmos-test/sparql', $this->graph, $this->model);
+ $gs = new GenericSparql($this->endpoint, $this->graph, $this->model);
$this->assertInstanceOf('GenericSparql', $gs);
}
@@ -32,7 +33,7 @@ public function testConstructor() {
* @covers GenericSparql::getGraph
*/
public function testGetGraph() {
- $gs = new GenericSparql('http://localhost:13030/skosmos-test/sparql', $this->graph, $this->model);
+ $gs = new GenericSparql($this->endpoint, $this->graph, $this->model);
$this->assertEquals($this->graph, $gs->getGraph());
}
@@ -200,7 +201,7 @@ public function testQueryConceptsAlphabeticalLimitAndOffset() {
public function testQualifiedNotationAlphabeticalList() {
$voc = $this->model->getVocabulary('test-qualified-notation');
$res = new EasyRdf\Resource("http://www.w3.org/2004/02/skos/core#notation");
- $sparql = new GenericSparql('http://localhost:13030/skosmos-test/sparql', $voc->getGraph(), $this->model);
+ $sparql = new GenericSparql($this->endpoint, $voc->getGraph(), $this->model);
$actual = $sparql->queryConceptsAlphabetical("a", "en", null, null, null, false, $res);
@@ -271,7 +272,7 @@ public function testQualifiedNotationAlphabeticalList() {
public function testQualifiedBroaderAlphabeticalList() {
$voc = $this->model->getVocabulary('test-qualified-broader');
$res = new EasyRdf\Resource("http://www.w3.org/2004/02/skos/core#broader");
- $sparql = new GenericSparql('http://localhost:13030/skosmos-test/sparql', $voc->getGraph(), $this->model);
+ $sparql = new GenericSparql($this->endpoint, $voc->getGraph(), $this->model);
$actual = $sparql->queryConceptsAlphabetical("a", "en", null, null, null, false, $res);
@@ -391,7 +392,7 @@ public function testQueryConceptsAlphabeticalFull() {
*/
public function testQueryConceptInfoWithMultipleVocabs()
{
- $this->sparql = new GenericSparql('http://localhost:13030/skosmos-test/sparql', '?graph', $this->model);
+ $this->sparql = new GenericSparql($this->endpoint, '?graph', $this->model);
$voc2 = $this->model->getVocabulary('test');
$voc3 = $this->model->getVocabulary('dates');
$voc4 = $this->model->getVocabulary('groups');
@@ -413,7 +414,7 @@ public function testQueryConceptInfoWithMultipleVocabs()
*/
public function testQueryConceptInfoWithAllVocabs()
{
- $this->sparql = new GenericSparql('http://localhost:13030/skosmos-test/sparql', '?graph', $this->model);
+ $this->sparql = new GenericSparql($this->endpoint, '?graph', $this->model);
$actual = $this->sparql->queryConceptInfo(array('http://www.skosmos.skos/test/ta121', 'http://www.skosmos.skos/groups/ta111'), null, null, 'en');
$this->assertInstanceOf('Concept', $actual[0]);
$this->assertEquals('http://www.skosmos.skos/test/ta121', $actual[0]->getUri());
@@ -490,7 +491,7 @@ public function testQueryConceptScheme()
{
$actual = $this->sparql->queryConceptScheme('http://www.skosmos.skos/test/conceptscheme');
$this->assertInstanceOf('EasyRdf\Graph', $actual);
- $this->assertEquals('http://localhost:13030/skosmos-test/sparql', $actual->getUri());
+ $this->assertEquals($this->endpoint, $actual->getUri());
}
/**
@@ -514,7 +515,7 @@ public function testQueryConceptSchemes()
*/
public function testQueryConceptSchemesSubject()
{
- $sparql = new GenericSparql('http://localhost:13030/skosmos-test/sparql', 'http://www.skosmos.skos/test-concept-schemes/', $this->model);
+ $sparql = new GenericSparql($this->endpoint, 'http://www.skosmos.skos/test-concept-schemes/', $this->model);
$actual = $sparql->queryConceptSchemes('en');
$expected = array(
@@ -566,7 +567,7 @@ public function testQueryConceptsMultipleVocabs()
$voc2 = $this->model->getVocabulary('groups');
$this->params->method('getSearchTerm')->will($this->returnValue('Carp'));
$this->params->method('getVocabs')->will($this->returnValue(array($voc, $voc2)));
- $sparql = new GenericSparql('http://localhost:13030/skosmos-test/sparql', '?graph', $this->model);
+ $sparql = new GenericSparql($this->endpoint, '?graph', $this->model);
$actual = $sparql->queryConcepts(array($voc, $voc2), null, null, $this->params);
$this->assertEquals(2, sizeof($actual));
$this->assertEquals('http://www.skosmos.skos/groups/ta112', $actual[0]['uri']);
@@ -589,7 +590,7 @@ public function testQueryConceptsMultipleSchemes()
// returns 3 concepts without the scheme limit, and only 2 with the scheme limit below
$this->params->method('getSearchTerm')->will($this->returnValue('concept*'));
$this->params->method('getSchemeLimit')->will($this->returnValue(array('http://www.skosmos.skos/multiple-schemes/cs1', 'http://www.skosmos.skos/multiple-schemes/cs2')));
- $sparql = new GenericSparql('http://localhost:13030/skosmos-test/sparql', 'http://www.skosmos.skos/multiple-schemes/', $this->model);
+ $sparql = new GenericSparql($this->endpoint, 'http://www.skosmos.skos/multiple-schemes/', $this->model);
$actual = $sparql->queryConcepts(array($voc), null, null, $this->params);
$this->assertEquals(2, sizeof($actual));
$this->assertEquals('http://www.skosmos.skos/multiple-schemes/c1-in-cs1', $actual[0]['uri']);
@@ -1050,7 +1051,7 @@ public function testListConceptGroups()
{
$voc = $this->model->getVocabulary('groups');
$graph = $voc->getGraph();
- $sparql = new GenericSparql('http://localhost:13030/skosmos-test/sparql', $graph, $this->model);
+ $sparql = new GenericSparql($this->endpoint, $graph, $this->model);
$actual = $sparql->ListConceptGroups('http://www.w3.org/2004/02/skos/core#Collection', 'en');
$expected = array (0 => array ('prefLabel' => 'Fish', 'uri' => 'http://www.skosmos.skos/groups/fish', 'hasMembers' => true, 'childGroups' => array('http://www.skosmos.skos/groups/sub')), 1 => array ('prefLabel' => 'Freshwater fish', 'uri' => 'http://www.skosmos.skos/groups/fresh', 'hasMembers' => true), 2 => array ('prefLabel' => 'Saltwater fish', 'uri' => 'http://www.skosmos.skos/groups/salt', 'hasMembers' => true),3 => array ('prefLabel' => 'Submarine-like fish', 'uri' => 'http://www.skosmos.skos/groups/sub', 'hasMembers' => true));
$this->assertEquals($expected, $actual);
@@ -1065,7 +1066,7 @@ public function testListConceptGroupContentsExcludingDeprecatedConcept()
{
$voc = $this->model->getVocabulary('groups');
$graph = $voc->getGraph();
- $sparql = new GenericSparql('http://localhost:13030/skosmos-test/sparql', $graph, $this->model);
+ $sparql = new GenericSparql($this->endpoint, $graph, $this->model);
$actual = $sparql->ListConceptGroupContents('http://www.w3.org/2004/02/skos/core#Collection', 'http://www.skosmos.skos/groups/salt', 'en');
$this->assertEquals('http://www.skosmos.skos/groups/ta113', $actual[0]['uri']);
$this->assertEquals(1, sizeof($actual));
@@ -1080,7 +1081,7 @@ public function testListConceptGroupContentsIncludingDeprecatedConcept()
{
$voc = $this->model->getVocabulary('showDeprecated');
$graph = $voc->getGraph();
- $sparql = new GenericSparql('http://localhost:13030/skosmos-test/sparql', $graph, $this->model);
+ $sparql = new GenericSparql($this->endpoint, $graph, $this->model);
$actual = $sparql->ListConceptGroupContents('http://www.w3.org/2004/02/skos/core#Collection', 'http://www.skosmos.skos/groups/salt', 'en', $voc->getConfig()->getShowDeprecated());
$expected = array (
0 => array (
@@ -1111,7 +1112,7 @@ public function testQueryChangeList()
{
$voc = $this->model->getVocabulary('changes');
$graph = $voc->getGraph();
- $sparql = new GenericSparql('http://localhost:13030/skosmos-test/sparql', $graph, $this->model);
+ $sparql = new GenericSparql($this->endpoint, $graph, $this->model);
$actual = $sparql->queryChangeList('dc:created', 'en', 0, 10);
$order = array();
foreach($actual as $concept) {
@@ -1129,7 +1130,7 @@ public function testQueryChangeList()
public function testMalformedDates() {
$voc = $this->model->getVocabulary('test');
$graph = $voc->getGraph();
- $sparql = new GenericSparql('http://localhost:13030/skosmos-test/sparql', $graph, $this->model);
+ $sparql = new GenericSparql($this->endpoint, $graph, $this->model);
$result = $sparql->queryChangeList('dc:modified', 'en', 0, 10);
$uris = array();
foreach($result as $concept) {
@@ -1146,7 +1147,7 @@ public function testLimitSearchToType()
{
$voc = $this->model->getVocabulary('test');
$graph = $voc->getGraph();
- $sparql = new GenericSparql('http://localhost:13030/skosmos-test/sparql', $graph, $this->model);
+ $sparql = new GenericSparql($this->endpoint, $graph, $this->model);
$this->params->method('getSearchTerm')->will($this->returnValue('*'));
$this->params->method('getTypeLimit')->will($this->returnValue(array('mads:Topic')));
$actual = $this->sparql->queryConcepts(array($voc), null, true, $this->params);
@@ -1186,7 +1187,7 @@ public function testQueryConceptsWithExtraFields()
*/
public function testQuerySuperProperties()
{
- $this->sparql = new GenericSparql('http://localhost:13030/skosmos-test/sparql', '?graph', $this->model);
+ $this->sparql = new GenericSparql($this->endpoint, '?graph', $this->model);
$actual = $this->sparql->querySuperProperties('http://example.com/myns#property');
$this->assertEquals(1, sizeof($actual));
$expected = array('http://example.com/myns#superProperty');
@@ -1202,7 +1203,7 @@ public function testQueryAllConceptLabels()
{
$voc = $this->model->getVocabulary('test');
$graph = $voc->getGraph();
- $sparql = new GenericSparql('http://localhost:13030/skosmos-test/sparql', $graph, $this->model);
+ $sparql = new GenericSparql($this->endpoint, $graph, $this->model);
$actual = $sparql->queryAllConceptLabels('http://www.skosmos.skos/test/ta112', 'en');
@@ -1224,7 +1225,7 @@ public function testQueryAllConceptLabelsNonexistentConcept()
{
$voc = $this->model->getVocabulary('test');
$graph = $voc->getGraph();
- $sparql = new GenericSparql('http://localhost:13030/skosmos-test/sparql', $graph, $this->model);
+ $sparql = new GenericSparql($this->endpoint, $graph, $this->model);
$actual = $sparql->queryAllConceptLabels('http://www.skosmos.skos/test/notfound', 'en');
@@ -1240,7 +1241,7 @@ public function testQueryAllConceptLabelsNoPrefLabel()
{
$voc = $this->model->getVocabulary('test');
$graph = $voc->getGraph();
- $sparql = new GenericSparql('http://localhost:13030/skosmos-test/sparql', $graph, $this->model);
+ $sparql = new GenericSparql($this->endpoint, $graph, $this->model);
$actual = $sparql->queryAllConceptLabels('http://www.skosmos.skos/test/ta112', 'sv');
diff --git a/tests/GlobalConfigTest.php b/tests/GlobalConfigTest.php
index d23d2d05a..7715a3952 100644
--- a/tests/GlobalConfigTest.php
+++ b/tests/GlobalConfigTest.php
@@ -23,7 +23,7 @@ protected function setUp() : void
public function testGetDefaultEndpoint()
{
- $this->assertEquals("http://localhost:13030/skosmos-test/sparql", $this->config->getDefaultEndpoint());
+ $this->assertEquals(getenv('SKOSMOS_SPARQL_ENDPOINT'), $this->config->getDefaultEndpoint());
}
public function testGetDefaultSparqlDialect()
diff --git a/tests/JenaTextSparqlTest.php b/tests/JenaTextSparqlTest.php
index 525062e06..821303f38 100644
--- a/tests/JenaTextSparqlTest.php
+++ b/tests/JenaTextSparqlTest.php
@@ -17,14 +17,15 @@ protected function setUp() : void
$this->vocab = $this->model->getVocabulary('test');
$this->graph = $this->vocab->getGraph();
$this->params = $this->getMockBuilder('ConceptSearchParameters')->disableOriginalConstructor()->getMock();
- $this->sparql = new JenaTextSparql('http://localhost:13030/skosmos-test/sparql', $this->graph, $this->model);
+ $this->endpoint = getenv('SKOSMOS_SPARQL_ENDPOINT');
+ $this->sparql = new JenaTextSparql($this->endpoint, $this->graph, $this->model);
}
/**
* @covers JenaTextSparql::__construct
*/
public function testConstructor() {
- $gs = new JenaTextSparql('http://localhost:13030/skosmos-test/sparql', $this->graph, $this->model);
+ $gs = new JenaTextSparql($this->endpoint, $this->graph, $this->model);
$this->assertInstanceOf('JenaTextSparql', $gs);
}
@@ -117,7 +118,7 @@ public function testQueryConceptsAlphabeticalLimitAndOffset() {
public function testQualifiedNotationAlphabeticalList() {
$voc = $this->model->getVocabulary('test-qualified-notation');
$res = new EasyRdf\Resource("http://www.w3.org/2004/02/skos/core#notation");
- $sparql = new GenericSparql('http://localhost:13030/skosmos-test/sparql', $voc->getGraph(), $this->model);
+ $sparql = new GenericSparql($this->endpoint, $voc->getGraph(), $this->model);
$actual = $sparql->queryConceptsAlphabetical("a", "en", null, null, null, false, $res);
@@ -187,7 +188,7 @@ public function testQualifiedNotationAlphabeticalList() {
public function testQualifiedBroaderAlphabeticalList() {
$voc = $this->model->getVocabulary('test-qualified-broader');
$res = new EasyRdf\Resource("http://www.w3.org/2004/02/skos/core#broader");
- $sparql = new JenaTextSparql('http://localhost:13030/skosmos-test/sparql', $voc->getGraph(), $this->model);
+ $sparql = new JenaTextSparql($this->endpoint, $voc->getGraph(), $this->model);
$actual = $sparql->queryConceptsAlphabetical("a", "en", null, null, null, false, $res);
@@ -358,7 +359,7 @@ public function testQueryConceptsDefaultGraph()
public function testQueryConceptsAlphabeticalOrderBy() {
$vocab = $this->model->getVocabulary('collation');
$graph = $vocab->getGraph();
- $sparql = new JenaTextSparql('http://localhost:13030/skosmos-test/sparql', $graph, $this->model);
+ $sparql = new JenaTextSparql($this->endpoint, $graph, $this->model);
$actual = $sparql->queryConceptsAlphabetical('t', 'fi');
$expected = array (
0 => array (
diff --git a/tests/bootstrap.php b/tests/bootstrap.php
index 04cb7fd10..f8175a878 100644
--- a/tests/bootstrap.php
+++ b/tests/bootstrap.php
@@ -1,3 +1,11 @@
;
# sparql-query extension, or "Generic" for plain SPARQL 1.1
# set to "JenaText" instead if you use Fuseki with jena-text index
skosmos:sparqlDialect "JenaText" ;
@@ -70,7 +69,6 @@
dc:subject :cat_science ;
dc:type mdrtype:ONTOLOGY ;
void:dataDump ;
- void:sparqlEndpoint ;
void:uriSpace "http://www.skosmos.skos/test/";
skos:prefLabel "Test ontology"@en ;
skosmos:arrayClass isothes:ThesaurusArray ;
@@ -88,7 +86,6 @@
dc:title "Test qualified alphabetical listing queries (skos:broader)"@en ;
dc:subject :cat_science ;
dc:type mdrtype:ONTOLOGY ;
- void:sparqlEndpoint ;
void:uriSpace "http://www.skosmos.skos/test-qualified-broader/" ;
skosmos:defaultLanguage "en" ;
skosmos:groupClass skos:Collection ;
@@ -100,7 +97,6 @@
dc:title "Test qualified alphabetical listing queries (skos:notation)"@en ;
dc:subject :cat_science ;
dc:type mdrtype:ONTOLOGY ;
- void:sparqlEndpoint ;
void:uriSpace "http://www.skosmos.skos/test-qualified-notation/" ;
skosmos:defaultLanguage "en" ;
skosmos:groupClass skos:Collection ;
@@ -112,7 +108,6 @@
skos:prefLabel "Mutiple Schemes vocabulary"@en ;
dc:title "Mutiple Schemes vocabulary"@en ;
dc:type mdrtype:ONTOLOGY ;
- void:sparqlEndpoint ;
void:uriSpace "http://www.skosmos.skos/multiple-schemes/";
skosmos:defaultLanguage "en";
skosmos:language "en";
@@ -123,7 +118,6 @@
dc11:title "Test ontology 2"@en ;
dc:subject :cat_general ;
void:uriSpace "http://www.skosmos.skos/onto/testdiff#";
- void:sparqlEndpoint ;
skosmos:language "fi", "en";
skosmos:sparqlDialect "JenaText";
skosmos:fullAlphabeticalIndex "true";
@@ -142,7 +136,6 @@
void:uriSpace "http://www.skosmos.skos/onto/groups/";
skosmos:arrayClass isothes:ThesaurusArray ;
skosmos:groupClass skos:Collection ;
- void:sparqlEndpoint ;
skosmos:language "fi", "en";
skosmos:defaultLanguage "fi";
skosmos:indexShowClass meta:TestClass, meta:TestClass2;
@@ -157,7 +150,6 @@
void:uriSpace "http://www.exemple.fr/";
skosmos:arrayClass isothes:ThesaurusArray ;
skosmos:groupClass skos:Collection ;
- void:sparqlEndpoint ;
skosmos:language "en";
skosmos:defaultLanguage "en";
skosmos:sparqlGraph .
@@ -170,7 +162,6 @@
void:uriSpace "http://www.skosmos.skos/onto/groups/";
skosmos:arrayClass isothes:ThesaurusArray ;
skosmos:groupClass skos:Collection ;
- void:sparqlEndpoint ;
skosmos:language "fi", "en";
skosmos:defaultLanguage "fi";
skosmos:showDeprecated "true";
@@ -180,7 +171,6 @@
dc11:title "Cycle test vocabulary"@en ;
dc:subject :cat_general ;
void:uriSpace "http://www.skosmos.skos/onto/cycle/";
- void:sparqlEndpoint ;
skosmos:language "en";
skosmos:sparqlGraph .
@@ -188,7 +178,6 @@
dc11:title "Duplicate labels test vocabulary"@en ;
dc:subject :cat_general ;
void:uriSpace "http://www.skosmos.skos/onto/dup/";
- void:sparqlEndpoint ;
skosmos:language "en";
skosmos:sparqlGraph .
@@ -199,7 +188,6 @@
rdfs:label "Date information vocabulary"@en ;
dc:subject :cat_general ;
void:uriSpace "http://www.skosmos.skos/onto/date/";
- void:sparqlEndpoint ;
skosmos:language "en";
skosmos:showPropertyInSearch skos:exactMatch;
skosmos:hasMultiLingualProperty skos:altLabel ;
@@ -210,7 +198,6 @@
dc11:title "Vocabulary with mappings"@en ;
dc:subject :cat_general ;
void:uriSpace "http://www.skosmos.skos/onto/mapping/";
- void:sparqlEndpoint ;
skosmos:language "en";
skosmos:sparqlGraph .
@@ -218,7 +205,6 @@
dc11:title "A vocabulary for testing the change list creation"@en ;
dc:subject :cat_general ;
void:uriSpace "http://www.skosmos.skos/changes/";
- void:sparqlEndpoint ;
skosmos:language "en";
skosmos:sparqlGraph .
@@ -226,7 +212,6 @@
dc11:title "A vocabulary for testing custom prefixes"@en ;
dc:subject :cat_general ;
void:uriSpace "http://www.skosmos.skos/prefix/";
- void:sparqlEndpoint ;
skosmos:language "en";
skosmos:sparqlGraph .
@@ -234,7 +219,6 @@
dc11:title "Subproperties of hiddenLabel"@en ;
dc:subject :cat_general ;
void:uriSpace "http://www.skosmos.skos/sub/";
- void:sparqlEndpoint ;
skosmos:language "en";
skosmos:sparqlGraph .
@@ -242,7 +226,6 @@
dc11:title "SuperGroup and member relationship double trouble"@en ;
dc:subject :cat_general ;
void:uriSpace "http://www.skosmos.skos/onto/dupgroup/";
- void:sparqlEndpoint ;
skosmos:language "en";
skosmos:sparqlGraph .
@@ -250,7 +233,6 @@
dc11:title "A vocabulary for testing language subtags"@en ;
dc:subject :cat_general ;
void:uriSpace "http://www.skosmos.skos/subtag/";
- void:sparqlEndpoint ;
skosmos:language "en";
skosmos:fallbackLanguages ( "fr" "de" "sv" ) ;
skosmos:sparqlGraph ;
@@ -260,7 +242,6 @@
dc11:title "A vocabulary for test SPARQL with collation"@en ;
dc:subject :cat_general ;
void:uriSpace "http://www.skosmos.skos/collation/";
- void:sparqlEndpoint ;
skosmos:language "fi";
skosmos:sparqlGraph .
@@ -272,7 +253,6 @@
skosmos:externalProperty dc11:creator ;
skosmos:externalProperty dc11:relation ;
skosmos:externalProperty rdfs:comment ;
- void:sparqlEndpoint ;
skosmos:language "en";
skosmos:sparqlGraph .
@@ -280,7 +260,6 @@
dc11:title "A vocabulary for testing SKOS XL"@en ;
dc:subject :cat_general ;
void:uriSpace "http://www.skosmos.skos/xl/";
- void:sparqlEndpoint ;
skosmos:language "en";
skosmos:sparqlGraph .
diff --git a/tests/testconfig.ttl b/tests/testconfig.ttl
index a48e969e5..390079d74 100644
--- a/tests/testconfig.ttl
+++ b/tests/testconfig.ttl
@@ -21,9 +21,8 @@
# Skosmos main configuration
:config a skosmos:Configuration ;
- # SPARQL endpoint
- # a local Fuseki server is usually on localhost:3030
- skosmos:sparqlEndpoint ;
+ # SPARQL endpoint defaults to $SKOSMOS_SPARQL_ENDPOINT environment var
+ # skosmos:sparqlEndpoint ;
# sparql-query extension, or "Generic" for plain SPARQL 1.1
# set to "JenaText" instead if you use Fuseki with jena-text index
# skosmos:sparqlDialect "JenaText" ;
@@ -74,7 +73,6 @@
dc:subject :cat_science ;
dc:type mdrtype:ONTOLOGY ;
void:dataDump ;
- void:sparqlEndpoint ;
void:uriSpace "http://www.skosmos.skos/test/";
skos:prefLabel "Test ontology"@en ;
skosmos:arrayClass isothes:ThesaurusArray ;
@@ -93,7 +91,6 @@
dc:title "Test notation sort ontology"@en ;
dc:subject :cat_science ;
dc:type mdrtype:ONTOLOGY ;
- void:sparqlEndpoint ;
void:uriSpace "http://www.skosmos.skos/test-notation-sort/";
skos:prefLabel "Test notation sort ontology"@en ;
skosmos:defaultLanguage "en";
@@ -106,7 +103,6 @@
dc:title "Test qualified alphabetical listing queries (skos:broader)"@en ;
dc:subject :cat_science ;
dc:type mdrtype:ONTOLOGY ;
- void:sparqlEndpoint ;
void:uriSpace "http://www.skosmos.skos/test-qualified-broader/" ;
skosmos:defaultLanguage "en" ;
skosmos:groupClass skos:Collection ;
@@ -118,7 +114,6 @@
dc:title "Test qualified alphabetical listing queries (skos:notation)"@en ;
dc:subject :cat_science ;
dc:type mdrtype:ONTOLOGY ;
- void:sparqlEndpoint ;
void:uriSpace "http://www.skosmos.skos/test-qualified-notation/" ;
skosmos:defaultLanguage "en" ;
skosmos:groupClass skos:Collection ;
@@ -132,7 +127,6 @@
dc:type mdrtype:ONTOLOGY ;
void:dataDump ;
void:dataDump ;
- void:sparqlEndpoint ;
void:uriSpace "http://www.skosmos.skos/test-marc/";
skosmos:defaultLanguage "fi" ;
skosmos:marcSourceCode "test/fin"@fi, "test/swe"@sv ;
@@ -145,7 +139,6 @@
dc:title "Test undefined marc source"@en ;
dc:type mdrtype:ONTOLOGY ;
void:dataDump ;
- void:sparqlEndpoint ;
void:uriSpace "http://www.skosmos.skos/test-marc/" ;
skosmos:defaultLanguage "fi" ;
skosmos:marcSourceCode "test/fin"@fi, "test/swe"@sv ;
@@ -165,7 +158,6 @@
skos:prefLabel "Mutiple Schemes vocabulary"@en ;
dc:title "Mutiple Schemes vocabulary"@en ;
dc:type mdrtype:ONTOLOGY ;
- void:sparqlEndpoint ;
void:uriSpace "http://www.skosmos.skos/multiple-schemes/";
skosmos:defaultLanguage "en";
skosmos:marcSourceCode "ysa/gen";
@@ -177,7 +169,6 @@
dc11:title "Test ontology 2"@en ;
dc:subject :cat_general ;
void:uriSpace "http://www.skosmos.skos/onto/testdiff#";
- void:sparqlEndpoint ;
skosmos:language "fi", "en";
skosmos:sparqlDialect "JenaText";
skosmos:fullAlphabeticalIndex "true";
@@ -196,7 +187,6 @@
void:uriSpace "http://www.skosmos.skos/onto/groups/";
skosmos:arrayClass isothes:ThesaurusArray ;
skosmos:groupClass skos:Collection ;
- void:sparqlEndpoint ;
skosmos:language "fi", "en";
skosmos:defaultLanguage "fi";
skosmos:indexShowClass meta:TestClass, meta:TestClass2;
@@ -211,7 +201,6 @@
void:uriSpace "http://www.exemple.fr/";
skosmos:arrayClass isothes:ThesaurusArray ;
skosmos:groupClass skos:Collection ;
- void:sparqlEndpoint ;
skosmos:language "en";
skosmos:defaultLanguage "en";
skosmos:sparqlGraph .
@@ -224,7 +213,6 @@
void:uriSpace "http://www.skosmos.skos/onto/groups/";
skosmos:arrayClass isothes:ThesaurusArray ;
skosmos:groupClass skos:Collection ;
- void:sparqlEndpoint ;
skosmos:language "fi", "en";
skosmos:defaultLanguage "fi";
skosmos:showDeprecated "true";
@@ -234,7 +222,6 @@
dc11:title "Cycle test vocabulary"@en ;
dc:subject :cat_general ;
void:uriSpace "http://www.skosmos.skos/onto/cycle/";
- void:sparqlEndpoint ;
skosmos:language "en";
skosmos:sparqlGraph .
@@ -242,7 +229,6 @@
dc11:title "Duplicate labels test vocabulary"@en ;
dc:subject :cat_general ;
void:uriSpace "http://www.skosmos.skos/onto/dup/";
- void:sparqlEndpoint ;
skosmos:language "en";
skosmos:sparqlGraph .
@@ -253,7 +239,6 @@
rdfs:label "Date information vocabulary"@en ;
dc:subject :cat_general ;
void:uriSpace "http://www.skosmos.skos/onto/date/";
- void:sparqlEndpoint ;
skosmos:language "en";
skosmos:showPropertyInSearch skos:exactMatch;
skosmos:hasMultiLingualProperty skos:altLabel ;
@@ -264,7 +249,6 @@
dc11:title "Vocabulary with mappings"@en ;
dc:subject :cat_general ;
void:uriSpace "http://www.skosmos.skos/onto/mapping/";
- void:sparqlEndpoint ;
skosmos:language "en";
skosmos:sparqlGraph .
@@ -272,7 +256,6 @@
dc11:title "A vocabulary for testing the change list creation"@en ;
dc:subject :cat_general ;
void:uriSpace "http://www.skosmos.skos/changes/";
- void:sparqlEndpoint ;
skosmos:language "en";
skosmos:sparqlGraph .
@@ -280,7 +263,6 @@
dc11:title "A vocabulary for testing custom prefixes"@en ;
dc:subject :cat_general ;
void:uriSpace "http://www.skosmos.skos/prefix/";
- void:sparqlEndpoint ;
skosmos:language "en";
skosmos:sparqlGraph .
@@ -288,7 +270,6 @@
dc11:title "Subproperties of hiddenLabel"@en ;
dc:subject :cat_general ;
void:uriSpace "http://www.skosmos.skos/sub/";
- void:sparqlEndpoint ;
skosmos:language "en";
skosmos:sparqlGraph .
@@ -296,7 +277,6 @@
dc11:title "SuperGroup and member relationship double trouble"@en ;
dc:subject :cat_general ;
void:uriSpace "http://www.skosmos.skos/onto/dupgroup/";
- void:sparqlEndpoint ;
skosmos:language "en";
skosmos:sparqlGraph .
@@ -304,7 +284,6 @@
dc11:title "A vocabulary for testing language subtags"@en ;
dc:subject :cat_general ;
void:uriSpace "http://www.skosmos.skos/subtag/";
- void:sparqlEndpoint ;
skosmos:language "en";
skosmos:fallbackLanguages ( "fr" "de" "sv" ) ;
skosmos:sparqlGraph ;
@@ -314,7 +293,6 @@
dc11:title "A vocabulary for test SPARQL with collation"@en ;
dc:subject :cat_general ;
void:uriSpace "http://www.skosmos.skos/collation/";
- void:sparqlEndpoint ;
skosmos:language "fi";
skosmos:sparqlGraph .
@@ -326,7 +304,6 @@
skosmos:externalProperty dc11:creator ;
skosmos:externalProperty dc11:relation ;
skosmos:externalProperty rdfs:comment ;
- void:sparqlEndpoint ;
skosmos:language "en";
skosmos:sparqlGraph .
@@ -334,7 +311,6 @@
dc11:title "A vocabulary for testing SKOS XL"@en ;
dc:subject :cat_general ;
void:uriSpace "http://www.skosmos.skos/xl/";
- void:sparqlEndpoint ;
skosmos:language "en";
skosmos:sparqlGraph .
@@ -342,7 +318,6 @@
dc11:title "A vocabulary for testing HTTP 304 new settings"@en ;
dc:subject :cat_general ;
void:uriSpace "http://www.skosmos.skos/http304disabled/";
- void:sparqlEndpoint ;
skosmos:language "fi";
skosmos:useModifiedDate "false";
skosmos:sparqlGraph ;
@@ -352,7 +327,6 @@
dc11:title "A vocabulary for testing HTTP 304 new settings"@en ;
dc:subject :cat_general ;
void:uriSpace "http://www.skosmos.skos/http304enabled/";
- void:sparqlEndpoint ;
skosmos:language "fi";
skosmos:useModifiedDate "true";
skosmos:sparqlGraph ;
@@ -362,7 +336,6 @@
dc11:title "A vocabulary for testing vocabularies with notation features"@en ;
dc:subject :cat_general ;
void:uriSpace "http://www.skosmos.skos/notationFeatures/";
- void:sparqlEndpoint ;
skosmos:language "fi";
skosmos:sortByNotation true ;
skosmos:searchByNotation true ;
@@ -376,7 +349,6 @@
dc:subject :cat_science ;
dc:type mdrtype:ONTOLOGY ;
void:dataDump ;
- void:sparqlEndpoint ;
void:uriSpace "http://www.skosmos.skos/test/";
skos:prefLabel "Test plugin parameters"@en ;
skosmos:arrayClass isothes:ThesaurusArray ;
@@ -408,7 +380,6 @@
dc:subject :cat_science ;
skosmos:propertyOrder skosmos:iso25964PropertyOrder ;
void:dataDump ;
- void:sparqlEndpoint ;
void:uriSpace "http://www.skosmos.skos/testOrder/";
skosmos:language "en";
skosmos:sparqlGraph .
@@ -418,7 +389,6 @@
dc:subject :cat_science ;
skosmos:propertyOrder skosmos:defaultPropertyOrder ;
void:dataDump ;
- void:sparqlEndpoint ;
void:uriSpace "http://www.skosmos.skos/testOrder/";
skosmos:language "en";
skosmos:sparqlGraph .
@@ -432,7 +402,6 @@
skos:historyNote skos:prefLabel
) ] ;
void:dataDump ;
- void:sparqlEndpoint ;
void:uriSpace "http://www.skosmos.skos/testOrder/";
skosmos:language "en";
skosmos:sparqlGraph .
@@ -442,7 +411,6 @@
dc:subject :cat_science ;
skosmos:propertyOrder skosmos:unknown ;
void:dataDump ;
- void:sparqlEndpoint ;
void:uriSpace "http://www.skosmos.skos/testOrder/";
skosmos:language "en";
skosmos:sparqlGraph .