Returns a single result row with one 'svg' column holding a complete SVG document rendering the FSR typology of the FAIR Implementation Profile (FIP) Ontology, computed dynamically from the published class definitions. This is the query behind the 'FSR typology' SVG view (gen:SvgView) and is specific to the FIP Ontology: it mirrors the hand-drawn FSR typology diagram with three fixed columns headed by FAIR Data Policy, FAIR Specification, and FAIR Supporting Technology, listing each column's subclasses (and their subclasses, indented) as boxes hanging off a vertical spine with a subtype triangle. Classes that are also FAIR-Enabling Resources (directly, or via their parent for nested entries) get a gray background; a legend below the columns explains the FSR/FER distinction. Box labels link root-relatively (/part?id=...) so they resolve inside the rendering Nanodash instance, which appends the page context; full labels are provided as tooltips. Positions are computed via rank subqueries, so the output is deterministic. The 'resource' parameter (the ontology) is used to derive the class namespace filter.
prefix np: <http://www.nanopub.org/nschema#> prefix npa: <http://purl.org/nanopub/admin/> prefix npx: <http://purl.org/nanopub/x/> prefix owl: <http://www.w3.org/2002/07/owl#> prefix rdfs: <http://www.w3.org/2000/01/rdf-schema#> prefix xsd: <http://www.w3.org/2001/XMLSchema#> select (concat( ' ', group_concat(?frag; separator=""), '<g transform="translate(20,', str((96 + max(?iy) * 38 + 24)), ')">',' ',' ',' FAIR Supporting Resource (FSR) ',' ',' ',' ',' FAIR-Enabling Resource (FER) ',' ',' All resources in this typology are ',' FAIR Supporting Resources (FSR), but ',' the FAIR-Enabling Resources (FER, ',' gray background) among them are ',' essential for the FAIR Principles. ',' </g>', ' ') as ?svg) where { # --- one row per rendered box, with rank ?iy inside its column { select ?b ?bx ?c ?clbl ?ind ?fer (count(*) as ?iy) where { { { { select ?b ?bx ?c (coalesce(min(?lu1), min(?la1), replace(str(?c), "^.*[/#]", "")) as ?clbl) where { values (?b ?bx) { (<https://w3id.org/fair/fip/terms/FAIR-Data-Policy> 0) (<https://w3id.org/fair/fip/terms/FAIR-Specification> 1) (<https://w3id.org/fair/fip/terms/FAIR-Supporting-Technology> 2) } graph npa:graph { ?np1 npx:hasNanopubType owl:Class ; npa:hasValidSignatureForPublicKeyHash ?pk1 ; npx:introduces ?c ; np:hasAssertion ?a1 . filter not exists { ?npi1 npx:invalidates ?np1 ; npa:hasValidSignatureForPublicKeyHash ?pk1 . } } graph ?a1 { ?c a owl:Class ; rdfs:subClassOf ?b . optional { ?c rdfs:label ?lu1 . filter(lang(?lu1) = "") } optional { ?c rdfs:label ?la1 . } } filter(strstarts(str(?c), replace(str(?_resource_iri), "[^/#]*$", ""))) } group by ?b ?bx ?c } bind(0 as ?ind) bind(concat(?clbl, "|", str(?c)) as ?sk) bind(if(exists { graph npa:graph { ?npf2 npx:hasNanopubType owl:Class ; npa:hasValidSignatureForPublicKeyHash ?pkf2 ; npx:introduces ?c ; np:hasAssertion ?af2 . filter not exists { ?npfi2 npx:invalidates ?npf2 ; npa:hasValidSignatureForPublicKeyHash ?pkf2 . } } graph ?af2 { ?c rdfs:subClassOf <https://w3id.org/fair/fip/terms/FAIR-Enabling-Resource> . } }, 1, 0) as ?fer) } union { { select ?b ?bx ?m ?c (coalesce(min(?lu2), min(?la2), replace(str(?m), "^.*[/#]", "")) as ?mlbl) (coalesce(min(?lu3), min(?la3), replace(str(?c), "^.*[/#]", "")) as ?clbl) where { values (?b ?bx) { (<https://w3id.org/fair/fip/terms/FAIR-Data-Policy> 0) (<https://w3id.org/fair/fip/terms/FAIR-Specification> 1) (<https://w3id.org/fair/fip/terms/FAIR-Supporting-Technology> 2) } graph npa:graph { ?np3 npx:hasNanopubType owl:Class ; npa:hasValidSignatureForPublicKeyHash ?pk3 ; npx:introduces ?m ; np:hasAssertion ?a3 . filter not exists { ?npi3 npx:invalidates ?np3 ; npa:hasValidSignatureForPublicKeyHash ?pk3 . } } graph ?a3 { ?m a owl:Class ; rdfs:subClassOf ?b . optional { ?m rdfs:label ?lu2 . filter(lang(?lu2) = "") } optional { ?m rdfs:label ?la2 . } } filter(strstarts(str(?m), replace(str(?_resource_iri), "[^/#]*$", ""))) graph npa:graph { ?np4 npx:hasNanopubType owl:Class ; npa:hasValidSignatureForPublicKeyHash ?pk4 ; npx:introduces ?c ; np:hasAssertion ?a4 . filter not exists { ?npi4 npx:invalidates ?np4 ; npa:hasValidSignatureForPublicKeyHash ?pk4 . } } graph ?a4 { ?c a owl:Class ; rdfs:subClassOf ?m . optional { ?c rdfs:label ?lu3 . filter(lang(?lu3) = "") } optional { ?c rdfs:label ?la3 . } } filter(strstarts(str(?c), replace(str(?_resource_iri), "[^/#]*$", ""))) } group by ?b ?bx ?m ?c } bind(1 as ?ind) bind(concat(?mlbl, "~|", ?clbl, "|", str(?c)) as ?sk) bind(if(exists { graph npa:graph { ?npf5 npx:hasNanopubType owl:Class ; npa:hasValidSignatureForPublicKeyHash ?pkf5 ; npx:introduces ?c ; np:hasAssertion ?af5 . filter not exists { ?npfi5 npx:invalidates ?npf5 ; npa:hasValidSignatureForPublicKeyHash ?pkf5 . } } graph ?af5 { ?c rdfs:subClassOf <https://w3id.org/fair/fip/terms/FAIR-Enabling-Resource> . } } || exists { graph npa:graph { ?npf6 npx:hasNanopubType owl:Class ; npa:hasValidSignatureForPublicKeyHash ?pkf6 ; npx:introduces ?m ; np:hasAssertion ?af6 . filter not exists { ?npfi6 npx:invalidates ?npf6 ; npa:hasValidSignatureForPublicKeyHash ?pkf6 . } } graph ?af6 { ?m rdfs:subClassOf <https://w3id.org/fair/fip/terms/FAIR-Enabling-Resource> . } }, 1, 0) as ?fer) } } { select distinct (?b as ?bR) (?sk as ?skR) where { { { select ?b ?bx ?c (coalesce(min(?lu1), min(?la1), replace(str(?c), "^.*[/#]", "")) as ?clbl) where { values (?b ?bx) { (<https://w3id.org/fair/fip/terms/FAIR-Data-Policy> 0) (<https://w3id.org/fair/fip/terms/FAIR-Specification> 1) (<https://w3id.org/fair/fip/terms/FAIR-Supporting-Technology> 2) } graph npa:graph { ?np7 npx:hasNanopubType owl:Class ; npa:hasValidSignatureForPublicKeyHash ?pk7 ; npx:introduces ?c ; np:hasAssertion ?a7 . filter not exists { ?npi7 npx:invalidates ?np7 ; npa:hasValidSignatureForPublicKeyHash ?pk7 . } } graph ?a7 { ?c a owl:Class ; rdfs:subClassOf ?b . optional { ?c rdfs:label ?lu1 . filter(lang(?lu1) = "") } optional { ?c rdfs:label ?la1 . } } filter(strstarts(str(?c), replace(str(?_resource_iri), "[^/#]*$", ""))) } group by ?b ?bx ?c } bind(0 as ?ind) bind(concat(?clbl, "|", str(?c)) as ?sk) bind(if(exists { graph npa:graph { ?npf8 npx:hasNanopubType owl:Class ; npa:hasValidSignatureForPublicKeyHash ?pkf8 ; npx:introduces ?c ; np:hasAssertion ?af8 . filter not exists { ?npfi8 npx:invalidates ?npf8 ; npa:hasValidSignatureForPublicKeyHash ?pkf8 . } } graph ?af8 { ?c rdfs:subClassOf <https://w3id.org/fair/fip/terms/FAIR-Enabling-Resource> . } }, 1, 0) as ?fer) } union { { select ?b ?bx ?m ?c (coalesce(min(?lu2), min(?la2), replace(str(?m), "^.*[/#]", "")) as ?mlbl) (coalesce(min(?lu3), min(?la3), replace(str(?c), "^.*[/#]", "")) as ?clbl) where { values (?b ?bx) { (<https://w3id.org/fair/fip/terms/FAIR-Data-Policy> 0) (<https://w3id.org/fair/fip/terms/FAIR-Specification> 1) (<https://w3id.org/fair/fip/terms/FAIR-Supporting-Technology> 2) } graph npa:graph { ?np9 npx:hasNanopubType owl:Class ; npa:hasValidSignatureForPublicKeyHash ?pk9 ; npx:introduces ?m ; np:hasAssertion ?a9 . filter not exists { ?npi9 npx:invalidates ?np9 ; npa:hasValidSignatureForPublicKeyHash ?pk9 . } } graph ?a9 { ?m a owl:Class ; rdfs:subClassOf ?b . optional { ?m rdfs:label ?lu2 . filter(lang(?lu2) = "") } optional { ?m rdfs:label ?la2 . } } filter(strstarts(str(?m), replace(str(?_resource_iri), "[^/#]*$", ""))) graph npa:graph { ?np10 npx:hasNanopubType owl:Class ; npa:hasValidSignatureForPublicKeyHash ?pk10 ; npx:introduces ?c ; np:hasAssertion ?a10 . filter not exists { ?npi10 npx:invalidates ?np10 ; npa:hasValidSignatureForPublicKeyHash ?pk10 . } } graph ?a10 { ?c a owl:Class ; rdfs:subClassOf ?m . optional { ?c rdfs:label ?lu3 . filter(lang(?lu3) = "") } optional { ?c rdfs:label ?la3 . } } filter(strstarts(str(?c), replace(str(?_resource_iri), "[^/#]*$", ""))) } group by ?b ?bx ?m ?c } bind(1 as ?ind) bind(concat(?mlbl, "~|", ?clbl, "|", str(?c)) as ?sk) bind(if(exists { graph npa:graph { ?npf11 npx:hasNanopubType owl:Class ; npa:hasValidSignatureForPublicKeyHash ?pkf11 ; npx:introduces ?c ; np:hasAssertion ?af11 . filter not exists { ?npfi11 npx:invalidates ?npf11 ; npa:hasValidSignatureForPublicKeyHash ?pkf11 . } } graph ?af11 { ?c rdfs:subClassOf <https://w3id.org/fair/fip/terms/FAIR-Enabling-Resource> . } } || exists { graph npa:graph { ?npf12 npx:hasNanopubType owl:Class ; npa:hasValidSignatureForPublicKeyHash ?pkf12 ; npx:introduces ?m ; np:hasAssertion ?af12 . filter not exists { ?npfi12 npx:invalidates ?npf12 ; npa:hasValidSignatureForPublicKeyHash ?pkf12 . } } graph ?af12 { ?m rdfs:subClassOf <https://w3id.org/fair/fip/terms/FAIR-Enabling-Resource> . } }, 1, 0) as ?fer) } } } filter(?bR = ?b && ?skR <= ?sk) } group by ?b ?bx ?c ?clbl ?ind ?fer } # --- root labels from their own definition nanopubs { select ?b (coalesce(min(?blu), min(?bla), replace(str(?b), "^.*[/#]", "")) as ?blbl) where { values ?b { <https://w3id.org/fair/fip/terms/FAIR-Data-Policy> <https://w3id.org/fair/fip/terms/FAIR-Specification> <https://w3id.org/fair/fip/terms/FAIR-Supporting-Technology> } graph npa:graph { ?np900 npx:hasNanopubType owl:Class ; npa:hasValidSignatureForPublicKeyHash ?pk900 ; npx:introduces ?b ; np:hasAssertion ?a900 . filter not exists { ?npi900 npx:invalidates ?np900 ; npa:hasValidSignatureForPublicKeyHash ?pk900 . } } graph ?a900 { ?b a owl:Class . optional { ?b rdfs:label ?blu . filter(lang(?blu) = "") } optional { ?b rdfs:label ?bla . } } } group by ?b } bind(20 + ?bx * 250 as ?colX) bind(?colX + 32 as ?spineX) bind(96 + (?iy - 1) * 38 as ?boxY) bind(?boxY + 15 as ?midY) bind(?colX + 46 + ?ind * 14 as ?boxX) bind(190 - ?ind * 14 as ?boxW) bind(if(?fer = 1, "#d8d8d8", "#ffffff") as ?boxFill) # column header (root box + subtype triangle), attached to the first item row bind(if(?iy = 1, concat( ' ', ' ', replace(replace(replace(?blbl, "&", "&"), "<", "<"), ">", ">"), ' ', ' ' ), '') as ?headerFrag) bind(concat( ?headerFrag, ' ', ' ', '', ' ', ' ', replace(replace(replace(if(strlen(?clbl) > 36, concat(substr(?clbl, 1, 35), "…"), ?clbl), "&", "&"), "<", "<"), ">", ">"), ' ', ' ', replace(replace(replace(?clbl, "&", "&"), "<", "<"), ">", ">"), ' ' ) as ?frag) }