Metreeca REST/JSON Framework

A lightweight Java framework enabling rapid development of model-driven REST/JSON APIs.

License

License

GroupId

GroupId

com.metreeca
ArtifactId

ArtifactId

metreeca-link
Last Version

Last Version

0.55.0
Release Date

Release Date

Type

Type

jar
Description

Description

Metreeca REST/JSON Framework
A lightweight Java framework enabling rapid development of model-driven REST/JSON APIs.
Project URL

Project URL

https://github.com/metreeca/link
Project Organization

Project Organization

Metreeca
Source Code Management

Source Code Management

https://github.com/metreeca/link

Download metreeca-link

How to add to project

<!-- https://jarcasting.com/artifacts/com.metreeca/metreeca-link/ -->
<dependency>
    <groupId>com.metreeca</groupId>
    <artifactId>metreeca-link</artifactId>
    <version>0.55.0</version>
</dependency>
// https://jarcasting.com/artifacts/com.metreeca/metreeca-link/
implementation 'com.metreeca:metreeca-link:0.55.0'
// https://jarcasting.com/artifacts/com.metreeca/metreeca-link/
implementation ("com.metreeca:metreeca-link:0.55.0")
'com.metreeca:metreeca-link:jar:0.55.0'
<dependency org="com.metreeca" name="metreeca-link" rev="0.55.0">
  <artifact name="metreeca-link" type="jar" />
</dependency>
@Grapes(
@Grab(group='com.metreeca', module='metreeca-link', version='0.55.0')
)
libraryDependencies += "com.metreeca" % "metreeca-link" % "0.55.0"
[com.metreeca/metreeca-link "0.55.0"]

Dependencies

test (3)

Group / Artifact Type Version
org.junit.jupiter : junit-jupiter-engine jar 5.7.1
org.assertj : assertj-core jar 3.19.0
org.slf4j : slf4j-jdk14 jar

Project Modules

  • metreeca-json
  • metreeca-rest
  • metreeca-mime
  • metreeca-head
  • metreeca-back
  • metreeca-toys

Maven Central

Metreeca/Link

Metreeca/Link is a model-driven Java framework for rapid REST/JSON-LD backend development.

Its engine automatically converts high-level declarative JSON-LD models into extended REST APIs supporting CRUD operations, faceted search, data validation and fine‑grained role‑based access control, relieving backend developers from low-level chores and completely shielding frontend developers from linked data technicalities.

Metreeca/Link is server and storage-agnostic and may be easily connected to your solution of choice.

Getting Started

  1. Add the framework to your Maven configuration
<project>

    <dependencyManagement>
        <dependencies>

            <dependency>
                <groupId>com.metreeca</groupId>
                <artifactId>metreeca-link</artifactId>
                <version>${link.version}</version>
                <type>pom</type>
                <scope>import</scope>
            </dependency>

        </dependencies>
    </dependencyManagement>

    <dependencies>

        <dependency> <!-- server connector -->
            <groupId>com.metreeca</groupId>
            <artifactId>metreeca-jse</artifactId>
        </dependency>

        <dependency> <!-- storage connector -->
            <groupId>com.metreeca</groupId>
            <artifactId>metreeca-rdf4j</artifactId>
        </dependency>

    </dependencies>

</project>
  1. Write your first server and launch it
import com.metreeca.jse.JSEServer;

import static com.metreeca.rest.Response.OK;
import static com.metreeca.rest.formats.TextFormat.text;

public final class Hello {

  public static void main(final String... args) {
    new JSEServer()

        .delegate(context -> request ->
            request.reply(response -> response
                .status(OK)
                .body(text(), "Hello world!")
            )
        )

        .start();
  }

}
  1. Access you API
% curl -i http://localhost:8080/

HTTP/1.1 200 OK
Content-Type: text/plain
Content-Length: 12

Hello world!
  1. Delve into the the docs to learn how to publish and consume your data as model-driven REST/JSON‑LD APIs…

Modules

area javadocs description
core metreeca‑json shape-based JSON modelling framework
metreeca‑rest model-driven REST publishing framework
data metreeca‑xml XML/HTML codecs and utilities
metreeca‑rdf RDF codecs and utilities
server metreeca‑jse Jave SE HTTP server connector
metreeca‑jee Servlet 3.1 containers connector
storage metreeca‑rdf4j RDF4J-based SPARQL repository connector

Support

  • open an issue to report a problem or to suggest a new feature
  • start a conversation to ask a how-to question or to share an open-ended idea

License

This project is licensed under the Apache 2.0 License – see LICENSE file for details.

com.metreeca

Metreeca

We are knowledge graph specialists

Versions

Version
0.55.0
0.54.1
0.54.0
0.53.0
0.52.0
0.0.1