Example #1
0
 private ResourceNode nodeFromMap(Map<String, String> map) throws MalformedURLException {
   if (map == null) {
     return null;
   }
   ResourceNode node = new ResourceNode();
   System.out.println("MAP IS " + map);
   System.out.println("Setting hostname to " + map.get(NAME));
   node.setId(map.get(NAME));
   node.setIpAddr(new URL("http://" + map.get(NAME) + ":" + DEFAULT_PORT));
   return node;
 }