All Projects β†’ ruby-rdf β†’ rdf-ldp

ruby-rdf / rdf-ldp

Licence: Unlicense License
A suite of LDP software and middleware for RDF.rb & Rack

Programming Languages

ruby
36898 projects - #4 most used programming language

Projects that are alternatives of or similar to rdf-ldp

mayktso
🌌 mayktso: encounters at an endpoint
Stars: ✭ 19 (+35.71%)
Mutual labels:  linked-data, rdf, ldp
Islandora-Metadata-Interest-Group
The purpose of the Islandora Metadata Interest Group (IMIG) is to investigate and provide metadata solutions that help improve metadata creation, maintenance and enhancement in Islandora.
Stars: ✭ 29 (+107.14%)
Mutual labels:  linked-data, rdf
CSV2RDF
Streaming, transforming, SPARQL-based CSV to RDF converter. Apache license.
Stars: ✭ 48 (+242.86%)
Mutual labels:  linked-data, rdf
awesome-ontology
A curated list of ontology things
Stars: ✭ 73 (+421.43%)
Mutual labels:  linked-data, rdf
viziquer
Tool for Search in Structured Semantic Data
Stars: ✭ 12 (-14.29%)
Mutual labels:  linked-data, rdf
carml
A pretty sweet RML engine, for RDF.
Stars: ✭ 74 (+428.57%)
Mutual labels:  linked-data, rdf
pyLDAPI
A very small module to add Linked Data API functionality to a Python Flask installation
Stars: ✭ 28 (+100%)
Mutual labels:  linked-data, rdf
Processor
Ontology-driven Linked Data processor and server for SPARQL backends. Apache License.
Stars: ✭ 54 (+285.71%)
Mutual labels:  linked-data, rdf
rdf2x
RDF2X converts big RDF datasets to the relational database model, CSV, JSON and ElasticSearch.
Stars: ✭ 43 (+207.14%)
Mutual labels:  linked-data, rdf
rdfa-streaming-parser.js
A fast and lightweight streaming RDFa parser for JavaScript
Stars: ✭ 15 (+7.14%)
Mutual labels:  linked-data, rdf
sparql-micro-service
SPARQL micro-services: A lightweight approach to query Web APIs with SPARQL
Stars: ✭ 22 (+57.14%)
Mutual labels:  linked-data, rdf
cubiql
CubiQL: A GraphQL service for querying multidimensional Linked Data Cubes
Stars: ✭ 40 (+185.71%)
Mutual labels:  linked-data, rdf
matcha
🍡 SPARQL-like DSL for querying in memory Linked Data Models
Stars: ✭ 18 (+28.57%)
Mutual labels:  linked-data, rdf
semagrow
A SPARQL query federator of heterogeneous data sources
Stars: ✭ 27 (+92.86%)
Mutual labels:  linked-data, rdf
specification
RDF vocabulary and specification
Stars: ✭ 21 (+50%)
Mutual labels:  rdf, ldp
twinql
A graph query language for the semantic web
Stars: ✭ 17 (+21.43%)
Mutual labels:  linked-data, rdf
LD-Connect
LD Connect is a Linked Data portal for IOS Press in collaboration with the STKO Lab at UC Santa Barbara.
Stars: ✭ 0 (-100%)
Mutual labels:  linked-data, rdf
sirene-ld
Transformation du rΓ©pertoire SIRENE (CSV) au format RDF pour publication en Linked Data
Stars: ✭ 31 (+121.43%)
Mutual labels:  linked-data, rdf
titanium-json-ld
A JSON-LD 1.1 Processor & API
Stars: ✭ 79 (+464.29%)
Mutual labels:  linked-data, rdf
YALC
πŸ•Έ YALC: Yet Another LOD Cloud (registry of Linked Open Datasets).
Stars: ✭ 14 (+0%)
Mutual labels:  linked-data, rdf

RDF::LDP

Gem Version Build Status Coverage Status Gitter chat

Server-side support for Linked Data Platform (LDP) with RDF.rb. To get started with LDP, see the LDP Primer.

This software ships with the following libraries:

  • RDF::LDP --- contains the domain model and behavior for LDP Resources and interaction models.
  • Rack::LDP --- a suite of Rack middleware for creating LDP servers based on RDF::LDP.
  • Lamprey --- a basic LDP server implemented with Rack::LDP.

Lamprey

Lamprey is a basic LDP server. To start it, use:

$ gem install rdf-ldp
$ lamprey

Lamprey currently uses an in-memory repository, and is therefore not a persistent datastore out of the box. Backends are swappable, using any RDF::Repository implementation with named graph (#context) support. We are working to complete a recommended, default backend and introduce startup configuration. See /CONSTRAINED_BY.md and /IMPLEMENTATION.md for details.

An ldp:BasicContainer will be created at the address of your first GET request if the backend store is empty. Note that if that request is made to the server root, Sinatra will assume a trailing slash. You can also create an initial container (or other resource) with HTTP PUT.

$ curl -i http://localhost:4567

HTTP/1.1 200 OK
Content-Type: text/turtle
Link: <http://www.w3.org/ns/ldp#Resource>;rel="type",<http://www.w3.org/ns/ldp#RDFSource>;rel="type",<http://www.w3.org/ns/ldp#BasicContainer>;rel="type"
Allow: GET, POST, PUT, DELETE, OPTIONS, HEAD
Accept-Post: application/n-triples, text/plain, application/n-quads, text/x-nquads, application/ld+json, application/x-ld+json, application/rdf+json, text/html, text/n3, text/rdf+n3, application/rdf+n3, application/rdf+xml, text/csv, text/tab-separated-values, application/csvm+json, text/turtle, text/rdf+turtle, application/turtle, application/x-turtle, application/trig, application/x-trig, application/trix
Etag: "1B2M2Y8AsgTpgAmY7PhCfg==0"
Vary: Accept
X-Content-Type-Options: nosniff
Server: WEBrick/1.3.1 (Ruby/2.1.0/2013-12-25)
Date: Mon, 27 Jul 2015 23:19:06 GMT
Content-Length: 0
Connection: Keep-Alive

Rack::LDP

Setting up a Custom Server

You can quickly create your own server with any framework supporting Rack. The simplest way to do this is with Rackup.

# ./config.ru

require 'rack/ldp'

use Rack::LDP::ContentNegotiation
use Rack::LDP::Errors
use Rack::LDP::Responses
use Rack::LDP::Requests

# Setup a repository and an initial container:
#
#   - You probably want some persistent repository implementation. The example
#     uses an in-memory repository.
#   - You may not need an initial "base" container, if you handle create on PUT
#     requests.
#
repository = RDF::Repository.new 
RDF::LDP::Container.new(RDF::URI('http://localhost:9292/'), repository)
  .create(StringIO.new(''), 'text/plain') if repository.empty?

app = proc do |env|
  # Return a Rack response, giving an `RDF::LDP::Resource`-like object as the body.
  # The `Rack::LDP` middleware marhsalls the request to the resource, builds the response,
  # and handles conneg for RDF serializations (when the body is an `RDF::LDP::RDFSource`).
  #
  # @see https://www.rubydoc.info/github/rack/rack/master/file/SPEC#The_Response
  
  [200, {}, RDF::LDP::Resource.find(RDF::URI(env['REQUEST_URI']), repository)]
end

run app

And run your server with:

$ rackup

Testing

RSpec shared examples for the required behaviors of LDP resource and container types are included in rdf/ldp/spec for use in customized implementations. Running these example sets will help ensure LDP compliance for specialized resource behaviors.

This test suite is provided provisionally and may be incomplete or overly strict. Please report issues encountered during its use.

require 'rdf/ldp/spec'

describe MyResource do
  it_behaves_like 'a Resource'
end

describe MyRDFSource do
  it_behaves_like 'an RDFSource'
end

# ...

describe MyIndirectContainer do
  it_behaves_like 'an IndirectContainer'
end

We recommend running the official LDP testsuite, as integration tests in addition to the above examples.

Compliance

Current compliance reports for Lamprey are located in /report. Reports are generated by the LDP test suite. We use the ldp_testsuite_wrapper gem to run the suite and generate the tests.

RDF.rb Compatibility

As of version 2.1, this software depends on RDF.rb 3.2 or greater.

Contributing

This repository uses Git Flow to mange development and release activity. All submissions must be on a feature branch based on the develop branch to ease staging and integration.

  • Do your best to adhere to the existing coding conventions and idioms.
  • Don't use hard tabs, and don't leave trailing whitespace on any line. Before committing, run git diff --check to make sure of this.
  • Do document every method you add using YARD annotations. Read the tutorial or just look at the existing code for examples.
  • Don't touch the .gemspec or VERSION files. If you need to change them, do so on your private branch only.
  • Do feel free to add yourself to the CREDITS file and the corresponding list in the the README. Alphabetical order applies.
  • Don't touch the AUTHORS file. If your contributions are significant enough, be assured we will eventually add you in there.
  • Do note that in order for us to merge any non-trivial changes (as a rule of thumb, additions larger than about 15 lines of code), we need an explicit public domain dedication on record from you, which you will be asked to agree to on the first commit to a repo within the organization. Note that the agreement applies to all repos in the Ruby RDF organization.

License

This software is released under a public domain waiver (Unlicense).

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].