Eclipse RDF4J Documentation

repository·main·Indexed 19 days ago

https://github.com/eclipse-rdf4j/rdf4j

A comprehensive framework for working with RDF (Resource Description Framework) data, providing a standalone Server/Workbench and Java libraries for programmatic integration. Documentation covers building from source with Maven, deploying via Docker, configuring SPARQL endpoints in Spring Boot, regenerating the SPARQL AST using JavaCC, and running end-to-end tests with Playwright.

Tokens
109.4K
Snippets
295
Records
472
Agent score
64%

What's inside Eclipse RDF4J

  1. Overview of the Eclipse RDF4J Framework

    main

    Eclipse RDF4J is a modular Java framework designed for working with RDF (Resource Description Framework) data. It provides a vendor-neutral API for parsing, storing, inferencing, and querying RDF and OWL data.

    Key capabilities include:

    • SPARQL Support: Full support for SPARQL 1.1 query and update languages.
    • Format Support: Support for mainstream RDF formats including RDF/XML, Turtle, N-Triples, N-Quads, JSON-LD, TriG, and TriX.
    • Connectivity: Transparent access to both local storage and remote SPARQL endpoints using the same API.
    • Extensibility: A modular architecture that allows connecting to various storage solutions and adding functional extensions like full-text search, RDFS inferencing, and SHACL/SPIN validation.
  2. New features in RDF4J 6.0.0

    main

    RDF4J 6.0.0 introduces significant updates to RDF and SPARQL standards, as well as core infrastructure:

    RDF & SPARQL

    • RDF 1.2 Support: Includes triple terms, literals with base direction, version announcements, and updated parsers, writers, protocols, and stores.
    • SPARQL 1.2 Support: Includes updated grammar and evaluation.
    • SPARQL Joins: Support for LATERAL joins.

    Infrastructure & Dependencies

    • Java Baseline: Java 25.
    • Jakarta & Frameworks: Upgrades to Jakarta Servlet, Spring 7, Jetty 12, Tomcat 11, Lucene 10, Elasticsearch 9, and Jackson 3.
    • HTTP API: A client-neutral HTTP API supporting Apache HttpComponents 5 and JDK backends. It supports gzip, deflate, Brotli, and Zstandard compression.

    Storage & Querying

    • LMDB Improvements: Value-ID, data loading, reader-recovery, and cardinality-estimation improvements.
    • Federation: Grouped FedX source selection.
    • Query Safety: Query circuit breakers, slow-query logging, and hardened XML processing.
  3. New features in RDF4J 3.1.0

    main

    The 3.1.0 release introduced several key improvements for developers:

    • Federated Querying: Integrated support for sophisticated federated querying via FedX.
    • ElasticSearchStore: A new experimental storage backend for RDF data.
    • Improved Iteration: QueryResult and RepositoryResult objects now implement Java Iterable, allowing for simpler client-side iteration.
    • Context Stripping Helpers: New helper functions are available to strip context/named graph information from Statement and Model objects.
  4. Key improvements in RDF4J 4.0.0 Milestone 1

    main

    The 4.0.0 Milestone 1 release includes several performance and usability enhancements:

    • SparqlBuilder: Improvements to the API for building SPARQL queries.
    • SPARQL Engine: Performance improvements in the query engine.
    • SHACL Engine: Performance improvements in the SHACL engine.
    • Spring Integration: Improved support for using RDF4J within Spring and Spring Boot applications.
  5. New features in RDF4J 5.3.0

    main

    RDF4J 5.3.0 introduces several key improvements for query observability, deployment, and performance:

    • Query Observability: Enhanced EXPLAIN support featuring runtime telemetry and a new 'compare mode' in the Workbench.
    • Deployment: A new standalone rdf4j-server-boot distribution is available for deploying the Server and Workbench.
    • Performance: Optimized workloads involving LMDB, Lucene, and DISTINCT-heavy SPARQL queries.
    • Data Export: Direct export of SPARQL results to .xlsx and .ods formats.
    • Developer APIs:
      • An experimental query renderer.
      • A new fluent ShaclValidator API for SHACL validation tasks.
  6. Key features in RDF4J 2.5.0

    main

    RDF4J 2.5.0 introduced several major improvements to the core library and its tooling:

    • SHACL Support: Streamlined initialization and an extended range of supported SHACL features.
    • RDF4J Console: New commands added to show and edit namespaces.
    • RDFS Inferencing: The old RDFS inferencer was replaced with a new, faster Schema-caching RDFS inferencer.
    • SparqlBuilder: Various improvements and bug fixes to the SPARQL query construction API.
  7. New features in RDF4J 5.0.0

    main

    RDF4J 5.0.0 introduces several major updates and improvements to the framework:

    • JSON-LD 1.1 support: Enhanced support for the JSON-LD 1.1 specification.
    • FedX Improvements: Various enhancements to the FedX federated query engine.
    • SHACL Validation: Improved SHACL validation capabilities, including support for sh:closed and pairwise validation.
    • LmdbStore: Stability and performance improvements for the LmdbStore storage engine.
    • MapDB Upgrade: Upgraded MapDB, which allows queries with intermediary results to be limited by available disk space rather than being constrained by RAM or Java heap.
  8. New features in RDF4J 4.0.0 Milestone 3

    main

    RDF4J 4.0.0 Milestone 3 introduces several key improvements and features:

    • BCP47 Language Tags: Improved normalization of BCP47 language tags.
    • Lucene Full-Text Search: Added support for type/language-based filtering.
    • Concurrency: Support for concurrent reads on a single connection.
    • SHACL Support: Ability to store SHACL Shapes in user-specified graphs.
    • Performance: Various performance improvements across Native, LMDB, and Memory stores.
  9. What is RDF and how does it model data?

    main

    The Resource Description Framework (RDF) is a standard for expressing information about resources in a machine-processable way. RDF models data as a graph consisting of statements (also called triples).

    Each statement consists of three parts:

    • Subject: The starting node, representing the resource the fact is about.
    • Predicate: The property (edge) that denotes the relation between the subject and the object.
    • Object: The end node, representing the value of the property (which can be another resource or a literal).

    Resources are globally identified using IRIs (Internationalized Resource Identifiers). Values that are simple strings of characters rather than resource identifiers are called literals.

  10. What is FedX federation?

    main
    FedX provides transparent federation of multiple SPARQL endpoints under a single virtual endpoint. Instead of using explicit SERVICE clauses in SPARQL queries to address specific endpoints, FedX automatically selects relevant sources, sends statement patterns to them for evaluation, and joins the results. It integrates into RDF4J via the Repository API and can be used as a drop-in component in applications or the RDF4J Workbench.
  11. What is a Codex Execution Plan (ExecPlan)?

    main

    An ExecPlan is a self-contained design document used to guide a coding agent (or a novice developer) through the implementation of a feature or system change.

    Key characteristics of a valid ExecPlan include:

    • Self-containment: It must contain all necessary knowledge, context, and instructions so that a user with only the current working tree and the plan can succeed without external documentation or prior repository knowledge.
    • Living Document: It must be updated continuously to reflect progress, design decisions, and new discoveries.
    • Outcome-Oriented: It focuses on producing demonstrably working behavior (e.g., observable terminal output, HTTP responses, or passing tests) rather than just code changes.
    • Plain Language: All technical terms or jargon must be defined in plain language within the plan itself.
  12. Manage SHACL transaction isolation and locking

    main

    When running parallel transactions, concurrent writes can lead to validation failures that wouldn't occur in isolation.

    To mitigate this, ShaclSail uses locking when the isolation level is set to SNAPSHOT. This runs transactions sequentially and is typically 2-4x faster than using SERIALIZABLE isolation. Locking only affects transactions writing to the ShaclSail and is applied during commit().

    You can disable this specific type of validation using setSerializableValidation(false).