nikolas.laskaris 2014-02-20 14:45:58 +00:00
parent f8d7cb9a66
commit fb5cb30cd0
1 changed files with 8 additions and 1 deletions

View File

@ -125,7 +125,6 @@ public class GenericResource implements GenericResourceInfoI {
}
/**
* @return the name of the active VRE
*/
@ -453,9 +452,16 @@ public class GenericResource implements GenericResourceInfoI {
}
public List<ISGenericResource> getGenericResourcesByType(String type) throws RemoteException {
return getGenericResourcesByType(session.getScope(), type);
}
public static List<ISGenericResource> getGenericResourcesByType(String scope, String type) throws RemoteException {
ScopeProvider.instance.set(scope);
List<ISGenericResource> output = new ArrayList<ISGenericResource>();
SimpleQuery queryMan = null;
try {
client = clientFor(org.gcube.common.resources.gcore.GenericResource.class);
queryMan = queryFor(org.gcube.common.resources.gcore.GenericResource.class);
queryMan.addCondition("$resource/Profile/SecondaryType eq '"+type+"'");
List <org.gcube.common.resources.gcore.GenericResource> results = client.submit(queryMan);
@ -468,6 +474,7 @@ public class GenericResource implements GenericResourceInfoI {
}
}
/**
* @param id the id of the generic resource