Skip to content

Commit

Permalink
Cleaning, remove logs, rename variables and files in english
Browse files Browse the repository at this point in the history
  • Loading branch information
tfrancart authored and CLARVIE committed Oct 19, 2017
1 parent c24a834 commit 26947ea
Show file tree
Hide file tree
Showing 5 changed files with 6 additions and 123 deletions.
12 changes: 6 additions & 6 deletions model/sparql/GenericSparql.php
Original file line number Diff line number Diff line change
Expand Up @@ -595,13 +595,13 @@ public function queryConceptScheme($conceptscheme) {
private function generateQueryConceptSchemesQuery($lang) {
$fcl = $this->generateFromClause();
$query = <<<EOQ
SELECT ?cs ?label ?preflabel ?title ?domaine ?domaineLabel $fcl
SELECT ?cs ?label ?preflabel ?title ?domain ?domainLabel $fcl
WHERE {
?cs a skos:ConceptScheme .
OPTIONAL{
?cs dcterms:subject ?domaine.
?domaine skos:prefLabel ?domaineLabel.
FILTER(langMatches(lang(?domaineLabel), '$lang'))
?cs dcterms:subject ?domain.
?domain skos:prefLabel ?domainLabel.
FILTER(langMatches(lang(?domainLabel), '$lang'))
}
OPTIONAL {
?cs rdfs:label ?label .
Expand Down Expand Up @@ -647,8 +647,8 @@ private function transformQueryConceptSchemesResults($result) {
}
//ajout des dcterms:subject et leurs libellés dans le retour json
if(isset($row->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;
Expand Down
5 changes: 0 additions & 5 deletions resource/js/hierarchy.js
Original file line number Diff line number Diff line change
Expand Up @@ -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]' ) {
Expand All @@ -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 <schemes[i].children.length; h++) {
for (var k = 0; k < parentData[currentNode.uri].top.length; k++) {
console.log('scheme children: '+schemes[i].children[h].uri+' currentNodeUri: '+parentData[currentNode.uri].uri);
if(schemes[i].children[h]){
if(schemes[i].children[h].uri===parentData[currentNode.uri].top[k]){
if(Object.prototype.toString.call(schemes[i].children[h].children) !== '[object Array]' ) {
Expand Down Expand Up @@ -357,8 +354,6 @@ function schemeRoot(schemes) {
}
}
}

// console.log(domains);

// Step 2 : create tree nodes for each domain

Expand Down
56 changes: 0 additions & 56 deletions test-concept-schemes_plusieurs_top_sans_domaine.ttl

This file was deleted.

56 changes: 0 additions & 56 deletions test-concept-schemes_plusieurs_tops_avec_domaine.ttl

This file was deleted.

File renamed without changes.

0 comments on commit 26947ea

Please sign in to comment.