2023-06-15 11:37:01 +02:00
|
|
|
package eu.dnetlib.openaire.exporter.model.community;
|
2023-06-14 11:14:24 +02:00
|
|
|
|
|
|
|
public enum CommunityClaimType {
|
2023-06-15 11:27:59 +02:00
|
|
|
|
|
|
|
managersOnly("managers-only"),
|
|
|
|
membersOnly("members-only"),
|
|
|
|
all("all");
|
|
|
|
|
|
|
|
private final String description;
|
|
|
|
|
|
|
|
private CommunityClaimType(final String description) {
|
|
|
|
this.description = description;
|
|
|
|
}
|
|
|
|
|
|
|
|
public String getDescription() {
|
|
|
|
return description;
|
|
|
|
}
|
|
|
|
|
|
|
|
public static CommunityClaimType fromDescription(final String dbData) {
|
|
|
|
for (final CommunityClaimType t : CommunityClaimType.values()) {
|
|
|
|
if (t.description.equalsIgnoreCase(dbData)) { return t; }
|
|
|
|
}
|
|
|
|
return null;
|
|
|
|
}
|
|
|
|
|
2023-06-14 11:14:24 +02:00
|
|
|
}
|