Skip to main content

Hydra-RDF

hydra-rdf is the translingual RDF support package for Hydra. It is generated into Haskell, Java, Python, and TypeScript from a common set of DSL sources, and depends only on hydra-kernel.

For background on how Hydra relates to RDF and SHACL, see the RDF wiki page.

What it provides

  • RDF 1.1 syntax model — IRIs, literals, blank nodes, triples, graphs, datasets.
  • SHACL syntax model and coder — maps Hydra types to SHACL shapes and Hydra terms to RDF descriptions (the data triples that conform to those shapes).
  • OWL 2 syntax model — full coverage of OWL 2 classes, properties, individuals, and axioms. Syntax only; there is no OWL coder yet.
  • ShEx syntax model.
  • XML Schema syntax model.
  • N-Triples serializer (rdfGraphToNtriples) — the only output format currently supported. Reading (parsing) of any RDF format is not yet supported.
  • Eclipse RDF4j overlay (hydra.overlay.java.rdf.SerdeNative) — a host-native Java integration that serializes Hydra RDF graphs (hydra.rdf.syntax.*) via RDF4j's Rio writers (and supports the reverse). Hand-written, host-specific code: it lives under overlay/java/hydra-rdf/ and is copied onto the generated distribution at assembly time (#511; formerly the separate bindings/java/hydra-rdf4j artifact). Its third-party dependency (org.eclipse.rdf4j:rdf4j-rio-ntriples) is declared in overlay/java/hydra-rdf/build.json.

Demos

Three demos exercise this package end-to-end:

  • demos/shacl — generates SHACL shapes from the Hydra kernel types, encodes kernel modules as N-Triples, and validates the data against the shapes.
  • demos/avro — bidirectional Avro coder; the included AvroWorkflows tool transforms Avro-schema'd JSON data into SHACL RDF.
  • demos/genpg — generates a property graph from relational CSV data and emits it as either GraphSON or RDF/SHACL N-Triples.

N-Triples output

The serializer follows the N-Triples 1.1 specification. Literals preserve all Unicode verbatim and escape only ", \, LF, and CR. IRIs emit any of the spec-disallowed characters (controls and <>"{}|^\) as \uXXXXUCHAR escapes; all other code points pass through. Earlier versions replaced any non-ASCII character with?`; that bug was fixed in #363.

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

hydra_rdf-0.17.3.tar.gz (53.4 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

hydra_rdf-0.17.3-py3-none-any.whl (53.8 kB view details)

Uploaded Python 3

File details

Details for the file hydra_rdf-0.17.3.tar.gz.

File metadata

  • Download URL: hydra_rdf-0.17.3.tar.gz
  • Upload date:
  • Size: 53.4 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.14.4

File hashes

Hashes for hydra_rdf-0.17.3.tar.gz
Algorithm Hash digest
SHA256 6d716e12c9f381447256f32cb30eef3327288d5206e562388bf7a62b6712d24d
MD5 981a05f1f3af079e567b59eaae980c51
BLAKE2b-256 8888e9018aaa9cdd4152afb93d5fa88ae672d96f77063c29e79f78e0d9e49313

See more details on using hashes here.

File details

Details for the file hydra_rdf-0.17.3-py3-none-any.whl.

File metadata

  • Download URL: hydra_rdf-0.17.3-py3-none-any.whl
  • Upload date:
  • Size: 53.8 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.14.4

File hashes

Hashes for hydra_rdf-0.17.3-py3-none-any.whl
Algorithm Hash digest
SHA256 2d6934ca227de0190eeed0a718f86223a8ba45ef5478079eec8ecfd6570f5ad8
MD5 fdd241c95c9bc00a8df578b3fba4bac8
BLAKE2b-256 d2580ccf0e2ad9dab23e581fc66d260b3f0dc1cef3265a0aa78b3132c0bf345c

See more details on using hashes here.

Release history Release notifications | RSS feed

0.17.6

2 files

0.17.5

2 files

0.17.4

2 files

This release

0.17.3 This release

2 files

0.17.2

2 files

0.17.1

2 files

0.17.0

2 files

0.16.1

2 files

0.16.0

2 files

0.15.0

2 files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page