minor fixes
git-svn-id: https://svn.d4science.research-infrastructures.eu/gcube/trunk/data-catalogue/ckan-util-library@142026 82a268e6-3cf1-43bd-a215-b396298e98cf
This commit is contained in:
parent
fbfee9aefb
commit
3991df8d00
|
@ -893,8 +893,6 @@ public class DataCatalogueImpl implements DataCatalogue{
|
|||
return res.getId();
|
||||
}
|
||||
|
||||
|
||||
|
||||
}catch(Exception e){
|
||||
|
||||
// try to update
|
||||
|
@ -2545,12 +2543,12 @@ public class DataCatalogueImpl implements DataCatalogue{
|
|||
|
||||
Set<Entry<CkanGroup, RolesCkanGroupOrOrg>> set = partialResult.entrySet();
|
||||
for (Entry<CkanGroup, RolesCkanGroupOrOrg> entry : set) {
|
||||
|
||||
|
||||
String groupName = entry.getKey().getName();
|
||||
HashMap<CkanGroup, RolesCkanGroupOrOrg> subMap = new HashMap<CkanGroup, RolesCkanGroupOrOrg>();
|
||||
subMap.put(entry.getKey(), entry.getValue());
|
||||
toReturn.put(groupName, subMap);
|
||||
|
||||
|
||||
}
|
||||
|
||||
logger.debug("Returning map " + toReturn);
|
||||
|
@ -2560,7 +2558,7 @@ public class DataCatalogueImpl implements DataCatalogue{
|
|||
|
||||
return toReturn;
|
||||
}
|
||||
|
||||
|
||||
@Override
|
||||
public Map<String, Map<CkanOrganization, RolesCkanGroupOrOrg>> getUserRoleByOrganization(
|
||||
String username, String apiKey) {
|
||||
|
@ -2577,12 +2575,12 @@ public class DataCatalogueImpl implements DataCatalogue{
|
|||
|
||||
Set<Entry<CkanOrganization, RolesCkanGroupOrOrg>> set = partialResult.entrySet();
|
||||
for (Entry<CkanOrganization, RolesCkanGroupOrOrg> entry : set) {
|
||||
|
||||
|
||||
String groupName = entry.getKey().getName();
|
||||
HashMap<CkanOrganization, RolesCkanGroupOrOrg> subMap = new HashMap<CkanOrganization, RolesCkanGroupOrOrg>();
|
||||
subMap.put(entry.getKey(), entry.getValue());
|
||||
toReturn.put(groupName, subMap);
|
||||
|
||||
|
||||
}
|
||||
|
||||
logger.debug("Returning map " + toReturn);
|
||||
|
|
|
@ -15,7 +15,6 @@ import org.gcube.datacatalogue.ckanutillibrary.server.models.CkanDatasetRelation
|
|||
import org.gcube.datacatalogue.ckanutillibrary.server.models.DatasetRelationships;
|
||||
import org.gcube.datacatalogue.ckanutillibrary.server.utils.UtilMethods;
|
||||
import org.gcube.datacatalogue.ckanutillibrary.shared.RolesCkanGroupOrOrg;
|
||||
import org.junit.Test;
|
||||
import org.slf4j.LoggerFactory;
|
||||
|
||||
import eu.trentorise.opendata.jackan.CheckedCkanClient;
|
||||
|
@ -504,5 +503,13 @@ public class TestDataCatalogueLib {
|
|||
public void getHigher(){
|
||||
logger.debug("Max is " + RolesCkanGroupOrOrg.getHigher(RolesCkanGroupOrOrg.ADMIN, RolesCkanGroupOrOrg.ADMIN));
|
||||
}
|
||||
|
||||
//@Test
|
||||
public void getUrlProduct() throws Exception{
|
||||
DataCatalogueImpl instance = factory.getUtilsPerScope(scope);
|
||||
String datasetName = "test_from_andrea_rossi";
|
||||
String url = instance.getUrlFromDatasetIdOrName(datasetName);
|
||||
logger.debug("url is " + url);
|
||||
}
|
||||
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue