if(o instanceof TypedLiteral){
final TypedLiteral tl = (TypedLiteral) o;
if(tl.getType().compareTo("<http://www.w3.org/2001/XMLSchema#string>")==0) {
o = tl.getContent();
} else {
throw new TypeErrorException();
}
}
if(o instanceof String || o instanceof StringLiteral || o instanceof CodeMapLiteral){
try {
String s = Helper.trim(o.toString());
if(s.startsWith("'") || s.startsWith("\"")) {
s=s.substring(1, s.length()-1);
}
return LiteralFactory.createURILiteral("<"+s+">");
} catch (final URISyntaxException e) {
throw new TypeErrorException();
}
}
throw new TypeErrorException();
}