Map<String,Map<String,Set<Map<String,String>>>> subjects = mapper.readValue(data, new TypeReference<Map<String,Map<String,Set<Map<String,String>>>>>(){});
// convert "raw" map into a map to Metadata objects
Map<String,Metadata> result = new HashMap<String, Metadata>();
for(Map.Entry<String,Map<String,Set<Map<String,String>>>> subject : subjects.entrySet()) {
Metadata m = new Metadata(subject.getKey());
result.put(subject.getKey(),m);
for(Map.Entry<String,Set<Map<String,String>>> property : subject.getValue().entrySet()) {
Set<RDFNode> propValue = new HashSet<RDFNode>();
for(Map<String,String> value : property.getValue()) {
propValue.add(parseRDFJSONNode(value));
}
m.put(property.getKey(),propValue);
}
}
return result;
} catch (IOException e) {