Skip to main content

Documentation Index

Fetch the complete documentation index at: https://docs.law4devs.eu/llms.txt

Use this file to discover all available pages before exploring further.

Overview

Frameworks represent EU regulations such as GDPR, CRA, NIS2, and the AI Act. Use client.frameworks() to list and fetch them.

Methods

list()

Returns a page of all available frameworks.
Page<Framework> page = client.frameworks().list();

System.out.printf("Found %d frameworks%n", page.meta().total());
for (Framework fw : page.data()) {
    System.out.printf("  %-12s %s%n", fw.slug(), fw.name());
}
Returns Page<Framework>

list(int page, int perPage)

Fetch a specific page with custom page size.
Page<Framework> page = client.frameworks().list(1, 5);
Parameters
ParameterTypeDefaultDescription
pageint1Page number (1-indexed)
perPageint20Items per page (max 100)
Returns Page<Framework>

get()

Fetch full detail for a single framework by slug.
FrameworkDetail cra = client.frameworks().get("cra");

System.out.println(cra.name());          // Cyber Resilience Act
System.out.println(cra.celexNumber());   // 32024R2847
System.out.println(cra.articleCount()); // number of synced articles
Parameters
ParameterTypeDescription
slugStringFramework slug, e.g. "gdpr"
Returns FrameworkDetail

iter()

Lazily iterate all frameworks across all pages.
for (Framework fw : client.frameworks().iter()) {
    System.out.println(fw.slug() + ": " + fw.name());
}
Returns Iterable<Framework>

Models

Framework

Returned by list() and iter().
FieldTypeDescription
id()intInternal numeric ID
slug()StringURL-safe identifier, e.g. "cra"
name()StringFull framework name
shortName()StringShort name, e.g. "CRA"
celexNumber()StringEUR-Lex CELEX identifier
description()StringBrief description
isActive()booleanWhether data is actively maintained
status()String"active", "draft", or "superseded"
articleCount()intNumber of synced articles
recitalCount()intNumber of synced recitals
createdAt()StringISO 8601 creation timestamp

FrameworkDetail

Returned by get(). Includes all Framework fields plus:
FieldTypeDescription
eurLexUrl()StringLink to the official EUR-Lex page
requirementCount()intNumber of extracted requirements
annexCount()intNumber of annexes
tagCount()intNumber of associated tags

Examples

List all active frameworks

for (Framework fw : client.frameworks().iter()) {
    if (fw.isActive()) {
        System.out.printf("%-12s %s (%d articles)%n",
            fw.slug(), fw.name(), fw.articleCount());
    }
}

Build a framework lookup map

var map = new java.util.LinkedHashMap<String, Framework>();
for (Framework fw : client.frameworks().iter()) {
    map.put(fw.slug(), fw);
}

Framework gdpr = map.get("gdpr");
System.out.println(gdpr.name()); // General Data Protection Regulation

Print frameworks with full article coverage

var page = client.frameworks().list();
for (Framework fw : page.data()) {
    if (fw.expectedArticles() > 0 && fw.articleCount() >= fw.expectedArticles()) {
        System.out.println(fw.name() + " — fully synced");
    }
}