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 CommunityMembershipType {
|
|
|
|
|
2023-06-15 11:27:59 +02:00
|
|
|
open("open"),
|
|
|
|
byInvitation("by-invitation");
|
2023-06-14 11:14:24 +02:00
|
|
|
|
2023-06-15 11:27:59 +02:00
|
|
|
private final String description;
|
|
|
|
|
|
|
|
private CommunityMembershipType(final String description) {
|
|
|
|
this.description = description;
|
|
|
|
}
|
|
|
|
|
|
|
|
public String getDescription() {
|
|
|
|
return description;
|
|
|
|
}
|
|
|
|
|
|
|
|
public static CommunityMembershipType fromDescription(final String dbData) {
|
|
|
|
for (final CommunityMembershipType t : CommunityMembershipType.values()) {
|
|
|
|
if (t.description.equalsIgnoreCase(dbData)) { return t; }
|
|
|
|
}
|
|
|
|
return null;
|
|
|
|
}
|
2023-06-14 11:14:24 +02:00
|
|
|
}
|