This file provides guidance to Claude Code (claude.ai/code) when working with code in this repository.
AtomGraph Core is a Java framework that bridges Apache Jena (RDF/SPARQL) with JAX-RS (Jakarta REST via Eclipse Jersey). It provides a Linked Data API for SPARQL endpoints and Graph Stores, with support for content negotiation across all standard RDF serialization formats.
# Build as library JAR (default)
mvn clean package
# Build as standalone WAR for Tomcat deployment
mvn clean package -Pstandalone
# Run all tests
mvn clean test
# Run a specific test class
mvn test -Dtest=DirectGraphStoreTest
# Run a specific test method
mvn test -Dtest=DirectGraphStoreTest#testGet
# Generate JavaDoc
mvn javadoc:javadocRequires Java 17.
Service— central interface abstracting a SPARQL 1.1 backend (endpoint + graph store). Two implementations:dataset.ServiceImpl(local in-memory Jena Dataset) andremote.ServiceImpl(HTTP remote endpoint).Application(com.atomgraph.core.Application) — JAX-RSResourceConfigsubclass; extend this to configure your own Linked Data application.MediaTypes— manages all supported MIME types with q-values for content negotiation. Dynamically discovers formats from Jena RIOT at startup.
| Package | Role |
|---|---|
com.atomgraph.core |
Application bootstrap, MediaTypes |
com.atomgraph.core.model |
Service, EndpointAccessor, DatasetAccessor interfaces and impl/ sub-packages (dataset.* for local, remote.* for HTTP) |
com.atomgraph.core.client |
SPARQLClient, GraphStoreClient, QuadStoreClient — HTTP clients for remote SPARQL/Graph Store endpoints |
com.atomgraph.core.io |
JAX-RS MessageBodyReader/Writer providers for RDF Model, Dataset, ResultSet, Query, UpdateRequest |
com.atomgraph.core.server |
Dispatcher routes incoming requests to resource implementations |
com.atomgraph.core.riot |
Custom Jena RIOT language registration (RDF/POST) |
com.atomgraph.core.vocabulary |
Jena OntModels for the AtomGraph (A) and SPARQL Service Description (SD) vocabularies |
com.atomgraph.core.mapper |
JAX-RS ExceptionMappers that translate Jena/HTTP exceptions to appropriate HTTP responses |
- Servlet container → Jersey
Dispatcher(server/Dispatcher.java) Dispatcherresolves the request URI to aGraphStoreorSPARQLEndpointresource- Resource delegates to an
EndpointAccessororDatasetAccessor(local dataset or remote HTTP client) - JAX-RS
MessageBodyWriterinio/serializes the JenaModel/Dataset/ResultSetusing the negotiated content type
Tests extend Jersey's JerseyTest (embedded Grizzly2 server). Each test class sets up an in-memory DatasetFactory.createTxnMem(), wires up a minimal JAX-RS application, and exercises HTTP CRUD operations, validating RDF graph isomorphism and HTTP status codes.