// }
// System.out.println("S=" + subject.toN3() + " P=" + predicate.toN3());
if (object instanceof Literal) {
Literal value = (Literal)object;
// Resolve the \\u0FF.. stuff
String cleanData = value.getUnescapedData();
try {
cleanData = URLDecoder.decode(cleanData, "utf8");
} catch (IllegalArgumentException e) {}
if (value.getDatatype() == null) {
return new DataTriple(subject.toN3(), predicate.toN3(), cleanData, value.getLanguageTag());
} else if (value.getDatatype().toN3().equals("<http://www.w3.org/2001/XMLSchema#double>")) {
return new DataTriple(subject.toN3(), predicate.toN3(), Double.parseDouble(value.getData()));
} else {
return new DataTriple(subject.toN3(), predicate.toN3(), cleanData, null);
}
} else {
Resource value = (Resource)object;
// System.out.println("OBJ " + value.toN3());
return new LinkTriple(subject.toN3(), predicate.toN3(), value.toN3());
}
}