minor
This commit is contained in:
parent
50d4db8b04
commit
59b942b2a8
|
@ -1,8 +1,6 @@
|
||||||
|
|
||||||
package eu.dnetlib.dhp.schema.common;
|
package eu.dnetlib.dhp.schema.common;
|
||||||
|
|
||||||
import eu.dnetlib.dhp.schema.oaf.OafEntity;
|
|
||||||
|
|
||||||
/** Actual entity types in the Graph */
|
/** Actual entity types in the Graph */
|
||||||
public enum EntityType {
|
public enum EntityType {
|
||||||
publication, dataset, otherresearchproduct, software, datasource, organization, project, person;
|
publication, dataset, otherresearchproduct, software, datasource, organization, project, person;
|
||||||
|
@ -14,7 +12,7 @@ public enum EntityType {
|
||||||
* @param <T> actual OafEntity subclass
|
* @param <T> actual OafEntity subclass
|
||||||
* @return the EntityType associated to the given class
|
* @return the EntityType associated to the given class
|
||||||
*/
|
*/
|
||||||
public static <T extends Object> EntityType fromClass(Class<T> clazz) {
|
public static <T> EntityType fromClass(Class<T> clazz) {
|
||||||
|
|
||||||
return EntityType.valueOf(clazz.getSimpleName().toLowerCase());
|
return EntityType.valueOf(clazz.getSimpleName().toLowerCase());
|
||||||
}
|
}
|
||||||
|
|
|
@ -212,7 +212,7 @@ public class ModelSupport {
|
||||||
private ModelSupport() {
|
private ModelSupport() {
|
||||||
}
|
}
|
||||||
|
|
||||||
public static <E extends Object> String getIdPrefix(Class<E> clazz) {
|
public static <E> String getIdPrefix(Class<E> clazz) {
|
||||||
return idPrefixMap.get(clazz);
|
return idPrefixMap.get(clazz);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue