updated code
git-svn-id: http://svn.d4science-ii.research-infrastructures.eu/gcube/trunk/portlets/user/uri-resolver-manager@101172 82a268e6-3cf1-43bd-a215-b396298e98cf
This commit is contained in:
parent
52c4462920
commit
508e8c051a
|
@ -99,15 +99,16 @@ public class UriResolverMapReader {
|
||||||
if (currValue != null && currValue.size() > 0) {
|
if (currValue != null && currValue.size() > 0) {
|
||||||
logger.info("Application Types are: "+currValue.size());
|
logger.info("Application Types are: "+currValue.size());
|
||||||
applicationTypes = new HashMap<String, String>(currValue.size());
|
applicationTypes = new HashMap<String, String>(currValue.size());
|
||||||
List<String> appTypes = currValue;
|
// List<String> appTypes = currValue;
|
||||||
for (String at : appTypes) {
|
//FOR EACH APPLICATION TYPE
|
||||||
|
for (String at : currValue) {
|
||||||
logger.info("Application Type "+at);
|
logger.info("Application Type "+at);
|
||||||
// currValue = helper.evaluate("/Resource/Profile/Body/EndPoint[Scope='"+scope.toString()+"']/Scope/text()");
|
// currValue = helper.evaluate("/Resource/Profile/Body/EndPoint[Scope='"+scope.toString()+"']/Scope/text()");
|
||||||
List<String> resources = helper.evaluate("/Resource/Profile/Body/access_point[application_type='"+at+"']/resource/text()");
|
List<String> resources = helper.evaluate("/Resource/Profile/Body/access_point[application_type='"+at+"']/resource/text()");
|
||||||
|
|
||||||
if(resources!=null && resources.size()>0){
|
if(resources!=null && resources.size()>0){
|
||||||
applicationTypes.put(at, resources.get(0));
|
applicationTypes.put(at, resources.get(0));
|
||||||
logger.info("Stored: "+at +" -> Resource: "+ currValue.get(0));
|
logger.info("Stored: "+at +" -> Resource: "+ resources.get(0));
|
||||||
}else
|
}else
|
||||||
logger.warn("Skipping Type "+at+" generic resource not found!");
|
logger.warn("Skipping Type "+at+" generic resource not found!");
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue