argos/dmp-backend/core/src/main/java/eu/eudat/commons/enums/ReferenceType.java

40 lines
872 B
Java
Raw Normal View History

2023-10-19 16:56:53 +02:00
package eu.eudat.commons.enums;
2023-10-23 14:58:33 +02:00
import com.fasterxml.jackson.annotation.JsonValue;
2023-10-20 18:13:57 +02:00
import eu.eudat.data.converters.enums.DatabaseEnum;
2023-10-19 16:56:53 +02:00
import java.util.Map;
2023-10-26 13:38:18 +02:00
public enum ReferenceType implements DatabaseEnum<Short> {
2023-10-19 16:56:53 +02:00
Taxonomies((short) 0),
Licenses((short) 1),
Publications((short) 2),
Journals((short) 3),
PubRepositories((short) 4),
DataRepositories((short) 5),
Registries((short) 6),
Services((short) 7),
Project((short) 8),
2023-10-20 18:13:57 +02:00
Funder((short) 9),
Datasets((short) 10),
Organizations((short) 11),
Grants((short) 12),
Researcher((short) 13);
2023-10-19 16:56:53 +02:00
private final Short value;
2023-10-26 13:38:18 +02:00
ReferenceType(Short value) {
2023-10-19 16:56:53 +02:00
this.value = value;
}
2023-10-23 14:58:33 +02:00
@JsonValue
2023-10-19 16:56:53 +02:00
public Short getValue() {
return value;
}
2023-10-26 13:38:18 +02:00
private static final Map<Short, ReferenceType> map = EnumUtils.getEnumValueMap(ReferenceType.class);
2023-10-19 16:56:53 +02:00
2023-10-26 13:38:18 +02:00
public static ReferenceType of(Short i) {
2023-10-19 16:56:53 +02:00
return map.get(i);
}
}