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
|
@ -105,18 +105,22 @@ public class ISUtils {
|
||||||
|
|
||||||
public static Map<String,String> loadConfiguration(){
|
public static Map<String,String> loadConfiguration(){
|
||||||
HashMap<String,String> toReturn=new HashMap<>();
|
HashMap<String,String> toReturn=new HashMap<>();
|
||||||
String confXML= ISUtils.queryForGenericResources("gcat-feeder", "configuration").get(0).profile().bodyAsString();
|
try {
|
||||||
confXML=confXML.replaceAll(" ", "");
|
String confXML= ISUtils.queryForGenericResources("gcat-feeder", "configuration").get(0).profile().bodyAsString();
|
||||||
|
confXML=confXML.replaceAll(" ", "");
|
||||||
|
|
||||||
Document xml = convertStringToDocument(confXML);
|
Document xml = convertStringToDocument(confXML);
|
||||||
Node user = xml.getFirstChild();
|
Node user = xml.getFirstChild();
|
||||||
NodeList childs = user.getChildNodes();
|
NodeList childs = user.getChildNodes();
|
||||||
Node child;
|
Node child;
|
||||||
for (int i = 0; i < childs.getLength(); i++) {
|
for (int i = 0; i < childs.getLength(); i++) {
|
||||||
child = childs.item(i);
|
child = childs.item(i);
|
||||||
System.out.println(child.getNodeName());
|
System.out.println(child.getNodeName());
|
||||||
System.out.println(child.getTextContent());
|
System.out.println(child.getTextContent());
|
||||||
toReturn.put(child.getNodeName(), child.getTextContent());
|
toReturn.put(child.getNodeName(), child.getTextContent());
|
||||||
|
}
|
||||||
|
}catch(Throwable t) {
|
||||||
|
log.warn("Unable to load IS configuration",t);
|
||||||
}
|
}
|
||||||
return toReturn;
|
return toReturn;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue