Heuristic:AKSW RDFUnit LOV Cache Fallback
| Knowledge Sources | |
|---|---|
| Domains | Schema_Discovery, Resilience, Semantic_Web |
| Last Updated | 2026-10-16 00:00 GMT |
Overview
When the LOV (Linked Open Vocabularies) endpoint is unavailable, RDFUnit falls back to a bundled `schemaLOV.csv` resource file containing pre-fetched vocabulary definitions.
Description
RDFUnit uses the LOV service at `lov.linkeddata.es` to discover vocabulary definitions for schema prefix resolution and auto-discovery. However, network access to LOV may be unavailable (offline environments, rate limits, service downtime). To ensure schema discovery works in all conditions, RDFUnit bundles a cached copy of LOV entries as a CSV resource file at `org/aksw/rdfunit/configuration/schemaLOV.csv` within the `rdfunit-model` module.
The loading sequence is: first, standard vocabularies are loaded from bundled RDF files; then manual schema declarations (`schemaDecl.csv`) are loaded to override or supplement; finally, the cached LOV entries (`schemaLOV.csv`) are loaded. If the LOV endpoint is reachable at runtime (e.g., via `LOVEndpoint.main()`), a fresh `schemaLOV.csv` can be regenerated and committed.
Usage
Use this heuristic when operating RDFUnit offline or when the LOV endpoint is unreachable. The bundled `schemaLOV.csv` is always loaded as a fallback. To refresh the cache, run `LOVEndpoint.main()` with an output file argument and commit the updated CSV.
The Insight (Rule of Thumb)
- Action: No action needed for fallback—it loads automatically. To refresh, run `LOVEndpoint` main class.
- Value: Bundled CSV at `org/aksw/rdfunit/configuration/schemaLOV.csv`; manual overrides at `schemaDecl.csv`.
- Trade-off: Bundled cache may be stale; LOV vocabulary definitions may have changed since the last cache generation.
- Compatibility: The `schemaDecl.csv` (manual) overrides take precedence over `schemaLOV.csv` (cached LOV) entries.
Reasoning
Network dependencies are a reliability risk for validation tools. By bundling a pre-fetched LOV cache, RDFUnit ensures schema auto-discovery works even in air-gapped environments. The layered loading approach (standard vocabularies → manual schemaDecl → cached LOV) ensures that manual overrides always take precedence and that the most critical vocabulary definitions are available without any network access.
Code Evidence
LOV cache loading from `RDFUnitUtils.java:152-156`:
public static void fillSchemaServiceFromLOV() throws IOException {
log.info("Loading cached schema entries from LOV!");
RDFUnitUtils.fillSchemaServiceFromResource("org/aksw/rdfunit/configuration/schemaLOV.csv");
}
Manual override loading from `RDFUnitUtils.java:147-150`:
public static void fillSchemaServiceFromSchemaDecl() throws IOException {
log.info("Adding manual schema entries (or overriding LOV)!");
RDFUnitUtils.fillSchemaServiceFromResource("org/aksw/rdfunit/configuration/schemaDecl.csv");
}
LOV endpoint URI from `LOVEndpoint.java:85`:
private static final String LOV_ENDPOINT_URI = "https://lov.linkeddata.es/dataset/lov/sparql";