No description
Find a file
2017-03-25 22:16:59 +01:00
config core: disable Credo and Dialyzer in mix_test_watch config 2016-11-27 15:01:28 +01:00
lib json_ld: JSON-LD compaction test suite and various compaction fixes 2017-03-25 22:16:59 +01:00
priv/vocabs core: vocabulary namespace rewrite 2017-03-12 14:30:59 +01:00
src core: N-Triples reader 2016-10-30 19:36:46 +01:00
test core: clean up unused vocabulary namespace stuff 2017-03-12 14:34:12 +01:00
.gitignore mix new rdf_core --module RDF.Core 2016-09-30 16:36:50 +02:00
LICENSE.md Add some basic project metadata 2016-09-30 16:51:59 +02:00
mix.exs upgrade dependencies 2017-02-12 18:55:03 +01:00
README.md core: first README content 2016-11-27 15:17:20 +01:00

RDF.ex Core

An implementation of the RDF and the basic accompanied standards for Elixir.

Installation

The Hex package can be installed as usual:

  1. Add rdf_core to your list of dependencies in mix.exs:
```elixir
def deps do
  [{:rdf_core, "~> 0.1.0"}]
end
```
  1. Ensure rdf_core is started before your application:
```elixir
def application do
  [applications: [:rdf_core]]
end
```

Introduction

The RDF standard defines a Graph data model for distributed information on the web. A RDF graph is a set of RDF triples, consistenting of a three nodes:

  1. a subject node with an IRI or a blank node,
  2. a predicate node with the IRI of a RDF property,
  3. an object nodes with an IRI, a blank node or a RDF literal value.

Let's start examining how the different types of nodes - the RDF standards also calls them RDF terms - are represented in Elixir.

Nodes

Literals

URIs

Although the RDF standards speaks of IRIs, an internationalized generalization of URIs, RDF.ex currently supports only URIs. They are represented by Elixirs builtin URI struct.

The RDF module defines a handy generator function RDF.uri

RDF.uri("http://www.example.com/foo")

Besides being shorter than URI.parse, it will provide a gentlier migration, if we decide to switch to a dedicated, more optimized URI-representation for RDF.ex.

Vocabularies

But rather than having to pass a fully qualified URI string to RDF.uri, it allows for something similar to QNames of XML.

Blank nodes

Triples

Graphs and Descriptions

Serializations

Repositories

Getting help

  • Hex
  • Slack

Development

Contributing

see CONTRIBUTING for details.

(c) 2016 Marcel Otto. MIT Licensed, see LICENSE for details.