oparl-service/oparl-server/src/main/java/de/twomartens/oparlservice/entity/Organization.java

98 lines
3.6 KiB
Java

package de.twomartens.oparlservice.entity;
import com.fasterxml.jackson.annotation.JsonFormat;
import com.fasterxml.jackson.annotation.JsonInclude;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.*;
import java.time.LocalDate;
import java.time.ZonedDateTime;
import java.util.List;
@Builder
@Getter
@ToString
@EqualsAndHashCode
@AllArgsConstructor(access = AccessLevel.PRIVATE)
@NoArgsConstructor(force = true, access = AccessLevel.PRIVATE)
@JsonInclude(JsonInclude.Include.NON_NULL)
public class Organization {
@NonNull
@Schema(required = true, description = "The unique identifier of the object")
private final String id;
@NonNull
@Schema(required = true, description = "Namespace URL to the object type schema")
private final String type;
@NonNull
@JsonFormat(shape = JsonFormat.Shape.STRING)
@Schema(required = true, description = "Date and time of the creation of the object")
private final ZonedDateTime created;
@NonNull
@JsonFormat(shape = JsonFormat.Shape.STRING)
@Schema(required = true, description = "Date and time of the last update of the object")
private final ZonedDateTime modified;
@Schema(description = "URL to the license", nullable = true)
private String license;
@Schema(description = "Categorization of the object", nullable = true)
private String keyword;
@Schema(description = "URL of a website that presents the object in the browser", nullable = true)
private String web;
@Schema(description = "True, if the object was deleted")
private final boolean deleted;
@Schema(description = "URL to body this legislative term belongs to", nullable = true)
private final String body;
@Schema(description = "official long name of the organization", nullable = true)
private final String name;
@Schema(description = "short name of the organization", nullable = true)
private final String shortName;
@Schema(description = "List of URLs to memberships", nullable = true)
private final List<String> membership;
@Schema(description = "URL to list of meetings of this organization", nullable = true)
private final String meeting;
@Schema(description = "URL to list of consultations of this organization", nullable = true)
private final String consultation;
@Schema(description = "List of positions available in this organization", nullable = true)
private final List<String> post;
@Schema(description = "URL to a parent organization", nullable = true)
private final String subOrganizationOf;
@Schema(description = "rough categorization of the organization", nullable = true,
allowableValues = "Gremium, Partei, Fraktion, Verwaltungsbereich, externes Gremium, Institution, Sonstiges")
private final String organizationType;
@Schema(description = "type of organization", nullable = true)
private final String classification;
@JsonFormat(shape = JsonFormat.Shape.STRING)
@Schema(description = "founding date of the organization", nullable = true)
private final LocalDate startDate;
@JsonFormat(shape = JsonFormat.Shape.STRING)
@Schema(description = "date of the last day of existance of the organization", nullable = true)
private final LocalDate endDate;
@Schema(description = "URL to the website of the organization", nullable = true)
private final String website;
@Schema(description = "location of the organization", nullable = true)
private final Location location;
@Schema(description = "URL to external OParl body describing this organization", nullable = true)
private final String externalBody;
}