Browse Source

Added OrganizationType to symbolize limited options

master
Jim Martens 10 months ago
parent
commit
75ad80e760
  1. 2
      oparl-server/src/main/java/de/twomartens/oparlservice/entity/Organization.java
  2. 21
      oparl-server/src/main/java/de/twomartens/oparlservice/entity/OrganizationType.java

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

@ -73,7 +73,7 @@ public class Organization {
@Schema(description = "rough categorization of the organization", nullable = true,
allowableValues = "Gremium, Partei, Fraktion, Verwaltungsbereich, externes Gremium, Institution, Sonstiges")
private final String organizationType;
private final OrganizationType organizationType;
@Schema(description = "type of organization", nullable = true)
private final String classification;

21
oparl-server/src/main/java/de/twomartens/oparlservice/entity/OrganizationType.java

@ -0,0 +1,21 @@
package de.twomartens.oparlservice.entity;
import com.fasterxml.jackson.annotation.JsonValue;
import lombok.Getter;
import lombok.RequiredArgsConstructor;
import lombok.ToString;
@RequiredArgsConstructor
@Getter(onMethod_={@JsonValue})
@ToString
public enum OrganizationType {
BODY("Gremium"),
PARTY("Partei"),
FACTION("Fraktion"),
ADMINISTRATIVE_AREA("Verwaltungsbereich"),
EXTERNAL_BODY("externes Gremium"),
INSTITUTION("Institution"),
OTHER("Sonstiges");
private final String value;
}
Loading…
Cancel
Save