[ { "@id": "https://w3id.org/np/RA_QcFRTOjwYRz5Yw7d5uepH9RYhrmovFWUJ0kLsuMo_g/provenance", "@graph": [ { "@id": "https://w3id.org/np/RA_QcFRTOjwYRz5Yw7d5uepH9RYhrmovFWUJ0kLsuMo_g/assertion", "http://www.w3.org/ns/prov#wasAttributedTo": [ { "@id": "https://w3id.org/np/RAFJKwxgChOLOQ2UduMAT1bYf1VNaWIZYIPmTT3YvJ8y0/docs-bot" } ] } ] }, { "@id": "https://w3id.org/np/RA_QcFRTOjwYRz5Yw7d5uepH9RYhrmovFWUJ0kLsuMo_g/assertion", "@graph": [ { "@id": "https://w3id.org/np/RA_QcFRTOjwYRz5Yw7d5uepH9RYhrmovFWUJ0kLsuMo_g/get-docs-topics", "http://purl.org/dc/terms/description": [ { "@value": "The topics of a documentation collection in reading order, each with its description and the number of its paragraphs. A topic's newest member-signed declaration counts; a newer removal (gen:DeactivatedDocumentationTopic) hides it. Paragraph counts include only current, member-signed paragraphs, so moved and removed ones are not counted." } ], "http://purl.org/dc/terms/license": [ { "@id": "http://www.apache.org/licenses/LICENSE-2.0" } ], "@type": [ "https://w3id.org/kpxl/grlc/grlc-query" ], "http://www.w3.org/2000/01/rdf-schema#label": [ { "@value": "Get the table of contents of a documentation collection" } ], "https://w3id.org/kpxl/grlc/endpoint": [ { "@id": "https://w3id.org/np/l/nanopub-query-1.1/repo/full" } ], "https://w3id.org/kpxl/grlc/sparql": [ { "@value": "prefix rdf: \nprefix rdfs: \nprefix dct: \nprefix np: \nprefix npa: \nprefix npx: \nprefix gen: \nprefix schema: \nprefix schemas: \n\n# The table of contents of a documentation collection: each topic's newest declaration by a\n# member of the maintaining space, in reading order (position, then label), with its description\n# and the number of paragraphs it has. Shaped for a paragraph view: ?paragraph is the topic's own\n# IRI (so the heading links to the topic page), ?title its label, ?content the description and\n# paragraph count.\nselect ?paragraph ?title ?content (str(?np) as ?override_target) ?np (\"^\" as ?np_label) where {\n {\n select ?topic ?np ?date (min(?l) as ?title) (min(?pos) as ?position) (min(?d) as ?description) where {\n service {\n select (group_concat(?mpk; separator=\" \") as ?memberPubkeys) where {\n graph npa:graph { npa:thisRepo npa:hasCurrentSpaceState ?stateG . }\n values ?_resource_multi_iri {}\n graph ?stateG {\n ?_resource_multi_iri npa:isMaintainedBy? ?space .\n ?ri a gen:RoleInstantiation ; npa:forSpace ?space ; npa:forAgent ?agent ; npa:hasRoleType ?roleType .\n ?acct a npa:AccountState ; npa:agent ?agent ; npa:pubkey ?mpk .\n }\n filter(?roleType in (gen:AdminRole, gen:MaintainerRole, gen:MemberRole))\n }\n }\n values ?_resource_multi_iri {}\n graph npa:graph {\n ?np npa:hasValidSignatureForPublicKeyHash ?k ; dct:created ?date ; np:hasAssertion ?a .\n filter not exists { ?x npx:invalidates ?np ; npa:hasValidSignatureForPublicKeyHash ?k . }\n }\n filter(contains(?memberPubkeys, ?k))\n graph ?a {\n ?topic gen:isRelevantFor ?_resource_multi_iri ; rdfs:label ?l .\n optional { ?topic gen:hasPositionString ?pos . }\n optional { ?topic dct:description ?d . }\n }\n filter not exists {\n graph npa:graph { ?np2 npa:hasValidSignatureForPublicKeyHash ?k2 ; dct:created ?date2 ; np:hasAssertion ?a2 .\n filter not exists { ?y npx:invalidates ?np2 ; npa:hasValidSignatureForPublicKeyHash ?k2 . } }\n # a newer declaration, or a newer removal (gen:DeactivatedDocumentationTopic), replaces this one\n graph ?a2 { { ?topic gen:isRelevantFor ?_resource_multi_iri . } union { ?topic rdf:type gen:DeactivatedDocumentationTopic . } }\n filter(?date2 > ?date) filter(contains(?memberPubkeys, ?k2))\n }\n } group by ?topic ?np ?date\n }\n # number of paragraphs about the topic: member-signed, newest version of each paragraph only,\n # so moved and removed paragraphs are not counted\n {\n select ?topic (count(distinct ?p) as ?n) where {\n service {\n select (group_concat(?mpk2; separator=\" \") as ?memberPubkeys2) where {\n graph npa:graph { npa:thisRepo npa:hasCurrentSpaceState ?stateG2 . }\n values ?_resource_multi_iri {}\n graph ?stateG2 {\n ?_resource_multi_iri npa:isMaintainedBy? ?space2 .\n ?ri2 a gen:RoleInstantiation ; npa:forSpace ?space2 ; npa:forAgent ?agent2 ; npa:hasRoleType ?roleType2 .\n ?acct2 a npa:AccountState ; npa:agent ?agent2 ; npa:pubkey ?mpk2 .\n }\n filter(?roleType2 in (gen:AdminRole, gen:MaintainerRole, gen:MemberRole))\n }\n }\n values ?_resource_multi_iri {}\n graph ?tg { ?topic gen:isRelevantFor ?_resource_multi_iri . }\n graph npa:graph { ?pnp npa:hasValidSignatureForPublicKeyHash ?pk ; dct:created ?pdate ; np:hasAssertion ?pa .\n filter not exists { ?z npx:invalidates ?pnp ; npa:hasValidSignatureForPublicKeyHash ?pk . } }\n filter(contains(?memberPubkeys2, ?pk))\n graph ?pa { ?p rdf:type gen:Paragraph ; schema:about|schemas:about ?topic . }\n filter not exists {\n graph npa:graph { ?pnp2 npa:hasValidSignatureForPublicKeyHash ?pk2 ; dct:created ?pdate2 ; np:hasAssertion ?pa2 .\n filter not exists { ?w npx:invalidates ?pnp2 ; npa:hasValidSignatureForPublicKeyHash ?pk2 . } }\n graph ?pa2 { ?p rdf:type ?ptype2 . }\n values ?ptype2 { gen:Paragraph gen:DeactivatedParagraph }\n filter(?pdate2 > ?pdate) filter(contains(?memberPubkeys2, ?pk2))\n }\n } group by ?topic\n }\n bind(?topic as ?paragraph)\n bind(concat(\"

\", coalesce(?description, \"\"), \"

\", str(?n), \" paragraph\", if(?n = 1, \"\", \"s\"), \"

\") as ?content)\n}\norder by ?position ?title" } ] } ] }, { "@id": "https://w3id.org/np/RA_QcFRTOjwYRz5Yw7d5uepH9RYhrmovFWUJ0kLsuMo_g/pubinfo", "@graph": [ { "@id": "https://w3id.org/np/RA_QcFRTOjwYRz5Yw7d5uepH9RYhrmovFWUJ0kLsuMo_g", "http://purl.org/dc/terms/created": [ { "@value": "2026-09-16T15:13:48Z", "@type": "http://www.w3.org/2001/XMLSchema#dateTime" } ], "http://purl.org/dc/terms/creator": [ { "@id": "https://w3id.org/np/RAFJKwxgChOLOQ2UduMAT1bYf1VNaWIZYIPmTT3YvJ8y0/docs-bot" } ], "http://purl.org/dc/terms/license": [ { "@id": "https://creativecommons.org/licenses/by/4.0/" } ], "http://purl.org/nanopub/x/embeds": [ { "@id": "https://w3id.org/np/RA_QcFRTOjwYRz5Yw7d5uepH9RYhrmovFWUJ0kLsuMo_g/get-docs-topics" } ], "http://purl.org/nanopub/x/supersedes": [ { "@id": "https://w3id.org/np/RA0m-5A9NjJagaJ4aPz8xnhUPEMxZCOlle0t_4kQ3kmuQ" } ], "https://w3id.org/np/o/ntemplate/wasCreatedFromProvenanceTemplate": [ { "@id": "https://w3id.org/np/RA7lSq6MuK_TIC6JMSHvLtee3lpLoZDOqLJCLXevnrPoU" } ], "https://w3id.org/np/o/ntemplate/wasCreatedFromPubinfoTemplate": [ { "@id": "https://w3id.org/np/RA-N4_kFxcruvBTlo1yJv29E4SLOXsx5KO_th69PprMrA" }, { "@id": "https://w3id.org/np/RACJ58Gvyn91LqCKIO9zu1eijDQIeEff28iyDrJgjSJF8" } ], "https://w3id.org/np/o/ntemplate/wasCreatedFromTemplate": [ { "@id": "https://w3id.org/np/RAEFAt-QcFK0ZhqfvlsmS10BnzGJA0xwOICZXkO-ai87k" } ] }, { "@id": "https://w3id.org/np/RA_QcFRTOjwYRz5Yw7d5uepH9RYhrmovFWUJ0kLsuMo_g/sig", "http://purl.org/nanopub/x/hasAlgorithm": [ { "@value": "RSA" } ], "http://purl.org/nanopub/x/hasPublicKey": [ { "@value": "MIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEAl8cMusqtNyKA6UIsi3f7BAcZmHQXWxU0qk0PLsboMWQxYrGBfGgHTgRHJrBRxL+Zn9kJHKVmz2smDcjCBptXi/OwWy80gjsx+Pbe6IWz3zFPWF1UoFIKfPnC0slV67CQgdM853zW7Bmk9/uflCtK4EtZKmPdRGtUHVC7DTVvDBMDzLRGdE2KCBVN29EbM5GGVNvijYbaZQ9OFQPBkQshayqSIyGRr6rreJdkrRVLIzu3uuAjKYydaeXZWSN2JLnVBwrClKUxaEdCwhb5nXpMtKOMD+R+LgaXLeJUWM8BdRSYnta9ZqI5pHY4y3v+eW7J+HHeTvRbHvlik+Z4hFUXmQIDAQAB" } ], "http://purl.org/nanopub/x/hasSignature": [ { "@value": "IgKwrbHi1oSzEwbCkjvCNkPhGG5XLD7MAYQyPe7QJogiVQDbtgpp/AdWVNOzIzA9IX2aDjIjI2COC8Ofb4F8YRmG9RInUVGZ4JvAPLD3wkGuIhrcmpb+5oU6trVyf8nGtt8qMN9btBIYA8D0MfXfU3znsuvOHDQq/rehc5PuusF8sXLRdNv6cFvgmcpNTfl9g+1dpZ2sC7Wo74fOF2mgH+zsQxOgeTnhx6Moc8KBexFdLgghqUnxefFiaNomlTt6a3muSxXtS/GO1R4M4xbSuemAhEAJRgjpzeLJNTu61ibdsVZ1DTmLEZ7JmivsJtaT1HFUqAiYWLgTaHsbcOg0ow==" } ], "http://purl.org/nanopub/x/hasSignatureTarget": [ { "@id": "https://w3id.org/np/RA_QcFRTOjwYRz5Yw7d5uepH9RYhrmovFWUJ0kLsuMo_g" } ], "http://purl.org/nanopub/x/signedBy": [ { "@id": "https://w3id.org/np/RAFJKwxgChOLOQ2UduMAT1bYf1VNaWIZYIPmTT3YvJ8y0/docs-bot" } ] } ] }, { "@id": "https://w3id.org/np/RA_QcFRTOjwYRz5Yw7d5uepH9RYhrmovFWUJ0kLsuMo_g/Head", "@graph": [ { "@id": "https://w3id.org/np/RA_QcFRTOjwYRz5Yw7d5uepH9RYhrmovFWUJ0kLsuMo_g", "http://www.nanopub.org/nschema#hasAssertion": [ { "@id": "https://w3id.org/np/RA_QcFRTOjwYRz5Yw7d5uepH9RYhrmovFWUJ0kLsuMo_g/assertion" } ], "http://www.nanopub.org/nschema#hasProvenance": [ { "@id": "https://w3id.org/np/RA_QcFRTOjwYRz5Yw7d5uepH9RYhrmovFWUJ0kLsuMo_g/provenance" } ], "http://www.nanopub.org/nschema#hasPublicationInfo": [ { "@id": "https://w3id.org/np/RA_QcFRTOjwYRz5Yw7d5uepH9RYhrmovFWUJ0kLsuMo_g/pubinfo" } ], "@type": [ "http://www.nanopub.org/nschema#Nanopublication" ] } ] } ]