diff --git a/model/sparql/GenericSparql.php b/model/sparql/GenericSparql.php index a86d0a92b..ece6a4de9 100644 --- a/model/sparql/GenericSparql.php +++ b/model/sparql/GenericSparql.php @@ -595,13 +595,13 @@ public function queryConceptScheme($conceptscheme) { private function generateQueryConceptSchemesQuery($lang) { $fcl = $this->generateFromClause(); $query = <<domaine)&&isset($row->domaineLabel)){ - $conceptscheme['subject']['uri']=$row->domaine->getURI(); - $conceptscheme['subject']['prefLabel']=$row->domaineLabel->getValue(); + $conceptscheme['subject']['uri']=$row->domain->getURI(); + $conceptscheme['subject']['prefLabel']=$row->domainLabel->getValue(); } $ret[$row->cs->getURI()] = $conceptscheme; diff --git a/resource/js/hierarchy.js b/resource/js/hierarchy.js index ece9a3711..113dbe279 100644 --- a/resource/js/hierarchy.js +++ b/resource/js/hierarchy.js @@ -128,13 +128,11 @@ function createConceptObject(conceptUri, conceptData) { * @param {Object} parentData */ function attachTopConceptsToSchemes(schemes, currentNode, parentData) { - console.log('I am in'); var foundFirstLevel = false; for (var i = 0; i < schemes.length; i++) { //search if top concept uri is equal to scheme uri on (first level) for (var h = 0; h < parentData[currentNode.uri].top.length; h++) { - console.log('scheme uri: '+schemes[i].uri +' currentNodeUri: '+parentData[currentNode.uri].top[h]); if(schemes[i].uri===parentData[currentNode.uri].top[h]){ foundFirstLevel = true; if(Object.prototype.toString.call(schemes[i].children) !== '[object Array]' ) { @@ -152,7 +150,6 @@ function attachTopConceptsToSchemes(schemes, currentNode, parentData) { // search if top concept uri is equal to scheme children uri, if there are children(second Level) for (var h = 0; h . -@prefix ex: . -@prefix dcterms: . - -ex:thesaurus a skos:ConceptScheme ; - skos:prefLabel "The Thesaurus"@en . - -ex:mt1 a skos:ConceptScheme ; - skos:prefLabel "Micro-Thesaurus 1"@en ; - dcterms:subject ex:d1 . - -ex:mt2 a skos:ConceptScheme ; - skos:prefLabel "Micro-Thesaurus 2"@en ; - dcterms:subject ex:d1 . - -ex:mt3 a skos:ConceptScheme ; - skos:prefLabel "Micro-Thesaurus 3"@en ; - dcterms:subject ex:d2 . - -### Begin Domains - -ex:domains a skos:ConceptScheme ; - skos:prefLabel "Special 'Domains' Concept Scheme"@en . - -ex:d1 a skos:Concept ; - skos:inScheme ex:domains ; - skos:topConceptOf ex:domains ; - skos:prefLabel "Domain 1"@en . - -ex:d2 a skos:Concept ; - skos:inScheme ex:domains ; - skos:topConceptOf ex:domains ; - skos:prefLabel "Domain 2"@en . - -#### End Domains - -ex:c1 a skos:Concept ; - skos:prefLabel "Concept 1"@en ; - skos:inScheme ex:thesaurus , ex:mt1 ; - skos:topConceptOf ex:thesaurus , ex:mt1 ; - skos:narrower ex:c1.1 . - -ex:c1.1 a skos:Concept ; - skos:prefLabel "Concept 1.1"@en ; - skos:inScheme ex:thesaurus , ex:mt1 ; - skos:broader ex:c1 . - -ex:c2 a skos:Concept ; - skos:prefLabel "Concept 2"@en ; - skos:inScheme ex:thesaurus , ex:mt2 ; - skos:topConceptOf ex:thesaurus , ex:mt2 . - -ex:c3 a skos:Concept ; - skos:prefLabel "Concept 3"@en ; - skos:inScheme ex:thesaurus , ex:mt3 ; - skos:topConceptOf ex:thesaurus , ex:mt3 . \ No newline at end of file diff --git a/test-concept-schemes_plusieurs_tops_avec_domaine.ttl b/test-concept-schemes_plusieurs_tops_avec_domaine.ttl deleted file mode 100644 index a2e59bfee..000000000 --- a/test-concept-schemes_plusieurs_tops_avec_domaine.ttl +++ /dev/null @@ -1,56 +0,0 @@ -@prefix skos: . -@prefix ex: . -@prefix dcterms: . - -ex:thesaurus a skos:ConceptScheme ; - skos:prefLabel "The Thesaurus"@en . - -ex:mt1 a skos:ConceptScheme ; - skos:prefLabel "Micro-Thesaurus 1"@en ; - dcterms:subject ex:d1 . - -ex:mt2 a skos:ConceptScheme ; - skos:prefLabel "Micro-Thesaurus 2"@en ; - dcterms:subject ex:d1 . - -ex:mt3 a skos:ConceptScheme ; - skos:prefLabel "Micro-Thesaurus 3"@en ; - dcterms:subject ex:d2 . - -### Begin Domains - -ex:domains a skos:ConceptScheme ; - skos:prefLabel "Special 'Domains' Concept Scheme"@en . - -ex:d1 a skos:Concept ; - skos:inScheme ex:domains ; - skos:topConceptOf ex:domains ; - skos:prefLabel "Domain 1"@en . - -ex:d2 a skos:Concept ; - skos:inScheme ex:domains ; - skos:topConceptOf ex:domains ; - skos:prefLabel "Domain 2"@en . - -#### End Domains - -ex:c1 a skos:Concept ; - skos:prefLabel "Concept 1"@en ; - skos:inScheme ex:thesaurus , ex:mt1 ; - skos:topConceptOf ex:thesaurus , ex:mt1 ; - skos:narrower ex:c1.1 . - -ex:c1.1 a skos:Concept ; - skos:prefLabel "Concept 1.1"@en ; - skos:inScheme ex:thesaurus , ex:mt1 ; - skos:broader ex:c1 . - -ex:c2 a skos:Concept ; - skos:prefLabel "Concept 2"@en ; - skos:inScheme ex:thesaurus , ex:mt2 ; - skos:topConceptOf ex:thesaurus , ex:mt2 . - -ex:c3 a skos:Concept ; - skos:prefLabel "Concept 3"@en ; - skos:inScheme ex:thesaurus , ex:mt3 ; - skos:topConceptOf ex:thesaurus , ex:mt3 . \ No newline at end of file diff --git a/test-concept-schemes.ttl b/tests/test-vocab-data/test-concept-schemes_multiple_tops_with_domains.ttl similarity index 100% rename from test-concept-schemes.ttl rename to tests/test-vocab-data/test-concept-schemes_multiple_tops_with_domains.ttl