{"id":22914459,"url":"https://github.com/communitysolidserver/predicate-cardinalities-component","last_synced_at":"2025-04-01T11:52:56.054Z","repository":{"id":191828396,"uuid":"685088255","full_name":"CommunitySolidServer/predicate-cardinalities-component","owner":"CommunitySolidServer","description":"A component for the Community Solid Server that allows to expose a view containing the predicate cardinalities in the pod.","archived":false,"fork":false,"pushed_at":"2023-08-31T10:36:30.000Z","size":192,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":4,"default_branch":"main","last_synced_at":"2025-02-07T06:44:25.562Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"TypeScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/CommunitySolidServer.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null}},"created_at":"2023-08-30T13:46:03.000Z","updated_at":"2023-08-30T13:46:36.000Z","dependencies_parsed_at":"2023-09-01T00:50:41.424Z","dependency_job_id":"ffb05c60-a4bd-40d2-9460-86a58f2c27e4","html_url":"https://github.com/CommunitySolidServer/predicate-cardinalities-component","commit_stats":null,"previous_names":["communitysolidserver/predicate-cardinalities-component"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/CommunitySolidServer%2Fpredicate-cardinalities-component","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/CommunitySolidServer%2Fpredicate-cardinalities-component/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/CommunitySolidServer%2Fpredicate-cardinalities-component/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/CommunitySolidServer%2Fpredicate-cardinalities-component/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/CommunitySolidServer","download_url":"https://codeload.github.com/CommunitySolidServer/predicate-cardinalities-component/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":246635950,"owners_count":20809331,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-12-14T05:15:08.615Z","updated_at":"2025-04-01T11:52:56.025Z","avatar_url":"https://github.com/CommunitySolidServer.png","language":"TypeScript","readme":"# Predicate Cardinalities Component\n\nThis repository contains an external component that can be injected into the [Community Solid Server (CSS)](https://github.com/CommunitySolidServer/CommunitySolidServer/).\nIt allows to expose a view containing the predicate cardinalities in the pod.\n\n## How it works\n\nFor each pod, the pod's root container contains a triple to indicate where the predicate cardinalities view is located.\nThis triple has the following form:\n\n```\n\u003c\u003e \u003chttp://rdfs.org/ns/void#inDataset\u003e \u003c/.well-known/.predicate-cardinalities\u003e.\n```\n\nThe view is thus located in the `.well-known/.predicate-cardinalities` location.\n\nOn startup, the component will check if the predicate cardinalities cache already exists and if not, will calculate the cardinalities over the entire pod.\nCurrently, only public readable resources are taken into account.\nThat is such that the view can be exposed publicly without leaking private information.\n\nWhen the cardinalities view is requested, it is dynamically generated from the cache.\nThis cache is updated periodically, and only if one or multiple resources (or its ACL files) have been modified since the last update.\nTo change the update interval, change the `updateInterval` variable in the configuration of the component.\nThe default is set to `600000` milliseconds, or 10 minutes.\n\n## Vocabulary\n\nThe vocabulary used in the view is the [VoID Vocabulary](https://www.w3.org/TR/2011/NOTE-void-20110303/).\n\nStructure of the view:\n\n```turtle\n@prefix void: \u003chttp://rdfs.org/ns/void#\u003e .\n\n\u003c{podBase}\u003e a void:Dataset ;\n    void:propertyPartition [\n        void:property \u003c{predicate}\u003e ;\n        void:triples \u003c{cardinality}\u003e\n    ] .\n```\n\n## Running the server\n\nClone this repository, then install the packages\n\n```bash\nnpm i\n```\n\nBuild the project\n\n```bash\nnpm run build\n```\n\nTo run the server with your current folder as storage, use:\n\n```bash\nnpm run start\n```\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcommunitysolidserver%2Fpredicate-cardinalities-component","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fcommunitysolidserver%2Fpredicate-cardinalities-component","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcommunitysolidserver%2Fpredicate-cardinalities-component/lists"}