From cd9bf4362c231495487f4df1d7c5b890119b25cd Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Kalle=20W=C3=A5hlin?= Date: Mon, 22 Dec 2025 09:33:09 +0100 Subject: [PATCH 1/4] Merge various Item properties --- source/vocab/display.jsonld | 44 +++++++++++++++++++++++++++++++++---- 1 file changed, 40 insertions(+), 4 deletions(-) diff --git a/source/vocab/display.jsonld b/source/vocab/display.jsonld index c34e909d..120c66d7 100644 --- a/source/vocab/display.jsonld +++ b/source/vocab/display.jsonld @@ -6,6 +6,7 @@ "@base": "https://id.kb.se/vocab/display", "@vocab": "https://id.kb.se/vocab/", "marc": "https://id.kb.se/marc/", + "librissearch": "https://id.kb.se/ns/librissearch/", "lensGroups": {"@id": "@graph", "@container": "@index"}, "lenses": {"@reverse": "fresnel:group", "@container": "@index"}, "showProperties": {"@id": "fresnel:showProperties", "@container": "@list", "@type": "@vocab"}, @@ -783,7 +784,6 @@ "summary", "immediateAcquisition", "availability", - "shelfLabel", { "inverseOf": "itemUsed" }, { "inverseOf": "hasComponent" } ] @@ -1494,9 +1494,45 @@ "subject", "summary", "hasComponent", - "availability", - "physicalLocation", - "shelfLabel" + { + "fresnel:mergeProperties": [ + "cataloguersNote", + "custodialHistory", + { + "@type": "fresnel:fslselector", + "@value": "hasNote/*/label" + }, + { + "@type": "fresnel:fslselector", + "@value": "marc:hasCopyAndVersionIdentificationNote/*/marc:itemCondition" + }, + { + "@type": "fresnel:fslselector", + "@value": "marc:hasBindingInformation/*/label" + }, + { + "@type": "fresnel:fslselector", + "@value": "marc:hasTextualHoldingsBasicBibliographicUnit/*/marc:cataloguersNote" + } + ], + "fresnel:use": "librissearch:itemNote" + }, + { + "fresnel:mergeProperties": [ + "shelfLabel", + "physicalLocation", + "shelfControlNumber", + { + "@type": "fresnel:fslselector", + "@value": "shelfMark/*/label" + }, + { + "@type": "fresnel:fslselector", + "@value": "availability/*/label" + } + ], + "fresnel:use": "librissearch:shelf" + } ] }, "Person": { From 983ea062db84d85f5e6b0ef38ee9110948117b49 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Kalle=20W=C3=A5hlin?= Date: Mon, 22 Dec 2025 14:35:52 +0100 Subject: [PATCH 2/4] Define merged properties --- source/vocab/display.jsonld | 4 ++ source/vocab/libris-search-experimental.ttl | 59 ++++++++++++++------- 2 files changed, 45 insertions(+), 18 deletions(-) diff --git a/source/vocab/display.jsonld b/source/vocab/display.jsonld index 120c66d7..35e95ae4 100644 --- a/source/vocab/display.jsonld +++ b/source/vocab/display.jsonld @@ -1513,6 +1513,10 @@ { "@type": "fresnel:fslselector", "@value": "marc:hasTextualHoldingsBasicBibliographicUnit/*/marc:cataloguersNote" + }, + { + "@type": "fresnel:fslselector", + "@value": "marc:hasTextualHoldingsBasicBibliographicUnit/*/marc:publicNote" } ], "fresnel:use": "librissearch:itemNote" diff --git a/source/vocab/libris-search-experimental.ttl b/source/vocab/libris-search-experimental.ttl index 8f9d9b35..eeea7bfc 100644 --- a/source/vocab/libris-search-experimental.ttl +++ b/source/vocab/libris-search-experimental.ttl @@ -7,6 +7,7 @@ @prefix rdf: . @prefix xsd: . @prefix ls: . +@prefix marc: . ### Extended definitions for Libris Search ### @@ -22,6 +23,14 @@ :hasTitle rdfs:subPropertyOf ls:title . # See ./details.ttl for full definition of :hasTitle +:shelfControlNumber rdfs:subPropertyOf ls:shelf . # See ./items.ttl for full definition of :shelfControlNumber +:shelfLabel rdfs:subPropertyOf ls:shelf . # See ./items.ttl for full definition of :shelfLabel +:physicalLocation rdfs:subPropertyOf ls:shelf . # See ./items.ttl for full definition of :physicalLocation + +:cataloguersNote rdfs:subPropertyOf ls:itemNote . # See ./details.ttl for full definition of :cataloguersNote +:custodialHistory rdfs:subPropertyOf ls:itemNote . # See ./items.ttl for full definition of :custodialHistory + + ### New definitions for Libris Search ### ls:QueryCode a rdfs:Datatype . @@ -30,6 +39,10 @@ ls:composite a skos:Collection ; rdfs:label "composite"@en, "sammansatt"@sv ; :code "composite" . +ls:merged a skos:Collection ; + rdfs:label "merged"@en, "sammanslagen"@sv ; + :code "merged" . + ls:itemHeldBy a owl:ObjectProperty ; rdfs:label "Bibliotek"@sv, "Library"@en ; :category :shorthand, :pending ; @@ -103,14 +116,34 @@ ls:title a owl:ObjectProperty ; ( :relationship :entity :hasTitle ) . ls:itemShelf a owl:DatatypeProperty ; - :category ls:composite ; # TODO: ls:merged? - rdfs:label "hyllsignum"@sv, "item shelf"@en ; - skos:notation "WHYL"^^ls:QueryCode ; - owl:propertyChainAxiom ( :hasItem :availability :label ), - ( :hasItem :shelfMark :label ), - ( :hasItem :shelfControlNumber ), - ( :hasItem :shelfLabel ), - ( :hasItem :physicalLocation ) . + :category :shorthand ; + skos:notation "WHYL"^^ls:QueryCode ; + rdfs:label "hyllsignum"@sv, "item shelf"@en ; + rdfs:domain :Instance ; + owl:propertyChainAxiom ( :hasItem ls:shelf ) . + +ls:shelf a owl:DatatypeProperty ; + :category ls:merged ; + rdfs:label "hylla"@sv, "shelf"@en ; + rdfs:domain :Item ; + owl:propertyChainAxiom ( :availability :label ), ( :shelfMark :label ) . + +ls:hasItemNote a owl:DatatypeProperty ; + :category :shorthand ; + skos:notation "BANM"^^ls:QueryCode ; + rdfs:label "har beståndsanmärkning"@sv, "has item note"@en ; + rdfs:domain :Instance ; + owl:propertyChainAxiom ( :hasItem ls:itemNote ) . + +ls:itemNote a owl:DatatypeProperty ; + :category ls:merged ; + rdfs:label "beståndsanmärkning"@sv, "item note"@en ; + rdfs:domain :Item ; + owl:propertyChainAxiom ( :hasNote :label ), + ( marc:hasCopyAndVersionIdentificationNote marc:itemCondition ), + ( marc:hasBindingInformation :label ), + ( marc:hasTextualHoldingsBasicBibliographicUnit marc:cataloguersNote ), + ( marc:hasTextualHoldingsBasicBibliographicUnit marc:publicNote ) . ls:itemCreated a owl:DatatypeProperty ; :category :shorthand ; @@ -165,16 +198,6 @@ ls:itemCreated a owl:DatatypeProperty ; # [ rdfs:subPropertyOf :classification ; rdfs:range :ClassificationLcc ] # :code ) . # -#ls:itemNote a owl:DatatypeProperty ; -# :category ls:merged ; -# rdfs:label "anmärkning i bestånd"@sv, "item note"@en ; -# skos:notation "BANM"^^ls:QueryCode ; -# owl:propertyChainAxiom ( :hasItem :hasNote :label ), -# ( :hasItem :cataloguersNote ), -# ( :hasItem :custodialHistory ), -# ( :hasItem marc:hasCopyAndVersionIdentificationNote marc:itemCondition ), -# ( :hasItem marc:hasBindingInformation :label ), -# ( :hasItem marc:hasTextualHoldingsBasicBibliographicUni marc:cataloguersNote ) . # #:author a owl:ObjectProperty ; # rdfs:label "författare"@sv, "author"@en ; From 1d38137d2d0bb2f2a49434a8a4010dee89f5dc74 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Kalle=20W=C3=A5hlin?= Date: Mon, 22 Dec 2025 17:45:36 +0100 Subject: [PATCH 3/4] Add search-token lenses for some common entity types --- source/vocab/display.jsonld | 39 ++++++++++++++++++++++++++++++++++++- 1 file changed, 38 insertions(+), 1 deletion(-) diff --git a/source/vocab/display.jsonld b/source/vocab/display.jsonld index 35e95ae4..5f588ae2 100644 --- a/source/vocab/display.jsonld +++ b/source/vocab/display.jsonld @@ -1476,6 +1476,43 @@ "name", "qualifier" ] + }, + "Title": { + "@type": "fresnel:Lens", + "classLensDomain": "Title", + "fresnel:extends": {"@id": "Title-chips"}, + "showProperties": [ "fresnel:super" ] + }, + "KeyTitle": { + "@type": "fresnel:Lens", + "classLensDomain": "KeyTitle", + "fresnel:extends": {"@id": "KeyTitle-chips"}, + "showProperties": [ "fresnel:super" ] + }, + "TitlePart": { + "@type": "fresnel:Lens", + "classLensDomain": "TitlePart", + "fresnel:extends": {"@id": "TitlePart-chips"}, + "showProperties": [ "fresnel:super" ] + }, + "ProvisionActivity": { + "@type": "fresnel:Lens", + "classLensDomain": "ProvisionActivity", + "fresnel:extends": {"@id": "ProvisionActivity-chips"}, + "showProperties": [ "fresnel:super" ] + }, + "Language": { + "@type": "fresnel:Lens", + "classLensDomain": "Language", + "fresnel:extends": {"@id": "Language-chips"}, + "showProperties": [ "fresnel:super" ] + }, + "Concept": { + "@type": "fresnel:Lens", + "classLensDomain": "Concept", + "showProperties": [ + {"alternateProperties": ["prefLabel", "singularLabel", "label", "termComponentList", "code"]} + ] } } }, @@ -2121,4 +2158,4 @@ } } } -} +} \ No newline at end of file From d90fc1e71069ed2a566777e5edb74ef624b19a6e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Kalle=20W=C3=A5hlin?= Date: Tue, 23 Dec 2025 06:44:40 +0100 Subject: [PATCH 4/4] Remove meta from Record search-chips and add instead meta.created to Item search-chips --- source/vocab/display.jsonld | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/source/vocab/display.jsonld b/source/vocab/display.jsonld index 5f588ae2..e349a736 100644 --- a/source/vocab/display.jsonld +++ b/source/vocab/display.jsonld @@ -1522,7 +1522,7 @@ "lenses": { "Record": { "fresnel:extends": {"@id": "Record-chips"}, - "showProperties": [ "fresnel:super", "bibliography", "created" ] + "showProperties": [ "fresnel:super", "bibliography" ] }, "Item": { "fresnel:extends": {"@id": "Item-chips"}, @@ -1573,6 +1573,10 @@ } ], "fresnel:use": "librissearch:shelf" + }, + { + "@type": "fresnel:fslselector", + "@value": "meta/*/created" } ] },