From 1a7966513c3ed817b89d5890f67b1b1b1a6228c6 Mon Sep 17 00:00:00 2001 From: CLARVIE Date: Mon, 6 Nov 2017 11:59:00 +0100 Subject: [PATCH 1/3] show or hide deprecated concepts --- controller/RestController.php | 3 ++- model/GlobalConfig.php | 2 +- model/Model.php | 5 ++-- model/Vocabulary.php | 8 ++++++- model/sparql/GenericSparql.php | 42 ++++++++++++++++++++++------------ 5 files changed, 41 insertions(+), 19 deletions(-) diff --git a/controller/RestController.php b/controller/RestController.php index 0e22e6fab..4edaf720d 100644 --- a/controller/RestController.php +++ b/controller/RestController.php @@ -791,7 +791,8 @@ public function groups($request) */ public function groupMembers($request) { - $children = $request->getVocab()->listConceptGroupContents($request->getUri(), $request->getLang()); + $showDeprecated=$request->getVocab()->showDeprecated(); + $children = $request->getVocab()->listConceptGroupContents($request->getUri(), $request->getLang(),$showDeprecated); if (empty($children)) { return $this->returnError('404', 'Not Found', "Could not find group <{$request->getUri()}>"); } diff --git a/model/GlobalConfig.php b/model/GlobalConfig.php index 4080e94fe..0cfc1b8c2 100644 --- a/model/GlobalConfig.php +++ b/model/GlobalConfig.php @@ -119,7 +119,7 @@ public function getSearchResultsSize() */ public function getTemplateCache() { - return $this->getConstant('TEMPLATE_CACHE', '/tmp/skosmos-template-cache'); + return $this->getConstant('TEMPLATE_CACHE', 'tmp/cache/skosmos-template-cache'); } /** diff --git a/model/Model.php b/model/Model.php index 90d7b0353..1103864b4 100644 --- a/model/Model.php +++ b/model/Model.php @@ -297,16 +297,17 @@ public function searchConcepts($params) } $vocabs = $params->getVocabs(); - + $showDeprecated=false; if (sizeof($vocabs) === 1) { // search within vocabulary $voc = $vocabs[0]; $sparql = $voc->getSparql(); + $showDeprecated=$voc->showDeprecated(); } else { // multi-vocabulary or global search $voc = null; $sparql = $this->getDefaultSparql(); } - $results = $sparql->queryConcepts($vocabs, $params->getAdditionalFields(), $params->getUnique(), $params); + $results = $sparql->queryConcepts($vocabs, $params->getAdditionalFields(), $params->getUnique(), $params,$showDeprecated); if ($params->getRest() && $results && $params->getSearchLimit() !== 0) { $results = array_slice($results, $params->getOffset(), $params->getSearchLimit()); } diff --git a/model/Vocabulary.php b/model/Vocabulary.php index f4a9ceac3..ae6575c6a 100644 --- a/model/Vocabulary.php +++ b/model/Vocabulary.php @@ -48,6 +48,12 @@ public function getGraph() return $graph; } + + public function showDeprecated(){ + $showDeprecated=false; + $showDeprecated= $this->resource->get('skosmos:showDeprecated'); + return $showDeprecated; + } /** * Get the SPARQL implementation for this vocabulary @@ -482,7 +488,7 @@ public function getAlphabet($clang) */ public function searchConceptsAlphabetical($letter, $limit = null, $offset = null, $clang = null) { - return $this->getSparql()->queryConceptsAlphabetical($letter, $clang, $limit, $offset, $this->config->getIndexClasses()); + return $this->getSparql()->queryConceptsAlphabetical($letter, $clang, $limit, $offset, $this->config->getIndexClasses(),$this->showDeprecated()); } /** diff --git a/model/sparql/GenericSparql.php b/model/sparql/GenericSparql.php index 7663bc7b2..b18d766a1 100644 --- a/model/sparql/GenericSparql.php +++ b/model/sparql/GenericSparql.php @@ -925,7 +925,7 @@ protected function generateConceptSearchQueryInner($term, $lang, $searchLang, $p * @param ConceptSearchParameters $params * @return string sparql query */ - protected function generateConceptSearchQuery($fields, $unique, $params) { + protected function generateConceptSearchQuery($fields, $unique, $params, $showDeprecated) { $vocabs = $params->getVocabs(); $gcl = $this->graphClause; $fcl = empty($vocabs) ? '' : $this->generateFromClause($vocabs); @@ -941,7 +941,11 @@ protected function generateConceptSearchQuery($fields, $unique, $params) { $schemecond .= "?s skos:inScheme <$scheme> . "; } } - + $filterDeprecated=""; + //show or hide deprecated concepts + if($showDeprecated==false){ + $filterDeprecated="FILTER NOT EXISTS { ?s owl:deprecated true }"; + } // extra conditions for parent and group, if specified $parentcond = ($params->getParentLimit()) ? "?s skos:broader+ <" . $params->getParentLimit() . "> ." : ""; $groupcond = ($params->getGroupLimit()) ? "<" . $params->getGroupLimit() . "> skos:member ?s ." : ""; @@ -989,7 +993,7 @@ protected function generateConceptSearchQuery($fields, $unique, $params) { ?s a ?type . $extrafields $schemecond } - FILTER NOT EXISTS { ?s owl:deprecated true } + $filterDeprecated } $filterGraph } @@ -1109,8 +1113,8 @@ private function transformConceptSearchResults($results, $vocabs, $fields) { * @param ConceptSearchParameters $params * @return array query result object */ - public function queryConcepts($vocabs, $fields = null, $unique = false, $params) { - $query = $this->generateConceptSearchQuery($fields, $unique, $params); + public function queryConcepts($vocabs, $fields = null, $unique = false, $params, $showDeprecated) { + $query = $this->generateConceptSearchQuery($fields, $unique, $params,$showDeprecated); $results = $this->query($query); return $this->transformConceptSearchResults($results, $vocabs, $fields); } @@ -1155,7 +1159,7 @@ private function formatFilterConditions($letter, $lang) { * @param array|null $classes * @return string sparql query */ - protected function generateAlphabeticalListQuery($letter, $lang, $limit, $offset, $classes) { + protected function generateAlphabeticalListQuery($letter, $lang, $limit, $offset, $classes, $showDeprecated) { $fcl = $this->generateFromClause(); $classes = ($classes) ? $classes : array('http://www.w3.org/2004/02/skos/core#Concept'); $values = $this->formatValues('?type', $classes, 'uri'); @@ -1163,7 +1167,10 @@ protected function generateAlphabeticalListQuery($letter, $lang, $limit, $offset $conditions = $this->formatFilterConditions($letter, $lang); $filtercondLabel = $conditions['filterpref']; $filtercondALabel = $conditions['filteralt']; - + $filterDeprecated=""; + if($showDeprecated==false){ + $filterDeprecated="FILTER NOT EXISTS { ?s owl:deprecated true }"; + } $query = <<generateAlphabeticalListQuery($letter, $lang, $limit, $offset, $classes); + public function queryConceptsAlphabetical($letter, $lang, $limit = null, $offset = null, $classes = null,$showDeprecated) { + $query = $this->generateAlphabeticalListQuery($letter, $lang, $limit, $offset, $classes,$showDeprecated); $results = $this->query($query); return $this->transformAlphabeticalListResults($results); } @@ -1945,16 +1953,21 @@ public function listConceptGroups($groupClass, $lang) { * @param string $groupClass URI of concept group class * @param string $group URI of the concept group instance * @param string $lang language of labels to return + * @param boolean $showDeprecated * @return string sparql query */ - private function generateConceptGroupContentsQuery($groupClass, $group, $lang) { + private function generateConceptGroupContentsQuery($groupClass, $group, $lang, $showDeprecated) { $fcl = $this->generateFromClause(); + $filterDeprecated=""; + if($showDeprecated==false){ + $filterDeprecated="FILTER NOT EXISTS { ?conc owl:deprecated true }"; + } $query = << a <$groupClass> . { <$group> skos:member ?conc . } UNION { ?conc isothes:superGroup <$group> } - FILTER NOT EXISTS { ?conc owl:deprecated true } +$filterDeprecated ?conc a ?type . OPTIONAL { ?conc skos:prefLabel ?label . FILTER (langMatches(lang(?label), '$lang')) @@ -2014,10 +2027,11 @@ private function transformConceptGroupContentsResults($result, $lang) { * @param string $groupClass URI of concept group class * @param string $group URI of the concept group instance * @param string $lang language of labels to return + * @param boolean $showDeprecated * @return array Result array with concept URI as key and concept label as value */ - public function listConceptGroupContents($groupClass, $group, $lang) { - $query = $this->generateConceptGroupContentsQuery($groupClass, $group, $lang); + public function listConceptGroupContents($groupClass, $group, $lang,$showDeprecated) { + $query = $this->generateConceptGroupContentsQuery($groupClass, $group, $lang,$showDeprecated); $result = $this->query($query); return $this->transformConceptGroupContentsResults($result, $lang); } From 967381d68e08daf9fd4a441fba8eb14a63a58e87 Mon Sep 17 00:00:00 2001 From: CLARVIE Date: Mon, 6 Nov 2017 15:46:57 +0100 Subject: [PATCH 2/3] show or hide deprecated concepts include unit tests --- controller/RestController.php | 3 +-- model/GlobalConfig.php | 2 +- model/Model.php | 3 ++- model/Vocabulary.php | 11 +++-------- model/VocabularyConfig.php | 9 +++++++++ model/sparql/GenericSparql.php | 29 ++++++++++++++++------------- model/sparql/JenaTextSparql.php | 10 ++++++++-- tests/GenericSparqlTest.php | 33 ++++++++++++++++++++++++++++++++- tests/ModelTest.php | 13 +++++++++++++ tests/VocabularyConfigTest.php | 8 ++++++++ tests/VocabularyTest.php | 19 +++++++++++++++++++ tests/testvocabularies.ttl | 15 +++++++++++++++ 12 files changed, 127 insertions(+), 28 deletions(-) diff --git a/controller/RestController.php b/controller/RestController.php index 4edaf720d..0e22e6fab 100644 --- a/controller/RestController.php +++ b/controller/RestController.php @@ -791,8 +791,7 @@ public function groups($request) */ public function groupMembers($request) { - $showDeprecated=$request->getVocab()->showDeprecated(); - $children = $request->getVocab()->listConceptGroupContents($request->getUri(), $request->getLang(),$showDeprecated); + $children = $request->getVocab()->listConceptGroupContents($request->getUri(), $request->getLang()); if (empty($children)) { return $this->returnError('404', 'Not Found', "Could not find group <{$request->getUri()}>"); } diff --git a/model/GlobalConfig.php b/model/GlobalConfig.php index 0cfc1b8c2..4080e94fe 100644 --- a/model/GlobalConfig.php +++ b/model/GlobalConfig.php @@ -119,7 +119,7 @@ public function getSearchResultsSize() */ public function getTemplateCache() { - return $this->getConstant('TEMPLATE_CACHE', 'tmp/cache/skosmos-template-cache'); + return $this->getConstant('TEMPLATE_CACHE', '/tmp/skosmos-template-cache'); } /** diff --git a/model/Model.php b/model/Model.php index 1103864b4..2452b2109 100644 --- a/model/Model.php +++ b/model/Model.php @@ -301,10 +301,11 @@ public function searchConcepts($params) if (sizeof($vocabs) === 1) { // search within vocabulary $voc = $vocabs[0]; $sparql = $voc->getSparql(); - $showDeprecated=$voc->showDeprecated(); + $showDeprecated=$voc->getConfig()->getShowDeprecated(); } else { // multi-vocabulary or global search $voc = null; $sparql = $this->getDefaultSparql(); + // @TODO : in a global search showDeprecated will always be false and cannot be set globally } $results = $sparql->queryConcepts($vocabs, $params->getAdditionalFields(), $params->getUnique(), $params,$showDeprecated); diff --git a/model/Vocabulary.php b/model/Vocabulary.php index ae6575c6a..194a0f64d 100644 --- a/model/Vocabulary.php +++ b/model/Vocabulary.php @@ -48,12 +48,6 @@ public function getGraph() return $graph; } - - public function showDeprecated(){ - $showDeprecated=false; - $showDeprecated= $this->resource->get('skosmos:showDeprecated'); - return $showDeprecated; - } /** * Get the SPARQL implementation for this vocabulary @@ -439,7 +433,7 @@ public function listConceptGroupContents($glname, $clang) } // no group class defined, so empty result $group = $this->getConceptURI($glname); - $contents = $this->getSparql()->listConceptGroupContents($gclass, $group, $clang); + $contents = $this->getSparql()->listConceptGroupContents($gclass, $group, $clang, $this->config->getShowDeprecated()); foreach ($contents as $uri => $label) { $ret[$uri] = $label; } @@ -488,7 +482,7 @@ public function getAlphabet($clang) */ public function searchConceptsAlphabetical($letter, $limit = null, $offset = null, $clang = null) { - return $this->getSparql()->queryConceptsAlphabetical($letter, $clang, $limit, $offset, $this->config->getIndexClasses(),$this->showDeprecated()); + return $this->getSparql()->queryConceptsAlphabetical($letter, $clang, $limit, $offset, $this->config->getIndexClasses(),$this->config->getShowDeprecated()); } /** @@ -615,4 +609,5 @@ public function getShortName() { public function getId() { return $this->config->getId(); } + } diff --git a/model/VocabularyConfig.php b/model/VocabularyConfig.php index c619734bf..5df0fcd36 100644 --- a/model/VocabularyConfig.php +++ b/model/VocabularyConfig.php @@ -405,6 +405,15 @@ public function showAlphabeticalIndex() { return $this->getBoolean('skosmos:showAlphabeticalIndex', true); } + + /** + * Returns a boolean value set in the vocabularies.ttl config. + * @return boolean + */ + public function getShowDeprecated() + { + return $this->getBoolean('skosmos:showDeprecated', false); + } /** * Returns the vocabulary dc:type value(s) with their labels and uris, if set in the vocabulary configuration. diff --git a/model/sparql/GenericSparql.php b/model/sparql/GenericSparql.php index b18d766a1..49e4254ba 100644 --- a/model/sparql/GenericSparql.php +++ b/model/sparql/GenericSparql.php @@ -922,10 +922,11 @@ protected function generateConceptSearchQueryInner($term, $lang, $searchLang, $p * Query for concepts using a search term. * @param array|null $fields extra fields to include in the result (array of strings). (default: null = none) * @param boolean $unique restrict results to unique concepts (default: false) + * @param boolean $showDeprecated whether to include deprecated concepts in search results (default: false) * @param ConceptSearchParameters $params * @return string sparql query */ - protected function generateConceptSearchQuery($fields, $unique, $params, $showDeprecated) { + protected function generateConceptSearchQuery($fields, $unique, $params, $showDeprecated = false) { $vocabs = $params->getVocabs(); $gcl = $this->graphClause; $fcl = empty($vocabs) ? '' : $this->generateFromClause($vocabs); @@ -943,7 +944,7 @@ protected function generateConceptSearchQuery($fields, $unique, $params, $showDe } $filterDeprecated=""; //show or hide deprecated concepts - if($showDeprecated==false){ + if(!$showDeprecated){ $filterDeprecated="FILTER NOT EXISTS { ?s owl:deprecated true }"; } // extra conditions for parent and group, if specified @@ -1110,10 +1111,11 @@ private function transformConceptSearchResults($results, $vocabs, $fields) { * @param array $vocabs array of Vocabulary objects to search; empty for global search * @param array $fields extra fields to include in the result (array of strings). (default: null = none) * @param boolean $unique restrict results to unique concepts (default: false) + * @param boolean $showDeprecated whether to include deprecated concepts in the result (default: false) * @param ConceptSearchParameters $params * @return array query result object */ - public function queryConcepts($vocabs, $fields = null, $unique = false, $params, $showDeprecated) { + public function queryConcepts($vocabs, $fields = null, $unique = false, $params, $showDeprecated = false) { $query = $this->generateConceptSearchQuery($fields, $unique, $params,$showDeprecated); $results = $this->query($query); return $this->transformConceptSearchResults($results, $vocabs, $fields); @@ -1157,9 +1159,10 @@ private function formatFilterConditions($letter, $lang) { * @param integer $limit limits the amount of results * @param integer $offset offsets the result set * @param array|null $classes + * @param boolean $showDeprecated whether to include deprecated concepts in the result (default: false) * @return string sparql query */ - protected function generateAlphabeticalListQuery($letter, $lang, $limit, $offset, $classes, $showDeprecated) { + protected function generateAlphabeticalListQuery($letter, $lang, $limit, $offset, $classes, $showDeprecated = false) { $fcl = $this->generateFromClause(); $classes = ($classes) ? $classes : array('http://www.w3.org/2004/02/skos/core#Concept'); $values = $this->formatValues('?type', $classes, 'uri'); @@ -1168,7 +1171,7 @@ protected function generateAlphabeticalListQuery($letter, $lang, $limit, $offset $filtercondLabel = $conditions['filterpref']; $filtercondALabel = $conditions['filteralt']; $filterDeprecated=""; - if($showDeprecated==false){ + if(!$showDeprecated){ $filterDeprecated="FILTER NOT EXISTS { ?s owl:deprecated true }"; } $query = <<generateAlphabeticalListQuery($letter, $lang, $limit, $offset, $classes,$showDeprecated); $results = $this->query($query); return $this->transformAlphabeticalListResults($results); @@ -1953,14 +1956,14 @@ public function listConceptGroups($groupClass, $lang) { * @param string $groupClass URI of concept group class * @param string $group URI of the concept group instance * @param string $lang language of labels to return - * @param boolean $showDeprecated + * @param boolean $showDeprecated whether to include deprecated in the result * @return string sparql query */ - private function generateConceptGroupContentsQuery($groupClass, $group, $lang, $showDeprecated) { + private function generateConceptGroupContentsQuery($groupClass, $group, $lang, $showDeprecated = false) { $fcl = $this->generateFromClause(); $filterDeprecated=""; - if($showDeprecated==false){ - $filterDeprecated="FILTER NOT EXISTS { ?conc owl:deprecated true }"; + if(!$showDeprecated){ + $filterDeprecated=" FILTER NOT EXISTS { ?conc owl:deprecated true }"; } $query = <<generateConceptGroupContentsQuery($groupClass, $group, $lang,$showDeprecated); $result = $this->query($query); return $this->transformConceptGroupContentsResults($result, $lang); diff --git a/model/sparql/JenaTextSparql.php b/model/sparql/JenaTextSparql.php index 7d60e8db8..613a636d7 100644 --- a/model/sparql/JenaTextSparql.php +++ b/model/sparql/JenaTextSparql.php @@ -80,10 +80,11 @@ protected function generateConceptSearchQueryCondition($term, $searchLang) * @param integer $limit limits the amount of results * @param integer $offset offsets the result set * @param array|null $classes + * @param boolean $showDeprecated whether to include deprecated concepts in the result (default: false) * @return string sparql query */ - public function generateAlphabeticalListQuery($letter, $lang, $limit = null, $offset = null, $classes = null) + public function generateAlphabeticalListQuery($letter, $lang, $limit = null, $offset = null, $classes = null, $showDeprecated = false) { if ($letter == '*' || $letter == '0-9' || $letter == '!*') { // text index cannot support special character queries, use the generic implementation for these @@ -100,6 +101,11 @@ public function generateAlphabeticalListQuery($letter, $lang, $limit = null, $of $textcondPref = $this->createTextQueryCondition($letter . '*', 'skos:prefLabel', $lang); $textcondAlt = $this->createTextQueryCondition($letter . '*', 'skos:altLabel', $lang); + $filterDeprecated=""; + if(!$showDeprecated){ + $filterDeprecated="FILTER NOT EXISTS { ?s owl:deprecated true }"; + } + $query = <<model->getVocabulary('groups'); $graph = $voc->getGraph(); @@ -829,6 +829,37 @@ public function testListConceptGroupContentsIncludingDeprecatedConcept() $this->assertEquals('http://www.skosmos.skos/groups/ta113', $actual[0]['uri']); $this->assertEquals(1, sizeof($actual)); } + + /** + * @covers GenericSparql::listConceptGroupContents + * @covers GenericSparql::generateConceptGroupContentsQuery + * @covers GenericSparql::transformConceptGroupContentsResults + */ + public function testListConceptGroupContentsIncludingDeprecatedConcept() + { + $voc = $this->model->getVocabulary('showDeprecated'); + $graph = $voc->getGraph(); + $sparql = new GenericSparql('http://localhost:3030/ds/sparql', $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 ( + 'uri' => 'http://www.skosmos.skos/groups/ta113', + 'isSuper' => false, + 'hasMembers' => false, + 'type' => array('skos:Concept'), + 'prefLabel' => 'Flatfish' + ), + 1 => array ( + 'uri' => 'http://www.skosmos.skos/groups/ta111', + 'isSuper' => false, + 'hasMembers' => false, + 'type' => array('skos:Concept'), + 'prefLabel' => 'Tuna' + ) + ); + $this->assertEquals($expected, $actual); + $this->assertEquals(2, sizeof($actual)); + } /** * @covers GenericSparql::queryChangeList diff --git a/tests/ModelTest.php b/tests/ModelTest.php index 5c8a6e201..ca347bba6 100644 --- a/tests/ModelTest.php +++ b/tests/ModelTest.php @@ -253,6 +253,19 @@ public function testSearchConceptsUnique() { $this->assertCount(2, $result); } + /** + * @covers Model::searchConcepts + */ + public function testSearchConceptsIncludingDeprecated() { + $params = $this->getMockBuilder('ConceptSearchParameters')->disableOriginalConstructor()->getMock(); + $params->method('getSearchTerm')->will($this->returnValue('Tuna')); + $params->method('getVocabIds')->will($this->returnValue('showDeprecated')); + $params->method('getVocabs')->will($this->returnValue(array($this->model->getVocabulary('showDeprecated')))); + $result = $this->model->searchConcepts($params); + $this->assertCount(1, $result); + $this->assertEquals('http://www.skosmos.skos/groups/ta111', $result[0]['uri']); + } + /** * @covers Model::searchConcepts */ diff --git a/tests/VocabularyConfigTest.php b/tests/VocabularyConfigTest.php index 6ff94dd64..021150d16 100644 --- a/tests/VocabularyConfigTest.php +++ b/tests/VocabularyConfigTest.php @@ -346,6 +346,14 @@ public function testGetTypes() { $vocab = $this->model->getVocabulary('test'); $this->assertEquals(array(0 => array('uri' => 'http://publications.europa.eu/resource/authority/dataset-type/ONTOLOGY', 'prefLabel' => 'Ontology')), $vocab->getConfig()->getTypes('en')); } + + /** + * @covers VocabularyConfig::showDeprecated + */ + public function testShowDeprecated() { + $vocab = $this->model->getVocabulary('showDeprecated'); + $this->assertEquals(true, $vocab->getConfig()->getShowDeprecated()); + } /** * @covers VocabularyConfig::getTypes diff --git a/tests/VocabularyTest.php b/tests/VocabularyTest.php index 9c98303df..cf5eebb2b 100644 --- a/tests/VocabularyTest.php +++ b/tests/VocabularyTest.php @@ -240,6 +240,25 @@ public function testSearchConceptsAlphabetical() { $this->assertEquals('Grouped fish', $concepts[0]['prefLabel']); $this->assertEquals('Guppy', $concepts[1]['prefLabel']); } + + /** + * @covers Vocabulary::searchConceptsAlphabetical + */ + public function testSearchConceptsAlphabeticalExcludingDeprecated() { + $vocab = $this->model->getVocabulary('groups'); + $concepts = $vocab->searchConceptsAlphabetical('T', null, null, 'en'); + $this->assertCount(0, $concepts); + } + + /** + * @covers Vocabulary::searchConceptsAlphabetical + */ + public function testSearchConceptsAlphabeticalIncludingDeprecated() { + $vocab = $this->model->getVocabulary('showDeprecated'); + $concepts = $vocab->searchConceptsAlphabetical('T', null, null, 'en'); + $this->assertCount(1, $concepts); + $this->assertEquals('Tuna', $concepts[0]['prefLabel']); + } /** * @covers Vocabulary::searchConceptsAlphabetical diff --git a/tests/testvocabularies.ttl b/tests/testvocabularies.ttl index 8704c52ca..69ce68b97 100644 --- a/tests/testvocabularies.ttl +++ b/tests/testvocabularies.ttl @@ -64,6 +64,21 @@ skosmos:indexShowClass meta:TestClass, meta:TestClass2; skosmos:sparqlGraph . + +:showDeprecated a skosmos:Vocabulary, void:Dataset ; + dc11:title "Show deprecated test vocabulary"@en ; + dc:subject :cat_general ; + void:dataDump , + ; + 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"; + skosmos:sparqlGraph . + :cycle a skosmos:Vocabulary, void:Dataset ; dc11:title "Cycle test vocabulary"@en ; dc:subject :cat_general ; From 4318efd381dba49be1220d1455bc27977c3b1970 Mon Sep 17 00:00:00 2001 From: Thomas Francart Date: Mon, 6 Nov 2017 16:20:46 +0100 Subject: [PATCH 3/3] Fix @covers --- tests/VocabularyConfigTest.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tests/VocabularyConfigTest.php b/tests/VocabularyConfigTest.php index 021150d16..2d81d9cc4 100644 --- a/tests/VocabularyConfigTest.php +++ b/tests/VocabularyConfigTest.php @@ -348,7 +348,7 @@ public function testGetTypes() { } /** - * @covers VocabularyConfig::showDeprecated + * @covers VocabularyConfig::getShowDeprecated */ public function testShowDeprecated() { $vocab = $this->model->getVocabulary('showDeprecated');