RDFLib / VocPrez

A tool (API and web front-end) for the read-only delivery system of SKOS vocabularies.
GNU General Public License v3.0
21 stars 13 forks source link

fixes collection view and label filters for languages #49

Closed rob-metalinkage closed 3 years ago

rob-metalinkage commented 3 years ago

check the conflict in source.py - i thinks its something you may have fixed or superceded and you can ignore.

nicholascar commented 3 years ago

@rob-metalinkage I can't merge this PR since you've removed the graph awareness in the get_concept_hierarchy() function inside _source.py. Other instances of VP have vocabs within Named Graphs so this change will break them.

The solution is to implement the function get_concept_hierarchy() as you need it in your OGC theme's own source, just as I've done with get_collection() with the original being at https://github.com/RDFLib/VocPrez/blob/master/vocprez/source/_source.py#L160 and your OGC one at https://github.com/surroundaustralia/VocPrez-theme-ogc/blob/master/source/ogc_sparql.py#L17.

I'll try and remove this change from this PR, accept the others and then re-implement the change in your theme repo.

rob-metalinkage commented 3 years ago

are you sure - I have actually respected an explicit inScheme over graph containment (which is an implicit pattern) , but it should still work..

     GRAPH ?g {
                <xxxx> a skos:Collection ;
                OPTIONAL { <xxxx> skos:inScheme ?cs }
                BIND ( COALESCE( ?cs,?g) AS ?conceptscheme )
rob-metalinkage commented 3 years ago

that said - it is probably incomplete - list_collections should also respect explicit rather than implicit containment.

rob-metalinkage commented 3 years ago

I dont think this is a theme repo issue - its relaxing an idiosyncratic implementation requirement to handle a more general case by preference. If an application needs to ignore an explicit statement, then that application should override the SKOS model rather than the other way around