File tree 3 files changed +13
-2
lines changed
3 files changed +13
-2
lines changed Original file line number Diff line number Diff line change @@ -536,10 +536,10 @@ public function getDefaultSidebarView()
536
536
public function getId ()
537
537
{
538
538
$ uriparts = explode ("# " , $ this ->resource ->getURI ());
539
- if (count ($ uriparts ) != 1 )
539
+ if (count ($ uriparts ) > 1 )
540
540
// hash namespace
541
541
{
542
- return $ uriparts [1 ];
542
+ return $ uriparts [count ( $ uriparts ) - 1 ];
543
543
}
544
544
545
545
// slash namespace
Original file line number Diff line number Diff line change @@ -25,6 +25,15 @@ public function testGetId() {
25
25
$ this ->assertEquals ('test ' , $ id );
26
26
}
27
27
28
+ /**
29
+ * @covers Vocabulary::getId
30
+ */
31
+ public function testGetMultiHashId () {
32
+ $ vocab = $ this ->model ->getVocabulary ('multiHashVocabId ' );
33
+ $ id = $ vocab ->getId ();
34
+ $ this ->assertEquals ('multiHashVocabId ' , $ id );
35
+ }
36
+
28
37
/**
29
38
* @covers Vocabulary::getTitle
30
39
*/
Original file line number Diff line number Diff line change 429
429
skosmos:language " en" ;
430
430
skosmos:sparqlGraph <http://www.skosmos.skos/testOrder/> .
431
431
432
+ <http://testMultiHashesInUri#vocab#multiHashVocabId> a skosmos:Vocabulary, void:Dataset ;
433
+
432
434
<http://skosmos.skos/dump/test/groups> dc:format " application/rdf+xml" .
433
435
434
436
:cat_science a skos:Concept ;
You can’t perform that action at this time.
0 commit comments