Instead of 4 lines you can just type
String s= rootnodeResolution.iterator().next().path("id").asText();