View Javadoc
1   package de.kaiserpfalzedv.services.dnb.marcxml.model;
2   
3   import java.util.List;
4   
5   import com.fasterxml.jackson.annotation.JsonInclude;
6   import com.fasterxml.jackson.dataformat.xml.annotation.JacksonXmlElementWrapper;
7   import com.fasterxml.jackson.dataformat.xml.annotation.JacksonXmlProperty;
8   
9   import edu.umd.cs.findbugs.annotations.SuppressFBWarnings;
10  import jakarta.xml.bind.annotation.XmlAccessType;
11  import jakarta.xml.bind.annotation.XmlAccessorType;
12  import jakarta.xml.bind.annotation.XmlAttribute;
13  import jakarta.xml.bind.annotation.XmlElement;
14  import jakarta.xml.bind.annotation.XmlType;
15  import lombok.AllArgsConstructor;
16  import lombok.EqualsAndHashCode;
17  import lombok.Getter;
18  import lombok.NoArgsConstructor;
19  import lombok.ToString;
20  import lombok.experimental.SuperBuilder;
21  import lombok.extern.jackson.Jacksonized;
22  
23  /**
24   * <p>Marc21Record -- .</p>
25   *
26   * @author rlichti {@literal <rlichti@kaiserpfalz-edv.de>}
27   * @since 1.0.0  2023-01-27
28   */
29  @SuppressFBWarnings(value = {"EI_EXPOSE_REP","EI_EXPOSE_REP2"}, justification = "lombok provided @Getter are created")
30  @Jacksonized
31  @SuperBuilder(toBuilder = true)
32  @AllArgsConstructor
33  @NoArgsConstructor
34  @Getter
35  @ToString
36  @EqualsAndHashCode(onlyExplicitlyIncluded = true)
37  @JsonInclude(JsonInclude.Include.NON_ABSENT)
38  @XmlType(namespace = "http://www.loc.gov/MARC21/slim")
39  @XmlAccessorType(XmlAccessType.FIELD)
40  public class Marc21Record {
41      @XmlAttribute
42      private String type;
43      @XmlElement
44      private String leader;
45      @JacksonXmlProperty(localName = "controlfield")
46      @JacksonXmlElementWrapper(useWrapping = false)
47      @XmlElement(name = "controlfield")
48      private List<ControlField> controlfields;
49  
50      @JacksonXmlProperty(localName = "datafield")
51      @JacksonXmlElementWrapper(useWrapping = false)
52      @XmlElement(name = "datafield")
53      private List<DataField> datafields;
54  }