Skip to content

Implementation Details

Enola Thing (ET 👽)

All ETs have 0.. n properties. Each such Property is identified by an IRI, and has a value. Each such value has a Type. These types include e.g. text (string), numbers, or dates - but also lists, and “nested” sub-properties. There is actually no fixed set of known such types; applications can define their own.

All ET have an IRI. Note that you may see what looks like an exception to this rule with the “nested” ETs, which RDF and LD call “blank nodes”; in Enola we strictly speaking conceptually don’t call those things, just “maps of properties”.

All this is, of course, heavily inspired by TBL’s vision of the ”Semantic Web” of ”Linked Data”, such as also expressed by standards such as RDF or JSON-LD.

ETs have a number of different (but ultimately semantically equivalent) representations, both internally in Enola’s code as well as externally serialized in resources.

Internal Data Types

Java ☕ Thing

  • Java Type: dev.enola.thing.Thing

The Java Thing API is an interface which has several available implementations. The simplest one is the dev.enola.thing.ImmutableThing with its Builder.

Proto Thing

Proto Message

Any Protocol Buffer can be converted to a Thing by Enola.

RDF4j Model

External Serialization Formats

RDF Turtle 🐢

Proto Thing YAML

  • Media Type: text/ (from dev.enola.thing.ThingMediaTypes)
  • Filename extension: .thing.yaml
  • Example: picasso.thing.yaml

Proto Thing Text

  • Media Type: text/protobuf?proto-message=dev.enola.thing.Thing (from dev.enola.thing.ThingMediaTypes)
  • Filename extension: .textproto


graph BT
  ProtoThing[Proto Thing]
  ProtoMessage[Proto Message]
  RDF4jModel(RDF4j Model)
  RDFTurtle["RDF Turtle 🐢"]
  JavaThing("Java ☕ Thing")

  ProtoThing-- "ThingAdapter" -->JavaThing
  JavaThing-- "JavaThingToProtoThingConverter" -->ProtoThing
  ProtoMessage-- "MessageToThingConverter" -->ProtoThing

  JavaThing<-- "ThingConverterInto" -->JavaThing

  RDF4jModel-- "RdfThingConverter" -->ProtoThing
  ProtoThing-- "ThingRdfConverter" -->RDF4jModel
  RDF4jModel-- "RdfWriterConverter" -->RDFTurtle
  RDFTurtle-- "RdfReaderConverterInto" -->RDF4jModel

Store & Repository

TODO Document!