git-svn-id: http://svn.research-infrastructures.eu/public/d4science/gcube/trunk/data-publishing/gCat-Feeder-Suite@179476 82a268e6-3cf1-43bd-a215-b396298e98cf
This commit is contained in:
parent
310ea7be51
commit
b50eb7a437
|
@ -59,7 +59,7 @@ public class ISUtils {
|
|||
|
||||
return client.submit(query);
|
||||
}
|
||||
|
||||
|
||||
public static List<ServiceEndpoint> queryForServiceEndpointsByName(String category, String name){
|
||||
log.debug("Querying for Service Endpoints [category : {} , name : {}, currentScope : {} ]",category,name,ContextUtils.getCurrentScope());
|
||||
|
||||
|
@ -105,18 +105,22 @@ public class ISUtils {
|
|||
|
||||
public static Map<String,String> loadConfiguration(){
|
||||
HashMap<String,String> toReturn=new HashMap<>();
|
||||
String confXML= ISUtils.queryForGenericResources("gcat-feeder", "configuration").get(0).profile().bodyAsString();
|
||||
confXML=confXML.replaceAll(" ", "");
|
||||
try {
|
||||
String confXML= ISUtils.queryForGenericResources("gcat-feeder", "configuration").get(0).profile().bodyAsString();
|
||||
confXML=confXML.replaceAll(" ", "");
|
||||
|
||||
Document xml = convertStringToDocument(confXML);
|
||||
Node user = xml.getFirstChild();
|
||||
NodeList childs = user.getChildNodes();
|
||||
Node child;
|
||||
for (int i = 0; i < childs.getLength(); i++) {
|
||||
child = childs.item(i);
|
||||
System.out.println(child.getNodeName());
|
||||
System.out.println(child.getTextContent());
|
||||
toReturn.put(child.getNodeName(), child.getTextContent());
|
||||
Document xml = convertStringToDocument(confXML);
|
||||
Node user = xml.getFirstChild();
|
||||
NodeList childs = user.getChildNodes();
|
||||
Node child;
|
||||
for (int i = 0; i < childs.getLength(); i++) {
|
||||
child = childs.item(i);
|
||||
System.out.println(child.getNodeName());
|
||||
System.out.println(child.getTextContent());
|
||||
toReturn.put(child.getNodeName(), child.getTextContent());
|
||||
}
|
||||
}catch(Throwable t) {
|
||||
log.warn("Unable to load IS configuration",t);
|
||||
}
|
||||
return toReturn;
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue