Map<String,RDFNode> row = new HashMap<String, RDFNode>();
for(Map.Entry<String,?> entry : ((Map<String,?>)o).entrySet()) {
Map<String,String> nodeDef = (Map<String,String>) entry.getValue();
RDFNode node = null;
if("uri".equalsIgnoreCase(nodeDef.get("type"))) {
node = new URI(nodeDef.get("value"));
} else if("literal".equalsIgnoreCase(nodeDef.get("type")) ||
"typed-literal".equalsIgnoreCase(nodeDef.get("type"))) {
String lang = nodeDef.get("xml:lang");
String datatype = nodeDef.get("datatype");
if(lang != null) {
node = new Literal(nodeDef.get("value"),lang);
} else if(datatype != null) {
node = new Literal(nodeDef.get("value"),new URI(datatype));
} else {
node = new Literal(nodeDef.get("value"));
}
} else if("bnode".equalsIgnoreCase(nodeDef.get("type"))) {
node = new BNode(nodeDef.get("value"));