Skip to content

Commit

Permalink
Mapping Search: Translate notations into URIs if possible (#721)
Browse files Browse the repository at this point in the history
  • Loading branch information
stefandesu committed Oct 26, 2023
1 parent bec3fd4 commit 78e6506
Showing 1 changed file with 15 additions and 1 deletion.
16 changes: 15 additions & 1 deletion src/components/MappingBrowser.vue
Original file line number Diff line number Diff line change
Expand Up @@ -1347,11 +1347,25 @@ export default {
this.$set(this.searchPages, registry.uri, page)
this.$set(this.searchLoading, registry.uri, true)
const getMappings = () => this.getMappings({
const schemeAndConceptFilters = {
from: this.searchFilter.fromNotation,
to: this.searchFilter.toNotation,
fromScheme: this.getSchemeForFilter(this.searchFilter.fromScheme),
toScheme: this.getSchemeForFilter(this.searchFilter.toScheme),
}
for (const side of ["from", "to"]) {
let scheme = schemeAndConceptFilters[`${side}Scheme`]
if (!scheme || !schemeAndConceptFilters[side]) {
continue
}
scheme = new this.$jskos.ConceptScheme(schemeAndConceptFilters[`${side}Scheme`])
if (scheme?.uriPattern) {
schemeAndConceptFilters[side] = schemeAndConceptFilters[side].split("|").map(notation => scheme.uriFromNotation(notation) || notation).join("|")
}
}
const getMappings = () => this.getMappings({
...schemeAndConceptFilters,
creator: this.searchFilter.creator,
type: this.searchFilter.type,
direction: this.searchFilter.direction,
Expand Down

0 comments on commit 78e6506

Please sign in to comment.