return Response.ok(apj, Namespaces.MIME_TYPE_JSON).location(java.net.URI.create(user.stringValue())).build();
}
try {
RepositoryConnection conn = sesameService.getConnection();
try {
final UserAccount a = accountService.getAccount(user);
if (a != null) {
AccountPoJo apj = new AccountPoJo(a.getLogin(), a.getWebId());
apj.setRoles(a.getRoles());
for (Statement t : ResourceUtils.listOutgoing(conn,conn.getValueFactory().createURI(a.getWebId()))) {
String prop = t.getPredicate().stringValue();
if (prop.startsWith(Namespaces.NS_FOAF)) {
Value object = t.getObject();
if (object instanceof org.openrdf.model.URI) {
apj.setFoaf(prop, String.format("<%s>", object));