DigitalCollections: Model (Feign)

Java library containing Domain Object classes of the Digital Collection's and Digital Humanities ecosystem.

License

License

Categories

Categories

Feign Net HTTP Clients
GroupId

GroupId

de.digitalcollections.model
ArtifactId

ArtifactId

dc-model-feign
Last Version

Last Version

8.2.1
Release Date

Release Date

Type

Type

jar
Description

Description

DigitalCollections: Model (Feign)
Java library containing Domain Object classes of the Digital Collection's and Digital Humanities ecosystem.

Download dc-model-feign

How to add to project

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

Dependencies

compile (2)

Group / Artifact Type Version
de.digitalcollections.model : dc-model jar 8.2.1
io.github.openfeign : feign-core jar 11.0

Project Modules

There are no modules declared in this project.

Digitalcollections Model

Javadocs Build Status Codecov License GitHub release Maven Central

Java library containing Domain Object classes of the Digital Collection's and Digital Humanities ecosystem. Primarily started from the needs for GLAMs (Galleries, Libraries, Archives, Museums) but not restricted to it.

Business Domain Model

The domain model follows the FRBR (Functional Requirements for Bibliographic Records). The model is not restricted to books but can handle all sort of creative works and their digital counterparts ("digital objects").

One core statement (taken from Music Cataloging at Yale) is:

"A work is realized by an expression, which is embodied in a manifestation, which is exemplified by an item."

And the central object of interest of digital collections is the DigitalObject as the digital representation of an item and curated Collections as group of digital objects.

Class Diagram

  • For presenting digital collections online the library offers Website and Webpage classes.
  • For arranging and describing digital objects by topics the library offers Topic and Subtopic classes.
  • For editorial contribution in the context of digital collections the library offers Article with rich text formatting and embedding of different media.

The following classes can be assigned to objects (where appropriate):

  • a freely definable License
  • a list of freely definable Identifiers, each of them identifying the object uniquely in an external source system, e.g. GND-ID ("gnd:104330171") or VIAF-ID ("viaf:96994450").

Technical Model Classes

This library supports practical handling of above domain model by adding paging, filtering and sorting classes.

Filtering-Model

Model for passing technology independent filter criterias from frontend to backend via URL-params. Backend has to take care about implementing technology dependent filtering for given criterias.

Example usage (use case: return only webpages with active publication time range):

  public PageResponse<Webpage> findAll(
      @RequestParam(name = "pageNumber", required = false, defaultValue = "0") int pageNumber,
      @RequestParam(name = "pageSize", required = false, defaultValue = "5") int pageSize,
      @RequestParam(name = "sortField", required = false, defaultValue = "uuid") String sortField,
      @RequestParam(name = "sortDirection", required = false, defaultValue = "ASC") Direction sortDirection,
      @RequestParam(name = "nullHandling", required = false, defaultValue = "NATIVE") NullHandling nullHandling
  ) {
    OrderImpl order = new OrderImpl(sortDirection, sortField, nullHandling);
    Sorting sorting = new SortingImpl(order);

    LocalDate now = LocalDate.now();
    Filtering filtering = Filtering.defaultBuilder()
            .filter("publicationStart").lessOrEqual(now)
            .filter("publicationEnd").greaterOrEqual(now)
            .build();

    PageRequest pageRequest = new PageRequestImpl(pageNumber, pageSize, sorting, filtering);
  ...

Supported filter operations:

Mapping operation abbreviation to filter operation
Symbol Operation Example filter query param
eq Equals city=eq:Munich
neq Not Equals country=neq:de
gt Greater Than amount=gt:10000
gte Greater Than or equals to amount=gte:10000
lt Less Than amount=lt:10000
lte Less Than or equals to amount=lte:10000
in IN country=in:uk, usa, au
nin Not IN country=nin:fr, de, nz
btn Between (inclusive) joiningDate=btn:2018-01-01, 2016-01-01
like Like firstName=like:John
set value exists (not null) firstName=set:
notset value is not set (null) firstName=notset:

REST-API design for filtering was inspired by:

Model-Serializing

Comes with a separate module for supporting serializing model objects to JSON (dc-model-jackson module) using Jackson

Systems implementing this library

de.digitalcollections.model

Open Source at the Bayerische Staatsbibliothek

...from the MDZ Digital Library team at the Bavarian State Library

Versions

Version
8.2.1
8.2.0
8.1.0
8.0.0
7.0.0
6.2.1
6.2.0
6.1.1
6.1.0