added static methods for getting types for grsf stocks and fisheries

git-svn-id: https://svn.d4science.research-infrastructures.eu/gcube/trunk/data-catalogue/grsf-common-library@164584 82a268e6-3cf1-43bd-a215-b396298e98cf
This commit is contained in:
Costantino Perciante 2018-02-26 18:01:05 +00:00
parent 85333c5c6e
commit 1416baa4eb
2 changed files with 20 additions and 0 deletions

View File

@ -1,5 +1,8 @@
package org.gcube.datacatalogue.common.enums;
import java.util.ArrayList;
import java.util.List;
import com.fasterxml.jackson.annotation.JsonCreator;
import com.fasterxml.jackson.annotation.JsonValue;
@ -59,4 +62,11 @@ public enum Fishery_Type {
public String toString() {
return getOrigName();
}
public static List<String> getTypesAsListString(){
List<String> toReturn = new ArrayList<String>(Stock_Type.values().length);
for(Fishery_Type type : Fishery_Type.values())
toReturn.add(type.getOrigName());
return toReturn;
}
}

View File

@ -1,5 +1,8 @@
package org.gcube.datacatalogue.common.enums;
import java.util.ArrayList;
import java.util.List;
import com.fasterxml.jackson.annotation.JsonCreator;
import com.fasterxml.jackson.annotation.JsonValue;
@ -59,5 +62,12 @@ public enum Stock_Type {
public String toString() {
return getOrigName();
}
public static List<String> getTypesAsListString(){
List<String> toReturn = new ArrayList<String>(Stock_Type.values().length);
for(Stock_Type type : Stock_Type.values())
toReturn.add(type.getOrigName());
return toReturn;
}
}