View Javadoc
1   /*
2    * Copyright (c) 2023. Roland T. Lichti, Kaiserpfalz EDV-Service.
3    *
4    * This program is free software: you can redistribute it and/or modify
5    * it under the terms of the GNU General Public License as published by
6    * the Free Software Foundation, either version 3 of the License, or
7    * (at your option) any later version.
8    *
9    * This program is distributed in the hope that it will be useful,
10   * but WITHOUT ANY WARRANTY; without even the implied warranty of
11   * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
12   * GNU General Public License for more details.
13   *
14   * You should have received a copy of the GNU General Public License
15   * along with this program.  If not, see <https://www.gnu.org/licenses/>.
16   */
17  
18  package de.kaiserpfalzedv.services.dnb.model;
19  
20  import java.time.LocalDate;
21  import java.util.ArrayList;
22  import java.util.HashMap;
23  import java.util.HashSet;
24  import java.util.List;
25  import java.util.Map;
26  import java.util.Set;
27  
28  import com.fasterxml.jackson.annotation.JsonInclude;
29  
30  import edu.umd.cs.findbugs.annotations.SuppressFBWarnings;
31  import jakarta.validation.constraints.Size;
32  import lombok.AllArgsConstructor;
33  import lombok.Builder;
34  import lombok.EqualsAndHashCode;
35  import lombok.Getter;
36  import lombok.NoArgsConstructor;
37  import lombok.ToString;
38  import lombok.experimental.SuperBuilder;
39  import lombok.extern.jackson.Jacksonized;
40  
41  /**
42   * <p>Book -- The data set returned by www.ean-search.org</p>
43   *
44   * @author klenkes74 {@literal <rlichti@kaiserpfalz-edv.de>}
45   * @since 3.0.0  2023-01-17
46   */
47  @SuppressFBWarnings(value = {"EI_EXPOSE_REP","EI_EXPOSE_REP2"}, justification = "lombok provided @Getter are created")
48  @Jacksonized
49  @SuperBuilder(toBuilder = true)
50  @AllArgsConstructor
51  @NoArgsConstructor
52  @Getter
53  @ToString(onlyExplicitlyIncluded = true)
54  @EqualsAndHashCode(onlyExplicitlyIncluded = true)
55  @JsonInclude(JsonInclude.Include.NON_ABSENT)
56  public class Book {
57      @ToString.Include
58      private String ean;
59      @ToString.Include
60      @Builder.Default
61      private List<String> isbns = new ArrayList<>();
62  
63      @ToString.Include
64      @Size(max = 1024)
65      private String title;
66      @ToString.Include
67      @Size(max = 1024)
68      private String subTitle;
69      @Size(max = 1024)
70      private String remainderOfTitle;
71  
72      @ToString.Include
73      @Builder.Default
74      private List<String> authors = new ArrayList<>();
75  
76      @ToString.Include
77      private String publisher;
78      private String placeOfPublication;
79      private LocalDate dateOfPublication;
80  
81      @Size(max = 1024)
82      private String physicalDescription;
83      private String termsOfAvailability;
84      @ToString.Include
85      private String series;
86      private String edition;
87      private String formOfProduct;
88      @Builder.Default
89      private List<String> bibliographyNumbers = new ArrayList<>();
90      @Builder.Default
91      private List<String> formKeywords = new ArrayList<>();
92      @Builder.Default
93      private Set<String> deweyDecimalClassifications = new HashSet<>();
94      private Boolean containedInInventory;
95      private String source;
96      @Builder.Default
97      private Map<String, String> inventoryUris = new HashMap<>();
98  }