{"id":13556069,"url":"https://github.com/agrueneberg/Sessel","last_synced_at":"2025-04-03T09:30:44.371Z","repository":{"id":66141830,"uuid":"1822159","full_name":"agrueneberg/Sessel","owner":"agrueneberg","description":"Document RDFizer for CouchDB","archived":true,"fork":false,"pushed_at":"2015-10-29T15:25:21.000Z","size":982,"stargazers_count":22,"open_issues_count":0,"forks_count":1,"subscribers_count":4,"default_branch":"master","last_synced_at":"2024-11-04T05:33:43.596Z","etag":null,"topics":["couchapp","couchdb","nosql","rdf","semantic-web","sparql","triple-store"],"latest_commit_sha":null,"homepage":"","language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/agrueneberg.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2011-05-30T16:14:19.000Z","updated_at":"2023-01-28T00:07:22.000Z","dependencies_parsed_at":"2023-02-19T23:15:45.267Z","dependency_job_id":null,"html_url":"https://github.com/agrueneberg/Sessel","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/agrueneberg%2FSessel","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/agrueneberg%2FSessel/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/agrueneberg%2FSessel/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/agrueneberg%2FSessel/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/agrueneberg","download_url":"https://codeload.github.com/agrueneberg/Sessel/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":246976075,"owners_count":20863007,"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":["couchapp","couchdb","nosql","rdf","semantic-web","sparql","triple-store"],"created_at":"2024-08-01T12:03:36.309Z","updated_at":"2025-04-03T09:30:43.925Z","avatar_url":"https://github.com/agrueneberg.png","language":"JavaScript","funding_links":[],"categories":["JavaScript","nosql"],"sub_categories":[],"readme":"Sessel\n======\n\n[![Project Status: Inactive - The project has reached a stable, usable state but is no longer being actively developed; support/maintenance will be provided as time allows.](http://www.repostatus.org/badges/0.1.0/inactive.svg)](http://www.repostatus.org/#inactive)\n\nSessel is a CouchApp for [CouchDB](http://couchdb.apache.org) that generates RDF triples from JSON documents, which then in turn can be exported to various serialization formats, or queried through a SPARQL endpoint.\n\n\nInstallation\n------------\n\nClone this repository and use [CouchApp](http://couchapp.org) to push Sessel to `\u003cyour_host\u003e/\u003cyour_db\u003e`:\n\n    git clone https://github.com/agrueneberg/Sessel.git\n    couchapp push Sessel/ http://\u003cyour_host\u003e/\u003cyour_db\u003e\n\nAlternatively, replicate [an existing deployment of Sessel](https://couchdb.gutpassfilter.de/sessel/) to `\u003cyour_host\u003e/\u003cyour_db\u003e` using `curl`:\n\n    curl\\\n      -X POST\\\n      -H \"Content-Type:application/json\"\\\n      -d \"{\\\"source\\\":\\\"https://couchdb.gutpassfilter.de/sessel\\\",\\\n           \\\"target\\\":\\\"http://\u003cyour_host\u003e/\u003cyour_db\u003e\\\",\\\n           \\\"filter\\\":\\\"vacuum/rw\\\"}\"\\\n      http://localhost:5984/_replicate\n\n\nExport\n------\n\nThe generated triples can be exported to various RDF serialization formats by calling the export interface `http://\u003cyour_host\u003e/\u003cyour_db\u003e/_design/sessel/_rewrite/` with one of the following strings added:\n\n* `export.nt` – Export as [N-Triples](http://www.w3.org/TR/rdf-testcases/#ntriples)\n* `export.ttl` – Export as [Turtle](http://www.w3.org/TeamSubmission/turtle/)\n* `export.rdf` – Export as [RDF/XML](http://www.w3.org/TR/rdf-syntax-grammar/)\n\nA graphical export interface can be accessed at `http://\u003cyour_host\u003e/\u003cyour_db\u003e/_design/sessel/export.html`.\n\n### Changing the base URI\n\nThe default base URI is `http://host/db_name/`. If you prefer a different URI, add a `base_uri` parameter to the export URL and provide a percent-encoded value, e.g. `http://\u003cyour_host\u003e/\u003cyour_db\u003e/_design/sessel/_rewrite/export.ttl?base_uri=http%3A%2F%2Fexample.com%2Frdf%23`.\n\n### Changing the prefix\n\nThe default prefix of the base URI is `sessel`. If you prefer a different prefix, add a `prefix` parameter to the export URL and provide a value, e.g. `http://\u003cyour_host\u003e/\u003cyour_db\u003e/_design/sessel/_rewrite/export.ttl?base_uri=http%3A%2F%2Fexample.com%2Frdf%23\u0026prefix=example`.\n\n### Data type mapping\n\nThe data types of JSON are mapped to the data types of XML as specified in [XML Schema Part 2: Datatypes Second Edition](http://www.w3.org/TR/xmlschema-2/).\n\n* `string` → `xsd:string`\n* `array` → `xsd:string`\n* `object` → `xsd:string`\n* `null` → `xsd:string`\n* `number` → `xsd:integer` or `xsd:double`\n* `boolean` → `xsd:boolean`\n\nTo activate data type mapping, add a `type_literals` parameter to the export URL and provide a string value `true`.\n\n\nSPARQL Endpoint\n---------------\n\nSessel bundles Antonio Garrote's fantastic [rdfstore-js](https://github.com/antoniogarrote/rdfstore-js), an RDF store with SPARQL support written entirely in JavaScript. A graphical query interface can be accessed at `http://\u003cyour_host\u003e/\u003cyour_db\u003e/_design/sessel/sparql.html`.\nUnfortunately, modern browsers only let [rdfstore-js](https://github.com/antoniogarrote/rdfstore-js) store 5 MB worth of triples. If your data set is large it is recommended to use a standalone SPARQL processor such as [ARQ](http://jena.sourceforge.net/ARQ/) to import the generated triples by pointing it to the export interface:\n\n    SELECT *\n    FROM \u003chttp://\u003cyour_host\u003e/\u003cyour_db\u003e/_design/sessel/_rewrite/export.ttl\u003e\n    WHERE {\n        ?s ?p ?o .\n    }\n\n\nDocument Conversion\n-------------------\n\nEach JSON document is broken down to key-value pairs. Each key-value pair represents a triple, key and value being predicate and object, respectively. The value of the special key-value pair with the key `_id` ensuring the uniqueness of a document serves as the subject of the generated triple.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fagrueneberg%2FSessel","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fagrueneberg%2FSessel","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fagrueneberg%2FSessel/lists"}