Closed nichtich closed 2 years ago
Isn't this related to https://github.com/gbv/cocoda/issues/512? I'm not sure whether this should be implemented in jskos-server. I guess what we could do is to add a parameter in /mappings
which is something like fromRelated
and Cocoda provides the related concepts (like parent concept). But I think this should just be implemented in Cocoda with a separate mapping request. There could be a setting with options "off", "always", and "only fallback" or something like that.
This could be implemented in the client (Cocoda) but then requires a loop with multiple queries. For cocoda this would be ok.
The use case of this feature however is to directly get "corresponding" concepts in concept scheme B from a given concept in concept scheme A. This issue is more related to #35 and to be used in cocoda-winibw and at http://uri.gbv.de/terminology/. But it may make sense to first implement it in a client.
[Reacting on this Tweet]: My use case is the new functionality in malibu where I visualize the DDC tree and try to find a mapping to the RVK with the coli-conc API, e.g.
All but the last DDC notation 518.64 is found in a mapping to the RVK. However, I would also be happy to have the first ancestor of 518.64 with a mapping to the RVK, i.e. 518 -> SK 900 (as also 518.6 has no mapping).
Would you consider to add a parameter to find either the direct mapping or the first mapping among its ancestors in the hierarchical order?
Any suggestions for a parameter name to enable this functionality?
How about expand=up
(try anchestors) and expand=down
(try children)? We only need the first case by now and document that proper functionality is only guaranteed for mono-hierarchies.
At the /mappings
endpoint parameter expand=up
will only have an effect of no explicit mapping was found. In this case:
m
is exactMatch or narrowMatch match the new mapping will also be narrowMatchm
is relatedMatch, new mapping type will also be relatedMatchm
is closeMatch, broadMatch or mappingRelation, new mapping type will be mappingRelationIn addition it would make sense to link the newly constructed mapping to m
but there is no JSKOS field for this yet.
This is a duplicate of #177 except the GND use case requires traversal of broader
(bread-first-search) instead of ancestors
.
@zuphilip We've implemented a feature covering your example, try https://coli-conc.gbv.de/api/mappings/infer?from=518.64&fromScheme=http://bartoc.org/en/node/241&toScheme=http://bartoc.org/en/node/533 to get inferred mappings from BK 518.64 to RVK. This won't work for GND so far as we don't have the hierarchy, but closing this issue unless GND is needed as well.
Different to #35 but similar use case: