-
Notifications
You must be signed in to change notification settings - Fork 95
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Issue #634 : Retrieve and display domains of ConceptScheme at the top of the tree hierarchy #660
Conversation
Squashed commit of the following: commit 06f5f7a Author: CLARVIE <clarvie-edouard.yetikoua@sparna.fr> Date: Mon Oct 30 12:03:56 2017 +0100 _ commit adf4cb8 Author: CLARVIE <clarvie-edouard.yetikoua@sparna.fr> Date: Mon Oct 30 11:40:25 2017 +0100 add a new key "tops" which contains the array of top concepts commit 7dfa174 Merge: 189e074 e4c7e61 Author: CLARVIE <clarvie-edouard.yetikoua@sparna.fr> Date: Fri Oct 20 09:32:23 2017 +0200 Merge branch 'skosmosWithDomain' of https://github.com/tfrancart/Skosmos into skosmosWithDomain commit 189e074 Author: CLARVIE <clarvie-edouard.yetikoua@sparna.fr> Date: Fri Oct 20 09:20:03 2017 +0200 Revert "adding timeline of concept versions" This reverts commit c24a834. commit 533b276 Author: CLARVIE <clarvie-edouard.yetikoua@sparna.fr> Date: Thu Oct 19 17:48:09 2017 +0200 Revert "Merge branch 'skosmosWithDomain' of https://github.com/tfrancart/Skosmos into skosmosWithDomain" This reverts commit 3f5e3a1, reversing changes made to c24a834. commit 4b1e306 Author: Thomas Francart <thomas.francart@sparna.fr> Date: Thu Oct 19 09:40:02 2017 +0200 Fixed typo commit 26947ea Author: Thomas Francart <thomas.francart@sparna.fr> Date: Thu Oct 19 09:23:25 2017 +0200 Cleaning, remove logs, rename variables and files in english commit e4c7e61 Author: CLARVIE <clarvie-edouard.yetikoua@sparna.fr> Date: Thu Oct 19 17:48:09 2017 +0200 Revert "Merge branch 'skosmosWithDomain' of https://github.com/tfrancart/Skosmos into skosmosWithDomain" This reverts commit 3f5e3a1, reversing changes made to c24a834. commit 3f5e3a1 Merge: c24a834 d36fc2d Author: CLARVIE <clarvie-edouard.yetikoua@sparna.fr> Date: Thu Oct 19 16:28:07 2017 +0200 Merge branch 'skosmosWithDomain' of https://github.com/tfrancart/Skosmos into skosmosWithDomain commit c24a834 Author: CLARVIE <clarvie-edouard.yetikoua@sparna.fr> Date: Thu Oct 19 16:27:27 2017 +0200 adding timeline of concept versions commit d36fc2d Author: Thomas Francart <thomas.francart@sparna.fr> Date: Thu Oct 19 09:40:02 2017 +0200 Fixed typo commit 595415c Author: Thomas Francart <thomas.francart@sparna.fr> Date: Thu Oct 19 09:23:25 2017 +0200 Cleaning, remove logs, rename variables and files in english commit 0c62bb0 Author: CLARVIE <clarvie-edouard.yetikoua@sparna.fr> Date: Thu Oct 12 12:35:49 2017 +0200 access to the hierarchy of a concept select in the list while taking into account the case where there is a domain or not and the case where there is one or more top concept commit e6a4b6d Author: CLARVIE <clarvie-edouard.yetikoua@sparna.fr> Date: Wed Oct 11 11:53:13 2017 +0200 adding domain in the hierarchy
domain nodes before non-domain nodes
https://github.com/tfrancart/Skosmos.git into skosmosWithDomains-single Conflicts: controller/RestController.php resource/js/hierarchy.js
https://github.com/tfrancart/Skosmos.git into skosmosWithDomains-single Conflicts: controller/RestController.php
Merge NatLibFi/master
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This looks promising, but is a bit hard to review because of the stylistic changes and reformatting.
Also I would suggest that you clean up the commit history by rebasing and squashing commits.
Please read this for some general guidance on making good PRs: https://www.atlassian.com/blog/git/written-unwritten-guide-pull-requests
@@ -200,6 +200,7 @@ public function vocabularyInformation($request) | |||
'skos' => 'http://www.w3.org/2004/02/skos/core#', | |||
'onki' => 'http://schema.onki.fi/onki#', | |||
'dct' => 'http://purl.org/dc/terms/', | |||
'dcterms' =>'http://purl.org/dc/terms/', |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why do you need to define this prefix? dct
is defined on the line above, you can just use that.
@@ -208,6 +209,7 @@ public function vocabularyInformation($request) | |||
'defaultLanguage' => 'onki:defaultLanguage', | |||
'languages' => 'onki:language', | |||
'label' => 'rdfs:label', | |||
'subject' => 'dcterms:subject', |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Use dct
@@ -254,6 +256,7 @@ public function vocabularyStatistics($request) | |||
'void' => 'http://rdfs.org/ns/void#', | |||
'onki' => 'http://schema.onki.fi/onki#', | |||
'uri' => '@id', | |||
'dcterms' =>'http://purl.org/dc/terms/', |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ditto
@@ -549,6 +552,7 @@ private function returnDataResults($results, $format) { | |||
'dct' => 'http://purl.org/dc/terms/', | |||
'dc11' => 'http://purl.org/dc/elements/1.1/', | |||
'uri' => '@id', | |||
'dcterms' =>'http://purl.org/dc/terms/', |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ditto
@@ -1,243 +1,243 @@ | |||
<?php |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please don't make style fixes in unrelated code as part of a feature PR. It's practically impossible to see whether you've changed anything in this file, making it difficult to review. I suggest you revert this part and make it a separate PR if you like.
@@ -128,76 +128,126 @@ function createConceptObject(conceptUri, conceptData) { | |||
* @param {Object} parentData | |||
*/ | |||
function attachTopConceptsToSchemes(schemes, currentNode, parentData) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The changes in this file look more invasive than they are, because you've reformatted the code when editing it. Consider making it more like the original code so it's easier to see what has changed. However, I understand that this may be difficult to do afterwards.
if(theSchemeLabel != '') { | ||
if((theScheme.subject) != null && (theScheme.subject.uri===theDomain.uri)) { | ||
domainObject.children.push( | ||
{ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The indents look rather excessive here.
} else { | ||
return naturalCompare(this.get_text(a).toLowerCase(), this.get_text(b).toLowerCase()); | ||
} | ||
// return naturalCompare(this.get_text(a).toLowerCase(), this.get_text(b).toLowerCase()); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please don't leave old code as comments. We have versioning for that.
@@ -350,6 +350,49 @@ public function testQueryConceptSchemes() | |||
$this->assertEquals('Test conceptscheme', $label['label']); | |||
} | |||
} | |||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It's excellent that you've written tests for your new functionality!
@@ -738,7 +781,7 @@ public function testQueryParentList() | |||
); | |||
$props = array ( | |||
'uri' => 'http://www.skosmos.skos/test/ta1', | |||
'top' => 'http://www.skosmos.skos/test/conceptscheme', |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please don't drop the definition of top
, it is still needed for backwards compatibility.
Also, please rebase on top of current master. There are conflicts so this cannot be merged as-is. |
Fixed test to assert tops (plural) instead of 'opt' (singular) Deleted wrong test
…art/Skosmos into skosmosWithDomains-single
|
Thanks for your patience! |
Coming back with a PR for #634 .
I have made this cleaner.
I am resubmitting the PR, hoping it can be useful and integrated in the code.
This answers 2 client use-cases I have (UNESCO and another).
Could you please let me know how can this proposal can progress to be integrated in the codebase ?