minor fix
git-svn-id: https://svn.d4science.research-infrastructures.eu/gcube/trunk/data-catalogue/grsf-publisher-ws@135150 82a268e6-3cf1-43bd-a215-b396298e98cf
This commit is contained in:
parent
35a7c82586
commit
d0f7e7a960
|
@ -180,7 +180,7 @@ public abstract class HelperMethods {
|
|||
|
||||
// extract the name from the enum class and add it to the groups
|
||||
// also convert to the group name that should be on ckan
|
||||
String groupName = getGroupNameOnCkan(field.getClass().getName());
|
||||
String groupName = getGroupNameOnCkan(field.getClass().getSimpleName());
|
||||
if(!groups.contains(groupName))
|
||||
groups.add(groupName);
|
||||
|
||||
|
|
|
@ -42,6 +42,7 @@ import org.gcube.data_catalogue.grsf_publish_ws.utils.groups.Source;
|
|||
import org.gcube.data_catalogue.grsf_publish_ws.utils.groups.Status;
|
||||
import org.gcube.datacatalogue.ckanutillibrary.DataCatalogue;
|
||||
import org.gcube.datacatalogue.ckanutillibrary.DataCatalogueFactory;
|
||||
import org.junit.Test;
|
||||
import org.slf4j.LoggerFactory;
|
||||
|
||||
import com.fasterxml.jackson.core.JsonProcessingException;
|
||||
|
@ -520,5 +521,22 @@ public class JTests {
|
|||
HelperMethods.removeHTML(toTest);
|
||||
|
||||
}
|
||||
|
||||
//@Test
|
||||
public void fatherGroupAnnotation(){
|
||||
|
||||
Status status = Status.Confirmed;
|
||||
|
||||
// check if the field is an enumerator, and the enum class is also annotated with @Group
|
||||
if(status.getClass().isEnum() && status.getClass().isAnnotationPresent(Group.class)){
|
||||
|
||||
// extract the name from the enum class and add it to the groups
|
||||
// also convert to the group name that should be on ckan
|
||||
String groupName = HelperMethods.getGroupNameOnCkan(status.getClass().getSimpleName());
|
||||
logger.debug("Name is " +groupName );
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue