generated from 2martens/template-service
Added bodies and body request and corresponding objects
This commit is contained in:
@ -0,0 +1,134 @@
|
||||
package de.twomartens.oparlservice.entity;
|
||||
|
||||
import com.fasterxml.jackson.annotation.JsonFormat;
|
||||
import io.swagger.v3.oas.annotations.media.Schema;
|
||||
import lombok.*;
|
||||
|
||||
import java.time.ZonedDateTime;
|
||||
import java.util.List;
|
||||
|
||||
@Builder
|
||||
@Getter
|
||||
@ToString
|
||||
@EqualsAndHashCode
|
||||
@AllArgsConstructor(access = AccessLevel.PRIVATE)
|
||||
@NoArgsConstructor(force = true, access = AccessLevel.PRIVATE)
|
||||
public class Body {
|
||||
// common fields
|
||||
@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;
|
||||
|
||||
// bespoke fields
|
||||
@Schema(description = "URL to the system this body belongs to", nullable = true)
|
||||
private final String system;
|
||||
|
||||
@NonNull
|
||||
@Schema(required = true, description = "official long name of the body")
|
||||
private final String name;
|
||||
|
||||
@Schema(description = "short name of the body", nullable = true)
|
||||
private final String shortName;
|
||||
|
||||
@Schema(description = "URL of the website of the body", nullable = true)
|
||||
private final String website;
|
||||
|
||||
@JsonFormat(shape = JsonFormat.Shape.STRING)
|
||||
@Schema(description = "Date and time from which the specified license is valid", nullable = true)
|
||||
private final ZonedDateTime licenseValidSince;
|
||||
|
||||
@JsonFormat(shape = JsonFormat.Shape.STRING)
|
||||
@Schema(description = "Date and time from which OParl API has been offered", nullable = true)
|
||||
private final ZonedDateTime oparlSince;
|
||||
|
||||
@Schema(description = "The eight character long official body identifier", nullable = true)
|
||||
private final String ags;
|
||||
|
||||
@Schema(description = "The 12 character long regional identifier", nullable = true)
|
||||
private final String rgs;
|
||||
|
||||
@Schema(description = "list of additional URLs that represent this body", nullable = true)
|
||||
private final List<String> equivalent;
|
||||
|
||||
@Schema(description = "E-Mail-Address for requests related to the body and the parliamentary information system", nullable = true)
|
||||
private final String contactEmail;
|
||||
|
||||
@Schema(description = "Name of the contact person or office reachable by contactEmail", nullable = true)
|
||||
private final String contactName;
|
||||
|
||||
@NonNull
|
||||
@Schema(required = true, description = "URL to list of organizations in this body")
|
||||
private final String organization;
|
||||
|
||||
@NonNull
|
||||
@Schema(required = true, description = "URL to list of persons in this body")
|
||||
private final String person;
|
||||
|
||||
@NonNull
|
||||
@Schema(required = true, description = "URL to list of meetings in this body")
|
||||
private final String meeting;
|
||||
|
||||
@NonNull
|
||||
@Schema(required = true, description = "URL to list of papers (Drucksachen) in this body")
|
||||
private final String paper;
|
||||
|
||||
@NonNull
|
||||
@Schema(required = true, description = "List of all legislative terms of this body")
|
||||
private final List<LegislativeTerm> legislativeTerm;
|
||||
|
||||
@NonNull
|
||||
@Schema(required = true, description = "URL to list of all agenda items in this body")
|
||||
private final String agendaItem;
|
||||
|
||||
@NonNull
|
||||
@Schema(required = true, description = "URL to list of all consultations in this body")
|
||||
private final String consultation;
|
||||
|
||||
@NonNull
|
||||
@Schema(required = true, description = "URL to list of all files in this body")
|
||||
private final String file;
|
||||
|
||||
@NonNull
|
||||
@Schema(required = true, description = "URL to list of all locations in this body")
|
||||
private final String locationList;
|
||||
|
||||
@NonNull
|
||||
@Schema(required = true, description = "URL to list of all legislative terms in this body")
|
||||
private final String legislativeTermList;
|
||||
|
||||
@NonNull
|
||||
@Schema(required = true, description = "URL to list of all memberships in this body")
|
||||
private final String membership;
|
||||
|
||||
@Schema(description = "physical location of the body", nullable = true)
|
||||
private final Location location;
|
||||
|
||||
@Schema(description = "classification of the body")
|
||||
private final String classification;
|
||||
}
|
||||
@ -0,0 +1,64 @@
|
||||
package de.twomartens.oparlservice.entity;
|
||||
|
||||
import com.fasterxml.jackson.annotation.JsonFormat;
|
||||
import io.swagger.v3.oas.annotations.media.Schema;
|
||||
import lombok.*;
|
||||
|
||||
import javax.swing.*;
|
||||
import java.time.LocalDate;
|
||||
import java.time.ZonedDateTime;
|
||||
|
||||
@Builder
|
||||
@Getter
|
||||
@ToString
|
||||
@EqualsAndHashCode
|
||||
@AllArgsConstructor(access = AccessLevel.PRIVATE)
|
||||
@NoArgsConstructor(force = true, access = AccessLevel.PRIVATE)
|
||||
public class LegislativeTerm {
|
||||
// common fields
|
||||
@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;
|
||||
|
||||
// bespoke fields
|
||||
|
||||
@Schema(description = "URL to body this legislative term belongs to", nullable = true)
|
||||
private final String body;
|
||||
|
||||
@Schema(description = "User friendly name of legislative term", nullable = true)
|
||||
private final String name;
|
||||
|
||||
@JsonFormat(shape = JsonFormat.Shape.STRING, pattern = "yyyy-MM-dd")
|
||||
@Schema(description = "First day of legislative term", nullable = true)
|
||||
private final LocalDate startDate;
|
||||
|
||||
@JsonFormat(shape = JsonFormat.Shape.STRING, pattern = "yyyy-MM-dd")
|
||||
@Schema(description = "Last day of legislative term", nullable = true)
|
||||
private final LocalDate endDate;
|
||||
}
|
||||
@ -0,0 +1,82 @@
|
||||
package de.twomartens.oparlservice.entity;
|
||||
|
||||
import io.swagger.v3.oas.annotations.media.Schema;
|
||||
import lombok.*;
|
||||
|
||||
import java.time.ZonedDateTime;
|
||||
import java.util.List;
|
||||
|
||||
@Builder
|
||||
@Getter
|
||||
@ToString
|
||||
@EqualsAndHashCode
|
||||
@AllArgsConstructor(access = AccessLevel.PRIVATE)
|
||||
@NoArgsConstructor(force = true, access = AccessLevel.PRIVATE)
|
||||
public class Location {
|
||||
// common fields
|
||||
@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
|
||||
@Schema(required = true, description = "Date and time of the creation of the object")
|
||||
private final ZonedDateTime created;
|
||||
|
||||
@NonNull
|
||||
@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;
|
||||
|
||||
// bespoke fields
|
||||
|
||||
@Schema(description = "description of the location", nullable = true)
|
||||
private final String description;
|
||||
|
||||
@Schema(description = "GeoJSON object of the location", nullable = true)
|
||||
private final Object geojson;
|
||||
|
||||
@Schema(description = "street address of the location", nullable = true)
|
||||
private final String streetAddress;
|
||||
|
||||
@Schema(description = "room information of the location", nullable = true)
|
||||
private final String room;
|
||||
|
||||
@Schema(description = "postal code of the location", nullable = true)
|
||||
private final String postalCode;
|
||||
|
||||
@Schema(description = "lower rank locality of the location", nullable = true)
|
||||
private final String subLocality;
|
||||
|
||||
@Schema(description = "locality of the location", nullable = true)
|
||||
private final String locality;
|
||||
|
||||
@Schema(description = "List of URLS to bodies this location is used for", nullable = true)
|
||||
private final List<String> bodies;
|
||||
|
||||
@Schema(description = "List of URLS to organizations this location is used for", nullable = true)
|
||||
private final List<String> organizations;
|
||||
|
||||
@Schema(description = "List of URLS to persons this location is used for", nullable = true)
|
||||
private final List<String> persons;
|
||||
|
||||
@Schema(description = "List of URLS to meetings this location is used for", nullable = true)
|
||||
private final List<String> meetings;
|
||||
|
||||
@Schema(description = "List of URLS to papers this location is used for", nullable = true)
|
||||
private final List<String> papers;
|
||||
}
|
||||
@ -1,5 +1,6 @@
|
||||
package de.twomartens.oparlservice.entity;
|
||||
|
||||
import com.fasterxml.jackson.annotation.JsonFormat;
|
||||
import io.swagger.v3.oas.annotations.media.Schema;
|
||||
import lombok.*;
|
||||
|
||||
@ -23,20 +24,22 @@ public class System {
|
||||
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")
|
||||
@Schema(description = "URL to the license", nullable = true)
|
||||
private String license;
|
||||
|
||||
@Schema(description = "Categorization of the object")
|
||||
@Schema(description = "Categorization of the object", nullable = true)
|
||||
private String keyword;
|
||||
|
||||
@Schema(description = "URL of a website that presents the object in the browser")
|
||||
@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")
|
||||
@ -47,28 +50,28 @@ public class System {
|
||||
@Schema(required = true, description = "URL to the OParl specification supported by this service")
|
||||
private final String oparlVersion;
|
||||
|
||||
@Schema(description = "Contains a list of URLs to System objects supporting another Oparl version")
|
||||
@Schema(description = "Contains a list of URLs to System objects supporting another Oparl version", nullable = true)
|
||||
private final List<String> otherOparlVersions;
|
||||
|
||||
@NonNull
|
||||
@Schema(required = true, description = "URL to the list of all bodies existing in this system")
|
||||
private final String body;
|
||||
|
||||
@Schema(description = "User friendly name for this system")
|
||||
@Schema(description = "User friendly name for this system", nullable = true)
|
||||
private final String name;
|
||||
|
||||
@Schema(description = "E-Mail-Address for requests related to the OParl-API")
|
||||
@Schema(description = "E-Mail-Address for requests related to the OParl-API", nullable = true)
|
||||
private final String contactEmail;
|
||||
|
||||
@Schema(description = "Name of the contact person who can be reached by contactEmail")
|
||||
@Schema(description = "Name of the contact person who can be reached by contactEmail", nullable = true)
|
||||
private final String contactName;
|
||||
|
||||
@Schema(description = "URL of the website of the parliamentary information system")
|
||||
@Schema(description = "URL of the website of the parliamentary information system", nullable = true)
|
||||
private final String website;
|
||||
|
||||
@Schema(description = "URL to the website of the software creator of the OParl server software")
|
||||
@Schema(description = "URL to the website of the software creator of the OParl server software", nullable = true)
|
||||
private final String vendor;
|
||||
|
||||
@Schema(description = "URL to information about the OParl server software utilized by this system")
|
||||
@Schema(description = "URL to information about the OParl server software utilized by this system", nullable = true)
|
||||
private final String product;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user